1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00
OpenMW/apps/opencs/view/world/nestedtable.hpp

57 lines
1.1 KiB
C++
Raw Normal View History

2014-06-29 21:12:31 +02:00
#ifndef CSV_WORLD_NESTEDTABLE_H
#define CSV_WORLD_NESTEDTABLE_H
2014-06-29 21:12:31 +02:00
#include <QTableView>
#include <QtGui/qevent.h>
class QUndoStack;
class QAction;
2014-06-30 20:06:18 +02:00
class QContextMenuEvent;
2014-06-29 21:12:31 +02:00
namespace CSMWorld
{
2015-03-30 16:41:55 +11:00
class NestedTableProxyModel;
class UniversalId;
2015-04-25 09:39:37 +10:00
class CommandDispatcher;
}
namespace CSMDoc
{
class Document;
2014-06-29 21:12:31 +02:00
}
namespace CSVWorld
{
class NestedTable : public QTableView
{
Q_OBJECT
QAction *mAddNewRowAction;
QAction *mRemoveRowAction;
2014-06-30 16:03:38 +02:00
QUndoStack& mUndoStack;
2015-03-30 16:41:55 +11:00
CSMWorld::NestedTableProxyModel* mModel;
2015-04-25 09:39:37 +10:00
CSMWorld::CommandDispatcher *mDispatcher;
2014-06-29 21:12:31 +02:00
public:
NestedTable(CSMDoc::Document& document,
2015-04-25 09:39:37 +10:00
CSMWorld::UniversalId id,
2015-03-30 16:41:55 +11:00
CSMWorld::NestedTableProxyModel* model,
QWidget* parent = NULL);
2014-06-29 21:12:31 +02:00
protected:
void dragEnterEvent(QDragEnterEvent *event);
2014-06-29 21:12:31 +02:00
void dragMoveEvent(QDragMoveEvent *event);
2014-06-30 20:06:18 +02:00
private:
void contextMenuEvent (QContextMenuEvent *event);
2014-07-01 20:52:27 +02:00
private slots:
void removeRowActionTriggered();
2014-07-01 20:52:27 +02:00
void addNewRowActionTriggered();
2014-06-29 21:12:31 +02:00
};
}
#endif