Implemented ExternalExecutableEditView utilising
[emufront] / src / mainwindow.h
1 /*
2 ** EmuFront
3 ** Copyright 2010 Mikko Keinänen
4 **
5 ** This file is part of EmuFront.
6 **
7 **
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.
12 **
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.
17 **
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
21 #define MAINWINDOW_H
22
23 #include <QMainWindow>
24
25 class QAction;
26 // TODO: DEPRECATED
27 class PlatformDialog;
28 class PlatformEditView;
29 class MediaTypeEditView;
30 // TODO: DEPRECATED
31 class MediaTypeDialog;
32 class MediaTypeEditView;
33 // TODO: DEPRECATED
34 class MediaImagePathMainDialog;
35 class FilePathEditView;
36 // TODO: DEPRECATED
37 class SetupMainDialog;
38 class SetupEditView;
39 // TODO: DEPRECATED
40 class ExecutableMainDialog;
41 class ExternalExecutableEditView;
42 //class TmpFolderEditDialog;
43 class QLabel;
44 class DatabaseManager;
45 class EmuFrontDialog;
46 class EmuLauncher;
47 class DatFileUtil;
48 class QErrorMessage;
49
50 class MainWindow : public QMainWindow
51 {
52         Q_OBJECT
53
54 public:
55     MainWindow(bool reset = false);
56     //~MainWindow()
57
58 protected:
59         void closeEvent(QCloseEvent *event);
60
61 private slots:
62     // TODO: DEPRECATED
63     void configurePlatforms();
64     void configurePlatformss();
65     // TODO: DEPRECATED
66     void configureMediaTypes();
67     void configureMediaTypess();
68     // TODO: DEPRECATED
69     void configureMediaImagePaths();
70     void configureMediaImagePathss();
71     // TODO: DEPRECATED
72     void configureSetups();
73     void configureSetupss();
74     // TODO: DEPRECATED
75     void configureEmulators();
76     void configureEmulatorss();
77     void configureTmpDir();
78     void resetDb();
79     void updateData();
80     void manageDatFiles();
81     void about();
82
83 private:
84     static QString aboutStr;
85     static QString aboutTitle;
86     void createActions();
87         void createMenus();
88         void createStatusBar();
89         void readSettings();
90         void writeSettings();
91         bool okToContinue();
92     void connectSignals();
93     void activateDialog(EmuFrontDialog*) const;
94     bool testDB(bool reset);
95     void createDB() const;
96
97     // TODO: deprecated
98     PlatformDialog *platformDialog;
99     PlatformEditView *plfDialog;
100     // TODO: deprecated
101     MediaTypeDialog *mediaTypeDialog;
102     MediaTypeEditView *mdtDialog;
103     // TODO: DEPRECATED
104     MediaImagePathMainDialog *mediaImagePathDialog;
105     FilePathEditView *mediaImagePathView;
106     // TODO: deprecated
107     SetupMainDialog *setupMainDialog;
108     SetupEditView *setupMainView;
109     // TODO: deprecated
110     ExecutableMainDialog *executableMainDialog;
111     ExternalExecutableEditView *emulatorEditView;
112     //TmpFolderEditDialog *tmpFolderDialog;
113         QMenu *configMenu;
114     QMenu *fileMenu;
115     QMenu *helpMenu;
116     // TODO: deprecated
117     QAction *configPlatformAction;
118     QAction *configPlatformsAction;
119     // TODO: deprecated
120     QAction *configMediaTypeAction;
121     QAction *configMediaTypesAction;
122     // TODO: DEPRECATED
123     QAction *configMediaImagePathAction;
124     QAction *configMediaImagePathsAction;
125     // TODO: deprecated
126     QAction *configSetupAction;
127     QAction *configSetupsAction;
128     // TODO: deprecated
129     QAction *configEmulatorAction;
130     QAction *configEmulatorsAction;
131     QAction *exitAction;
132     QAction *resetDbAction;
133     QAction *aboutAction;
134     QAction *configTmpDirAction;
135     QAction *manageDatFilesAction;
136         QLabel *messageLabel;
137     DatabaseManager *dbManager;
138     EmuLauncher *launcher;
139     QString tmpDirFilePath;
140     QErrorMessage *errorMessage;
141 };
142
143 #endif