mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 10:19:55 +00:00
53 lines
1,012 B
C++
53 lines
1,012 B
C++
#ifndef CSV_WORLD_NESTEDTABLE_H
|
|
#define CSV_WORLD_NESTEDTABLE_H
|
|
|
|
#include <QTableView>
|
|
#include <QtGui/qevent.h>
|
|
|
|
class QUndoStack;
|
|
class QAction;
|
|
class QContextMenuEvent;
|
|
|
|
namespace CSMWorld
|
|
{
|
|
class NestedTableProxyModel;
|
|
class UniversalId;
|
|
}
|
|
|
|
namespace CSMDoc
|
|
{
|
|
class Document;
|
|
}
|
|
|
|
namespace CSVWorld
|
|
{
|
|
class NestedTable : public QTableView
|
|
{
|
|
Q_OBJECT
|
|
|
|
QAction *mAddNewRowAction;
|
|
QAction *mRemoveRowAction;
|
|
QUndoStack& mUndoStack;
|
|
CSMWorld::NestedTableProxyModel* mModel;
|
|
|
|
public:
|
|
NestedTable(CSMDoc::Document& document,
|
|
CSMWorld::NestedTableProxyModel* model,
|
|
QWidget* parent = NULL);
|
|
|
|
protected:
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
|
|
|
private:
|
|
void contextMenuEvent (QContextMenuEvent *event);
|
|
|
|
private slots:
|
|
void removeRowActionTriggered();
|
|
|
|
void addNewRowActionTriggered();
|
|
};
|
|
}
|
|
|
|
#endif
|