Refactoring the project, new folders for view and model classes. Added
[emufront] / src / widgets / efcombobox.h
index 780273b..89681bd 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 EFCOMBOBOX_H
 
 #include <QComboBox>
-#include "../db/databasemanager.h"
+#include "databasemanager.h"
 
 class EFComboBox : public QComboBox
 {
 public:
     EFComboBox(DatabaseManager *dbMan, QWidget *parent = 0);
     ~EFComboBox();
-    EmuFrontObject* getSelected() const;
+    EmuFrontObject* getSelected();
     // This will replace DataObjectEditDialog::setSelected!
     void setSelected(const EmuFrontObject*);
-    void updateDataModel();
+    // reset sets the data model to orinal, non filtered setting
+    void updateDataModel(bool reset = true);
 protected:
     DatabaseManager *dbManager;
     int dataModelIndex_id;
     int dataModelIndex_name;
+    virtual void reset();
 };
 
 #endif // EFCOMBOBOX_H