summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/kopeteeditglobalidentitywidget.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/kopete/kopeteeditglobalidentitywidget.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/kopete/kopeteeditglobalidentitywidget.h')
-rw-r--r--kopete/kopete/kopeteeditglobalidentitywidget.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.h b/kopete/kopete/kopeteeditglobalidentitywidget.h
new file mode 100644
index 00000000..731a2cc5
--- /dev/null
+++ b/kopete/kopete/kopeteeditglobalidentitywidget.h
@@ -0,0 +1,99 @@
+/*
+ kopeteeditglobalidentitywidget.h - Kopete Edit Global Identity widget
+
+ Copyright (c) 2005 by Michaël Larouche <michael.larouche@kdemail.net>
+
+ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * 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 KOPETEEDITGLOBALIDENTITYWIDGET_H
+#define KOPETEEDITGLOBALIDENTITYWIDGET_H
+
+#include <qwidget.h>
+#include <qlabel.h>
+
+/**
+ * This is a simple widget added to a toolbar in KopeteWindow.
+ *
+ * It can edit the global photo and the global nickname.
+ * When either the photo or the nickname change, it's set the source to Custom.
+ * When well connected(signal/slot), it react to the toolbar icon size change.
+ *
+ * @author Michaël Larouche
+ */
+class KopeteEditGlobalIdentityWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ KopeteEditGlobalIdentityWidget(QWidget *parent = 0, const char *name = 0);
+ virtual ~KopeteEditGlobalIdentityWidget();
+
+public slots:
+ /**
+ * This slot is called when the "parent" toolbar change its icon size.
+ */
+ void iconSizeChanged();
+ /**
+ * This slot is called to first set the icon size.
+ */
+ void setIconSize(int size);
+
+private:
+ /**
+ * Create the internal widgets and signal/slots connections
+ */
+ void createGUI();
+
+private slots:
+ /**
+ * When a global identity key is changed, update the GUI.
+ */
+ void updateGUI(const QString &key, const QVariant &value);
+ /**
+ * The photo label was clicked, show a ImageFileDialog.
+ */
+ void photoClicked();
+ /**
+ * The nickname was changed, display the text in red to display the change.
+ */
+ void lineNicknameTextChanged(const QString &text);
+ /**
+ * User press Return/Enter in the KLineEdit, commit the new nickname.
+ */
+ void changeNickname();
+
+private:
+ class Private;
+ Private *d;
+};
+
+class QMouseEvent;
+/**
+ * This is a special label that react to click.
+ * Also display a "hand" when hovered.
+ *
+ * @author Michaël Larouche
+ */
+class ClickableLabel : public QLabel
+{
+ Q_OBJECT
+public:
+ ClickableLabel(QWidget *parent = 0, const char *name = 0);
+
+signals:
+ void clicked();
+
+protected:
+ void mouseReleaseEvent(QMouseEvent *event);
+};
+
+#endif