Fixed bugs: dialogs remained disabled (signals were not attached to
[emufront] / src / dialogs / dbobjectdialog.h
index e27ac15..38442d0 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
@@ -48,19 +48,25 @@ private slots:
     void updateReject();
     void updateList() const;
     void testSlot();
+    void enableUi();
 
 protected:
     // implementation specific, deletes current data object from memory
-    virtual void deleteCurrentObject();
+    virtual void deleteCurrentObject() = 0;
+    virtual void cleanUp() = 0;
     virtual void initEditDialog() = 0;
     virtual EmuFrontObject* createObject() = 0;
+    virtual void closeEvent(QCloseEvent *);
     void initDataTable();
     virtual void connectSignals();
+    virtual void connectNameDialogSignals();
     DataObjectEditDialog *nameDialog;
     EmuFrontObject *dbObject;
     DatabaseManager *dbManager;
     QDialogButtonBox *buttonBox;
     QTableView *objectList;
+    QList<int> hiddenColumns;
+    void hideColumns();
 
 private:
     bool deleteItem();
@@ -68,11 +74,13 @@ private:
     void insertDb(const EmuFrontObject*) const;
     void updateDb(const EmuFrontObject*) const;
     void editObject();
-    void activateNameDialog();
+    void activateNameDialog(bool updateData = true);
     bool confirmDelete(QString name, int numRefs);
-       void setButtonsEnabled(bool);
+    void setButtonsEnabled(bool);
+    void setUIEnabled(bool);
     void layout();
     void disableSelection();
+    void createEditDialog();
     QPushButton *editButton;
     QPushButton *addButton;
     QPushButton *deleteButton;