1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 11:49:56 +00:00
openmw-tes3mp/apps/opencs/model/doc/document.hpp
2012-11-23 10:25:34 +01:00

60 lines
No EOL
1.3 KiB
C++

#ifndef CSM_DOC_DOCUMENT_H
#define CSM_DOC_DOCUMENT_H
#include <QUndoStack>
#include <QObject>
#include <QTimer>
namespace CSMDoc
{
class Document : public QObject
{
Q_OBJECT
public:
enum State
{
State_Modified = 1,
State_Locked = 2,
State_Saving = 4,
State_Progress = 8
};
QUndoStack mUndoStack;
int mSaveCount; ///< dummy implementation -> remove when proper save is implemented.
QTimer mSaveTimer; ///< dummy implementation -> remove when proper save is implemented.
// not implemented
Document (const Document&);
Document& operator= (const Document&);
public:
Document();
QUndoStack& getUndoStack();
int getState() const;
void save();
void abortSave();
signals:
void stateChanged (int state, CSMDoc::Document *document);
void progress (int current, int max, CSMDoc::Document *document);
private slots:
void modificationStateChanged (bool clean);
void saving();
///< dummy implementation -> remove when proper save is implemented.
};
}
#endif