1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 18:53:54 +00:00
openmw/apps/opencs/view/world/table.hpp

50 lines
951 B
C++
Raw Normal View History

#ifndef CSV_WORLD_TABLE_H
#define CSV_WORLD_TABLE_H
2012-11-30 12:58:10 +00:00
#include <vector>
#include <QTableView>
class QUndoStack;
class QAction;
namespace CSMWorld
{
class Data;
class UniversalId;
class IdTableProxyModel;
}
namespace CSVWorld
{
2012-11-30 12:58:10 +00:00
class CommandDelegate;
///< Table widget
class Table : public QTableView
{
Q_OBJECT
2012-11-30 12:58:10 +00:00
std::vector<CommandDelegate *> mDelegates;
QUndoStack& mUndoStack;
QAction *mCreateAction;
CSMWorld::IdTableProxyModel *mModel;
private:
void contextMenuEvent (QContextMenuEvent *event);
2012-11-30 12:58:10 +00:00
public:
Table (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack, bool createAndDelete);
///< \param createAndDelete Allow creation and deletion of records.
2012-11-30 12:58:10 +00:00
void setEditLock (bool locked);
private slots:
void createRecord();
};
}
#endif