2014-09-19 01:10:05 +02:00
|
|
|
#pragma once
|
|
|
|
#ifndef _OBJECTVIEWER_HPP_
|
|
|
|
#define _OBJECTVIEWER_HPP_
|
|
|
|
#include <engine/GameData.hpp>
|
|
|
|
#include <engine/GameWorld.hpp>
|
|
|
|
#include <QGLWidget>
|
|
|
|
#include <QTableView>
|
|
|
|
#include <QLabel>
|
2014-09-21 17:13:01 +02:00
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QHBoxLayout>
|
2014-09-19 01:10:05 +02:00
|
|
|
|
|
|
|
class ViewerWidget;
|
2015-04-13 02:48:29 +02:00
|
|
|
class Model;
|
2014-09-19 01:10:05 +02:00
|
|
|
|
|
|
|
class ObjectViewer : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QTableView* objectList;
|
|
|
|
GameWorld* _world;
|
|
|
|
|
2014-09-21 17:13:01 +02:00
|
|
|
QHBoxLayout* mainLayout;
|
|
|
|
QGridLayout* infoLayout;
|
2014-09-19 01:10:05 +02:00
|
|
|
ViewerWidget* previewWidget;
|
|
|
|
QLabel* previewID;
|
|
|
|
QLabel* previewModel;
|
|
|
|
QLabel* previewClass;
|
|
|
|
public:
|
|
|
|
|
|
|
|
ObjectViewer(ViewerWidget *viewer = 0, QWidget* parent = 0, Qt::WindowFlags f = 0);
|
|
|
|
|
|
|
|
GameWorld* world()
|
|
|
|
{
|
|
|
|
return _world;
|
|
|
|
}
|
|
|
|
|
2014-09-21 17:13:01 +02:00
|
|
|
void setViewerWidget( ViewerWidget* widget );
|
|
|
|
|
2015-04-13 02:48:29 +02:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void modelChanged(Model* model);
|
|
|
|
|
2014-09-19 01:10:05 +02:00
|
|
|
public slots:
|
|
|
|
|
|
|
|
void showItem(qint16 item);
|
|
|
|
|
|
|
|
void showData(GameWorld* world);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void showItem(QModelIndex model);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|