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 PlatformMainDialog;
29 class MediaTypeMainDialog;
31 class MediaTypeDialog;
32 class MediaTypeMainDialog;
33 class MediaImagePathMainDialog;
34 class SetupMainDialog;
35 class ExecutableMainDialog;
36 //class TmpFolderEditDialog;
38 class DatabaseManager;
44 class MainWindow : public QMainWindow
49 MainWindow(bool reset = false);
53 void closeEvent(QCloseEvent *event);
57 void configurePlatforms();
58 void configurePlatformss();
60 void configureMediaTypes();
61 void configureMediaTypess();
62 void configureMediaImagePaths();
63 void configureSetups();
64 void configureEmulators();
65 void configureTmpDir();
68 void manageDatFiles();
72 static QString aboutStr;
73 static QString aboutTitle;
76 void createStatusBar();
80 void connectSignals();
81 void activateDialog(EmuFrontDialog*) const;
82 bool testDB(bool reset);
83 void createDB() const;
86 PlatformDialog *platformDialog;
87 PlatformMainDialog *plfDialog;
89 MediaTypeDialog *mediaTypeDialog;
90 MediaTypeMainDialog *mdtDialog;
91 MediaImagePathMainDialog *mediaImagePathDialog;
92 SetupMainDialog *setupMainDialog;
93 ExecutableMainDialog *executableMainDialog;
94 //TmpFolderEditDialog *tmpFolderDialog;
99 QAction *configPlatformAction;
100 QAction *configPlatformsAction;
102 QAction *configMediaTypeAction;
103 QAction *configMediaTypesAction;
104 QAction *configMediaImagePathAction;
105 QAction *configSetupAction;
106 QAction *configEmulatorAction;
108 QAction *resetDbAction;
109 QAction *aboutAction;
110 QAction *configTmpDirAction;
111 QAction *manageDatFilesAction;
112 QLabel *messageLabel;
113 DatabaseManager *dbManager;
114 EmuLauncher *launcher;
115 QString tmpDirFilePath;
116 QErrorMessage *errorMessage;