You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
C++
57 lines
1.1 KiB
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;
|
|
class CommandDispatcher;
|
|
}
|
|
|
|
namespace CSMDoc
|
|
{
|
|
class Document;
|
|
}
|
|
|
|
namespace CSVWorld
|
|
{
|
|
class NestedTable : public QTableView
|
|
{
|
|
Q_OBJECT
|
|
|
|
QAction *mAddNewRowAction;
|
|
QAction *mRemoveRowAction;
|
|
QUndoStack& mUndoStack;
|
|
CSMWorld::NestedTableProxyModel* mModel;
|
|
CSMWorld::CommandDispatcher *mDispatcher;
|
|
|
|
public:
|
|
NestedTable(CSMDoc::Document& document,
|
|
CSMWorld::UniversalId id,
|
|
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
|