1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/opencs/model/doc/document.hpp

57 lines
1.2 KiB
C++
Raw Normal View History

2012-11-22 13:30:02 +01:00
#ifndef CSM_DOC_DOCUMENT_H
#define CSM_DOC_DOCUMENT_H
2012-11-21 17:31:18 +01:00
2012-11-22 15:54:31 +01:00
#include <QUndoStack>
#include <QObject>
#include <QTimer>
2012-11-22 15:54:31 +01:00
2012-11-21 17:31:18 +01:00
namespace CSMDoc
{
class Document : public QObject
2012-11-21 17:31:18 +01:00
{
Q_OBJECT
public:
enum State
{
State_Modified = 1,
State_Locked = 2,
State_Saving = 4
};
2012-11-22 15:54:31 +01:00
QUndoStack mUndoStack;
int mSaveCount; ///< dummy implementation -> remove when proper save is implemented.
QTimer mSaveTimer; ///< dummy implementation -> remove when proper save is implemented.
2012-11-22 13:30:02 +01:00
// not implemented
2012-11-21 17:31:18 +01:00
Document (const Document&);
Document& operator= (const Document&);
public:
Document();
2012-11-22 15:54:31 +01:00
QUndoStack& getUndoStack();
int getState() const;
void save();
void abortSave();
signals:
void stateChanged (int state, CSMDoc::Document *document);
private slots:
void modificationStateChanged (bool clean);
void saving();
///< dummy implementation -> remove when proper save is implemented.
2012-11-21 17:31:18 +01:00
};
}
#endif