1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-03 09:09:47 +02:00
openrw/rwviewer/widgets/ItemListWidget.hpp

33 lines
662 B
C++
Raw Normal View History

2014-06-08 02:58:49 +02:00
#ifndef _ITEMLISTWIDGET_HPP_
#define _ITEMLISTWIDGET_HPP_
#include <QDockWidget>
#include <QLineEdit>
#include <QSortFilterProxyModel>
2016-09-09 22:13:21 +02:00
#include <QTableView>
2018-08-30 03:00:39 +02:00
#include "models/ItemListModel.hpp"
2014-06-08 02:58:49 +02:00
2016-09-09 22:13:21 +02:00
class ItemListWidget : public QDockWidget {
Q_OBJECT
QSortFilterProxyModel* filter;
ItemListModel* model;
QTableView* table;
QLineEdit* searchbox;
2014-06-08 02:58:49 +02:00
public:
2016-09-09 22:13:21 +02:00
ItemListWidget(QWidget* parent = 0, Qt::WindowFlags flags = 0);
2014-06-08 02:58:49 +02:00
signals:
2016-09-09 22:13:21 +02:00
void selectedItemChanged(const qint16 id);
2014-06-08 02:58:49 +02:00
public slots:
2016-09-09 22:13:21 +02:00
void worldLoaded(GameWorld* world);
2014-06-08 02:58:49 +02:00
2016-09-09 22:13:21 +02:00
void selectedIndexChanged(const QModelIndex& current);
2014-06-08 02:58:49 +02:00
2016-09-09 22:13:21 +02:00
void setFilter(const QString& f);
2014-06-08 02:58:49 +02:00
};
#endif