Updated the git clone command.
[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 Executable;
33 class MediaImageContainer;
34 class EmuHelper;
35 class SetupModel;
36 class ExternalExecutableModel;
37 class MediaImageContainerModel;
38
39 class EmuLauncher : public QWidget
40 {
41 Q_OBJECT
42 public:
43     EmuLauncher(QErrorMessage *, SetupModel *supModel, 
44                         ExternalExecutableModel *emuModel, 
45                         QWidget *parent = 0, QString tmp = ".");
46     ~EmuLauncher();
47     void updateData();
48     void setTmpDirPath(QString);
49
50 signals:
51
52 private slots:
53     void updateMediaImageContainers();
54     void launchEmu();
55     void processError(QProcess::ProcessError);
56     void processFinished(int);
57
58 private:
59     QTableView *micTable;
60     QComboBox *setupSelectBox;
61     QComboBox *execSelectBox;
62     QPushButton *selectButton;
63     QPushButton *launchButton;
64     EmuHelper *emuHelper;
65     void initWidgets();
66     void layout();
67     void connectSignals();
68     void launch(const Executable*, const MediaImageContainer*);
69     void cleanTmp();
70     QString tmpDirPath;
71     QErrorMessage *errorMessage;
72     SetupModel *supModel;
73     MediaImageContainerModel *micModel;
74     ExternalExecutableModel *emuModel;
75 };
76
77 #endif // EMULAUNCHER_H