1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 11:53:53 +00:00
openmw/apps/opencs/model/doc/document.hpp

81 lines
1.9 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-23 13:05:49 +00:00
#include <string>
2012-11-22 14:54:31 +00:00
#include <QUndoStack>
#include <QObject>
#include <QTimer>
2012-11-22 14:54:31 +00:00
#include "../world/data.hpp"
#include "../tools/tools.hpp"
#include "state.hpp"
2012-11-21 16:31:18 +00:00
namespace CSMDoc
{
class Document : public QObject
2012-11-21 16:31:18 +00:00
{
Q_OBJECT
private:
2012-11-23 13:05:49 +00:00
std::string mName; ///< \todo replace name with ESX list
2012-11-22 14:54:31 +00:00
QUndoStack mUndoStack;
CSMWorld::Data mData;
CSMTools::Tools mTools;
2012-11-22 14:54:31 +00:00
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.
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:
2012-11-23 13:05:49 +00:00
Document (const std::string& name);
///< \todo replace name with ESX list
2012-11-22 14:54:31 +00:00
QUndoStack& getUndoStack();
int getState() const;
2012-11-23 13:05:49 +00:00
const std::string& getName() const;
///< \todo replace with ESX list
void save();
void verify();
2012-11-23 11:20:35 +00:00
void abortOperation (int type);
const CSMWorld::Data& getData() const;
CSMWorld::Data& getData();
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 operationDone (int type);
void saving();
///< dummy implementation -> remove when proper save is implemented.
public slots:
void progress (int current, int max, int type);
2012-11-21 16:31:18 +00:00
};
}
#endif