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
|
|
|
|
2015-06-12 13:10:12 +00:00
|
|
|
#include <QEvent>
|
2014-06-29 19:12:31 +00:00
|
|
|
|
2015-06-21 18:35:00 +00:00
|
|
|
#include "dragrecordtable.hpp"
|
|
|
|
|
2014-06-29 19:12:31 +00:00
|
|
|
class QAction;
|
2014-06-30 18:06:18 +00:00
|
|
|
class QContextMenuEvent;
|
2014-06-29 19:12:31 +00:00
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
2015-03-30 05:41:55 +00:00
|
|
|
class NestedTableProxyModel;
|
2014-06-30 11:09:10 +00:00
|
|
|
class UniversalId;
|
2015-04-24 23:39:37 +00:00
|
|
|
class CommandDispatcher;
|
2014-06-30 11:09:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
2014-06-29 19:12:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
2015-06-21 18:35:00 +00:00
|
|
|
class NestedTable : public DragRecordTable
|
2014-06-29 19:12:31 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QAction *mAddNewRowAction;
|
|
|
|
QAction *mRemoveRowAction;
|
2015-03-30 05:41:55 +00:00
|
|
|
CSMWorld::NestedTableProxyModel* mModel;
|
2015-04-24 23:39:37 +00:00
|
|
|
CSMWorld::CommandDispatcher *mDispatcher;
|
2015-03-06 03:36:13 +00:00
|
|
|
|
2014-06-29 19:12:31 +00:00
|
|
|
public:
|
2015-03-06 03:36:13 +00:00
|
|
|
NestedTable(CSMDoc::Document& document,
|
2015-04-24 23:39:37 +00:00
|
|
|
CSMWorld::UniversalId id,
|
2015-03-30 05:41:55 +00:00
|
|
|
CSMWorld::NestedTableProxyModel* model,
|
2014-06-30 11:09:10 +00:00
|
|
|
QWidget* parent = NULL);
|
2015-03-06 03:36:13 +00:00
|
|
|
|
2015-06-21 18:35:00 +00:00
|
|
|
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const;
|
2015-03-06 03:36:13 +00:00
|
|
|
|
2014-06-30 18:06:18 +00:00
|
|
|
private:
|
|
|
|
void contextMenuEvent (QContextMenuEvent *event);
|
2015-03-06 03:36:13 +00:00
|
|
|
|
2014-07-01 18:52:27 +00:00
|
|
|
private slots:
|
|
|
|
void removeRowActionTriggered();
|
2015-03-06 03:36:13 +00:00
|
|
|
|
2014-07-01 18:52:27 +00:00
|
|
|
void addNewRowActionTriggered();
|
2014-06-29 19:12:31 +00:00
|
|
|
};
|
|
|
|
}
|
2014-06-30 11:09:10 +00:00
|
|
|
|
|
|
|
#endif
|