1. Start EmuFront
------------------
+=================
- if database already exists move/remove it:
$ mv ~/emufront.db.sqlite ~/emufront.db.sqlite.bak
> empty area for filtered media image containers is shown
2. Set temporary directory
---------------------------
+==========================
- Select 'Config->Temp dir'
> A file selector is opened, only folders can be selected
- Select a folder
> A messagebox is shown telling that the Temporary directory has been updated to selected folder.
3. Platform
------------
+===========
3.1 Open platform editor
------------------------
> Platform was removed from the table view
4. Media Types
---------------
+==============
+
+5. Setups
+=========
+
+Delete all the platforms and media types first.
+
+5.1 Open setup editor
+---------------------
+- Select 'Config->Configure setups'
+> New view is opened with a title describing about setting setups
+ > 'Add' and 'OK' buttons active
+ > 'Edit' and 'Delete' buttons disabled
+
+5.2 Add setup
+-------------
+
+5.2.1 Add setup with no platforms and media types configured
+------------------------------------------------------------
+- Click Add button
+>
+
+5.2.2 Add setup with no platforms configured
+--------------------------------------------
+
+5.2.3 Add setup with no media types configured
+----------------------------------------------
+
+5.2.3 Add setup with a single media type and a single platform configured
+-------------------------------------------------------------------------
+
+5.2.3 Add setup with multiple media types and platforms configured
+------------------------------------------------------------------
+
+
#include "dbcreator.h"
#include "dbconfig.h"
#include "setupmodel.h"
+#include "platformmodel.h"
+#include "mediatypemodel.h"
QString MainWindow::aboutStr = trUtf8(
"<h2>EmuFront</h2>"
tmpDirFilePath = QDir::homePath();
qDebug() << "Temporary dir is " << tmpDirFilePath;
supModel = new SetupModel(this);
+ plfModel = new PlatformModel(this);
+ mdtModel = new MediaTypeModel(this);
emuModel = new ExternalExecutableModel(this);
launcher = new EmuLauncher(errorMessage, supModel, emuModel, this, tmpDirFilePath);
setCentralWidget(launcher);
void MainWindow::configurePlatformss()
{
if (!plfDialog) {
- plfDialog = new PlatformEditView(this);
+ plfDialog = new PlatformEditView(plfModel, this);
connect(plfDialog, SIGNAL(finished(int)), this, SLOT(updateData()));
}
activateDialog(plfDialog);
{
if (!mdtDialog)
{
- mdtDialog = new MediaTypeEditView(this);
+ mdtDialog = new MediaTypeEditView(mdtModel, this);
connect(mdtDialog, SIGNAL(finished(int)), this, SLOT(updateData()));
}
activateDialog(mdtDialog);
void MainWindow::configureSetupss()
{
- //TODO: maybe a common setup model in MainWindow, so the data would be in sync without refresh with updateData!
if (!setupMainView) {
- setupMainView = new SetupEditView(supModel, this);
- //connect(setupMainView, SIGNAL(finished(int)), this, SLOT(updateData()));
+ setupMainView = new SetupEditView(plfModel, mdtModel, supModel, this);
}
activateDialog(setupMainView);
}
class QErrorMessage;
class SetupModel;
class ExternalExecutableModel;
+class PlatformModel;
+class MediaTypeModel;
class MainWindow : public QMainWindow
{
QString tmpDirFilePath;
QErrorMessage *errorMessage;
SetupModel *supModel;
- ExternalExecutableModel *emuModel;
+ ExternalExecutableModel *emuModel;
+ PlatformModel *plfModel;
+ MediaTypeModel *mdtModel;
};
#endif
#include "mediatypeeditview.h"
#include "mediatypemodel.h"
-MediaTypeEditView::MediaTypeEditView(QWidget *parent) :
+MediaTypeEditView::MediaTypeEditView(MediaTypeModel *mdtModel, QWidget *parent) :
EmuFrontFileObjectEditView(parent)
{
setWindowTitle(tr("Set media types"));
- model = new MediaTypeModel(this);
+ model = mdtModel;
objectList->setModel(model);
postInit();
}
#include "emufrontfileobjecteditview.h"
+class MediaTypeModel;
+
class MediaTypeEditView : public EmuFrontFileObjectEditView
{
Q_OBJECT
public:
- MediaTypeEditView(QWidget *parent = 0);
+ MediaTypeEditView(MediaTypeModel *mdtModel, QWidget *parent = 0);
};
#endif // MEDIATYPEMAINDIALOG_H
** 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) :
+PlatformEditView::PlatformEditView(PlatformModel *plfModel, QWidget *parent) :
EmuFrontFileObjectEditView(parent)
{
setWindowTitle(tr("Set emulated platforms"));
- model = new PlatformModel(this);
+ model = plfModel;
objectList->setModel(model);
postInit();
}
**
** 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
+*/
+
+#ifndef PLATFORMMAINDIALOG_H
#define PLATFORMMAINDIALOG_H
#include "emufrontfileobjecteditview.h"
+class PlatformModel;
+
class PlatformEditView : public EmuFrontFileObjectEditView
{
Q_OBJECT
public:
- PlatformEditView(QWidget *parent = 0);
+ PlatformEditView(PlatformModel *plfModel, QWidget *parent = 0);
};
#endif // PLATFORMMAINDIALOG_H
#include "mediatypemodel.h"
#include <QSqlTableModel>
-SetupEditView::SetupEditView(SetupModel *supModel, QWidget *parent) :
- EmuFrontEditView(parent)//, model(supModel)
+SetupEditView::SetupEditView(PlatformModel *plfModel, MediaTypeModel *mdtModel, SetupModel *supModel, QWidget *parent) :
+ EmuFrontEditView(parent), plfModel(plfModel), mdtModel(mdtModel)
{
setWindowTitle(tr("Setups"));
model = supModel;
- //model = new SetupModel(this);
objectList->setModel(model);
- PlatformModel *plfModel = new PlatformModel(this);
ComboBoxDelegate *platformDelegate = new ComboBoxDelegate(
plfModel,
PlatformModel::EmuFrontFileObject_Id,
this
);
objectList->setItemDelegateForColumn(SetupModel::Setup_PlatformId, platformDelegate);
- MediaTypeModel *mdtModel = new MediaTypeModel(this);
ComboBoxDelegate *mediatypeDelegate = new ComboBoxDelegate(
mdtModel,
MediaTypeModel::EmuFrontFileObject_Id,
#include "emufronteditview.h"
+class PlatformModel;
+class MediaTypeModel;
class SetupModel;
class SetupEditView : public EmuFrontEditView
{
Q_OBJECT
public:
- SetupEditView(SetupModel *supModel, QWidget *parent = 0);
+ SetupEditView(PlatformModel *plfModel, MediaTypeModel *mdtModel, SetupModel *supModel, QWidget *parent = 0);
signals:
public slots:
private:
-
+ PlatformModel *plfModel;
+ MediaTypeModel *mdtModel;
};
#endif // SETUPMAINVIEW_H