mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-12 12:38:02 +00:00
54 lines
997 B
C++
54 lines
997 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 NestedTableModel;
|
|
class UniversalId;
|
|
}
|
|
|
|
namespace CSMDoc
|
|
{
|
|
class Document;
|
|
}
|
|
|
|
namespace CSVWorld
|
|
{
|
|
class NestedTable : public QTableView
|
|
{
|
|
Q_OBJECT
|
|
|
|
QAction *mAddNewRowAction;
|
|
QAction *mRemoveRowAction;
|
|
QUndoStack& mUndoStack;
|
|
CSMWorld::NestedTableModel* mModel;
|
|
|
|
public:
|
|
NestedTable(CSMDoc::Document& document,
|
|
CSMWorld::NestedTableModel* 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
|