41 lines
950 B
C
41 lines
950 B
C
|
#ifndef StabilityUndoRedoCommand_H
|
||
|
#define StabilityUndoRedoCommand_H
|
||
|
#include <QUndoCommand>
|
||
|
#include <QString>
|
||
|
#include "DataManager.h"
|
||
|
|
||
|
|
||
|
class StabilityUndoRedoCommand : public QUndoCommand
|
||
|
{
|
||
|
public:
|
||
|
StabilityUndoRedoCommand();
|
||
|
StabilityUndoRedoCommand(int& icommandid, IModel*& data,vector<string> commandLines = vector<string>());
|
||
|
StabilityUndoRedoCommand(int& icommandid,std::vector<IModel*>& data,vector<string> commandLines = vector<string>());
|
||
|
~StabilityUndoRedoCommand();
|
||
|
|
||
|
std::vector<IModel*>* getData();
|
||
|
|
||
|
void undo() override;
|
||
|
void redo() override;
|
||
|
|
||
|
int getCommandid()
|
||
|
{
|
||
|
return m_iCommandid;
|
||
|
}
|
||
|
vector<string> geCommands()
|
||
|
{
|
||
|
return m_commandLines;
|
||
|
}
|
||
|
void setCommands(vector<string>& c)
|
||
|
{
|
||
|
m_commandLines = c;
|
||
|
}
|
||
|
private:
|
||
|
|
||
|
int m_iCommandid;
|
||
|
vector<string> m_commandLines;
|
||
|
std::vector<IModel*> m_data;
|
||
|
};
|
||
|
|
||
|
#endif // StabilityUndoRedoManager_H
|