mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.5 KiB
C++
68 lines
2.5 KiB
C++
#ifndef LAUNCHERSETTINGS_HPP
|
|
#define LAUNCHERSETTINGS_HPP
|
|
|
|
#include "gamesettings.hpp"
|
|
#include "settingsbase.hpp"
|
|
|
|
namespace Config
|
|
{
|
|
class LauncherSettings : public SettingsBase<QMultiMap<QString, QString>>
|
|
{
|
|
public:
|
|
bool writeFile(QTextStream& stream);
|
|
|
|
/// \return names of all Content Lists in the launcher's .cfg file.
|
|
QStringList getContentLists();
|
|
|
|
/// Set initially selected content list to match values from openmw.cfg, creating if necessary
|
|
void setContentList(const GameSettings& gameSettings);
|
|
|
|
/// Create a Content List (or replace if it already exists)
|
|
void setContentList(const QString& contentListName, const QStringList& dirNames,
|
|
const QStringList& archiveNames, const QStringList& fileNames);
|
|
|
|
void removeContentList(const QString& contentListName);
|
|
|
|
void setCurrentContentListName(const QString& contentListName);
|
|
|
|
QString getCurrentContentListName() const;
|
|
|
|
QStringList getDataDirectoryList(const QString& contentListName) const;
|
|
QStringList getArchiveList(const QString& contentListName) const;
|
|
QStringList getContentListFiles(const QString& contentListName) const;
|
|
|
|
/// \return new list that is reversed order of input
|
|
static QStringList reverse(const QStringList& toReverse);
|
|
|
|
static const char sLauncherConfigFileName[];
|
|
|
|
private:
|
|
/// \return key to use to get/set the files in the specified data Directory List
|
|
static QString makeDirectoryListKey(const QString& contentListName);
|
|
|
|
/// \return key to use to get/set the files in the specified Archive List
|
|
static QString makeArchiveListKey(const QString& contentListName);
|
|
|
|
/// \return key to use to get/set the files in the specified Content List
|
|
static QString makeContentListKey(const QString& contentListName);
|
|
|
|
/// \return true if both lists are same
|
|
static bool isEqual(const QStringList& list1, const QStringList& list2);
|
|
|
|
static QString makeNewContentListName();
|
|
|
|
QStringList subKeys(const QString& key);
|
|
|
|
/// name of entry in launcher.cfg that holds name of currently selected Content List
|
|
static const char sCurrentContentListKey[];
|
|
|
|
/// section of launcher.cfg holding the Content Lists
|
|
static const char sContentListsSectionPrefix[];
|
|
|
|
static const char sDirectoryListSuffix[];
|
|
static const char sArchiveListSuffix[];
|
|
static const char sContentListSuffix[];
|
|
};
|
|
}
|
|
#endif // LAUNCHERSETTINGS_HPP
|