1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 12:22:34 +01:00
openrw/rwviewer/views/ObjectViewer.hpp
Daniel Evans 6f9c3db52e Overahaul of rwviewer to simplify the code and improve usability
- Shared ViewerWidget has been removed. Now multiple instances exist
2018-01-27 21:44:18 +00:00

57 lines
1.0 KiB
C++

#ifndef _OBJECTVIEWER_HPP_
#define _OBJECTVIEWER_HPP_
#include <engine/GameData.hpp>
#include <engine/GameWorld.hpp>
#include "ViewerInterface.hpp"
#include <QGridLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QTableView>
#include <QSortFilterProxyModel>
class ViewerWidget;
class Clump;
class ObjectSearchModel;
class ObjectViewer : public ViewerInterface {
Q_OBJECT
QTableView* objectList;
QHBoxLayout* mainLayout;
QGridLayout* infoLayout;
ViewerWidget* previewWidget;
QLabel* previewID;
QLabel* previewModel;
QLabel* previewClass;
QMenu* objectMenu;
QModelIndex contextMenuIndex;
ObjectSearchModel* filterModel;
public:
ObjectViewer(QWidget* parent = 0, Qt::WindowFlags f = 0);
protected:
void worldChanged() override;
signals:
void showObjectModel(uint16_t object);
public slots:
void showItem(qint16 item);
private slots:
void showItem(QModelIndex model);
void onCustomContextMenu(const QPoint&);
void menuViewModel();
};
#endif