From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/oscar/icq/icqprotocol.h | 106 +++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 kopete/protocols/oscar/icq/icqprotocol.h (limited to 'kopete/protocols/oscar/icq/icqprotocol.h') diff --git a/kopete/protocols/oscar/icq/icqprotocol.h b/kopete/protocols/oscar/icq/icqprotocol.h new file mode 100644 index 00000000..8e3c1be9 --- /dev/null +++ b/kopete/protocols/oscar/icq/icqprotocol.h @@ -0,0 +1,106 @@ +/* + oscarprotocol.h - Oscar Protocol Plugin + + Copyright (c) 2003 by Olivier Goffart + Kopete (c) 2003 by the Kopete developers + + ************************************************************************* + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef ICQPROTOCOL_H +#define ICQPROTOCOL_H + +#include "kopeteprotocol.h" +#include "kopetemimetypehandler.h" +#include "kopeteonlinestatus.h" + +class QComboBox; +/*class ICQUserInfoWidget; +class ICQContact;*/ + +namespace ICQ { class OnlineStatusManager; } + +class ICQProtocolHandler : public Kopete::MimeTypeHandler +{ +public: + ICQProtocolHandler(); + void handleURL(const QString &mimeType, const KURL & url) const; +}; + + +class ICQProtocol : public Kopete::Protocol +{ +Q_OBJECT + +public: + ICQProtocol(QObject *parent, const char *name, const QStringList &args); + virtual ~ICQProtocol(); + + /** + * Return the active instance of the protocol + */ + static ICQProtocol *protocol(); + + virtual bool canSendOffline() const; + + virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, + const QMap &serializedData, + const QMap &addressBookData ); + AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); + KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); + Kopete::Account *createNewAccount(const QString &accountId); + + ICQ::OnlineStatusManager *statusManager(); + + + const Kopete::ContactPropertyTmpl firstName; + const Kopete::ContactPropertyTmpl lastName; + const Kopete::ContactPropertyTmpl awayMessage; + const Kopete::ContactPropertyTmpl emailAddress; + const Kopete::ContactPropertyTmpl ipAddress; + const Kopete::ContactPropertyTmpl clientFeatures; + const Kopete::ContactPropertyTmpl buddyIconHash; + const Kopete::ContactPropertyTmpl contactEncoding; + + const QMap &genders() { return mGenders; } + const QMap &countries() { return mCountries; } + const QMap &languages() { return mLanguages; } + const QMap &encodings() { return mEncodings; } + const QMap &maritals() { return mMarital; } + const QMap &interests() { return mInterests; } + + void fillComboFromTable( QComboBox*, const QMap& ); + void setComboFromTable( QComboBox*, const QMap&, int ); + int getCodeForCombo( QComboBox*, const QMap& ); + /* void fillTZCombo(QComboBox *combo); + void setTZComboValue(QComboBox *combo, const char &tz); + char getTZComboValue(QComboBox *combo); */ + +private: + void initGenders(); + void initLang(); + void initCountries(); + void initEncodings(); + void initMaritals(); + void initInterests(); + +private: + static ICQProtocol* protocolStatic_; + ICQ::OnlineStatusManager* statusManager_; + QMap mGenders; + QMap mCountries; + QMap mLanguages; + QMap mEncodings; + QMap mMarital; + QMap mInterests; + ICQProtocolHandler protohandler; +}; +#endif +// vim: set noet ts=4 sts=4 sw=4: -- cgit v1.2.1