OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launchersettings.hpp
Go to the documentation of this file.
1 #ifndef LAUNCHERSETTINGS_HPP
2 #define LAUNCHERSETTINGS_HPP
3 
4 #include "settingsbase.hpp"
5 #include "gamesettings.hpp"
6 
7 namespace Config
8 {
9  class LauncherSettings : public SettingsBase<QMap<QString, QString> >
10  {
11  public:
14 
15  bool writeFile(QTextStream &stream);
16 
18  QStringList getContentLists();
19 
21  void setContentList(const GameSettings& gameSettings);
22 
24  void setContentList(const QString& contentListName, const QStringList& fileNames);
25 
26  void removeContentList(const QString &contentListName);
27 
28  void setCurrentContentListName(const QString &contentListName);
29 
30  QString getCurrentContentListName() const;
31 
32  QStringList getContentListFiles(const QString& contentListName) const;
33 
35  static QStringList reverse(const QStringList& toReverse);
36 
37  static const char sLauncherConfigFileName[];
38 
39  private:
40 
42  static QString makeContentListKey(const QString& contentListName);
43 
45  static bool isEqual(const QStringList& list1, const QStringList& list2);
46 
47  static QString makeNewContentListName();
48 
49  QStringList subKeys(const QString &key);
50 
52  static const char sCurrentContentListKey[];
53 
55  static const char sContentListsSectionPrefix[];
56 
57  static const char sContentListSuffix[];
58  };
59 }
60 #endif // LAUNCHERSETTINGS_HPP
QStringList getContentListFiles(const QString &contentListName) const
Definition: launchersettings.cpp:154
~LauncherSettings()
Definition: launchersettings.cpp:19
static QStringList reverse(const QStringList &toReverse)
Definition: launchersettings.cpp:160
void removeContentList(const QString &contentListName)
Definition: launchersettings.cpp:128
static QString makeContentListKey(const QString &contentListName)
Definition: launchersettings.cpp:96
QStringList subKeys(const QString &key)
Definition: launchersettings.cpp:23
static const char sContentListSuffix[]
Definition: launchersettings.hpp:57
QString getCurrentContentListName() const
Definition: launchersettings.cpp:149
void setCurrentContentListName(const QString &contentListName)
Definition: launchersettings.cpp:133
static QString makeNewContentListName()
Definition: launchersettings.cpp:187
Definition: settingsbase.hpp:13
static const char sLauncherConfigFileName[]
Definition: launchersettings.hpp:37
void setContentList(const GameSettings &gameSettings)
Set initially selected content list to match values from openmw.cfg, creating if necessary.
Definition: launchersettings.cpp:101
LauncherSettings()
Definition: launchersettings.cpp:15
static const char sCurrentContentListKey[]
name of entry in launcher.cfg that holds name of currently selected Content List
Definition: launchersettings.hpp:52
static bool isEqual(const QStringList &list1, const QStringList &list2)
Definition: launchersettings.cpp:168
Definition: launchersettings.hpp:9
QStringList getContentLists()
Definition: launchersettings.cpp:91
bool writeFile(QTextStream &stream)
Definition: launchersettings.cpp:52
static const char sContentListsSectionPrefix[]
section of launcher.cfg holding the Content Lists
Definition: launchersettings.hpp:55
Definition: gamesettings.hpp:20