1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 18:32:36 +00:00
OpenMW/apps/opencs/view/world/nestedtable.hpp

60 lines
1.2 KiB
C++
Raw Normal View History

2014-06-29 21:12:31 +02:00
#ifndef CSV_WORLD_NESTEDTABLE_H
#define CSV_WORLD_NESTEDTABLE_H
2014-06-29 21:12:31 +02:00
2015-06-21 21:35:00 +03:00
#include "dragrecordtable.hpp"
2022-10-19 19:02:00 +02:00
#include <string>
#include <vector>
2014-06-29 21:12:31 +02:00
class QAction;
2014-06-30 20:06:18 +02:00
class QContextMenuEvent;
2014-06-29 21:12:31 +02:00
namespace CSMWorld
{
2015-03-30 16:41:55 +11:00
class NestedTableProxyModel;
class UniversalId;
2015-04-25 09:39:37 +10:00
class CommandDispatcher;
}
namespace CSMDoc
{
class Document;
2014-06-29 21:12:31 +02:00
}
namespace CSVWorld
{
2015-07-04 19:27:42 +03:00
class TableEditIdAction;
2015-06-21 21:35:00 +03:00
class NestedTable : public DragRecordTable
2014-06-29 21:12:31 +02:00
{
Q_OBJECT
2022-09-22 21:26:05 +03:00
QAction* mAddNewRowAction;
QAction* mRemoveRowAction;
TableEditIdAction* mEditIdAction;
2015-03-30 16:41:55 +11:00
CSMWorld::NestedTableProxyModel* mModel;
2022-09-22 21:26:05 +03:00
CSMWorld::CommandDispatcher* mDispatcher;
2014-06-29 21:12:31 +02:00
public:
2022-09-22 21:26:05 +03:00
NestedTable(CSMDoc::Document& document, CSMWorld::UniversalId id, CSMWorld::NestedTableProxyModel* model,
QWidget* parent = nullptr, bool editable = true, bool fixedRows = false);
std::vector<CSMWorld::UniversalId> getDraggedRecords() const override;
2014-06-30 20:06:18 +02:00
private:
2022-09-22 21:26:05 +03:00
void contextMenuEvent(QContextMenuEvent* event) override;
2014-07-01 20:52:27 +02:00
private slots:
void removeRowActionTriggered();
2014-07-01 20:52:27 +02:00
void addNewRowActionTriggered();
2015-07-04 19:27:42 +03:00
void editCell();
signals:
2022-09-22 21:26:05 +03:00
void editRequest(const CSMWorld::UniversalId& id, const std::string& hint);
2014-06-29 21:12:31 +02:00
};
}
#endif