mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 15:15:32 +00:00
66 lines
1.2 KiB
C++
66 lines
1.2 KiB
C++
|
#ifndef CSM_WOLRD_PATHGRIDCOMMANDS_H
|
||
|
#define CSM_WOLRD_PATHGRIDCOMMANDS_H
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
#include "commands.hpp"
|
||
|
|
||
|
namespace CSVRender
|
||
|
{
|
||
|
class Cell;
|
||
|
}
|
||
|
|
||
|
namespace CSMWorld
|
||
|
{
|
||
|
class IdTree;
|
||
|
class NestedTableWrapperBase;
|
||
|
|
||
|
class ModifyPathgridCommand : public QObject, public QUndoCommand, private NestedTableStoring
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
IdTree& mModel;
|
||
|
std::string mId;
|
||
|
|
||
|
int mParentColumn;
|
||
|
|
||
|
NestedTableWrapperBase* mRecord;
|
||
|
|
||
|
public:
|
||
|
|
||
|
ModifyPathgridCommand(IdTree& model,
|
||
|
const std::string& id, int parentColumn, NestedTableWrapperBase* newRecord,
|
||
|
QUndoCommand* parent = 0);
|
||
|
|
||
|
virtual void redo();
|
||
|
|
||
|
virtual void undo();
|
||
|
|
||
|
signals:
|
||
|
|
||
|
void undoActioned();
|
||
|
};
|
||
|
|
||
|
class SignalHandler : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
CSVRender::Cell *mParent;
|
||
|
|
||
|
public:
|
||
|
|
||
|
SignalHandler (CSVRender::Cell *parent);
|
||
|
|
||
|
void connectToCommand(const ModifyPathgridCommand *command);
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void rebuildPathgrid();
|
||
|
|
||
|
signals:
|
||
|
|
||
|
void flagAsModified();
|
||
|
};
|
||
|
}
|
||
|
#endif // CSM_WOLRD_PATHGRIDCOMMANDS_H
|