2020-03-19 09:36:36 +00:00
|
|
|
#ifndef IOMODESCONTROLLER_H
|
|
|
|
#define IOMODESCONTROLLER_H
|
|
|
|
|
|
|
|
#include "core/Cutter.h"
|
|
|
|
|
2020-05-23 11:41:12 +00:00
|
|
|
class IOModesController : public QObject
|
2020-03-19 09:36:36 +00:00
|
|
|
|
2020-05-23 11:41:12 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-03-19 09:36:36 +00:00
|
|
|
public:
|
2020-05-23 11:41:12 +00:00
|
|
|
enum class Mode { READ_ONLY, CACHE, WRITE };
|
2020-03-19 09:36:36 +00:00
|
|
|
bool prepareForWriting();
|
|
|
|
bool canWrite();
|
2020-05-23 11:41:12 +00:00
|
|
|
bool allChangesComitted();
|
|
|
|
Mode getIOMode();
|
|
|
|
void setIOMode(Mode mode);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
bool askCommitUnsavedChanges();
|
2020-03-19 09:36:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IOMODESCONTROLLER_H
|