Blokkal::AccountManager Class Reference
Global account manager class. More...
#include <blokkalaccountmanager.h>
Public Slots | |
void | loadAccounts (void) |
void | saveAccounts (void) |
Signals | |
void | accountRegistered (Blokkal::Account *account) |
void | accountUnregistered (Blokkal::Account *account) |
Public Member Functions | |
Blokkal::Account * | account (const QString &id) |
Blokkal::AccountList | accounts (void) |
Blokkal::Account * | registerAccount (Blokkal::Account *account) |
Static Public Member Functions | |
static Blokkal::AccountManager * | self (void) |
Protected Slots | |
void | unregisterAccount (Blokkal::Account *account) |
Protected Member Functions | |
QDomElement | accountNode (const QString &id) |
Friends | |
class | AccountConfig |
class | AccountManagerPrivate |
Detailed Description
Global account manager class.This is the global account manager class. It maitains information of all accounts and saves the configuration of registered accounts.
Definition at line 49 of file blokkalaccountmanager.h.
Member Function Documentation
Blokkal::Account * Blokkal::AccountManager::account | ( | const QString & | id | ) |
Returns the account id if such an account has been registered or 0 if no such account exists.
- Parameters:
-
id query for this account
- Returns:
- the desired account or 0 if it does not exist
Definition at line 182 of file blokkalaccountmanager.cpp.
QDomElement Blokkal::AccountManager::accountNode | ( | const QString & | id | ) | [protected] |
Returns the node of the account with name id if it exists. If it does not exist, a new node for this account will be created, but not inserted in the tree. You should check whether the protocol attribute is set and set if if necessary. This method is used by the AccountConfig constructor.
- Parameters:
-
id get the node for this account.
- Returns:
- the configuration node
Definition at line 191 of file blokkalaccountmanager.cpp.
void Blokkal::AccountManager::accountRegistered | ( | Blokkal::Account * | account | ) | [signal] |
This signal is emitted whenever an account is registered.
- Parameters:
-
account the registered account
Blokkal::AccountList Blokkal::AccountManager::accounts | ( | void | ) |
Returns a list of available accounts.
- Returns:
- registered accounts
Definition at line 138 of file blokkalaccountmanager.cpp.
void Blokkal::AccountManager::accountUnregistered | ( | Blokkal::Account * | account | ) | [signal] |
This signal is emitted whenever an account has been unregistered. Usually this means, that the account is about to be deleted, so you should not store the pointer.
- Parameters:
-
account the unregistered account
void Blokkal::AccountManager::loadAccounts | ( | void | ) | [slot] |
Loads the account information and creates the accounts.
Definition at line 85 of file blokkalaccountmanager.cpp.
Blokkal::Account * Blokkal::AccountManager::registerAccount | ( | Blokkal::Account * | account | ) |
Checks that account does not already exists and registers it. If it tries to take over an already registered account, account will be deleted.
- Parameters:
-
account account to register
- Returns:
- account or 0 if it was not registered
Definition at line 144 of file blokkalaccountmanager.cpp.
void Blokkal::AccountManager::saveAccounts | ( | void | ) | [slot] |
Saves the account information to the account file.
Definition at line 125 of file blokkalaccountmanager.cpp.
Blokkal::AccountManager * Blokkal::AccountManager::self | ( | void | ) | [static] |
Returns a pointer to the global account manager. If no account manager exists yet, one will be created.
- Returns:
- global account manager
Definition at line 133 of file blokkalaccountmanager.cpp.
void Blokkal::AccountManager::unregisterAccount | ( | Blokkal::Account * | account | ) | [protected, slot] |
Unregisters account
- Parameters:
-
account account to unregister
Definition at line 171 of file blokkalaccountmanager.cpp.
The documentation for this class was generated from the following files: