X-Git-Url: http://git.maemo.org/git/?p=emufront;a=blobdiff_plain;f=src%2Fmainwindow.h;h=390691e8ef2300216543483ba0a81dce0ab4905a;hp=326395ad02a9070ed6ed6fdc32daf74cf4535236;hb=HEAD;hpb=6887a4e7986a5fea38a868a860c4da7a2d7f1b8c diff --git a/src/mainwindow.h b/src/mainwindow.h index 326395a..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 as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// 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,54 +24,87 @@ #include class QAction; -class PlatformDialog; -class MediaTypeDialog; -class MediaImagePathMainDialog; -class SetupMainDialog; +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(); void writeSettings(); bool okToContinue(); + void connectSignals(); void activateDialog(EmuFrontDialog*) const; - PlatformDialog *platformDialog; - MediaTypeDialog *mediaTypeDialog; - MediaImagePathMainDialog *mediaImagePathDialog; - SetupMainDialog *setupMainDialog; + bool testDB(bool reset); + void createDB() const; + + PlatformEditView *plfDialog; + MediaTypeEditView *mdtDialog; + FilePathEditView *mediaImagePathView; + SetupEditView *setupMainView; + ExternalExecutableEditView *emulatorEditView; QMenu *configMenu; - QMenu *fileMenu; - QAction *configPlatformAction; - QAction *configMediaTypeAction; - QAction *configMediaImagePathAction; - QAction *configSetupAction; + QMenu *fileMenu; + QMenu *helpMenu; + 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