1 // Copyright (c) 2012 Dennco Project
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // Created by tkawata on Sep-30, 2012.
22 #include <QMainWindow>
24 #include <QSharedMemory>
31 class DCGLVisualizerWidget;
32 class DCTreeViewWidget;
33 class DCCellCodeScriptTreeViewWidget;
35 class MainWindow : public QMainWindow
40 explicit MainWindow(QWidget *parent = 0);
43 static QByteArray readSettingsForCellScriptsEditorGeometory();
44 static void writeSettingsForCellScriptsEditorGeometory(const QByteArray &value);
45 static QString readSettingsForExternalScriptEditorPath();
46 static QString readSettingsForExternalScriptEditorParameters();
47 static void writeSettingsForExternalScriptEditorPath(const QString& arg);
48 static void writeSettingsForExternalScriptEditorParameters(const QString& arg);
49 static bool openExternalEditorFor(const QString& path);
52 void closeEvent(QCloseEvent *event);
63 bool save(bool showMessage);
65 void doExternalEditorSetting();
67 void documentWasModified();
69 void manageCellCode();
74 void createOpenRecentMenu();
75 void createToolBars();
76 void createStatusBar();
80 bool openRecent(int idx);
81 void loadContent(const QString &contentDirectory);
82 void setCurrentContent(const QString &contentDirectory);
83 QString strippedName(const QString &fullFileName);
88 QMenu *openRecentMenu;
92 QToolBar *fileToolBar;
93 QToolBar *editToolBar;
94 QToolBar *playToolBar;
100 QAction *manageCellCodeAct;
105 QAction *externalEditorSettingAct;
107 QList<QAction*> openRecentActs;
111 DCCreator *d_creator;
112 DCGLVisualizerWidget *d_visualizerWidget;
113 DCTreeViewWidget *d_treeViewWidget;
114 DCCellCodeScriptTreeViewWidget *d_cellCodeScriptTreeViewWidget;
116 QString d_IPCServerName;
117 QStringList d_contentOpenHistory;
120 #endif // MAINWINDOW_H