OpenMW
|
00001 #ifndef CS_EDITOR_H 00002 #define CS_EDITOR_H 00003 00004 #include <QObject> 00005 #include <QString> 00006 #include <QLocalServer> 00007 #include <QLocalSocket> 00008 00009 #ifndef Q_MOC_RUN 00010 #include <components/files/configurationmanager.hpp> 00011 #endif 00012 00013 #include "model/settings/usersettings.hpp" 00014 #include "model/doc/documentmanager.hpp" 00015 00016 #include "view/doc/viewmanager.hpp" 00017 #include "view/doc/startup.hpp" 00018 #include "view/doc/filedialog.hpp" 00019 #include "view/doc/newgame.hpp" 00020 00021 #include "view/settings/usersettingsdialog.hpp" 00022 00023 namespace CS 00024 { 00025 class Editor : public QObject 00026 { 00027 Q_OBJECT 00028 00029 Files::ConfigurationManager mCfgMgr; 00030 CSMSettings::UserSettings mUserSettings; 00031 CSMDoc::DocumentManager mDocumentManager; 00032 CSVDoc::ViewManager mViewManager; 00033 CSVDoc::StartupDialogue mStartup; 00034 CSVDoc::NewGameDialogue mNewGame; 00035 CSVSettings::UserSettingsDialog mSettings; 00036 CSVDoc::FileDialog mFileDialog; 00037 00038 boost::filesystem::path mLocal; 00039 00040 void setupDataFiles(); 00041 00042 // not implemented 00043 Editor (const Editor&); 00044 Editor& operator= (const Editor&); 00045 00046 public: 00047 00048 Editor(); 00049 00050 bool makeIPCServer(); 00051 void connectToIPCServer(); 00052 00053 int run(); 00055 00056 private slots: 00057 00058 void createGame(); 00059 void createAddon(); 00060 00061 void loadDocument(); 00062 void openFiles (const boost::filesystem::path &path); 00063 void createNewFile (const boost::filesystem::path& path); 00064 void createNewGame (const boost::filesystem::path& file); 00065 00066 void showStartup(); 00067 00068 void showSettings(); 00069 00070 private: 00071 00072 QString mIpcServerName; 00073 QLocalServer *mServer; 00074 QLocalSocket *mClientSocket; 00075 }; 00076 } 00077 00078 #endif