2014-06-29 19:12:31 +00:00
|
|
|
#ifndef CSV_WORLD_NESTEDTABLE_H
|
2014-06-30 11:09:10 +00:00
|
|
|
#define CSV_WORLD_NESTEDTABLE_H
|
2014-06-29 19:12:31 +00:00
|
|
|
|
|
|
|
#include <QTableView>
|
|
|
|
#include <QtGui/qevent.h>
|
|
|
|
|
|
|
|
class QUndoStack;
|
|
|
|
class QAction;
|
2014-06-30 18:06:18 +00:00
|
|
|
class QContextMenuEvent;
|
2014-06-29 19:12:31 +00:00
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class NestedTableModel;
|
2014-06-30 11:09:10 +00:00
|
|
|
class UniversalId;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
2014-06-29 19:12:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class NestedTable : public QTableView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QAction *mAddNewRowAction;
|
|
|
|
QAction *mRemoveRowAction;
|
2014-06-30 14:03:38 +00:00
|
|
|
QUndoStack& mUndoStack;
|
2014-07-01 18:52:27 +00:00
|
|
|
CSMWorld::NestedTableModel* mModel;
|
2014-06-29 19:12:31 +00:00
|
|
|
|
|
|
|
public:
|
2014-06-30 11:09:10 +00:00
|
|
|
NestedTable(QUndoStack& undoStack,
|
|
|
|
CSMWorld::NestedTableModel* model,
|
|
|
|
QWidget* parent = NULL);
|
2014-06-29 19:12:31 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void dragEnterEvent(QDragEnterEvent *event);
|
|
|
|
|
|
|
|
void dragMoveEvent(QDragMoveEvent *event);
|
2014-06-30 18:06:18 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void contextMenuEvent (QContextMenuEvent *event);
|
2014-07-01 18:52:27 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void removeRowActionTriggered();
|
|
|
|
|
|
|
|
void addNewRowActionTriggered();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void addNewRow();
|
|
|
|
|
|
|
|
void removeRow(int row);
|
2014-06-29 19:12:31 +00:00
|
|
|
};
|
|
|
|
}
|
2014-06-30 11:09:10 +00:00
|
|
|
|
|
|
|
#endif
|