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;
34 class MainWindow : public QMainWindow
39 explicit MainWindow(QWidget *parent = 0);
42 static QByteArray readSettingsForCellScriptsEditorGeometory();
43 static void writeSettingsForCellScriptsEditorGeometory(const QByteArray &value);
44 static QString readSettingsForExternalScriptEditorPath();
45 static QString readSettingsForExternalScriptEditorParameters();
46 static void writeSettingsForExternalScriptEditorPath(const QString& arg);
47 static void writeSettingsForExternalScriptEditorParameters(const QString& arg);
50 void closeEvent(QCloseEvent *event);
61 bool save(bool showMessage);
63 void doExternalEditorSetting();
65 void documentWasModified();
67 void manageCellCode();
72 void createOpenRecentMenu();
73 void createToolBars();
74 void createStatusBar();
78 bool openRecent(int idx);
79 void loadContent(const QString &contentDirectory);
80 void setCurrentContent(const QString &contentDirectory);
81 QString strippedName(const QString &fullFileName);
86 QMenu *openRecentMenu;
90 QToolBar *fileToolBar;
91 QToolBar *editToolBar;
92 QToolBar *playToolBar;
98 QAction *manageCellCodeAct;
103 QAction *externalEditorSettingAct;
105 QList<QAction*> openRecentActs;
109 DCCreator *d_creator;
110 DCGLVisualizerWidget *d_visualizerWidget;
111 DCTreeViewWidget *d_treeViewWidget;
113 QString d_IPCServerName;
114 QStringList d_contentOpenHistory;
117 #endif // MAINWINDOW_H