X-Git-Url: http://git.maemo.org/git/?p=emufront;a=blobdiff_plain;f=src%2Fmainwindow.h;h=390691e8ef2300216543483ba0a81dce0ab4905a;hp=7f8ba294773b52d26fb4df4030bcdb6cb5f95911;hb=HEAD;hpb=7c518bfa60fd8b21e82dcab019ec7d591348e078 diff --git a/src/mainwindow.h b/src/mainwindow.h index 7f8ba29..390691e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -1,21 +1,22 @@ -// 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 . +/* ** 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 . +*/ #ifndef MAINWINDOW_H #define MAINWINDOW_H @@ -23,38 +24,50 @@ #include class QAction; -class PlatformDialog; -class MediaTypeDialog; -class MediaImagePathMainDialog; -class SetupMainDialog; -class ExecutableMainDialog; +class PlatformEditView; +class MediaTypeEditView; +class MediaTypeEditView; +class FilePathEditView; +class SetupEditView; +class ExternalExecutableEditView; class QLabel; class DatabaseManager; class EmuFrontDialog; class EmuLauncher; +class DatFileUtil; +class QErrorMessage; +class SetupModel; +class ExternalExecutableModel; +class PlatformModel; +class MediaTypeModel; class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow(); + MainWindow(bool reset = false); //~MainWindow() protected: void closeEvent(QCloseEvent *event); private slots: - void configurePlatforms(); + void configurePlatforms(); void configureMediaTypes(); void configureMediaImagePaths(); void configureSetups(); void configureEmulators(); + void configureTmpDir(); + void resetDb(); void updateData(); + void manageDatFiles(); void about(); private: - void createActions(); + static QString aboutStr; + static QString aboutTitle; + void createActions(); void createMenus(); void createStatusBar(); void readSettings(); @@ -62,24 +75,36 @@ private: bool okToContinue(); void connectSignals(); void activateDialog(EmuFrontDialog*) const; - PlatformDialog *platformDialog; - MediaTypeDialog *mediaTypeDialog; - MediaImagePathMainDialog *mediaImagePathDialog; - SetupMainDialog *setupMainDialog; - ExecutableMainDialog *executableMainDialog; + bool testDB(bool reset); + void createDB() const; + + PlatformEditView *plfDialog; + MediaTypeEditView *mdtDialog; + FilePathEditView *mediaImagePathView; + SetupEditView *setupMainView; + ExternalExecutableEditView *emulatorEditView; QMenu *configMenu; QMenu *fileMenu; QMenu *helpMenu; - QAction *configPlatformAction; - QAction *configMediaTypeAction; - QAction *configMediaImagePathAction; - QAction *configSetupAction; - QAction *configEmulatorAction; + QAction *configPlatformsAction; + QAction *configMediaTypesAction; + QAction *configMediaImagePathsAction; + QAction *configSetupsAction; + QAction *configEmulatorsAction; QAction *exitAction; + QAction *resetDbAction; QAction *aboutAction; + QAction *configTmpDirAction; + QAction *manageDatFilesAction; QLabel *messageLabel; DatabaseManager *dbManager; EmuLauncher *launcher; + QString tmpDirFilePath; + QErrorMessage *errorMessage; + SetupModel *supModel; + ExternalExecutableModel *emuModel; + PlatformModel *plfModel; + MediaTypeModel *mdtModel; }; #endif