OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mainwizard.hpp
Go to the documentation of this file.
1 #ifndef MAINWIZARD_HPP
2 #define MAINWIZARD_HPP
3 
4 #include <QProcess>
5 #include <QWizard>
6 #include <QMap>
7 
9 
10 #ifndef Q_MOC_RUN
12 #endif
15 
16 namespace Wizard
17 {
18  class MainWizard : public QWizard
19  {
20  Q_OBJECT
21 
22  public:
23  struct Installation {
27 
28  QString iniPath;
29  };
30 
31  enum {
41  };
42 
43  MainWizard(QWidget *parent = 0);
44  ~MainWizard();
45 
46  bool findFiles(const QString &name, const QString &path);
47  void addInstallation(const QString &path);
48  void runSettingsImporter();
49 
50  QMap<QString, Installation> mInstallations;
51 
53 
55 
56  bool mError;
57 
58  public slots:
59  void addLogText(const QString &text);
60 
61  private:
63  QString toQString(const boost::filesystem::path& path);
64 
65  void setupLog();
66  void setupGameSettings();
67  void setupLauncherSettings();
68  void setupInstallations();
69  void setupPages();
70 
71  void writeSettings();
72 
75 
76  QString mLogError;
77 
78  private slots:
79 
80  void importerStarted();
81  void importerFinished(int exitCode, QProcess::ExitStatus exitStatus);
82 
83  void accept();
84  void reject();
85 
86  };
87 
88 }
89 
90 #endif // MAINWIZARD_HPP
void setupLog()
Definition: mainwizard.cpp:78
Definition: mainwizard.hpp:18
Definition: mainwizard.hpp:23
void importerFinished(int exitCode, QProcess::ExitStatus exitStatus)
Definition: mainwizard.cpp:347
Config::LauncherSettings mLauncherSettings
Definition: mainwizard.hpp:74
QMap< QString, Installation > mInstallations
Definition: mainwizard.hpp:50
void setupInstallations()
Definition: mainwizard.cpp:222
void writeSettings()
Definition: mainwizard.cpp:375
void reject()
Definition: mainwizard.cpp:362
void setupGameSettings()
Definition: mainwizard.cpp:128
Definition: configurationmanager.hpp:20
~MainWizard()
Definition: mainwizard.cpp:73
Definition: mainwizard.hpp:33
Definition: mainwizard.hpp:39
QString mLogError
Definition: mainwizard.hpp:76
void accept()
Definition: mainwizard.cpp:356
Definition: mainwizard.hpp:34
Definition: processinvoker.hpp:10
bool hasBloodmoon
Definition: mainwizard.hpp:26
void addInstallation(const QString &path)
Definition: mainwizard.cpp:294
void runSettingsImporter()
Definition: mainwizard.cpp:232
Definition: mainwizard.hpp:36
Config::GameSettings mGameSettings
Definition: mainwizard.hpp:73
void setupPages()
Definition: mainwizard.cpp:326
Files::ConfigurationManager mCfgMgr
Definition: mainwizard.hpp:52
Definition: mainwizard.hpp:37
QString toQString(const boost::filesystem::path &path)
convert boost::filesystem::path to QString
Definition: mainwizard.cpp:470
bool hasMorrowind
Definition: mainwizard.hpp:24
void addLogText(const QString &text)
Definition: mainwizard.cpp:100
void importerStarted()
Definition: mainwizard.cpp:343
Definition: launchersettings.hpp:9
void setupLauncherSettings()
Definition: mainwizard.cpp:188
QString iniPath
Definition: mainwizard.hpp:28
MainWizard(QWidget *parent=0)
Definition: mainwizard.cpp:27
bool hasTribunal
Definition: mainwizard.hpp:25
Definition: mainwizard.hpp:40
bool findFiles(const QString &name, const QString &path)
Definition: mainwizard.cpp:458
Definition: mainwizard.hpp:32
Process::ProcessInvoker * mImporterInvoker
Definition: mainwizard.hpp:54
bool mError
Definition: mainwizard.hpp:56
Definition: mainwizard.hpp:38
Definition: gamesettings.hpp:20
const char * name
Definition: crashcatcher.cpp:59