summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/ui/dlgjabbervcard.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/jabber/ui/dlgjabbervcard.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
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
Diffstat (limited to 'kopete/protocols/jabber/ui/dlgjabbervcard.h')
-rw-r--r--kopete/protocols/jabber/ui/dlgjabbervcard.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/ui/dlgjabbervcard.h b/kopete/protocols/jabber/ui/dlgjabbervcard.h
new file mode 100644
index 00000000..2bea5a2b
--- /dev/null
+++ b/kopete/protocols/jabber/ui/dlgjabbervcard.h
@@ -0,0 +1,118 @@
+
+/***************************************************************************
+ dlgjabbervcard.h - vCard dialog
+ -------------------
+ begin : Thu Aug 08 2002
+ copyright : (C) 2002-2003 by Till Gerken <[email protected]>
+ (C) 2005 by Michaël Larouche <[email protected]>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 DLGJABBERVCARD_H
+#define DLGJABBERVCARD_H
+
+#include <kdialogbase.h>
+#include "xmpp_vcard.h"
+
+class JabberAccount;
+class JabberContact;
+class JabberBaseContact;
+class QString;
+class dlgVCard;
+
+/**
+ * @brief Show the information of a Jabber contact.
+ *
+ * This dialog shows the information of a Jabber contact from
+ * the contact properties(from Kopete).
+ * Also it is used to edit the information of the Account myself contact.
+ *
+ * First it fetch a new version of the vcard then it display the
+ * information. User can force the update using the "Update vCard" button.
+ *
+ * @author Till Gerken <[email protected]>
+ * @author Michaël Larouche <[email protected]>
+ */
+class dlgJabberVCard : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Create the information(vcard) dialog.
+ *
+ * @param account the current Jabber account
+ * @param contact the contact to display or edit information.
+ * @param widget Parent widget.
+ * @param name widget name.
+ */
+ dlgJabberVCard (JabberAccount *account, JabberBaseContact *contact, QWidget * parent = 0, const char *name = 0);
+ ~dlgJabberVCard ();
+
+private slots:
+ /**
+ * Show the KFileDialog for image to select a photo for the contact.
+ */
+ void slotSelectPhoto();
+ /**
+ * Remove(clear) the photo.
+ * Maybe the user doesn't want to export a photo anymore.
+ */
+ void slotClearPhoto();
+ /**
+ * Send vCard to the server.
+ */
+ void slotSaveVCard();
+ /**
+ * Put back the information from the dialog into the contact properties
+ */
+ void slotVCardSaved();
+ /**
+ * Close the dialog.
+ */
+ void slotClose();
+ /**
+ * Open a link. (ex: the homepage link or the email address)
+ */
+ void slotOpenURL(const QString &url);
+
+ /**
+ * Retrieve vCard information for the current contact.
+ */
+ void slotGetVCard();
+ /**
+ * vCard was succesfully fetched, update contact properties
+ * and enable display.
+ */
+ void slotGotVCard();
+
+private:
+ JabberAccount *m_account;
+ JabberBaseContact *m_contact;
+ dlgVCard *m_mainWidget;
+ QString m_photoPath;
+
+ void assignContactProperties();
+ void setReadOnly(bool state);
+ void setEnabled(bool state);
+
+};
+
+#endif // DLGJABBERVCARD_H
+
+/*
+ * Local variables:
+ * c-indentation-style: k&r
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */