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>
27 class PlatformMainDialog;
28 class MediaTypeDialog;
29 class MediaImagePathMainDialog;
30 class SetupMainDialog;
31 class ExecutableMainDialog;
32 //class TmpFolderEditDialog;
34 class DatabaseManager;
40 class MainWindow : public QMainWindow
45 MainWindow(bool reset = false);
49 void closeEvent(QCloseEvent *event);
52 void configurePlatforms();
53 void configurePlatformss();
54 void configureMediaTypes();
55 void configureMediaImagePaths();
56 void configureSetups();
57 void configureEmulators();
58 void configureTmpDir();
61 void manageDatFiles();
65 static QString aboutStr;
66 static QString aboutTitle;
69 void createStatusBar();
73 void connectSignals();
74 void activateDialog(EmuFrontDialog*) const;
75 bool testDB(bool reset);
76 void createDB() const;
77 PlatformDialog *platformDialog;
78 PlatformMainDialog *plfDialog;
79 MediaTypeDialog *mediaTypeDialog;
80 MediaImagePathMainDialog *mediaImagePathDialog;
81 SetupMainDialog *setupMainDialog;
82 ExecutableMainDialog *executableMainDialog;
83 //TmpFolderEditDialog *tmpFolderDialog;
87 QAction *configPlatformAction;
88 QAction *configPlatformsAction;
89 QAction *configMediaTypeAction;
90 QAction *configMediaImagePathAction;
91 QAction *configSetupAction;
92 QAction *configEmulatorAction;
94 QAction *resetDbAction;
96 QAction *configTmpDirAction;
97 QAction *manageDatFilesAction;
99 DatabaseManager *dbManager;
100 EmuLauncher *launcher;
101 QString tmpDirFilePath;
102 QErrorMessage *errorMessage;