Added configuration of temporary directory.
[emufront] / src / mainwindow.h
1 // EmuFront
2 // Copyright 2010 Mikko Keinänen
3 //
4 // This file is part of EmuFront.
5 //
6 //
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.
11 //
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.
16 //
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/>.
19
20 #ifndef MAINWINDOW_H
21 #define MAINWINDOW_H
22
23 #include <QMainWindow>
24
25 class QAction;
26 class PlatformDialog;
27 class MediaTypeDialog;
28 class MediaImagePathMainDialog;
29 class SetupMainDialog;
30 class ExecutableMainDialog;
31 //class TmpFolderEditDialog;
32 class QLabel;
33 class DatabaseManager;
34 class EmuFrontDialog;
35 class EmuLauncher;
36
37 class MainWindow : public QMainWindow
38 {
39         Q_OBJECT
40
41 public:
42         MainWindow();
43     //~MainWindow()
44
45 protected:
46         void closeEvent(QCloseEvent *event);
47
48 private slots:
49         void configurePlatforms();
50     void configureMediaTypes();
51     void configureMediaImagePaths();
52     void configureSetups();
53     void configureEmulators();
54     void configureTmpDir();
55     void updateData();
56     void about();
57
58 private:
59         void createActions();
60         void createMenus();
61         void createStatusBar();
62         void readSettings();
63         void writeSettings();
64         bool okToContinue();
65     void connectSignals();
66     void activateDialog(EmuFrontDialog*) const;
67         PlatformDialog *platformDialog;
68     MediaTypeDialog *mediaTypeDialog;
69     MediaImagePathMainDialog *mediaImagePathDialog;
70     SetupMainDialog *setupMainDialog;
71     ExecutableMainDialog *executableMainDialog;
72     //TmpFolderEditDialog *tmpFolderDialog;
73         QMenu *configMenu;
74     QMenu *fileMenu;
75     QMenu *helpMenu;
76     QAction *configPlatformAction;
77     QAction *configMediaTypeAction;
78     QAction *configMediaImagePathAction;
79     QAction *configSetupAction;
80     QAction *configEmulatorAction;
81     QAction *exitAction;
82     QAction *aboutAction;
83     QAction *configTmpDirAction;
84         QLabel *messageLabel;
85     DatabaseManager *dbManager;
86     EmuLauncher *launcher;
87     QString tmpDirFilePath;
88 };
89
90 #endif