kopete/libkopete
#include <kopeteaccountmanager.h>

Public Types | |
enum | SetOnlineStatusFlag { ConnectIfOffline =0x01 } |
Public Slots | |
void | load () |
bool | resume () |
void | save () |
void | setOnlineStatus (uint category, const Kopete::StatusMessage &statusMessage, uint flags, bool forced) |
void | setOnlineStatus (uint category, const Kopete::StatusMessage &statusMessage=Kopete::StatusMessage(), uint flags=0) |
void | setStatusMessage (const QString &message) |
void | suspend () |
Signals | |
void | accountOnlineStatusChanged (Kopete::Account *account, const Kopete::OnlineStatus &oldStatus, const Kopete::OnlineStatus &newStatus) |
void | accountRegistered (Kopete::Account *account) |
void | accountUnregistered (const Kopete::Account *account) |
Public Member Functions | |
~AccountManager () | |
const QList< Account * > & | accounts () const |
QList< Account * > | accounts (Kopete::Protocol *protocol) const |
Account * | findAccount (const QString &protocolId, const QString &accountId) |
QColor | guessColor (Protocol *protocol) const |
bool | isAnyAccountConnected () const |
Account * | registerAccount (Account *account) |
void | removeAccount (Account *account) |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static AccountManager * | self () |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
objectName | |
Detailed Description
AccountManager manages all defined accounts in Kopete.
You can query them and globally set them all online or offline from here.
AccountManager is a singleton, you may uses it with AccountManager::self()
Definition at line 47 of file kopeteaccountmanager.h.
Member Enumeration Documentation
Flag to be used in setOnlineStatus.
ConnectIfOffline
: if set, this will connect offlines account with the status.
Enumerator | |
---|---|
ConnectIfOffline |
Definition at line 125 of file kopeteaccountmanager.h.
Constructor & Destructor Documentation
Kopete::AccountManager::~AccountManager | ( | ) |
Definition at line 101 of file kopeteaccountmanager.cpp.
Member Function Documentation
|
signal |
An account has changed its onlinestatus Technically this monitors Account::myself() onlinestatus changes.
- Parameters
-
account Account which changed its onlinestatus oldStatus The online status before the change newStatus The new online status
|
signal |
Signals when an account is ready for use.
Retrieve the list of accounts.
- Returns
- a list of all the accounts
Definition at line 313 of file kopeteaccountmanager.cpp.
QList< Account * > Kopete::AccountManager::accounts | ( | Kopete::Protocol * | protocol | ) | const |
Retrieve a list of accounts per protocol.
Provides a list of accounts for a certain protocol. If there are no accounts for that protocol then the list is empty.
- Parameters
-
protocol the protocol to get accounts for
- Returns
- the list of accounts that belong to the
protocol
protocol
Definition at line 318 of file kopeteaccountmanager.cpp.
|
signal |
Signals when an account has been unregistered.
At this state, we are already in the Account destructor.
Account * Kopete::AccountManager::findAccount | ( | const QString & | protocolId, |
const QString & | accountId | ||
) |
Return the account asked.
- Parameters
-
protocolId is the ID for the protocol accountId is the ID for the account you want
- Returns
- the Account object found or NULL if no account was found
Definition at line 329 of file kopeteaccountmanager.cpp.
Guess the color for a new account.
Guesses a color for the next account of a given protocol based on the already registered colors
- Returns
- the color guessed for the account
Definition at line 209 of file kopeteaccountmanager.cpp.
bool Kopete::AccountManager::isAnyAccountConnected | ( | ) | const |
Check if there is at least one account connected.
- Returns
- true if there at least one account connected, false otherwise.
Definition at line 108 of file kopeteaccountmanager.cpp.
|
slot |
Load the account data from KConfig
Definition at line 375 of file kopeteaccountmanager.cpp.
Register the account.
This adds the account in the manager's account list. It will check no accounts already exist with the same ID, if any, the account is deleted. and not added
- Returns
account
, or 0L if the account was deleted because id collision
Definition at line 253 of file kopeteaccountmanager.cpp.
void Kopete::AccountManager::removeAccount | ( | Account * | account | ) |
Delete the account and clean the config data.
This is praticaly called by the account config page when you remove the account.
Definition at line 340 of file kopeteaccountmanager.cpp.
|
slot |
Resumes all accounts.
Returns false if network is not available.
Definition at line 194 of file kopeteaccountmanager.cpp.
|
slot |
Save the account data to KConfig
Definition at line 358 of file kopeteaccountmanager.cpp.
|
static |
Retrieve the instance of AccountManager.
The account manager is a singleton class of which only a single instance will exist. If no manager exists yet this function will create one for you.
- Returns
- the instance of the AccountManager
Definition at line 77 of file kopeteaccountmanager.cpp.
|
slot |
Set all accounts a status in the specified category.
Account that are offline will not be connected, unless the ConnectIfOffline flag is set.
- Parameters
-
category is one of the Kopete::OnlineStatusManager::Categories statusMessage is the new status message flags is a bitmask of SetOnlineStatusFlag forced is a boolean indicating that all accounts are required to change status
- Note
- KDE5: Merge these two setOnlineStatus functions (default value for forced is false)
Definition at line 119 of file kopeteaccountmanager.cpp.
|
slot |
Definition at line 149 of file kopeteaccountmanager.cpp.
|
slot |
Set the given status message for all online accounts.
- Parameters
-
message Status message to set
Definition at line 154 of file kopeteaccountmanager.cpp.
|
slot |
Suspends all accounts.
Definition at line 162 of file kopeteaccountmanager.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.