1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 12:22:34 +01:00
openrw/rwviewer/views/ObjectViewer.hpp

57 lines
1.0 KiB
C++
Raw Normal View History

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