summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/ui/userinfodialog.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/libkopete/ui/userinfodialog.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/libkopete/ui/userinfodialog.h')
-rw-r--r--kopete/libkopete/ui/userinfodialog.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h
new file mode 100644
index 00000000..7df19f4f
--- /dev/null
+++ b/kopete/libkopete/ui/userinfodialog.h
@@ -0,0 +1,91 @@
+/*
+ userinfodialog.h
+
+ Copyright (c) 2003 by Zack Rusin <zack@kde.org>
+
+ Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This library is free software; you can redistribute it and/or *
+ * modify it under the terms of the GNU Lesser General Public *
+ * License as published by the Free Software Foundation; either *
+ * version 2 of the License, or (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef USERINFODIALOG_H
+#define USERINFODIALOG_H
+
+#include <kdialogbase.h>
+#include <qstring.h>
+
+#include "kopete_export.h"
+
+class KLineEdit;
+
+namespace Kopete {
+
+ class KOPETE_EXPORT UserInfoDialog : public KDialogBase
+ {
+ Q_OBJECT
+ public:
+ UserInfoDialog( const QString& descr );
+ virtual ~UserInfoDialog();
+
+
+ /**
+ * Specifies the look of this dialog. If set to HTML only
+ * KHTMLPart will be in the dialog and it's look can be customized
+ * through setStyleSheet
+ * @see setStyleSheet
+ */
+ enum DialogStyle { HTML, Widget };
+ void setStyle( DialogStyle style );
+
+ // The functions below set elements as specified in the name.
+ // If an element is not set it won't be displayed.
+ void setName( const QString& name );
+ void setId( const QString& id );
+ void setAwayMessage( const QString& msg );
+ void setStatus( const QString& status );
+ void setWarningLevel(const QString& level );
+ void setOnlineSince( const QString& since );
+ void setInfo( const QString& info );
+ void setAddress( const QString& addr );
+ void setPhone( const QString& phone );
+
+ void addCustomField( const QString& name, const QString& txt );
+ void addHTMLText( const QString& str );
+
+ ///Shows the dialog
+ virtual void show();
+ protected:
+ /**
+ * This function has to be called after setting all the fields.
+ * It builds the GUI for the dialog. By default show() calls it.
+ */
+ virtual void create();
+ //Fills the dialog HTML if DialogStyle is HTML
+ virtual void fillHTML();
+ //Fills the dialog with widgets if DialogStyle is Widget
+ virtual void fillWidgets();
+
+ /**
+ * If the DialogStyle is set to HTML one can customize the look of this
+ * dialog by setting the right stylesheet. The CSS id elements that can be
+ * customized include : "name", "id", "warningLevel", "onlineSince",
+ * "address", "phone", "status", "awayMessage" and "info".
+ */
+ void setStyleSheet( const QString& css );
+
+ QHBox* addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit );
+
+ private:
+ struct UserInfoDialogPrivate;
+ UserInfoDialogPrivate *d;
+ };
+
+}
+#endif