2012-11-22 13:30:02 +01:00
|
|
|
#ifndef CS_EDITOR_H
|
|
|
|
#define CS_EDITOR_H
|
|
|
|
|
2012-11-23 14:05:49 +01:00
|
|
|
#include <QObject>
|
2013-03-31 18:00:46 +02:00
|
|
|
#ifndef Q_MOC_RUN
|
2013-03-07 03:00:59 +01:00
|
|
|
#include <components/files/configurationmanager.hpp>
|
2013-03-31 18:00:46 +02:00
|
|
|
#endif
|
2012-11-22 13:30:02 +01:00
|
|
|
#include "model/doc/documentmanager.hpp"
|
2013-02-02 16:14:58 +01:00
|
|
|
|
2012-11-22 13:30:02 +01:00
|
|
|
#include "view/doc/viewmanager.hpp"
|
2013-02-02 16:14:58 +01:00
|
|
|
#include "view/doc/startup.hpp"
|
2013-03-07 03:00:59 +01:00
|
|
|
#include "view/doc/filedialog.hpp"
|
2013-06-12 12:36:35 +02:00
|
|
|
#include "model/settings/usersettings.hpp"
|
2012-11-22 13:30:02 +01:00
|
|
|
|
|
|
|
namespace CS
|
|
|
|
{
|
2012-11-23 14:05:49 +01:00
|
|
|
class Editor : public QObject
|
2012-11-22 13:30:02 +01:00
|
|
|
{
|
2012-11-23 14:05:49 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
2013-06-12 12:36:35 +02:00
|
|
|
CSMSettings::UserSettings mUserSettings;
|
2012-11-22 13:30:02 +01:00
|
|
|
CSMDoc::DocumentManager mDocumentManager;
|
|
|
|
CSVDoc::ViewManager mViewManager;
|
2013-02-02 16:14:58 +01:00
|
|
|
CSVDoc::StartupDialogue mStartup;
|
2013-03-07 03:00:59 +01:00
|
|
|
FileDialog mFileDialog;
|
|
|
|
|
|
|
|
Files::ConfigurationManager mCfgMgr;
|
|
|
|
void setupDataFiles();
|
2012-11-22 13:30:02 +01:00
|
|
|
|
|
|
|
// not implemented
|
|
|
|
Editor (const Editor&);
|
|
|
|
Editor& operator= (const Editor&);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Editor();
|
|
|
|
|
|
|
|
int run();
|
|
|
|
///< \return error status
|
2012-11-23 14:05:49 +01:00
|
|
|
|
2013-02-02 16:14:58 +01:00
|
|
|
private slots:
|
2012-11-23 14:05:49 +01:00
|
|
|
|
|
|
|
void createDocument();
|
2013-02-02 16:14:58 +01:00
|
|
|
|
|
|
|
void loadDocument();
|
2013-02-05 22:06:36 +01:00
|
|
|
void openFiles();
|
2013-03-07 03:00:59 +01:00
|
|
|
void createNewFile();
|
2012-11-22 13:30:02 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2013-03-07 03:00:59 +01:00
|
|
|
#endif
|