3 ** Copyright 2010 Mikko Keinänen
5 ** This file is part of EmuFront.
8 ** EmuFront is free software: you can redistribute it and/or modify
9 ** it under the terms of the GNU General Public License version 2 as published by
10 ** the Free Software Foundation and appearing in the file gpl.txt included in the
11 ** packaging of this file.
13 ** EmuFront is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ** GNU General Public License for more details.
18 ** You should have received a copy of the GNU General Public License
19 ** along with EmuFront. If not, see <http://www.gnu.org/licenses/>.
22 #include "executablemaindialog.h"
23 #include "executableeditdialog.h"
24 #include "dbexecutable.h"
25 #include "executable.h"
27 ExecutableMainDialog::ExecutableMainDialog(QWidget *parent)
28 : DbObjectDialog(parent)
30 setWindowTitle(tr("Emulators"));
31 dbManager = new DbExecutable(this);
34 hiddenColumns << DbExecutable::Executable_Id;
35 hiddenColumns << DbExecutable::Executable_TypeId;
36 hiddenColumns << DbExecutable::Executable_SetupId;
41 ExecutableMainDialog::~ExecutableMainDialog()
43 deleteCurrentObject();
46 void ExecutableMainDialog::initEditDialog()
48 nameDialog = new ExecutableEditDialog(
49 this, dynamic_cast<Executable*>(dbObject));
50 connectNameDialogSignals();
53 void ExecutableMainDialog::deleteCurrentObject()
56 Executable *exe = dynamic_cast<Executable*>(dbObject);
58 else qDebug() << "Failed deleting Executable";
63 void ExecutableMainDialog::cleanUp()
65 deleteCurrentObject();
67 ExecutableEditDialog *pnd =
68 dynamic_cast<ExecutableEditDialog *>(nameDialog);
70 else qDebug() << "Failed to delete PlatformNameDialog";
75 EmuFrontObject* ExecutableMainDialog::createObject()
77 Executable *ex = new Executable;