2014-09-19 01:10:05 +02:00
|
|
|
#ifndef _OBJECTVIEWER_HPP_
|
|
|
|
#define _OBJECTVIEWER_HPP_
|
|
|
|
#include <engine/GameData.hpp>
|
|
|
|
#include <engine/GameWorld.hpp>
|
2016-05-15 21:25:20 +02:00
|
|
|
|
|
|
|
#include "ViewerInterface.hpp"
|
|
|
|
|
2014-09-21 17:13:01 +02:00
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QHBoxLayout>
|
2016-09-09 22:13:21 +02:00
|
|
|
#include <QLabel>
|
|
|
|
#include <QTableView>
|
2018-01-16 02:05:23 +01:00
|
|
|
#include <QSortFilterProxyModel>
|
2014-09-19 01:10:05 +02:00
|
|
|
|
|
|
|
class ViewerWidget;
|
2017-01-03 15:18:06 +01:00
|
|
|
class Clump;
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2018-01-16 02:05:23 +01:00
|
|
|
class ObjectSearchModel;
|
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
class ObjectViewer : public ViewerInterface {
|
|
|
|
Q_OBJECT
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
QTableView* objectList;
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
QHBoxLayout* mainLayout;
|
|
|
|
QGridLayout* infoLayout;
|
|
|
|
ViewerWidget* previewWidget;
|
|
|
|
QLabel* previewID;
|
|
|
|
QLabel* previewModel;
|
|
|
|
QLabel* previewClass;
|
2015-04-14 02:06:50 +02:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
QMenu* objectMenu;
|
|
|
|
QModelIndex contextMenuIndex;
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2018-01-16 02:05:23 +01:00
|
|
|
ObjectSearchModel* filterModel;
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2018-01-16 02:05:23 +01:00
|
|
|
public:
|
|
|
|
ObjectViewer(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
2014-09-21 17:13:01 +02:00
|
|
|
|
2016-05-15 21:25:20 +02:00
|
|
|
protected:
|
2016-09-09 22:13:21 +02:00
|
|
|
void worldChanged() override;
|
2016-05-15 21:25:20 +02:00
|
|
|
|
2015-04-13 02:48:29 +02:00
|
|
|
signals:
|
2016-09-09 22:13:21 +02:00
|
|
|
void showObjectModel(uint16_t object);
|
2015-04-14 02:06:50 +02:00
|
|
|
|
2014-09-19 01:10:05 +02:00
|
|
|
public slots:
|
2016-09-09 22:13:21 +02:00
|
|
|
void showItem(qint16 item);
|
2014-09-19 01:10:05 +02:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
void showItem(QModelIndex model);
|
2014-09-19 01:10:05 +02:00
|
|
|
|
2016-09-09 22:13:21 +02:00
|
|
|
void onCustomContextMenu(const QPoint&);
|
|
|
|
void menuViewModel();
|
2014-09-19 01:10:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|