Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
CoreUserSettings Class Reference

#include </tmp/quassel/src/core/coreusersettings.h>

Inheritance diagram for CoreUserSettings:
Collaboration diagram for CoreUserSettings:

Public Types

enum  Mode { Default, Custom }

Public Member Functions

 CoreUserSettings (UserId user)
Identity identity (IdentityId id)
QList< IdentityIdidentityIds ()
void storeIdentity (const Identity &identity)
void removeIdentity (IdentityId id)
void setSessionState (const QVariant &data)
QVariant sessionState (const QVariant &def=QVariant())
void setStorageSettings (const QVariant &data)
QVariant storageSettings (const QVariant &def=QVariant())
QVariant oldDbSettings ()
void setCoreState (const QVariant &data)
QVariant coreState (const QVariant &def=QVariant())
virtual void notify (const QString &key, QObject *receiver, const char *slot)
 Call the given slot on change of the given key.
void initAndNotify (const QString &key, QObject *receiver, const char *slot, const QVariant &defaultValue=QVariant())
 Sets up notification and calls the given slot to set the initial value.
virtual uint version ()

Protected Member Functions

void setGroup (const QString &group_)
virtual QStringList allLocalKeys ()
virtual QStringList localChildKeys (const QString &rootkey=QString())
virtual QStringList localChildGroups (const QString &rootkey=QString())
virtual void setLocalValue (const QString &key, const QVariant &data)
virtual const QVariant & localValue (const QString &key, const QVariant &def=QVariant())
virtual void removeLocalKey (const QString &key)

Protected Attributes

QString group
QString appName

Private Member Functions

QVariantMap sessionData ()
QVariant sessionValue (const QString &key, const QVariant &def=QVariant())
void setSessionValue (const QString &key, const QVariant &value)

Private Attributes

UserId user

Friends

class CoreSession

Detailed Description

Definition at line 31 of file coreusersettings.h.

Member Enumeration Documentation

enum Mode
inherited
Enumerator:
Default 
Custom 

Definition at line 47 of file settings.h.

Constructor & Destructor Documentation

Definition at line 23 of file coreusersettings.cpp.

Member Function Documentation

Identity identity ( IdentityId  id)

Definition at line 28 of file coreusersettings.cpp.

References Settings::localValue(), and toInt().

Referenced by CoreSession::loadSettings().

QList< IdentityId > identityIds ( )

Definition at line 38 of file coreusersettings.cpp.

References Settings::localChildKeys().

Referenced by CoreSession::loadSettings().

void storeIdentity ( const Identity identity)

Definition at line 48 of file coreusersettings.cpp.

References Identity::id(), Settings::setLocalValue(), and SignedId::toInt().

void removeIdentity ( IdentityId  id)

Definition at line 54 of file coreusersettings.cpp.

References Settings::removeLocalKey(), and toInt().

Referenced by CoreSession::loadSettings().

void setSessionState ( const QVariant &  data)

Definition at line 60 of file coreusersettings.cpp.

References Settings::setLocalValue().

QVariant sessionState ( const QVariant &  def = QVariant())

Definition at line 66 of file coreusersettings.cpp.

References Settings::localValue().

QVariantMap sessionData ( )
private

Definition at line 72 of file coreusersettings.cpp.

References Settings::localChildKeys(), and Settings::localValue().

QVariant sessionValue ( const QString &  key,
const QVariant &  def = QVariant() 
)
private

Definition at line 88 of file coreusersettings.cpp.

References Settings::localValue().

void setSessionValue ( const QString &  key,
const QVariant &  value 
)
private

Definition at line 82 of file coreusersettings.cpp.

References Settings::setLocalValue().

void setStorageSettings ( const QVariant &  data)
inherited

Definition at line 35 of file coresettings.cpp.

References Settings::setLocalValue().

Referenced by Core::saveBackendSettings().

QVariant storageSettings ( const QVariant &  def = QVariant())
inherited

Definition at line 41 of file coresettings.cpp.

References Settings::localValue().

Referenced by Core::init().

QVariant oldDbSettings ( )
inherited

Definition at line 48 of file coresettings.cpp.

References Settings::localValue().

void setCoreState ( const QVariant &  data)
inherited

Definition at line 54 of file coresettings.cpp.

References Settings::setLocalValue().

Referenced by Core::saveState().

QVariant coreState ( const QVariant &  def = QVariant())
inherited

Definition at line 60 of file coresettings.cpp.

References Settings::localValue().

Referenced by Core::restoreState().

void initAndNotify ( const QString &  key,
QObject *  receiver,
const char *  slot,
const QVariant &  defaultValue = QVariant() 
)
inherited
uint version ( )
virtualinherited

Definition at line 75 of file settings.cpp.

References create_qsettings, and VERSION.

Referenced by Core::Core(), and QtUiApplication::init().

void setGroup ( const QString &  group_)
inlineprotectedinherited

Definition at line 62 of file settings.h.

References Settings::group.

QStringList allLocalKeys ( )
protectedvirtualinherited

Definition at line 89 of file settings.cpp.

References create_qsettings, and Settings::group.

Referenced by ShortcutSettings::clear().

QStringList localChildKeys ( const QString &  rootkey = QString())
protectedvirtualinherited
QStringList localChildGroups ( const QString &  rootkey = QString())
protectedvirtualinherited
void setLocalValue ( const QString &  key,
const QVariant &  data 
)
protectedvirtualinherited

Definition at line 131 of file settings.cpp.

References create_qsettings, Settings::group, Settings::hasNotifier(), Settings::normalizedKey(), Settings::notifier(), Settings::setCacheValue(), and SettingsChangeNotifier::valueChanged().

Referenced by BufferSettings::enableUserStateIcons(), ChatViewSettings::enableWebPreview(), BufferSettings::filterMessage(), BufferSettings::removeFilter(), ShortcutSettings::saveShortcut(), CoreAccountSettings::setAccountValue(), TabCompletionSettings::setAddSpaceMidSentence(), CoreAccountSettings::setAutoConnectAccount(), CoreAccountSettings::setAutoConnectOnStartup(), CoreAccountSettings::setAutoConnectToFixedAccount(), CoreConnectionSettings::setAutoReconnect(), TabCompletionSettings::setCaseSensitivity(), TabCompletionSettings::setCompletionSuffix(), CoreSettings::setCoreState(), UiStyleSettings::setCustomFormat(), BacklogSettings::setDynamicBacklogAmount(), BufferSettings::setErrorMsgsTarget(), BacklogSettings::setFixedBacklogAmount(), BacklogSettings::setGlobalUnreadBacklogAdditional(), BacklogSettings::setGlobalUnreadBacklogLimit(), NotificationSettings::setHighlightList(), NotificationSettings::setHighlightNick(), CoreAccountSettings::setLastAccount(), BufferSettings::setMessageFilter(), CoreConnectionSettings::setNetworkDetectionMode(), NotificationSettings::setNicksCaseSensitive(), BacklogSettings::setPerBufferUnreadBacklogAdditional(), BacklogSettings::setPerBufferUnreadBacklogLimit(), CoreConnectionSettings::setPingTimeoutInterval(), CoreConnectionSettings::setReconnectInterval(), BacklogSettings::setRequesterType(), BufferSettings::setServerNoticesTarget(), setSessionState(), setSessionValue(), WarningsSettings::setShowWarning(), TabCompletionSettings::setSortMode(), CoreSettings::setStorageSettings(), ChatViewSettings::setTimestampFormatString(), TabCompletionSettings::setUseLastSpokenTo(), BufferSettings::setUserNoticesTarget(), UiSettings::setValue(), BufferSettings::setValue(), SessionSettings::setValue(), NotificationSettings::setValue(), ChatViewSettings::setWebSearchUrlFormatString(), CoreAccountSettings::storeAccountData(), and storeIdentity().

const QVariant & localValue ( const QString &  key,
const QVariant &  def = QVariant() 
)
protectedvirtualinherited

Definition at line 143 of file settings.cpp.

References Settings::cacheValue(), create_qsettings, Settings::group, Settings::isCached(), Settings::normalizedKey(), and Settings::setCacheValue().

Referenced by CoreAccountSettings::accountValue(), TabCompletionSettings::addSpaceMidSentence(), CoreAccountSettings::autoConnectAccount(), CoreAccountSettings::autoConnectOnStartup(), CoreAccountSettings::autoConnectToFixedAccount(), CoreConnectionSettings::autoReconnect(), TabCompletionSettings::caseSensitivity(), TabCompletionSettings::completionSuffix(), CoreSettings::coreState(), UiStyleSettings::customFormat(), ItemViewSettings::displayTopicInTooltip(), BacklogSettings::dynamicBacklogAmount(), BufferSettings::errorMsgsTarget(), BufferSettings::filterMessage(), BacklogSettings::fixedBacklogAmount(), BacklogSettings::globalUnreadBacklogAdditional(), BacklogSettings::globalUnreadBacklogLimit(), BufferSettings::hasFilter(), NotificationSettings::highlightList(), NotificationSettings::highlightNick(), identity(), Settings::initAndNotify(), CoreAccountSettings::lastAccount(), ShortcutSettings::loadShortcut(), BufferSettings::messageFilter(), ItemViewSettings::mouseWheelChangesBuffer(), CoreConnectionSettings::networkDetectionMode(), NotificationSettings::nicksCaseSensitive(), CoreSettings::oldDbSettings(), BacklogSettings::perBufferUnreadBacklogAdditional(), BacklogSettings::perBufferUnreadBacklogLimit(), CoreConnectionSettings::pingTimeoutInterval(), CoreConnectionSettings::reconnectInterval(), BacklogSettings::requesterType(), CoreAccountSettings::retrieveAccountData(), BufferSettings::serverNoticesTarget(), SessionSettings::sessionAge(), sessionData(), sessionState(), sessionValue(), BufferSettings::showUserStateIcons(), WarningsSettings::showWarning(), ChatViewSettings::showWebPreview(), TabCompletionSettings::sortMode(), CoreSettings::storageSettings(), ChatViewSettings::timestampFormatString(), TabCompletionSettings::useLastSpokenTo(), BufferSettings::userNoticesTarget(), UiSettings::value(), BufferSettings::value(), SessionSettings::value(), NotificationSettings::value(), and ChatViewSettings::webSearchUrlFormatString().

Friends And Related Function Documentation

friend class CoreSession
friend

Definition at line 52 of file coreusersettings.h.

Member Data Documentation

UserId user
private

Definition at line 50 of file coreusersettings.h.

QString appName
protectedinherited

Definition at line 74 of file settings.h.

Referenced by Settings::fileName().


The documentation for this class was generated from the following files: