Fixed a bug: the edit dialog fields were not cleared if an
[emufront] / src / dialogs / mediaimagepathdialog.h
index cc0fa4c..358d962 100644 (file)
@@ -5,34 +5,34 @@
 //
 //
 // 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.
 //
-// Foobar is distributed in the hope that it will be useful,
+// EmuFront is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
 //
 // You should have received a copy of the GNU General Public License
-// along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
+// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
 
 #ifndef MEDIAIMAGEPATHDIALOG_H
 #define MEDIAIMAGEPATHDIALOG_H
 
-#include "dataobjecteditdialog.h"
+#include "browsefilepathdialog.h"
 
-class QDialogButtonBox;
-class QComboBox;
-class QLabel;
-class QPushButton;
-class QSqlTableModel;
+//class QDialogButtonBox;
+//class QLabel;
+//class QPushButton;
+//class QSqlTableModel;
 class DbSetup;
 class Setup;
 class DbMediaType;
 class DbPlatform;
+class SetupComboBox;
 
-class MediaImagePathDialog : public DataObjectEditDialog
+class MediaImagePathDialog : public BrowseFilePathDialog
 {
     Q_OBJECT
 
@@ -40,22 +40,24 @@ public:
     MediaImagePathDialog(QWidget *parent, EmuFrontObject*);
     ~MediaImagePathDialog();
     virtual void setDataObject(EmuFrontObject *);
+    virtual void updateData();
 
 protected slots:
     virtual void acceptChanges();
-    void browseFilePath();
+    //void browseFilePath();
+
+protected:
+    virtual void clear();
 
 private:
-    QComboBox *setupComBox;
-    QLabel *filePathLabel;
-    QPushButton *filePathButton;
+    SetupComboBox *setupComBox;
     DbSetup *dbSetup;
     DbMediaType *dbMediaType;
     DbPlatform *dbPlatform;
 
     void initWidgets();
     void layout();
-    void connectSignals();
+    //void connectSignals();
     void populateSetupComBox();
     void setSelectedSetup(const Setup *);
     Setup* getSelectedSetup();