![]() |
libQuotient
A Qt library for building matrix clients
|
A group of settings for one Matrix account. More...
#include <settings.h>
Public Member Functions | |
AccountSettings (const QString &accountId, QObject *parent=nullptr) | |
QString | userId () const |
QUrl | homeserver () const |
void | setHomeserver (const QUrl &url) |
QByteArray | encryptionAccountPickle () |
void | setEncryptionAccountPickle (const QByteArray &encryptionAccountPickle) |
Q_INVOKABLE void | clearEncryptionAccountPickle () |
![]() | |
SettingsGroup (const QString &path, QObject *parent=nullptr) | |
![]() | |
Settings (QObject *parent=nullptr) | |
Q_INVOKABLE void | setValue (const QString &key, const QVariant &value) |
Set the value for a given key. | |
Q_INVOKABLE void | remove (const QString &key) |
Remove the value from both the primary and legacy locations. | |
Q_INVOKABLE QVariant | value (const QString &key, const QVariant &defaultValue={}) const |
Obtain a value for a given key. | |
template<typename T > | |
T | get (const QString &key, const T &defaultValue={}) const |
Obtain a value for a given key, coerced to the given type. | |
Q_INVOKABLE bool | contains (const QString &key) const |
Q_INVOKABLE QStringList | childGroups () const |
Q_INVOKABLE QStringList | childGroups (bool decodeSlashes) const |
Properties | |
QString | userId |
QByteArray | encryptionAccountPickle |
Additional Inherited Members | |
![]() | |
static void | setLegacyNames (const QString &organizationName, const QString &applicationName={}) |
Add a legacy organisation/application name to migrate settings from. | |
static QString | toEncoded (QString key) |
Escape forward- and backslashes in keys because QSettings doesn't (see #842) | |
static QString | fromEncoded (QString key) |
Unescape \ and / in keys stored with escapedForSettings() | |
![]() | |
QSettings | legacySettings { legacyOrganizationName, legacyApplicationName } |
A group of settings for one Matrix account.
This class provides typesafe accessors to common account settings such as user and device id. User id (aka MXID) is stored as a group name. Although QSettings does not protect forward- and backslashes inside group names, AccountSettings covers for that, percent-encoding the user id before passing it to QSettings.
Definition at line 113 of file settings.h.
|
explicit |
Q_INVOKABLE void Quotient::AccountSettings::clearEncryptionAccountPickle | ( | ) |
QByteArray Quotient::AccountSettings::encryptionAccountPickle | ( | ) |
QUrl Quotient::AccountSettings::homeserver | ( | ) | const |
void Quotient::AccountSettings::setEncryptionAccountPickle | ( | const QByteArray & | encryptionAccountPickle | ) |
void Quotient::AccountSettings::setHomeserver | ( | const QUrl & | url | ) |
QString Quotient::AccountSettings::userId | ( | ) | const |
|
readwrite |
Definition at line 119 of file settings.h.
|
read |
Definition at line 115 of file settings.h.