Commented out debug messages.
[emufront] / src / emulauncher.h
index c1acf6f..4998240 100644 (file)
@@ -5,9 +5,9 @@
 //
 //
 // EmuFront is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
+// it under the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation and appearing in the file gpl.txt included in the
+// packaging of this file.
 //
 // EmuFront is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #define EMULAUNCHER_H
 
 #include <QWidget>
+#include <QProcess>
 
 class QTableView;
-class QComboBox;
 class QPushButton;
+class QErrorMessage;
 class DbMediaType;
 class DbPlatform;
 class DbMediaImageContainer;
+class DbExecutable;
 class EFFileObjectComboBox;
+class ExecutableComboBox;
+class Executable;
+class MediaImageContainer;
+class EmuHelper;
 
 class EmuLauncher : public QWidget
 {
 Q_OBJECT
 public:
-    explicit EmuLauncher(QWidget *parent = 0);
+    EmuLauncher(QErrorMessage *, QWidget *parent = 0, QString tmp = ".");
+    ~EmuLauncher();
+    void updateData();
+    void setTmpDirPath(QString);
 
 signals:
 
 private slots:
     void updateMediaImageContainers();
+    void launchEmu();
+    void processError(QProcess::ProcessError);
+    void processFinished(int);
 
 private:
     QTableView *micTable;
     EFFileObjectComboBox *platformSelectBox;
     EFFileObjectComboBox *mediaTypeSelectBox;
+    ExecutableComboBox *execSelectBox;
     QPushButton *selectButton;
+    QPushButton *launchButton;
     DbPlatform *dbPlatform;
     DbMediaType *dbMediaType;
     DbMediaImageContainer *dbMic;
+    DbExecutable *dbExec;
+    EmuHelper *emuHelper;
     void initWidgets();
     void layout();
     void connectSignals();
     void populatePlatformSelectBox();
     void populateMediaTypeSelectBox();
+    void launch(const Executable*, const MediaImageContainer*);
+    void cleanTmp();
+    QString tmpDirPath;
+    QErrorMessage *errorMessage;
 };
 
 #endif // EMULAUNCHER_H