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

68 lines
1.7 KiB
C++
Raw Normal View History

2012-11-22 12:30:02 +00:00
#ifndef CSM_DOC_DOCUMENT_H
#define CSM_DOC_DOCUMENT_H
2012-11-21 16:31:18 +00:00
2012-11-22 14:54:31 +00:00
#include <QUndoStack>
#include <QObject>
#include <QTimer>
2012-11-22 14:54:31 +00:00
2012-11-21 16:31:18 +00:00
namespace CSMDoc
{
class Document : public QObject
2012-11-21 16:31:18 +00:00
{
Q_OBJECT
public:
enum State
{
State_Modified = 1,
State_Locked = 2,
State_Saving = 4,
State_Verifying = 8
};
2012-11-22 14:54:31 +00:00
QUndoStack mUndoStack;
int mSaveCount; ///< dummy implementation -> remove when proper save is implemented.
QTimer mSaveTimer; ///< dummy implementation -> remove when proper save is implemented.
int mVerifyCount; ///< dummy implementation -> remove when proper verify is implemented.
QTimer mVerifyTimer; ///< dummy implementation -> remove when proper verify is implemented.
2012-11-22 12:30:02 +00:00
// not implemented
2012-11-21 16:31:18 +00:00
Document (const Document&);
Document& operator= (const Document&);
public:
Document();
2012-11-22 14:54:31 +00:00
QUndoStack& getUndoStack();
int getState() const;
void save();
void verify();
2012-11-23 11:20:35 +00:00
void abortOperation (int type);
signals:
void stateChanged (int state, CSMDoc::Document *document);
2012-11-23 11:20:35 +00:00
void progress (int current, int max, int type, int threads, CSMDoc::Document *document);
2012-11-23 09:25:34 +00:00
private slots:
void modificationStateChanged (bool clean);
void saving();
///< dummy implementation -> remove when proper save is implemented.
void verifying();
///< dummy implementation -> remove when proper verify is implemented.
2012-11-21 16:31:18 +00:00
};
}
#endif