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>
|
2012-11-22 22:42:17 +00:00
|
|
|
#include <QObject>
|
2012-11-22 14:54:31 +00:00
|
|
|
|
2012-11-21 16:31:18 +00:00
|
|
|
namespace CSMDoc
|
|
|
|
{
|
2012-11-22 22:42:17 +00:00
|
|
|
class Document : public QObject
|
2012-11-21 16:31:18 +00:00
|
|
|
{
|
2012-11-22 22:42:17 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum State
|
|
|
|
{
|
|
|
|
State_Modified = 1
|
|
|
|
};
|
|
|
|
|
2012-11-22 14:54:31 +00:00
|
|
|
QUndoStack mUndoStack;
|
|
|
|
|
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();
|
2012-11-22 22:42:17 +00:00
|
|
|
|
|
|
|
int getState() const;
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void stateChanged (int state, CSMDoc::Document *document);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void modificationStateChanged (bool clean);
|
2012-11-21 16:31:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|