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

#include </tmp/quassel/src/client/clientsettings.h>

Inheritance diagram for CoreAccountSettings:
Collaboration diagram for CoreAccountSettings:

Public Types

enum  Mode { Default, Custom }

Public Member Functions

 CoreAccountSettings (const QString &subgroup="General")
virtual void notify (const QString &key, QObject *receiver, const char *slot)
 Call the given slot on change of the given key.
QList< AccountIdknownAccounts ()
AccountId lastAccount ()
void setLastAccount (AccountId)
AccountId autoConnectAccount ()
void setAutoConnectAccount (AccountId)
bool autoConnectOnStartup ()
void setAutoConnectOnStartup (bool)
bool autoConnectToFixedAccount ()
void setAutoConnectToFixedAccount (bool)
void clearAccounts ()
void storeAccountData (AccountId id, const QVariantMap &data)
QVariantMap retrieveAccountData (AccountId)
void removeAccount (AccountId)
void setJumpKeyMap (const QHash< int, BufferId > &keyMap)
QHash< int, BufferIdjumpKeyMap ()
void setBufferViewOverlay (const QSet< int > &viewIds)
QSet< int > bufferViewOverlay ()
void setAccountValue (const QString &key, const QVariant &data)
QVariant accountValue (const QString &key, const QVariant &def=QVariant())
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 Attributes

QString _subgroup

Detailed Description

Definition at line 52 of file clientsettings.h.

Member Enumeration Documentation

enum Mode
inherited
Enumerator:
Default 
Custom 

Definition at line 47 of file settings.h.

Constructor & Destructor Documentation

CoreAccountSettings ( const QString &  subgroup = "General")

Definition at line 45 of file clientsettings.cpp.

Member Function Documentation

void notify ( const QString &  key,
QObject *  receiver,
const char *  slot 
)
virtual

Call the given slot on change of the given key.

Reimplemented from Settings.

Definition at line 52 of file clientsettings.cpp.

References _subgroup, Client::currentCoreAccount(), and toInt().

QList< AccountId > knownAccounts ( )
AccountId lastAccount ( )
void setLastAccount ( AccountId  account)

Definition at line 76 of file clientsettings.cpp.

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

Referenced by CoreConnection::connectToCore().

AccountId autoConnectAccount ( )
void setAutoConnectAccount ( AccountId  account)

Definition at line 88 of file clientsettings.cpp.

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

Referenced by CoreAccountSettingsPage::save().

bool autoConnectOnStartup ( )
void setAutoConnectOnStartup ( bool  b)

Definition at line 100 of file clientsettings.cpp.

References Settings::setLocalValue().

bool autoConnectToFixedAccount ( )
void setAutoConnectToFixedAccount ( bool  b)

Definition at line 112 of file clientsettings.cpp.

References Settings::setLocalValue().

void clearAccounts ( )

Definition at line 232 of file clientsettings.cpp.

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

void storeAccountData ( AccountId  id,
const QVariantMap &  data 
)
QVariantMap retrieveAccountData ( AccountId  id)

Definition at line 130 of file clientsettings.cpp.

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

Referenced by CoreAccountModel::load().

void removeAccount ( AccountId  id)

Definition at line 226 of file clientsettings.cpp.

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

Referenced by CoreAccountModel::save().

void setJumpKeyMap ( const QHash< int, BufferId > &  keyMap)

Definition at line 180 of file clientsettings.cpp.

References setAccountValue().

Referenced by MainWin::bindJumpKey().

QHash< int, BufferId > jumpKeyMap ( )

Definition at line 192 of file clientsettings.cpp.

References accountValue().

Referenced by MainWin::onJumpKey().

void setBufferViewOverlay ( const QSet< int > &  viewIds)

Definition at line 205 of file clientsettings.cpp.

References setAccountValue().

Referenced by BufferViewOverlay::save().

QSet< int > bufferViewOverlay ( )

Definition at line 215 of file clientsettings.cpp.

References accountValue().

Referenced by BufferViewOverlay::restore().

void setAccountValue ( const QString &  key,
const QVariant &  data 
)
QVariant accountValue ( const QString &  key,
const QVariant &  def = QVariant() 
)
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(), setAccountValue(), TabCompletionSettings::setAddSpaceMidSentence(), setAutoConnectAccount(), setAutoConnectOnStartup(), 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(), setLastAccount(), BufferSettings::setMessageFilter(), CoreConnectionSettings::setNetworkDetectionMode(), NotificationSettings::setNicksCaseSensitive(), BacklogSettings::setPerBufferUnreadBacklogAdditional(), BacklogSettings::setPerBufferUnreadBacklogLimit(), CoreConnectionSettings::setPingTimeoutInterval(), CoreConnectionSettings::setReconnectInterval(), BacklogSettings::setRequesterType(), BufferSettings::setServerNoticesTarget(), CoreUserSettings::setSessionState(), CoreUserSettings::setSessionValue(), WarningsSettings::setShowWarning(), TabCompletionSettings::setSortMode(), CoreSettings::setStorageSettings(), ChatViewSettings::setTimestampFormatString(), TabCompletionSettings::setUseLastSpokenTo(), BufferSettings::setUserNoticesTarget(), UiSettings::setValue(), BufferSettings::setValue(), SessionSettings::setValue(), NotificationSettings::setValue(), ChatViewSettings::setWebSearchUrlFormatString(), storeAccountData(), and CoreUserSettings::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 accountValue(), TabCompletionSettings::addSpaceMidSentence(), autoConnectAccount(), autoConnectOnStartup(), 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(), CoreUserSettings::identity(), Settings::initAndNotify(), lastAccount(), ShortcutSettings::loadShortcut(), BufferSettings::messageFilter(), ItemViewSettings::mouseWheelChangesBuffer(), CoreConnectionSettings::networkDetectionMode(), NotificationSettings::nicksCaseSensitive(), CoreSettings::oldDbSettings(), BacklogSettings::perBufferUnreadBacklogAdditional(), BacklogSettings::perBufferUnreadBacklogLimit(), CoreConnectionSettings::pingTimeoutInterval(), CoreConnectionSettings::reconnectInterval(), BacklogSettings::requesterType(), retrieveAccountData(), BufferSettings::serverNoticesTarget(), SessionSettings::sessionAge(), CoreUserSettings::sessionData(), CoreUserSettings::sessionState(), CoreUserSettings::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().

Member Data Documentation

QString _subgroup
private

Definition at line 86 of file clientsettings.h.

Referenced by accountValue(), notify(), and setAccountValue().

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: