diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/libkopete/ui/metacontactselectorwidget.h | |
download | tdenetwork-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/metacontactselectorwidget.h')
-rw-r--r-- | kopete/libkopete/ui/metacontactselectorwidget.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/metacontactselectorwidget.h b/kopete/libkopete/ui/metacontactselectorwidget.h new file mode 100644 index 00000000..1c0a21ff --- /dev/null +++ b/kopete/libkopete/ui/metacontactselectorwidget.h @@ -0,0 +1,103 @@ +/* + MetaContactSelectorWidget + + Copyright (c) 2005 by Duncan Mac-Vicar Prett <[email protected]> + + Kopete (c) 2002-2005 by the Kopete developers <[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 MetaContactSelectorWidget_H +#define MetaContactSelectorWidget_H + +#include <kdemacros.h> +#include <qwidget.h> +#include "kopetelistviewitem.h" +#include "kopete_export.h" + +class Kopete::MetaContact; + +namespace Kopete +{ +namespace UI +{ + +/** + * @author Duncan Mac-Vicar Prett <[email protected]> + * This class provides a widget which allows easy selection + * of available Kopete metacontacts. + */ +class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget +{ + Q_OBJECT +public: + MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + ~MetaContactSelectorWidget(); + Kopete::MetaContact* metaContact(); + /** + * sets the widget label message + * example: Please select a contact + * or, Choose a contact to delete + */ + void setLabelMessage( const QString &msg ); + /** + * pre-selects a contact + */ + void selectMetaContact( Kopete::MetaContact *mc ); + /** + * excludes a metacontact from being shown in the list + * if the metacontact is already excluded, do nothing + */ + void excludeMetaContact( Kopete::MetaContact *mc ); + /** + * @return true if there is a contact selected + */ + bool metaContactSelected(); +protected slots: + /** + * Utility function, populates the metacontact list + */ + void slotLoadMetaContacts(); +signals: + void metaContactListClicked( QListViewItem *mc ); +private: + class Private; + Private *d; +}; + +/** + * @author Duncan Mac-Vicar Prett <[email protected]> + */ + +class MetaContactSelectorWidgetLVI : public Kopete::UI::ListView::Item +{ + Q_OBJECT +public: + MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner = 0, const char *name = 0 ); + Kopete::MetaContact* metaContact(); + virtual QString text ( int column ) const; +protected slots: + void slotPhotoChanged(); + void slotDisplayNameChanged(); + void buildVisualComponents(); + void slotUpdateContactBox(); +private: + class Private; + Private *d; +}; + +} // namespace UI +} // namespace Kopete + +#endif + +// vim: set noet ts=4 sts=4 sw=4: + |