views/emufronteditview.h \
delegates/comboboxdelegate.h \
delegates/stringlistdelegate.h \
- models/filepathmodel.h
+ models/filepathmodel.h \
+ views/filepatheditview.h
SOURCES += main.cpp \
mainwindow.cpp \
db/databasemanager.cpp \
views/emufronteditview.cpp \
delegates/comboboxdelegate.cpp \
delegates/stringlistdelegate.cpp \
- models/filepathmodel.cpp
+ models/filepathmodel.cpp \
+ views/filepatheditview.cpp
OTHER_FILES +=
CONFIG += mobility
#include "mediatypedialog.h"
// TODO: deprecated
#include "mediatypeeditview.h"
+// TODO: DEPRECATED
#include "mediaimagepathmaindialog.h"
+#include "filepatheditview.h"
// TODO: deprecated
#include "setupmaindialog.h"
#include "setupeditview.h"
// TODO: deprecated
mediaTypeDialog = 0;
mdtDialog = 0;
+ // TODO: DEPRECATED
mediaImagePathDialog = 0;
+ mediaImagePathView = 0;
// TODO: deprecated
setupMainDialog = 0;
setupMainView = 0;
configMediaTypeAction->setStatusTip(tr("Add, edit and delete media types"));
connect(configMediaTypesAction, SIGNAL(triggered()), this, SLOT(configureMediaTypess()));
+ // TODO: DEPRECATED
configMediaImagePathAction = new QAction(tr("Media &Image Paths"), this);
configMediaImagePathAction->setStatusTip(tr("Configure media image file paths."));
connect(configMediaImagePathAction, SIGNAL(triggered()),
this, SLOT(configureMediaImagePaths()));
+ configMediaImagePathsAction = new QAction(tr("Set media &image paths"), this);
+ configMediaImagePathsAction->setStatusTip(tr("Add, edit and delete media image file paths."));
+ connect(configMediaImagePathsAction, SIGNAL(triggered()),
+ this, SLOT(configureMediaImagePathss()));
+
// TODO: deprecated
configSetupAction = new QAction(tr("S&etups"), this);
configSetupAction->setStatusTip(tr("Configure set ups"));
}
+// TODO: DEPRECATED
void MainWindow::configureMediaImagePaths()
{
if (!mediaImagePathDialog)
activateDialog(mediaImagePathDialog);
}
+void MainWindow::configureMediaImagePathss()
+{
+ if (!mediaImagePathView)
+ {
+ mediaImagePathView = new FilePathEditView(this);
+ }
+ activateDialog(mediaImagePathView);
+}
+
// TODO: deprecated
void MainWindow::configureSetups()
{
// TODO: deprecated
configMenu->addAction(configSetupAction);
configMenu->addAction(configSetupsAction);
+ // TODO: DEPRECATED
configMenu->addAction(configMediaImagePathAction);
+ configMenu->addAction(configMediaImagePathsAction);
configMenu->addAction(configEmulatorAction);
configMenu->addSeparator();
configMenu->addAction(manageDatFilesAction);
// TODO: DEPRECATED
class MediaTypeDialog;
class MediaTypeEditView;
+// TODO: DEPRECATED
class MediaImagePathMainDialog;
+class FilePathEditView;
// TODO: DEPRECATED
class SetupMainDialog;
class SetupEditView;
// TODO: DEPRECATED
void configureMediaTypes();
void configureMediaTypess();
+ // TODO: DEPRECATED
void configureMediaImagePaths();
+ void configureMediaImagePathss();
// TODO: DEPRECATED
void configureSetups();
void configureSetupss();
// TODO: deprecated
MediaTypeDialog *mediaTypeDialog;
MediaTypeEditView *mdtDialog;
+ // TODO: DEPRECATED
MediaImagePathMainDialog *mediaImagePathDialog;
+ FilePathEditView *mediaImagePathView;
// TODO: deprecated
SetupMainDialog *setupMainDialog;
SetupEditView *setupMainView;
// TODO: deprecated
QAction *configMediaTypeAction;
QAction *configMediaTypesAction;
+ // TODO: DEPRECATED
QAction *configMediaImagePathAction;
+ QAction *configMediaImagePathsAction;
// TODO: deprecated
QAction *configSetupAction;
QAction *configSetupsAction;
void FilePathModel::refresh()
{
-
- // TODO
+ setQuery(constructSelect());
+ setHeaderData(FilePath_Id, Qt::Horizontal, tr("Id"));
+ setHeaderData(FilePath_Name, Qt::Horizontal, tr("Name"));
+ setHeaderData(FilePath_LastScanned, Qt::Horizontal, tr("Last scanned"));
+ setHeaderData(FilePath_SetupId, Qt::Horizontal, tr("Set up id"));
+ setHeaderData(FilePath_SetupName, Qt::Horizontal, tr("Set up"));
}
QString FilePathModel::constructSelect(QString where) const
--- /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 "filepatheditview.h"
+#include "filepathmodel.h"
+#include "setupmodel.h"
+#include "comboboxdelegate.h"
+#include <QtGui>
+
+FilePathEditView::FilePathEditView(QWidget *parent) :
+ EmuFrontEditView(parent)
+{
+ model = new FilePathModel(this);
+ objectList->setModel(model);
+ /*SetupModel *stupMdl = new SetupModel(this);
+ ComboBoxDelegate *setupDelegate = new ComboBoxDelegate(
+ stupMdl,
+ SetupModel::Setup_Id,
+ SetupModel::Setup_Name,
+ this
+ );
+ objectList->setItemDelegateForColumn(FilePathModel::FilePath_SetupId, setupDelegate);*/
+ 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 FILEPATHEDITVIEW_H
+#define FILEPATHEDITVIEW_H
+
+#include "emufronteditview.h"
+
+class FilePathEditView : public EmuFrontEditView
+{
+ Q_OBJECT
+public:
+ FilePathEditView(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // FILEPATHEDITVIEW_H