Refactored (moved, renamed)
authorMikko Keinänen <mikko.keinanen@gmail.com>
Sun, 5 Dec 2010 00:45:01 +0000 (02:45 +0200)
committerMikko Keinänen <mikko.keinanen@gmail.com>
Sun, 5 Dec 2010 00:45:01 +0000 (02:45 +0200)
20 files changed:
src/db/emufrontfileobjectmodel.cpp [deleted file]
src/db/emufrontfileobjectmodel.h [deleted file]
src/db/emufrontquerymodel.cpp [deleted file]
src/db/emufrontquerymodel.h [deleted file]
src/db/mediatypemodel.cpp [deleted file]
src/db/mediatypemodel.h [deleted file]
src/db/platformmodel.cpp [deleted file]
src/db/platformmodel.h [deleted file]
src/db/setupmodel.cpp [deleted file]
src/db/setupmodel.h [deleted file]
src/dialogs/emufrontdatadialog.cpp [deleted file]
src/dialogs/emufrontdatadialog.h [deleted file]
src/dialogs/emufrontfileobjectmaindialog.cpp [deleted file]
src/dialogs/emufrontfileobjectmaindialog.h [deleted file]
src/dialogs/mediatypemaindialog.cpp [deleted file]
src/dialogs/mediatypemaindialog.h [deleted file]
src/dialogs/platformmaindialog.cpp [deleted file]
src/dialogs/platformmaindialog.h [deleted file]
src/dialogs/setupmainview.cpp [deleted file]
src/dialogs/setupmainview.h [deleted file]

diff --git a/src/db/emufrontfileobjectmodel.cpp b/src/db/emufrontfileobjectmodel.cpp
deleted file mode 100644 (file)
index f287ca1..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtSql>
-#include "emufrontfileobjectmodel.h"
-
-EmuFrontFileObjectModel::EmuFrontFileObjectModel(QObject *parent) :
-    EmuFrontQueryModel(parent)
-{ }
-
-Qt::ItemFlags EmuFrontFileObjectModel::flags(const QModelIndex &index) const
-{
-    Qt::ItemFlags flags = QSqlQueryModel::flags(index);
-    if (index.column() == EmuFrontFileObject_Name) {
-        flags |= Qt::ItemIsEditable;
-    }
-    return flags;
-}
-
-bool EmuFrontFileObjectModel::setData(const QModelIndex &index, const QVariant &value, int /*role*/)
-{
-    if(index.column() != EmuFrontFileObject_Name)
-        return false;
-
-    QModelIndex primaryKeyIndex
-        = QSqlQueryModel::index(index.row(), EmuFrontFileObject_Id);
-
-    int id = data(primaryKeyIndex).toInt();
-    clear();
-
-    bool ok;
-    if (index.column() == EmuFrontFileObject_Name) {
-        ok = setName(id, value.toString());
-    }
-
-    refresh();
-    return ok;
-}
-
-void EmuFrontFileObjectModel::refresh()
- {
-     setQuery(constructSelect());
-     setHeaderData(EmuFrontFileObject_Id, Qt::Horizontal, tr("ID"));
-     setHeaderData(EmuFrontFileObject_Name, Qt::Horizontal, tr("Name"));
-     setHeaderData(EmuFrontFileObject_FileId, Qt::Horizontal, tr("FileID"));
-     setHeaderData(EmuFrontFileObject_FileName, Qt::Horizontal, tr("File Name"));
-     setHeaderData(EmuFrontFileObject_FileCheckSum, Qt::Horizontal, tr("File Checksum"));
-     setHeaderData(EmuFrontFileObject_FileSize, Qt::Horizontal, tr("File Size"));
-     setHeaderData(EmuFrontFileObject_FileType, Qt::Horizontal, tr("File Type"));
-     setHeaderData(EmuFrontFileObject_FileUpdateTime, Qt::Horizontal, tr("File Updated"));
- }
-
-QString EmuFrontFileObjectModel::constructSelect(QString where) const
-{
-    return QString("SELECT maintbl.id AS FileObjectId, "
-            "maintbl.name AS Name, "
-            "file.id AS FileId, "
-            "file.name AS FileName, "
-            "file.type AS FileType, "
-            "file.checksum AS FileChecksum, "
-            "file.size AS FileSize, "
-            "file.updatetime AS FileUpdateTime "
-            "FROM %1 AS maintbl "
-            "LEFT OUTER JOIN file ON maintbl.fileid=file.id "
-            "%2 "
-            "ORDER BY Name").arg(tableName).arg(where);
-}
-
-bool EmuFrontFileObjectModel::setName(int id, const QString &name)
-{
-    QSqlQuery query;
-    query.prepare(QString("update %1 set name = :name where id = :id").arg(tableName));
-    query.bindValue(":name", name);
-    query.bindValue(":id", id);
-    return query.exec();
-}
-
-bool EmuFrontFileObjectModel::insertRows(int row, int count, const QModelIndex &parent)
-{
-    if (parent.isValid())
-        return false; // This is a flat model
-    if (rowCount() < row)
-        row = rowCount() + 1;
-    QSqlQuery q;
-    q.prepare(QString("INSERT INTO %1 (id, name, fileid) "
-        " VALUES (NULL, '', NULL) ").arg(tableName));
-    beginInsertRows(QModelIndex(), row, row + count - 1);
-    for (int i = 0; i < count; ++i) {
-        q.exec();
-    }
-    endInsertRows();
-    refresh();
-    return true;
-}
-
-bool EmuFrontFileObjectModel::removeRows(int row, int count, const QModelIndex &parent)
-{
-     if (parent.isValid()) {
-        return false; // This is a flat model
-    }
-    if (rowCount() < row + count - 1)
-        return false;
-
-    QSqlQuery q;
-    q.prepare(QString("DELETE FROM %1 WHERE id=:id").arg(tableName));
-    QModelIndex primaryIndex;
-    int id = -1;
-    beginRemoveRows(QModelIndex(), row, row + count - 1);
-    for(int i = 0; i < count; ++i) {
-        primaryIndex = QSqlQueryModel::index(row + i, EmuFrontFileObject_Id);
-        id = data(primaryIndex).toInt();
-        qDebug() << "Removing data item with id " << id;
-        q.bindValue(":id", id);
-        q.exec();
-    }
-    endRemoveRows();
-    refresh();
-    return true;
-}
diff --git a/src/db/emufrontfileobjectmodel.h b/src/db/emufrontfileobjectmodel.h
deleted file mode 100644 (file)
index 5b8aaad..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef EMUFRONTFILEOBJECTMODEL_H
-#define EMUFRONTFILEOBJECTMODEL_H
-
-#include "emufrontquerymodel.h"
-
-class EmuFrontFileObjectModel : public EmuFrontQueryModel
-{
-    Q_OBJECT
-public:
-    EmuFrontFileObjectModel(QObject *parent = 0);
-    virtual Qt::ItemFlags flags(const QModelIndex &index) const;
-    virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
-    virtual bool insertRows(int row, int count, const QModelIndex &parent);
-    virtual bool removeRows(int row, int count, const QModelIndex &parent);
-    enum {
-        EmuFrontFileObject_Id,
-        EmuFrontFileObject_Name,
-        EmuFrontFileObject_FileId,
-        EmuFrontFileObject_FileName,
-        EmuFrontFileObject_FileType,
-        EmuFrontFileObject_FileCheckSum,
-        EmuFrontFileObject_FileSize,
-        EmuFrontFileObject_FileUpdateTime
-    };
-
-protected:
-    virtual void refresh();
-    virtual QString constructSelect(QString where = "") const;
-    virtual bool setName(int id, const QString &name);
-};
-
-#endif // EMUFRONTFILEOBJECTMODEL_H
diff --git a/src/db/emufrontquerymodel.cpp b/src/db/emufrontquerymodel.cpp
deleted file mode 100644 (file)
index 9d99e46..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include "emufrontquerymodel.h"
-
-EmuFrontQueryModel::EmuFrontQueryModel(QObject *parent) :
-    QSqlQueryModel(parent)
-{
-}
diff --git a/src/db/emufrontquerymodel.h b/src/db/emufrontquerymodel.h
deleted file mode 100644 (file)
index 5e56c18..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef EMUFRONTQUERYMODEL_H
-#define EMUFRONTQUERYMODEL_H
-
-#include <QSqlQueryModel>
-
-class EmuFrontQueryModel : public QSqlQueryModel
-{
-    Q_OBJECT
-public:
-    EmuFrontQueryModel(QObject *parent = 0);
-
-signals:
-
-public slots:
-
-protected:
-    QString tableName;
-};
-
-#endif // EMUFRONTQUERYMODEL_H
diff --git a/src/db/mediatypemodel.cpp b/src/db/mediatypemodel.cpp
deleted file mode 100644 (file)
index 4352879..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include "mediatypemodel.h"
-
-MediaTypeModel::MediaTypeModel(QObject *parent) :
-    EmuFrontFileObjectModel(parent)
-{
-    tableName = "mediatype";
-    refresh();
-}
diff --git a/src/db/mediatypemodel.h b/src/db/mediatypemodel.h
deleted file mode 100644 (file)
index 90ad66e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef MEDIATYPEMODEL_H
-#define MEDIATYPEMODEL_H
-
-#include "emufrontfileobjectmodel.h"
-
-class MediaTypeModel : public EmuFrontFileObjectModel
-{
-    Q_OBJECT
-public:
-    MediaTypeModel(QObject *parent = 0);
-};
-
-#endif // MEDIATYPEMODEL_H
diff --git a/src/db/platformmodel.cpp b/src/db/platformmodel.cpp
deleted file mode 100644 (file)
index 66a2815..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include "platformmodel.h"
-
-PlatformModel::PlatformModel(QObject *parent) :
-    EmuFrontFileObjectModel(parent)
-{
-    tableName = "platform";
-    refresh();
-}
diff --git a/src/db/platformmodel.h b/src/db/platformmodel.h
deleted file mode 100644 (file)
index eef53ad..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef PLATFORMMODEL_H
-#define PLATFORMMODEL_H
-
-#include "emufrontfileobjectmodel.h"
-
-class PlatformModel : public EmuFrontFileObjectModel
-{
-    Q_OBJECT
-public:
-    PlatformModel(QObject *parent = 0);
-};
-
-#endif // PLATFORMMODEL_H
diff --git a/src/db/setupmodel.cpp b/src/db/setupmodel.cpp
deleted file mode 100644 (file)
index cea5ccc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include "setupmodel.h"
-
-SetupModel::SetupModel(QObject *parent) :
-    EmuFrontQueryModel(parent)
-{
-    refresh();
-}
-
-void SetupModel::refresh()
-{
-    setQuery(constructSelect());
-    setHeaderData(Setup_Id, Qt::Horizontal, tr("Id"));
-    setHeaderData(Setup_PlatformId, Qt::Horizontal, tr("Platform id"));
-    setHeaderData(Setup_MediaTypeId, Qt::Horizontal, tr("Media type id"));
-    setHeaderData(Setup_FileTypeExtensions, Qt::Horizontal, tr("File types"));
-    setHeaderData(Setup_Name, Qt::Horizontal, tr("Name"));
-}
-
-QString SetupModel::constructSelect(QString where) const
-{
-    return QString(
-        "SELECT setup.id AS SetupId, "
-        "setup.platformid AS PlatformId, "
-        "setup.mediatypeid AS MediaTypeId, "
-        "setup.filetypeextensions AS SupportedFileTypeExtensions, "
-        "platform.name || ' ' || mediatype.name AS SetupName "
-        "FROM setup "
-        "INNER JOIN platform ON setup.platformid=platform.id "
-        "INNER JOIN mediatype ON setup.mediatypeid=mediatype.id %1 "
-        "ORDER BY SetupName"
-        ).arg(where);
-}
diff --git a/src/db/setupmodel.h b/src/db/setupmodel.h
deleted file mode 100644 (file)
index 036a016..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef SETUPMODEL_H
-#define SETUPMODEL_H
-
-#include "emufrontquerymodel.h"
-
-class SetupModel : public EmuFrontQueryModel
-{
-    Q_OBJECT
-public:
-    SetupModel(QObject *parent = 0);
-    enum { Setup_Id = 0,
-           Setup_PlatformId,
-           Setup_MediaTypeId,
-           Setup_FileTypeExtensions,
-           Setup_Name };
-    static const QString FILE_TYPE_EXTENSION_SEPARATOR;
-
-protected:
-    virtual void refresh();
-    virtual QString constructSelect(QString where = "") const;
-};
-
-#endif // SETUPMODEL_H
diff --git a/src/dialogs/emufrontdatadialog.cpp b/src/dialogs/emufrontdatadialog.cpp
deleted file mode 100644 (file)
index 65b5635..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtGui>
-#include "emufrontdatadialog.h"
-
-EmuFrontDataDialog::EmuFrontDataDialog(QWidget *parent) :
-    EmuFrontDialog(parent)
-{
-    editButton = new QPushButton(tr("&Edit"));
-    editButton->setEnabled(false);
-    addButton = new QPushButton(tr("&Add"));
-    deleteButton = new QPushButton(tr("&Delete"));
-    deleteButton->setEnabled(false);
-    objectList = new QTableView(this);
-    buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Vertical);
-    buttonBox->addButton(editButton, QDialogButtonBox::ActionRole);
-    buttonBox->addButton(addButton, QDialogButtonBox::ActionRole);
-    buttonBox->addButton(deleteButton, QDialogButtonBox::ActionRole);
-    // this be called from the implementing classes:
-    //connectSignals();
-    layout();
-}
-
-void EmuFrontDataDialog::postInit()
-{
-    connectSignals();
-    setHiddenColumns();
-    hideColumns();
-}
-
-void EmuFrontDataDialog::layout()
-{
-    QHBoxLayout *mainLayout = new QHBoxLayout;
-    mainLayout->addWidget(objectList);
-    mainLayout->addWidget(buttonBox);
-    setLayout(mainLayout);
-}
-
-void EmuFrontDataDialog::hideColumns()
-{
-    foreach(int c, hiddenColumns)
-        objectList->hideColumn(c);
-}
-
-void EmuFrontDataDialog::connectSignals()
-{
-    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
-    connect(objectList, SIGNAL(clicked(const QModelIndex &)),
-        this, SLOT(listObjectClicked(const QModelIndex &)));
-    connect(editButton, SIGNAL(clicked()), this, SLOT(editButtonClicked()));
-    connect(addButton, SIGNAL(clicked()), this, SLOT(addButtonClicked()));
-    connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteButtonClicked()));
-}
-
-void EmuFrontDataDialog::editButtonClicked()
-{
-    setButtonsEnabled(false);
-    qDebug() << "Edit button clicked";
-}
-
-void EmuFrontDataDialog::deleteButtonClicked()
-{
-    setButtonsEnabled(false);
-    if (!objectList->currentIndex().isValid())
-        return;
-    int row = objectList->currentIndex().row();
-    if ( !model->removeRows(row, 1) ) {
-        errorMessage->showMessage(tr("Failed removing selected item."));
-    }
-}
-
-
-void EmuFrontDataDialog::addButtonClicked()
-{
-    int row = objectList->currentIndex().isValid() ?
-        objectList->currentIndex().row() : 0;
-    model->insertRows(row, 1);
-    QModelIndex ind = model->index(row, 1);
-    if (!ind.isValid()){
-        return;
-    }
-    objectList->setCurrentIndex(ind);
-    objectList->edit(ind);
-}
-
-void EmuFrontDataDialog::listObjectClicked(const QModelIndex &index)
-{
-    setButtonsEnabled(index.isValid());
-}
-
-void EmuFrontDataDialog::setButtonsEnabled(bool b)
-{
-    editButton->setEnabled(b);
-    deleteButton->setEnabled(b);
-}
-
-void EmuFrontDataDialog::setHiddenColumns()
-{
-    // default implementation
-}
diff --git a/src/dialogs/emufrontdatadialog.h b/src/dialogs/emufrontdatadialog.h
deleted file mode 100644 (file)
index 302591d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef EMUFRONTDATADIALOG_H
-#define EMUFRONTDATADIALOG_H
-
-#include "emufrontdialog.h"
-#include "db/emufrontquerymodel.h"
-
-class QDialogButtonBox;
-class QTableView;
-
-class EmuFrontDataDialog : public EmuFrontDialog
-{
-    Q_OBJECT
-public:
-    EmuFrontDataDialog(QWidget *parent = 0);
-
-private slots:
-    void editButtonClicked();
-    void addButtonClicked();
-    void deleteButtonClicked();
-    void listObjectClicked(const QModelIndex &);
-
-protected:
-    EmuFrontQueryModel *model;
-    QList<int> hiddenColumns;
-    QDialogButtonBox *buttonBox;
-    QTableView *objectList;
-    void postInit();
-
-private:
-    QPushButton *editButton;
-    QPushButton *addButton;
-    QPushButton *deleteButton;
-    void layout();
-    virtual void setHiddenColumns();
-    void hideColumns();
-    virtual void connectSignals();
-    void setButtonsEnabled(bool);
-
-};
-
-#endif // EMUFRONTDATADIALOG_H
diff --git a/src/dialogs/emufrontfileobjectmaindialog.cpp b/src/dialogs/emufrontfileobjectmaindialog.cpp
deleted file mode 100644 (file)
index 6f4a4a8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include "emufrontfileobjectmaindialog.h"
-#include "db/emufrontfileobjectmodel.h"
-
-EmuFrontFileObjectMainDialog::EmuFrontFileObjectMainDialog(QWidget *parent) :
-    EmuFrontDataDialog(parent)
-{
-}
-
-void EmuFrontFileObjectMainDialog::setHiddenColumns()
-{
-    hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_Id;
-    hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileId;
-    hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileType;
-    hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileCheckSum;
-}
diff --git a/src/dialogs/emufrontfileobjectmaindialog.h b/src/dialogs/emufrontfileobjectmaindialog.h
deleted file mode 100644 (file)
index 53bdbb1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef EMUFRONTFILEOBJECTMAINDIALOG_H
-#define EMUFRONTFILEOBJECTMAINDIALOG_H
-
-#include "emufrontdatadialog.h"
-
-class EmuFrontFileObjectMainDialog : public EmuFrontDataDialog
-{
-    Q_OBJECT
-public:
-    EmuFrontFileObjectMainDialog(QWidget *parent = 0);
-
-private:
-    virtual void setHiddenColumns();
-};
-
-#endif // EMUFRONTFILEOBJECTMAINDIALOG_H
diff --git a/src/dialogs/mediatypemaindialog.cpp b/src/dialogs/mediatypemaindialog.cpp
deleted file mode 100644 (file)
index 031ad06..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtGui>
-#include "mediatypemaindialog.h"
-#include "db/mediatypemodel.h"
-
-MediaTypeMainDialog::MediaTypeMainDialog(QWidget *parent) :
-    EmuFrontFileObjectMainDialog(parent)
-{
-    model = new MediaTypeModel(this);
-    objectList->setModel(model);
-    postInit();
-}
diff --git a/src/dialogs/mediatypemaindialog.h b/src/dialogs/mediatypemaindialog.h
deleted file mode 100644 (file)
index ca8d4d2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef MEDIATYPEMAINDIALOG_H
-#define MEDIATYPEMAINDIALOG_H
-
-#include "emufrontfileobjectmaindialog.h"
-
-class MediaTypeMainDialog : public EmuFrontFileObjectMainDialog
-{
-    Q_OBJECT
-public:
-    MediaTypeMainDialog(QWidget *parent = 0);
-};
-
-#endif // MEDIATYPEMAINDIALOG_H
diff --git a/src/dialogs/platformmaindialog.cpp b/src/dialogs/platformmaindialog.cpp
deleted file mode 100644 (file)
index 05127c7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtGui>
-#include "platformmaindialog.h"
-#include "db/platformmodel.h"
-
-PlatformMainDialog::PlatformMainDialog(QWidget *parent) :
-    EmuFrontFileObjectMainDialog(parent)
-{
-    model = new PlatformModel(this);
-    objectList->setModel(model);
-    postInit();
-}
-
-
diff --git a/src/dialogs/platformmaindialog.h b/src/dialogs/platformmaindialog.h
deleted file mode 100644 (file)
index 7e0229c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef PLATFORMMAINDIALOG_H
-#define PLATFORMMAINDIALOG_H
-
-#include "emufrontfileobjectmaindialog.h"
-
-class PlatformMainDialog : public EmuFrontFileObjectMainDialog
-{
-    Q_OBJECT
-public:
-    PlatformMainDialog(QWidget *parent = 0);
-  };
-
-#endif // PLATFORMMAINDIALOG_H
diff --git a/src/dialogs/setupmainview.cpp b/src/dialogs/setupmainview.cpp
deleted file mode 100644 (file)
index f05d987..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <QtGui>
-#include "setupmainview.h"
-#include "db/setupmodel.h"
-
-SetupMainView::SetupMainView(QWidget *parent) :
-    EmuFrontDataDialog(parent)
-{
-    model = new SetupModel(this);
-    objectList->setModel(model);
-    postInit();
-}
diff --git a/src/dialogs/setupmainview.h b/src/dialogs/setupmainview.h
deleted file mode 100644 (file)
index 11b299f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// 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
-// 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 EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef SETUPMAINVIEW_H
-#define SETUPMAINVIEW_H
-
-#include "emufrontdatadialog.h"
-
-class SetupMainView : public EmuFrontDataDialog
-{
-    Q_OBJECT
-public:
-    SetupMainView(QWidget *parent = 0);
-
-signals:
-
-public slots:
-
-};
-
-#endif // SETUPMAINVIEW_H