3 ** Copyright 2010 Mikko Keinänen
5 ** This file is part of EmuFront.
8 ** EmuFront is free software: you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License version 2 as published by
10 ** the Free Software Foundation and appearing in the file gpl.txt included in the
11 ** packaging of this file.
13 ** EmuFront is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
18 ** You should have received a copy of the GNU General Public License
19 ** along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
20 */#ifndef MAINWINDOW_H
23 #include <QMainWindow>
28 class PlatformEditView;
29 class MediaTypeEditView;
31 class MediaTypeDialog;
32 class MediaTypeEditView;
34 class MediaImagePathMainDialog;
35 class FilePathEditView;
37 class SetupMainDialog;
39 class ExecutableMainDialog;
40 //class TmpFolderEditDialog;
42 class DatabaseManager;
48 class MainWindow : public QMainWindow
53 MainWindow(bool reset = false);
57 void closeEvent(QCloseEvent *event);
61 void configurePlatforms();
62 void configurePlatformss();
64 void configureMediaTypes();
65 void configureMediaTypess();
67 void configureMediaImagePaths();
68 void configureMediaImagePathss();
70 void configureSetups();
71 void configureSetupss();
72 void configureEmulators();
73 void configureTmpDir();
76 void manageDatFiles();
80 static QString aboutStr;
81 static QString aboutTitle;
84 void createStatusBar();
88 void connectSignals();
89 void activateDialog(EmuFrontDialog*) const;
90 bool testDB(bool reset);
91 void createDB() const;
94 PlatformDialog *platformDialog;
95 PlatformEditView *plfDialog;
97 MediaTypeDialog *mediaTypeDialog;
98 MediaTypeEditView *mdtDialog;
100 MediaImagePathMainDialog *mediaImagePathDialog;
101 FilePathEditView *mediaImagePathView;
103 SetupMainDialog *setupMainDialog;
104 SetupEditView *setupMainView;
105 ExecutableMainDialog *executableMainDialog;
106 //TmpFolderEditDialog *tmpFolderDialog;
111 QAction *configPlatformAction;
112 QAction *configPlatformsAction;
114 QAction *configMediaTypeAction;
115 QAction *configMediaTypesAction;
117 QAction *configMediaImagePathAction;
118 QAction *configMediaImagePathsAction;
120 QAction *configSetupAction;
121 QAction *configSetupsAction;
122 QAction *configEmulatorAction;
124 QAction *resetDbAction;
125 QAction *aboutAction;
126 QAction *configTmpDirAction;
127 QAction *manageDatFilesAction;
128 QLabel *messageLabel;
129 DatabaseManager *dbManager;
130 EmuLauncher *launcher;
131 QString tmpDirFilePath;
132 QErrorMessage *errorMessage;