• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • Kopete
  • AccountManager
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
Kopete::AccountManager Class Reference

#include <kopeteaccountmanager.h>

Inheritance diagram for Kopete::AccountManager:
Inheritance graph
[legend]

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)
 
- Public Member Functions inherited from QObject
 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 &regExp) 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 ()
 
- Static Public Member Functions inherited from QObject
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

- Protected Member Functions inherited from QObject
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)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 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()

Author
Martijn Klingens kling.nosp@m.ens@.nosp@m.kde.o.nosp@m.rg
Olivier Goffart <ogoffart@kde.org>

Definition at line 47 of file kopeteaccountmanager.h.

Member Enumeration Documentation

enum Kopete::AccountManager::SetOnlineStatusFlag

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

void Kopete::AccountManager::accountOnlineStatusChanged ( Kopete::Account *  account,
const Kopete::OnlineStatus &  oldStatus,
const Kopete::OnlineStatus &  newStatus 
)
signal

An account has changed its onlinestatus Technically this monitors Account::myself() onlinestatus changes.

Parameters
accountAccount which changed its onlinestatus
oldStatusThe online status before the change
newStatusThe new online status
void Kopete::AccountManager::accountRegistered ( Kopete::Account *  account)
signal

Signals when an account is ready for use.

const QList< Account * > & Kopete::AccountManager::accounts ( ) const

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
protocolthe protocol to get accounts for
Returns
the list of accounts that belong to the protocol protocol

Definition at line 318 of file kopeteaccountmanager.cpp.

void Kopete::AccountManager::accountUnregistered ( const Kopete::Account *  account)
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
protocolIdis the ID for the protocol
accountIdis 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.

QColor Kopete::AccountManager::guessColor ( Protocol *  protocol) const

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.

void Kopete::AccountManager::load ( )
slot

Load the account data from KConfig

Definition at line 375 of file kopeteaccountmanager.cpp.

Account * Kopete::AccountManager::registerAccount ( Account *  account)

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.

bool Kopete::AccountManager::resume ( )
slot

Resumes all accounts.

Returns false if network is not available.

Definition at line 194 of file kopeteaccountmanager.cpp.

void Kopete::AccountManager::save ( )
slot

Save the account data to KConfig

Definition at line 358 of file kopeteaccountmanager.cpp.

AccountManager * Kopete::AccountManager::self ( )
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.

void Kopete::AccountManager::setOnlineStatus ( uint  category,
const Kopete::StatusMessage &  statusMessage,
uint  flags,
bool  forced 
)
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
categoryis one of the Kopete::OnlineStatusManager::Categories
statusMessageis the new status message
flagsis a bitmask of SetOnlineStatusFlag
forcedis 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.

void Kopete::AccountManager::setOnlineStatus ( uint  category,
const Kopete::StatusMessage &  statusMessage = Kopete::StatusMessage(),
uint  flags = 0 
)
slot

Definition at line 149 of file kopeteaccountmanager.cpp.

void Kopete::AccountManager::setStatusMessage ( const QString &  message)
slot

Set the given status message for all online accounts.

Parameters
messageStatus message to set

Definition at line 154 of file kopeteaccountmanager.cpp.

void Kopete::AccountManager::suspend ( )
slot

Suspends all accounts.

Definition at line 162 of file kopeteaccountmanager.cpp.


The documentation for this class was generated from the following files:
  • kopeteaccountmanager.h
  • kopeteaccountmanager.cpp
This file is part of the KDE documentation.
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.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal