2 // Copyright 2010 Mikko Keinänen
4 // This file is part of EmuFront.
7 // EmuFront is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2 as published by
9 // the Free Software Foundation and appearing in the file gpl.txt included in the
10 // packaging of this file.
12 // EmuFront is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
23 #include <QMainWindow>
28 class PlatformEditView;
29 class MediaTypeEditView;
31 class MediaTypeDialog;
32 class MediaTypeEditView;
33 class MediaImagePathMainDialog;
35 class SetupMainDialog;
37 class ExecutableMainDialog;
38 //class TmpFolderEditDialog;
40 class DatabaseManager;
46 class MainWindow : public QMainWindow
51 MainWindow(bool reset = false);
55 void closeEvent(QCloseEvent *event);
59 void configurePlatforms();
60 void configurePlatformss();
62 void configureMediaTypes();
63 void configureMediaTypess();
64 void configureMediaImagePaths();
66 void configureSetups();
67 void configureSetupss();
68 void configureEmulators();
69 void configureTmpDir();
72 void manageDatFiles();
76 static QString aboutStr;
77 static QString aboutTitle;
80 void createStatusBar();
84 void connectSignals();
85 void activateDialog(EmuFrontDialog*) const;
86 bool testDB(bool reset);
87 void createDB() const;
90 PlatformDialog *platformDialog;
91 PlatformEditView *plfDialog;
93 MediaTypeDialog *mediaTypeDialog;
94 MediaTypeEditView *mdtDialog;
95 MediaImagePathMainDialog *mediaImagePathDialog;
97 SetupMainDialog *setupMainDialog;
98 SetupEditView *setupMainView;
99 ExecutableMainDialog *executableMainDialog;
100 //TmpFolderEditDialog *tmpFolderDialog;
105 QAction *configPlatformAction;
106 QAction *configPlatformsAction;
108 QAction *configMediaTypeAction;
109 QAction *configMediaTypesAction;
110 QAction *configMediaImagePathAction;
112 QAction *configSetupAction;
113 QAction *configSetupsAction;
114 QAction *configEmulatorAction;
116 QAction *resetDbAction;
117 QAction *aboutAction;
118 QAction *configTmpDirAction;
119 QAction *manageDatFilesAction;
120 QLabel *messageLabel;
121 DatabaseManager *dbManager;
122 EmuLauncher *launcher;
123 QString tmpDirFilePath;
124 QErrorMessage *errorMessage;