2014-06-29 21:12:31 +02:00
|
|
|
#ifndef CSV_WORLD_NESTEDTABLE_H
|
2014-06-30 13:09:10 +02:00
|
|
|
#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;
|
2014-06-30 13:09:10 +02:00
|
|
|
class UniversalId;
|
2015-04-25 09:39:37 +10:00
|
|
|
class CommandDispatcher;
|
2014-06-30 13:09:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-06-29 21:12:31 +02:00
|
|
|
public:
|
2015-03-06 14:36:13 +11:00
|
|
|
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,
|
2014-06-30 13:09:10 +02:00
|
|
|
QWidget* parent = NULL);
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-06-29 21:12:31 +02:00
|
|
|
protected:
|
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-06-29 21:12:31 +02:00
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-06-30 20:06:18 +02:00
|
|
|
private:
|
|
|
|
void contextMenuEvent (QContextMenuEvent *event);
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-07-01 20:52:27 +02:00
|
|
|
private slots:
|
|
|
|
void removeRowActionTriggered();
|
2015-03-06 14:36:13 +11:00
|
|
|
|
2014-07-01 20:52:27 +02:00
|
|
|
void addNewRowActionTriggered();
|
2014-06-29 21:12:31 +02:00
|
|
|
};
|
|
|
|
}
|
2014-06-30 13:09:10 +02:00
|
|
|
|
|
|
|
#endif
|