ExternalExecutableModel. Used new view in MainWindow.
views/filepatheditview.h \
delegates/filesystembrowsedelegate.h \
widgets/filepathselectorwidget.h \
- models/externalexecutablemodel.h
+ models/externalexecutablemodel.h \
+ views/externalexecutableeditview.h
SOURCES += main.cpp \
mainwindow.cpp \
db/databasemanager.cpp \
views/filepatheditview.cpp \
delegates/filesystembrowsedelegate.cpp \
widgets/filepathselectorwidget.cpp \
- models/externalexecutablemodel.cpp
+ models/externalexecutablemodel.cpp \
+ views/externalexecutableeditview.cpp
OTHER_FILES +=
CONFIG += mobility
// TODO: deprecated
#include "setupmaindialog.h"
#include "setupeditview.h"
+// TODO: deprecated
#include "executablemaindialog.h"
+#include "externalexecutableeditview.h"
#include "datfileutil.h"
#include "databasemanager.h"
#include "dbcreator.h"
// TODO: deprecated
setupMainDialog = 0;
setupMainView = 0;
+ // TODO: deprecated
executableMainDialog = 0;
+ emulatorEditView = 0;
}
void MainWindow::connectSignals()
configEmulatorAction->setStatusTip(tr("Configure emulators"));
connect(configEmulatorAction, SIGNAL(triggered()), this, SLOT(configureEmulators()));
+ configEmulatorsAction = new QAction(tr("Configure Em&ulators"), this);
+ configEmulatorsAction->setStatusTip(tr("Add, edit and delete emulator configurations"));
+ connect(configEmulatorsAction, SIGNAL(triggered()), this, SLOT(configureEmulatorss()));
+
+
configTmpDirAction = new QAction(tr("&Temp dir"), this);
configTmpDirAction->setStatusTip(tr("Configure directory for temporary files."));
connect(configTmpDirAction, SIGNAL(triggered()), this, SLOT(configureTmpDir()));
}
+// TODO: deprecated
void MainWindow::configureEmulators()
{
if (!executableMainDialog) {
executableMainDialog->refreshDataModel();
}
+void MainWindow::configureEmulatorss()
+{
+ if (!emulatorEditView) {
+ emulatorEditView = new ExternalExecutableEditView(this);
+ connect(emulatorEditView, SIGNAL(finished(int)), this, SLOT(updateData()));
+ }
+ activateDialog(emulatorEditView);
+}
+
void MainWindow::configureTmpDir()
{
/*if (!tmpFolderDialog) {
// TODO: DEPRECATED
configMenu->addAction(configMediaImagePathAction);
configMenu->addAction(configMediaImagePathsAction);
+ // TODO: DEPRECATED
configMenu->addAction(configEmulatorAction);
+ configMenu->addAction(configEmulatorsAction);
configMenu->addSeparator();
configMenu->addAction(manageDatFilesAction);
// TODO: DEPRECATED
class SetupMainDialog;
class SetupEditView;
+// TODO: DEPRECATED
class ExecutableMainDialog;
+class ExternalExecutableEditView;
//class TmpFolderEditDialog;
class QLabel;
class DatabaseManager;
// TODO: DEPRECATED
void configureSetups();
void configureSetupss();
+ // TODO: DEPRECATED
void configureEmulators();
+ void configureEmulatorss();
void configureTmpDir();
void resetDb();
void updateData();
// TODO: deprecated
SetupMainDialog *setupMainDialog;
SetupEditView *setupMainView;
+ // TODO: deprecated
ExecutableMainDialog *executableMainDialog;
+ ExternalExecutableEditView *emulatorEditView;
//TmpFolderEditDialog *tmpFolderDialog;
QMenu *configMenu;
QMenu *fileMenu;
// TODO: deprecated
QAction *configSetupAction;
QAction *configSetupsAction;
+ // TODO: deprecated
QAction *configEmulatorAction;
+ QAction *configEmulatorsAction;
QAction *exitAction;
QAction *resetDbAction;
QAction *aboutAction;
--- /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 "externalexecutableeditview.h"
+#include "externalexecutablemodel.h"
+#include "setupmodel.h"
+#include "comboboxdelegate.h"
+#include <QtGui>
+
+ExternalExecutableEditView::ExternalExecutableEditView(QWidget *parent) :
+ EmuFrontEditView(parent)
+{
+ model = new ExternalExecutableModel(this);
+ objectList->setModel(model);
+ SetupModel *stupMdl = new SetupModel(this);
+ ComboBoxDelegate *setupDelegate = new ComboBoxDelegate(
+ stupMdl,
+ SetupModel::Setup_Id,
+ SetupModel::Setup_Name,
+ this
+ );
+ objectList->setItemDelegateForColumn(ExternalExecutableModel::Executable_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 EXTERNALEXECUTABLEEDITVIEW_H
+#define EXTERNALEXECUTABLEEDITVIEW_H
+
+#include "emufronteditview.h"
+
+class ExternalExecutableEditView : public EmuFrontEditView
+{
+ Q_OBJECT
+public:
+ explicit ExternalExecutableEditView(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // EXTERNALEXECUTABLEEDITVIEW_H
**
** 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
+*/
+#ifndef FILEPATHEDITVIEW_H
#define FILEPATHEDITVIEW_H
#include "emufronteditview.h"