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/addressbooklinkwidget.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/addressbooklinkwidget.h')
-rw-r--r-- | kopete/libkopete/ui/addressbooklinkwidget.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/addressbooklinkwidget.h b/kopete/libkopete/ui/addressbooklinkwidget.h new file mode 100644 index 00000000..dff23c58 --- /dev/null +++ b/kopete/libkopete/ui/addressbooklinkwidget.h @@ -0,0 +1,81 @@ +/* + AddressBookLinkWidget + + A compact widget for showing and changing which address book item a + particular Kopete::MetaContact is related to. + + Comprises a label showing the contact's name, a Clear button, and a Change + button that usually invokes the AddressBookSelectorWidget. + + Copyright (c) 2006 by Will Stephenson <[email protected]> + + Kopete (c) 2002-2004 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 ADDRESSBOOKLINKWIDGET_H +#define ADDRESSBOOKLINKWIDGET_H + +#include <kabc/addressee.h> + +#include "addressbooklinkwidget_base.h" + +namespace Kopete { +class MetaContact; + +namespace UI { + +/** + * A compact widget for showing and changing which address book item a + * particular Kopete::MetaContact is related to. + * + * Comprises a label showing the contact's name, a Clear button, and a Change + * button that usually invokes the AddressBookSelectorWidget. + */ +class AddressBookLinkWidget : public AddressBookLinkWidgetBase +{ +Q_OBJECT +public: + AddressBookLinkWidget( QWidget * parent, const char * name ); + ~AddressBookLinkWidget() {} + /** + * Set the currently selected addressee + */ + void setAddressee( const KABC::Addressee& addr ); + /** + * Set the current metacontact so that the selector dialog may be preselected + */ + void setMetaContact( const Kopete::MetaContact * ); + /** + * Return the selected addressbook UID. + */ + QString uid() const; +signals: + /** + * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. + */ + void addresseeChanged( const KABC::Addressee& addr ); + + /** + * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. + * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal + */ + void selectAddresseeClicked(); +protected slots: + void slotClearAddressee(); + void slotSelectAddressee(); +private: + const Kopete::MetaContact * mMetaContact; + QString mSelectedUid; +}; +} // end namespace UI +} // end namespace Kopete +#endif |