17 #include <QCoreApplication>
25 #include <QStringList>
26 #include "../../util/btassert.h"
27 #include "../btglobal.h"
33 namespace sword {
class ListKey; }
276 explicit BtConfig(
const QString & settingsFile);
BtConfig & btConfig()
This is a shortchand for BtConfig::getInstance().
BtConfigCore group(Prefix &&prefix) const &
QMap< QString, QString > StringMap
QString getModuleEncryptionKey(const QString &name)
Function to get a module decryption key.
static void storeFilterOptionsToGroup(FilterOptions const &options, BtConfigCore &group)
Saves the current filter options.
BtConfigCore session() const
static FilterOptions loadFilterOptionsFromGroup(BtConfigCore const &group)
void setFontForLanguage(Language const &language, FontSettingsPair const &fontSettings)
Set font for a language.
QPair< bool, QFont > FontSettingsPair
static DisplayOptions loadDisplayOptionsFromGroup(BtConfigCore const &group)
QHash< QString, QString > m_sessionNames
void setDefaultSwordModuleByType(const QString &moduleType, const CSwordModuleInfo *const module)
Sets the default sword module for a module type.
void setSearchScopesWithCurrentLocale(const QStringList &scopeModules, StringMap searchScopes)
QHash< QString, QString > sessionNames() const
QString m_currentSessionKey
QFont const & getDefaultFont() const
QString currentSessionName() const
static InitState initBtConfig()
static void destroyInstance()
DisplayOptions getDisplayOptions() const
QString addSession(const QString &name)
Creates a new session with the given name.
void deleteSearchScopesWithCurrentLocale()
static void forceMigrate()
static sword::ListKey parseVerseListWithModules(const QString &data, const QStringList &scopeModules)
void setModuleEncryptionKey(const QString &name, const QString &key)
Function to set a module decryption key.
QHash< Language const *, FontSettingsPair > m_fontCache
a cache for the fonts saved in the configuration file for speed
void setShortcuts(QString const &shortcutGroup, ShortcutsMap const &shortcuts)
Sets the shortcuts for the given group.
static BtConfig * m_instance
singleton instance
QFont m_defaultFont
default font used when no special one is set
QHash< QString, QList< QKeySequence > > ShortcutsMap
FontSettingsPair getFontForLanguage(Language const &language)
Get font for a language.
@ INIT_NEED_UNIMPLEMENTED_FORWARD_MIGRATE
@ INIT_NEED_UNIMPLEMENTED_BACKWARD_MIGRATE
void setCurrentSession(const QString &key)
Notifies the configuration system that the session settings should be read from and saved to the give...
QString const & currentSessionKey() const
void deleteSession(const QString &key)
Deletes the session with the given key.
QString booknameLanguage()
CSwordModuleInfo * getDefaultSwordModuleByType(const QString &moduleType)
Returns default sword module info class for a given module type.
FilterOptions getFilterOptions() const
ShortcutsMap getShortcuts(QString const &shortcutGroup)
Gets the shortcuts for the given group.
static void storeDisplayOptionsToGroup(DisplayOptions const &options, BtConfigCore &group)
Saves the current display options.
static StringMap m_defaultSearchScopes
static BtConfig & getInstance()
StringMap getSearchScopesForCurrentLocale(const QStringList &scopeModules)