Some models were still needed: FileModel and MediaImageModel extending
[emufront] / src / emulauncher.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 */
21
22 #ifndef EMULAUNCHER_H
23 #define EMULAUNCHER_H
24
25 #include <QWidget>
26 #include <QProcess>
27
28 class QTableView;
29 class QPushButton;
30 class QComboBox;
31 class QErrorMessage;
32 //class DbMediaImageContainer;
33 class Executable;
34 class MediaImageContainer;
35 class EmuHelper;
36
37 class EmuLauncher : public QWidget
38 {
39 Q_OBJECT
40 public:
41     EmuLauncher(QErrorMessage *, QWidget *parent = 0, QString tmp = ".");
42     ~EmuLauncher();
43     void updateData();
44     void setTmpDirPath(QString);
45
46 signals:
47
48 private slots:
49     void updateMediaImageContainers();
50     void launchEmu();
51     void processError(QProcess::ProcessError);
52     void processFinished(int);
53
54 private:
55     QTableView *micTable;
56     QComboBox *setupSelectBox;
57     QComboBox *execSelectBox;
58     QPushButton *selectButton;
59     QPushButton *launchButton;
60     //DbMediaImageContainer *dbMic;
61     EmuHelper *emuHelper;
62     void initWidgets();
63     void layout();
64     void connectSignals();
65     void launch(const Executable*, const MediaImageContainer*);
66     void cleanTmp();
67     QString tmpDirPath;
68     QErrorMessage *errorMessage;
69 };
70
71 #endif // EMULAUNCHER_H