kopete/libkopete
kopeteaccount.cpp
Go to the documentation of this file.
105 d->configGroup=new KConfigGroup(KGlobal::config(), QString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id ));
120 QObject::connect(Solid::Networking::notifier(), SIGNAL(statusChanged(Solid::Networking::Status)), this, SLOT(networkingStatusChanged(Solid::Networking::Status)));
132 foreach (Contact* c, d->contacts) QObject::disconnect(c, SIGNAL(contactDestroyed(Kopete::Contact*)), this, 0);
186 else if ( Kopete::BehaviorSettings::self()->reconnectOnDisconnect() == true && reason > Manual )
188 bool networkAvailable = ( Solid::Networking::status() == Solid::Networking::Unknown || Solid::Networking::status() == Solid::Networking::Connected );
201 d->reconnectTimer.start( ((2 * (d->connectionTry - 2)) - 1) * 60000 ); // wait 1,3,5...15 minutes => stops after 64 min
212 Kopete::Utils::notifyConnectionLost(this, i18n("You have been disconnected"), i18n( "You have connected from another client or computer to the account '%1'" , d->id), i18n("Most proprietary Instant Messaging services do not allow you to connect from more than one location. Check that nobody is using your account without your permission. If you need a service that supports connection from various locations at the same time, use the Jabber protocol."));
316 kWarning(14010) << "Contact already exists!!! accountId: " << c->account() << " contactId: " << c->contactId();
339 Kopete::MetaContact* Account::addContact( const QString &contactId, const QString &displayName , Group *group, AddMode mode )
347 i18n("You are not allowed to add yourself to the contact list. The addition of \"%1\" to account \"%2\" will not take place.", contactId, accountId()), i18n("Error Creating Contact")
352 kWarning(14010) << "You are not allowed to add yourself to the contact list. The addition of" << contactId
369 kDebug( 14010 ) << " You are trying to add an existing temporary contact. Just add it on the list";
421 i18n("You are not allowed to add yourself to the contact list. The addition of \"%1\" to account \"%2\" will not take place.", contactId, accountId()), i18n("Error Creating Contact")
426 kWarning(14010) << "You are not allowed to add yourself to the contact list. The addition of" << contactId
440 "Account::addContact: You are trying to add an existing temporary contact. Just add it on the list" << endl;
468 // KActionMenu *menu = new KActionMenu( QIcon(myself()->onlineStatus().iconFor( this )), accountId(), 0, 0);
474 nick = identity()->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
548 QObject::connect( d->myself, SIGNAL(onlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)),
549 this, SLOT(slotOnlineStatusChanged(Kopete::Contact*,Kopete::OnlineStatus,Kopete::OnlineStatus)) );
550 QObject::connect( d->myself, SIGNAL(propertyChanged(Kopete::PropertyContainer*,QString,QVariant,QVariant)),
590 d->restoreMessage.setTitle( myself()->property( Kopete::Global::Properties::self()->statusTitle() ).value().toString() );
591 d->restoreMessage.setMessage( myself()->property( Kopete::Global::Properties::self()->statusMessage() ).value().toString() );
644 if ( key == Kopete::Global::Properties::self()->statusTitle().key() && old != newVal && isConnected() )
646 else if ( key == Kopete::Global::Properties::self()->statusMessage().key() && old != newVal && isConnected() )
695 KopeteEditAccountWidget *m_accountWidget = protocol()->createEditAccountWidget( this, editDialog );
virtual void fillActionMenu(KActionMenu *actionMenu)
Fill the menu with actions for this account.
Definition: kopeteaccount.cpp:465
MetaContact * myself()
return the metacontact that represent the user itself.
Definition: kopetecontactlist.cpp:349
static ContactList * self()
The contact list is a singleton object.
Definition: kopetecontactlist.cpp:71
virtual bool setIdentity(Kopete::Identity *ident)
Sets the identity this account belongs to.
Definition: kopeteaccount.cpp:519
Definition: kopeteonlinestatus.h:68
void addToGroup(Kopete::Group *to)
Add a contact to another group.
Definition: kopetemetacontact.cpp:1045
void setAllContactsStatus(const Kopete::OnlineStatus &status)
Sets the online status of all contacts in this account to the same value.
Definition: kopeteaccount.cpp:625
QString accountId() const
void setTemporary(bool b=true, Kopete::Group *group=0L)
Set if this is a temporary contact.
Definition: kopetemetacontact.cpp:1150
int width() const
void setDisplayName(const QString &name)
Set the custom displayName.
Definition: kopetemetacontact.cpp:620
connection failed because password was incorrect
Definition: kopeteaccount.h:97
Account(Protocol *parent, const QString &accountID)
Constructor for the Account object.
Definition: kopeteaccount.cpp:102
void setMetaContact(MetaContact *m)
Move this contact to a new MetaContact.
Definition: kopetecontact.cpp:420
virtual void unblock(const QString &contactId)
Remove a user from the blacklist.
Definition: kopeteaccount.cpp:679
bool hasNext() const
void write(MetaContact *mc)
Change the KABC data associated with this metacontact.
Definition: kabcpersistence.cpp:102
const Kopete::Property & property(const QString &key) const
Get the value of a property with key "key".
Definition: kopetepropertycontainer.cpp:111
State where you really cannot be contacted.
Definition: kopeteonlinestatus.h:98
Account * account() const
Get the account that this contact belongs to.
Definition: kopetecontact.cpp:538
connection went down because another client connected the same account
Definition: kopeteaccount.h:96
bool isDefinitelyOnline() const
Definition: kopeteonlinestatus.cpp:287
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
Definition: networkstatuscommon.h:10
bool isNull() const
virtual bool createContact(const QString &contactId, MetaContact *parentContact)=0
Create a new contact in the specified metacontact.
virtual void disconnected(Kopete::Account::DisconnectReason reason)
The service has been disconnected.
Definition: kopeteaccount.cpp:178
bool suppressStatusNotification() const
Indicates whether or not we should suppress status notifications for contacts belonging to this accou...
OnlineStatus onlineStatus() const
Get the online status of the contact.
Definition: kopetecontact.cpp:173
void colorChanged(const QColor &)
The color of the account has been changed.
virtual bool hasCustomStatusMenu() const
Return true if account has custom status menu.
Definition: kopeteaccount.cpp:492
QVariant property(const char *name) const
Means that you have other things to do and don't want to get involved in messaging ('Busy' or 'Do not...
Definition: kopeteonlinestatus.h:123
virtual void setOnlineStatus(const Kopete::OnlineStatus &status, const Kopete::StatusMessage &reason=Kopete::StatusMessage(), const OnlineStatusOptions &options=None)=0
Reimplement this function to set the online status.
void setExcludeConnect(bool)
Set if the account should not log in automatically.
Definition: kopeteaccount.cpp:299
bool isEmpty() const
KConfigGroup * configGroup() const
Return the KConfigGroup used to write and read special properties.
Definition: kopeteaccount.cpp:282
void accountDestroyed(const Kopete::Account *account)
Emitted when the account is deleted.
AddMode
Describes what should be done when the contact is added to a metacontact.
Definition: kopeteaccount.h:109
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
Identity * identity() const
Retrieve the identity this account belongs to.
Definition: kopeteaccount.cpp:514
Definition: kopetecontact.h:58
The contact will not be added on the contact list.
Definition: kopeteaccount.h:112
void notifyConnectionLost(const Account *account, const QString caption, const QString message, const QString explanation, const QString debugInfo)
Notifies the user connection has been lost without coupling plugins with GUI code.
Definition: kopeteutils.cpp:91
Refers to a true online state, i.e.
Definition: kopeteonlinestatus.h:129
void editAccount(QWidget *parent=0L)
Display the edit account widget for the account.
Definition: kopeteaccount.cpp:689
Definition: editaccountwidget.h:55
Item next()
bool isConnected() const
Indicate whether the account is connected at all.
KOPETE_EXPORT QWidget * mainWidget()
Returns the main widget - this is the widget that message boxes and KNotify stuff should use as a par...
Definition: kopeteuiglobal.cpp:37
void addMetaContact(Kopete::MetaContact *c)
Add the metacontact into the contact list When calling this method, the contact has to be already pla...
Definition: kopetecontactlist.cpp:235
const PropertyTmpl & statusMessage() const
Definition: kopeteglobal.cpp:158
bool suspend(const Kopete::StatusMessage &reason=Kopete::StatusMessage())
Disconnects account, required before resume() Returns false if account is already suspended...
Definition: kopeteaccount.cpp:601
QDateTime currentDateTime()
virtual Kopete::Account * apply()=0
Create a new account if we are in the 'add account wizard', otherwise update the existing account...
MetaContact * metaContact() const
Get the metacontact for this contact.
Definition: kopetecontact.cpp:523
Manages the list of blacklisted contacts for an account.
Definition: kopeteblacklister.h:45
static BehaviorSettings * self()
Definition: kopetebehaviorsettings.cpp:23
QString customIcon() const
return the icon base This is the custom account icon set with setIcon.
Definition: kopeteaccount.cpp:733
QString id() const
The id is a unique internal handle and should not be exposed in the UI.
Definition: kopeteidentity.cpp:91
virtual bool isBlocked(const QString &contactId)
Definition: kopeteaccount.cpp:684
virtual KopeteEditAccountWidget * createEditAccountWidget(Account *account, QWidget *parent)=0
Create a new KopeteEditAccountWidget.
virtual void block(const QString &contactId)
Add a user to the blacklist.
Definition: kopeteaccount.cpp:674
bool resume()
Sets account to the online status that was active when suspend() was called.
Definition: kopeteaccount.cpp:614
Definition: kopetemetacontact.h:54
QString fromLatin1(const char *str, int size)
Refers to a state where you can be technically reached, but for one reason or another it is often not...
Definition: kopeteonlinestatus.h:117
void networkingStatusChanged(const Solid::Networking::Status status)
React to network status changes.
Definition: kopeteaccount.cpp:155
const T & value() const
virtual bool validateData()=0
This method must be reimplemented.
static KABCPersistence * self()
Retrieve the instance of AccountManager.
Definition: kabcpersistence.cpp:86
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QList< QAction * > actions() const
const QHash< QString, Contact * > & contacts()
Retrieve the list of contacts for this account (except myself contact)
Definition: kopeteaccount.cpp:333
QString toString() const
void setOnlineStatus(const OnlineStatus &status)
Set the contact's online status.
Definition: kopetecontact.cpp:181
Definition: kopeteidentity.h:41
MetaContact * addContact(const QString &contactId, const QString &displayName=QString(), Group *group=0, AddMode mode=DontChangeKABC)
Create a contact (creating a new metacontact if necessary)
Definition: kopeteaccount.cpp:339
void addAccount(Kopete::Account *account)
Adds an account to the identity.
Definition: kopeteidentity.cpp:194
QString accountIconPath(const KIconLoader::Group size) const
Definition: kopeteaccount.cpp:275
State where the user is not available on the network yet but trying to get onto.
Definition: kopeteonlinestatus.h:104
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.