all the source folders to project file.
#include <QObject>
#include <QSqlDatabase>
-#include "../exceptions/emufrontexception.h"
+#include "emufrontexception.h"
class QSqlError;
class QFile;
#include <QDebug>
#include <exception>
#include "dbcreator.h"
-#include "../exceptions/emufrontexception.h"
+#include "emufrontexception.h"
using namespace std;
#include "dbquerymodelmanager.h"
#include "dbfile.h"
-#include "../dataobjects/emufrontfileobject.h"
+#include "emufrontfileobject.h"
class DbEmuFrontFileObject : public DbQueryModelManager
{
#include <QSqlRelationalTableModel>
#include "dbexecutable.h"
#include "dbsetup.h"
-#include "../dataobjects/executable.h"
+#include "executable.h"
DbExecutable::DbExecutable(QObject *parent)
#define DBFILE_H
#include "dbquerymodelmanager.h"
-#include "../dataobjects/emufrontfile.h"
+#include "emufrontfile.h"
class DbFile : public DbQueryModelManager
{
#include <QSqlRelationalTableModel>
#include <QSqlRecord>
#include <QSqlQuery>
-#include "../dataobjects/filepathobject.h"
+#include "filepathobject.h"
#include "dbfilepath.h"
#include "dbsetup.h"
#define DBMEDIAIMAGE_H
#include "dbfile.h"
-#include "../dataobjects/mediaimage.h"
+#include "mediaimage.h"
#include <QMap>
class DbMediaImage : public DbFile
#include "dbmediaimage.h"
#include "dbfile.h"
-#include "../dataobjects/mediaimagecontainer.h"
-#include "../dataobjects/filepathobject.h"
+#include "mediaimagecontainer.h"
+#include "filepathobject.h"
class DbMediaImageContainer;
class DbMediaImage;
#define DBMEDIATYPE_H
#include "dbemufrontfileobject.h"
-#include "../dataobjects/mediatype.h"
+#include "mediatype.h"
class DbMediaType : public DbEmuFrontFileObject
{
#define DBPLATFORM_H
#include "dbemufrontfileobject.h"
-#include "../dataobjects/platform.h"
+#include "platform.h"
class QModelIndex;
#define DBSETUP_H
#include "dbquerymodelmanager.h"
-#include "../dataobjects/setup.h"
+#include "setup.h"
#include "dbplatform.h"
#include "dbmediatype.h"
#define DATAOBJECTEDITDIALOG_H
#include "emufrontdialog.h"
-#include "../dataobjects/emufrontobject.h"
+#include "emufrontobject.h"
class QDialogButtonBox;
class QComboBox;
#include <QtGui>
#include <QSqlTableModel>
#include "dbobjectdialog.h"
-#include "../db/databasemanager.h"
+#include "databasemanager.h"
DbObjectDialog::DbObjectDialog(QWidget *parent)
: EmuFrontDialog(parent)
#include "emufrontdialog.h"
#include "dataobjecteditdialog.h"
-#include "../db/databasemanager.h"
-#include "../dataobjects/emufrontobject.h"
+#include "databasemanager.h"
+#include "emufrontobject.h"
class QPushButton;
class QModelIndex;
#ifndef EMUFRONTDIALOG_H
#define EMUFRONTDIALOG_H
#include <QDialog>
-#include "../exceptions/emufrontexception.h"
+#include "emufrontexception.h"
class QErrorMessage;
#include <QtGui>
#include "emufrontfileobjectdialog.h"
-#include "../db/dbemufrontfileobject.h"
+#include "dbemufrontfileobject.h"
EmuFrontFileObjectDialog::EmuFrontFileObjectDialog(QWidget *parent) :
DbObjectDialog(parent)
#include "emufrontinputdialog.h"
#include <QMap>
-#include "../dataobjects/emufrontobject.h"
+#include "emufrontobject.h"
EmuFrontInputDialog::EmuFrontInputDialog(QWidget *parent, Qt::WindowFlags flags)
: QInputDialog(parent, flags)
#include <QtGui>
#include "executableeditdialog.h"
-#include "../db/dbexecutable.h"
-#include "../db/dbsetup.h"
-#include "../dataobjects/executable.h"
-#include "../dataobjects/setup.h"
-#include "../widgets/setupcombobox.h"
-#include "../exceptions/emufrontexception.h"
+#include "dbexecutable.h"
+#include "dbsetup.h"
+#include "executable.h"
+#include "setup.h"
+#include "setupcombobox.h"
+#include "emufrontexception.h"
ExecutableEditDialog::ExecutableEditDialog(QWidget *parent, EmuFrontObject *obj)
: DataObjectEditDialog(parent, obj)
#include <QtGui>
#include "executablemaindialog.h"
#include "executableeditdialog.h"
-#include "../db/dbexecutable.h"
-#include "../dataobjects/executable.h"
+#include "dbexecutable.h"
+#include "executable.h"
ExecutableMainDialog::ExecutableMainDialog(QWidget *parent)
: DbObjectDialog(parent)
#include "listdialog.h"
#include <QtGui>
-#include "../dataobjects/emufrontobject.h"
+#include "emufrontobject.h"
ListDialog::ListDialog(QWidget *parent)
: QDialog(parent)
#include <QSqlTableModel>
#include <QSqlRecord>
#include "mediaimagepathdialog.h"
-#include "../db/dbsetup.h"
-#include "../dataobjects/filepathobject.h"
-#include "../widgets/setupcombobox.h"
+#include "dbsetup.h"
+#include "filepathobject.h"
+#include "setupcombobox.h"
MediaImagePathDialog::MediaImagePathDialog(QWidget *parent, EmuFrontObject *efObject)
: BrowseFilePathDialog(parent, efObject, Qt::Horizontal)
#include <QtGui>
-#include "../dataobjects/filepathobject.h"
-#include "../dataobjects/emufrontfileobject.h"
-#include "../db/dbfilepath.h"
-#include "../utils/fileutil.h"
+#include "filepathobject.h"
+#include "emufrontfileobject.h"
+#include "dbfilepath.h"
+#include "fileutil.h"
#include "mediaimagepathmaindialog.h"
#include "mediaimagepathdialog.h"
#define MEDIAIMAGEPATHMAINDIALOG_H
#include "dbobjectdialog.h"
-#include "../db/dbmediaimagecontainer.h"
+#include "dbmediaimagecontainer.h"
class FileUtil;
class QProgressDialog;
#include <QAbstractItemView>
#include <QSqlTableModel>
#include <QTextStream>
-#include "../db/dbmediatype.h"
-#include "../dataobjects/mediatype.h"
+#include "dbmediatype.h"
+#include "mediatype.h"
#include "mediatypedialog.h"
#include "mediatypenamedialog.h"
#define MEDIATYPENAMEDIALOG_H
#include "namedialog.h"
-#include "../dataobjects/mediatype.h"
+#include "mediatype.h"
class MediaTypeNameDialog : public NameDialog
{
#ifndef NAMEDIALOG_H
#define NAMEDIALOG_H
-#include "../dataobjects/emufrontobject.h"
+#include "emufrontobject.h"
#include "dataobjecteditdialog.h"
class QLabel;
// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include <QtGui>
-#include "../db/dbplatform.h"
-#include "../dataobjects/platform.h"
+#include "dbplatform.h"
+#include "platform.h"
#include "platformdialog.h"
#include "platformnamedialog.h"
#include <QtGui>
#include "platformnamedialog.h"
-#include "../db/databasemanager.h"
+#include "databasemanager.h"
PlatformNameDialog::PlatformNameDialog(QWidget *parent, Platform *efObj)
: NameDialog(parent, efObj)
#define PLATFORMNAMEDIALOG_H
#include "namedialog.h"
-#include "../dataobjects/platform.h"
+#include "platform.h"
class PlatformNameDialog : public NameDialog
{
#include <QSqlTableModel>
#include <QSqlRecord>
#include "setupeditdialog.h"
-#include "../widgets/fileextensionwidget.h"
-#include "../widgets/effileobjectcombobox.h"
-#include "../db/dbmediatype.h"
-#include "../db/dbplatform.h"
-#include "../db/dbsetup.h"
+#include "fileextensionwidget.h"
+#include "effileobjectcombobox.h"
+#include "dbmediatype.h"
+#include "dbplatform.h"
+#include "dbsetup.h"
SetupEditDialog::SetupEditDialog(QWidget *parent, EmuFrontObject* obj)
: DataObjectEditDialog(parent, obj)
#include <QtGui>
#include "setupmaindialog.h"
#include "setupeditdialog.h"
-#include "../db/dbsetup.h"
+#include "dbsetup.h"
SetupMainDialog::SetupMainDialog(QWidget *parent)
: DbObjectDialog(parent)
TEMPLATE = app
TARGET =
DEPENDPATH += . \
+ exceptions \
+ dataobjects \
db \
- dialogs
+ dialogs \
+ models \
+ utils \
+ widgets \
+ views
INCLUDEPATH += . \
db \
- dialogs
+ exceptions \
+ dataobjects \
+ dialogs \
+ models \
+ utils \
+ widgets \
+ views
QT += sql
QT += xml
utils/fileutil.h \
dataobjects/setup.h \
db/dbsetup.h \
- db/dbtablemodelmanager.h \
- db/dbquerymodelmanager.h \
dialogs/setupmaindialog.h \
dialogs/setupeditdialog.h \
widgets/stringlistwidget.h \
db/dbconfig.h \
utils/datfileutil.h \
widgets/fileextensionwidget.h \
- db/platformmodel.h \
- dialogs/platformmaindialog.h \
- dialogs/emufrontdatadialog.h \
- db/emufrontquerymodel.h \
- db/emufrontfileobjectmodel.h \
- db/mediatypemodel.h \
- dialogs/emufrontfileobjectmaindialog.h \
- dialogs/mediatypemaindialog.h \
- db/setupmodel.h \
- dialogs/setupmainview.h
+ models/setupmodel.h \
+ models/platformmodel.h \
+ models/mediatypemodel.h \
+ models/emufrontquerymodel.h \
+ models/emufrontfileobjectmodel.h \
+ views/setupeditview.h \
+ views/platformeditview.h \
+ views/mediatypeeditview.h \
+ views/emufrontfileobjecteditview.h \
+ views/emufronteditview.h
SOURCES += main.cpp \
mainwindow.cpp \
db/databasemanager.cpp \
db/dbconfig.cpp \
utils/datfileutil.cpp \
widgets/fileextensionwidget.cpp \
- db/platformmodel.cpp \
- dialogs/platformmaindialog.cpp \
- dialogs/emufrontdatadialog.cpp \
- db/emufrontquerymodel.cpp \
- db/emufrontfileobjectmodel.cpp \
- db/mediatypemodel.cpp \
- dialogs/emufrontfileobjectmaindialog.cpp \
- dialogs/mediatypemaindialog.cpp \
- db/setupmodel.cpp \
- dialogs/setupmainview.cpp
+ models/setupmodel.cpp \
+ models/platformmodel.cpp \
+ models/mediatypemodel.cpp \
+ models/emufrontquerymodel.cpp \
+ models/emufrontfileobjectmodel.cpp \
+ views/setupeditview.cpp \
+ views/platformeditview.cpp \
+ views/mediatypeeditview.cpp \
+ views/emufrontfileobjecteditview.cpp \
+ views/emufronteditview.cpp
OTHER_FILES +=
CONFIG += mobility
#include <QSqlTableModel>
#include <QItemSelectionModel>
#include "emulauncher.h"
-#include "db/dbmediatype.h"
-#include "db/dbplatform.h"
-#include "db/dbexecutable.h"
-#include "db/dbmediaimagecontainer.h"
-#include "widgets/effileobjectcombobox.h"
-#include "widgets/executablecombobox.h"
-#include "dataobjects/executable.h"
-#include "utils/emuhelper.h"
-#include "dialogs/emufrontinputdialog.h"
+#include "dbmediatype.h"
+#include "dbplatform.h"
+#include "dbexecutable.h"
+#include "dbmediaimagecontainer.h"
+#include "effileobjectcombobox.h"
+#include "executablecombobox.h"
+#include "executable.h"
+#include "emuhelper.h"
+#include "emufrontinputdialog.h"
EmuLauncher::EmuLauncher(QErrorMessage *errorMessage, QWidget *parent, QString tmp) :
QWidget(parent), tmpDirPath(tmp), errorMessage(errorMessage)
#include "mainwindow.h"
#include "emulauncher.h"
// TODO: deprecated
-#include "dialogs/platformdialog.h"
-#include "dialogs/platformmaindialog.h"
-#include "dialogs/mediatypedialog.h"
+#include "platformdialog.h"
+#include "platformeditview.h"
+#include "mediatypedialog.h"
// TODO: deprecated
-#include "dialogs/mediatypemaindialog.h"
-#include "dialogs/mediaimagepathmaindialog.h"
+#include "mediatypeeditview.h"
+#include "mediaimagepathmaindialog.h"
// TODO: deprecated
-#include "dialogs/setupmaindialog.h"
-#include "dialogs/setupmainview.h"
-#include "dialogs/executablemaindialog.h"
-#include "utils/datfileutil.h"
-#include "db/databasemanager.h"
-#include "db/dbcreator.h"
-#include "db/dbconfig.h"
+#include "setupmaindialog.h"
+#include "setupeditview.h"
+#include "executablemaindialog.h"
+#include "datfileutil.h"
+#include "databasemanager.h"
+#include "dbcreator.h"
+#include "dbconfig.h"
QString MainWindow::aboutStr = trUtf8(
"<h2>EmuFront</h2>"
void MainWindow::configurePlatformss()
{
if (!plfDialog) {
- plfDialog = new PlatformMainDialog(this);
+ plfDialog = new PlatformEditView(this);
connect(plfDialog, SIGNAL(finished(int)), this, SLOT(updateData()));
}
activateDialog(plfDialog);
{
if (!mdtDialog)
{
- mdtDialog = new MediaTypeMainDialog(this);
+ mdtDialog = new MediaTypeEditView(this);
connect(mdtDialog, SIGNAL(finished(int)), this, SLOT(updateData()));
}
activateDialog(mdtDialog);
void MainWindow::configureSetupss()
{
if (!setupMainView) {
- setupMainView = new SetupMainView(this);
+ setupMainView = new SetupEditView(this);
}
activateDialog(setupMainView);
}
class QAction;
// TODO: DEPRECATED
class PlatformDialog;
-class PlatformMainDialog;
-class MediaTypeMainDialog;
+class PlatformEditView;
+class MediaTypeEditView;
// TODO: DEPRECATED
class MediaTypeDialog;
-class MediaTypeMainDialog;
+class MediaTypeEditView;
class MediaImagePathMainDialog;
// TODO: DEPRECATED
class SetupMainDialog;
-class SetupMainView;
+class SetupEditView;
class ExecutableMainDialog;
//class TmpFolderEditDialog;
class QLabel;
// TODO: deprecated
PlatformDialog *platformDialog;
- PlatformMainDialog *plfDialog;
+ PlatformEditView *plfDialog;
// TODO: deprecated
MediaTypeDialog *mediaTypeDialog;
- MediaTypeMainDialog *mdtDialog;
+ MediaTypeEditView *mdtDialog;
MediaImagePathMainDialog *mediaImagePathDialog;
// TODO: deprecated
SetupMainDialog *setupMainDialog;
- SetupMainView *setupMainView;
+ SetupEditView *setupMainView;
ExecutableMainDialog *executableMainDialog;
//TmpFolderEditDialog *tmpFolderDialog;
QMenu *configMenu;
--- /dev/null
+// 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;
+}
--- /dev/null
+// 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
--- /dev/null
+// 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)
+{
+}
--- /dev/null
+// 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
--- /dev/null
+// 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();
+}
--- /dev/null
+// 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
--- /dev/null
+// 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();
+}
--- /dev/null
+// 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
--- /dev/null
+// 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);
+}
--- /dev/null
+// 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
#include <QMessageBox>
#include "emuhelper.h"
#include "unziphelper.h"
-#include "../dataobjects/mediaimagecontainer.h"
-#include "../dataobjects/executable.h"
-#include "../exceptions/emufrontexception.h"
+#include "mediaimagecontainer.h"
+#include "executable.h"
+#include "emufrontexception.h"
EmuHelper::EmuHelper(QObject *parent) :
ProcessHelper(parent)
#include <QProgressDialog>
#include "fileutil.h"
#include "zlib.h" /* crc32 */
-#include "../exceptions/emufrontexception.h"
-#include "../dataobjects/setup.h"
-#include "../dataobjects/mediaimage.h"
-#include "../dataobjects/mediaimagecontainer.h"
-#include "../dataobjects/mediatype.h"
-#include "../dataobjects/platform.h"
-#include "../db/dbmediaimagecontainer.h"
+#include "emufrontexception.h"
+#include "setup.h"
+#include "mediaimage.h"
+#include "mediaimagecontainer.h"
+#include "mediatype.h"
+#include "platform.h"
+#include "dbmediaimagecontainer.h"
#include "unziphelper.h"
FileUtil::FileUtil(QObject *parent) : QObject(parent)
#define FILEUTIL_H
#include <QObject>
-#include "../dataobjects/emufrontfileobject.h"
-#include "../dataobjects/filepathobject.h"
+#include "emufrontfileobject.h"
+#include "filepathobject.h"
#define READ_BUFFER (256*1024)
#include <QFileInfo>
#include <QDebug>
#include "unziphelper.h"
-#include "../dataobjects/mediaimage.h"
-#include "../dataobjects/filepathobject.h"
-#include "../exceptions/emufrontexception.h"
+#include "mediaimage.h"
+#include "filepathobject.h"
+#include "emufrontexception.h"
const QString UnzipHelper::UNZIP_COMMAND = "unzip ";
const QString UnzipHelper::UNZIP_LIST_ARGS = "-lv ";
--- /dev/null
+// 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 "emufronteditview.h"
+
+EmuFrontEditView::EmuFrontEditView(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 EmuFrontEditView::postInit()
+{
+ connectSignals();
+ setHiddenColumns();
+ hideColumns();
+}
+
+void EmuFrontEditView::layout()
+{
+ QHBoxLayout *mainLayout = new QHBoxLayout;
+ mainLayout->addWidget(objectList);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+}
+
+void EmuFrontEditView::hideColumns()
+{
+ foreach(int c, hiddenColumns)
+ objectList->hideColumn(c);
+}
+
+void EmuFrontEditView::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 EmuFrontEditView::editButtonClicked()
+{
+ setButtonsEnabled(false);
+ qDebug() << "Edit button clicked";
+}
+
+void EmuFrontEditView::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 EmuFrontEditView::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 EmuFrontEditView::listObjectClicked(const QModelIndex &index)
+{
+ setButtonsEnabled(index.isValid());
+}
+
+void EmuFrontEditView::setButtonsEnabled(bool b)
+{
+ editButton->setEnabled(b);
+ deleteButton->setEnabled(b);
+}
+
+void EmuFrontEditView::setHiddenColumns()
+{
+ // default implementation
+}
--- /dev/null
+// 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 "emufrontquerymodel.h"
+
+class QDialogButtonBox;
+class QTableView;
+
+class EmuFrontEditView : public EmuFrontDialog
+{
+ Q_OBJECT
+public:
+ EmuFrontEditView(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
--- /dev/null
+// 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 "emufrontfileobjecteditview.h"
+#include "emufrontfileobjectmodel.h"
+
+EmuFrontFileObjectEditView::EmuFrontFileObjectEditView(QWidget *parent) :
+ EmuFrontEditView(parent)
+{
+}
+
+void EmuFrontFileObjectEditView::setHiddenColumns()
+{
+ hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_Id;
+ hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileId;
+ hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileType;
+ hiddenColumns << EmuFrontFileObjectModel::EmuFrontFileObject_FileCheckSum;
+}
--- /dev/null
+// 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 "emufronteditview.h"
+
+class EmuFrontFileObjectEditView : public EmuFrontEditView
+{
+ Q_OBJECT
+public:
+ EmuFrontFileObjectEditView(QWidget *parent = 0);
+
+private:
+ virtual void setHiddenColumns();
+};
+
+#endif // EMUFRONTFILEOBJECTMAINDIALOG_H
--- /dev/null
+// 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 "mediatypeeditview.h"
+#include "mediatypemodel.h"
+
+MediaTypeEditView::MediaTypeEditView(QWidget *parent) :
+ EmuFrontFileObjectEditView(parent)
+{
+ model = new MediaTypeModel(this);
+ objectList->setModel(model);
+ postInit();
+}
--- /dev/null
+// 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 "emufrontfileobjecteditview.h"
+
+class MediaTypeEditView : public EmuFrontFileObjectEditView
+{
+ Q_OBJECT
+public:
+ MediaTypeEditView(QWidget *parent = 0);
+};
+
+#endif // MEDIATYPEMAINDIALOG_H
--- /dev/null
+// 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 "platformeditview.h"
+#include "platformmodel.h"
+
+PlatformEditView::PlatformEditView(QWidget *parent) :
+ EmuFrontFileObjectEditView(parent)
+{
+ model = new PlatformModel(this);
+ objectList->setModel(model);
+ postInit();
+}
+
+
--- /dev/null
+// 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 "emufrontfileobjecteditview.h"
+
+class PlatformEditView : public EmuFrontFileObjectEditView
+{
+ Q_OBJECT
+public:
+ PlatformEditView(QWidget *parent = 0);
+ };
+
+#endif // PLATFORMMAINDIALOG_H
--- /dev/null
+// 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 "setupeditview.h"
+#include "setupmodel.h"
+
+SetupEditView::SetupEditView(QWidget *parent) :
+ EmuFrontEditView(parent)
+{
+ model = new SetupModel(this);
+ objectList->setModel(model);
+ postInit();
+}
--- /dev/null
+// 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 "emufronteditview.h"
+
+class SetupEditView : public EmuFrontEditView
+{
+ Q_OBJECT
+public:
+ SetupEditView(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // SETUPMAINVIEW_H
// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include "efcombobox.h"
-#include "../exceptions/emufrontexception.h"
-#include "../dataobjects/emufrontobject.h"
+#include "emufrontexception.h"
+#include "emufrontobject.h"
#include <QSqlQueryModel>
#include <QSqlRecord>
#include <QDebug>
#define EFCOMBOBOX_H
#include <QComboBox>
-#include "../db/databasemanager.h"
+#include "databasemanager.h"
class EFComboBox : public QComboBox
{
// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include "effileobjectcombobox.h"
-#include "../db/dbemufrontfileobject.h"
+#include "dbemufrontfileobject.h"
EFFileObjectComboBox::EFFileObjectComboBox(DatabaseManager *dbMan, QWidget *parent)
: EFComboBox(dbMan, parent)
// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include "executablecombobox.h"
-#include "../db/dbexecutable.h"
+#include "dbexecutable.h"
ExecutableComboBox::ExecutableComboBox(DatabaseManager *dbMan, QWidget *parent)
: EFComboBox(dbMan, parent)
// along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
#include "setupcombobox.h"
-#include "../db/dbsetup.h"
+#include "dbsetup.h"
SetupComboBox::SetupComboBox(DatabaseManager *dbMan, QWidget *parent)
: EFComboBox(dbMan, parent)