1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 08:49:55 +00:00
openmw-tes3mp/apps/opencs/view/world/nestedtable.hpp
2014-07-01 20:52:27 +02:00

58 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 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(QUndoStack& undoStack,
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();
signals:
void addNewRow();
void removeRow(int row);
};
}
#endif