summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/ui/addressbookselectordialog.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/addressbookselectordialog.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/addressbookselectordialog.h')
-rw-r--r--kopete/libkopete/ui/addressbookselectordialog.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/addressbookselectordialog.h b/kopete/libkopete/ui/addressbookselectordialog.h
new file mode 100644
index 00000000..f391aa3a
--- /dev/null
+++ b/kopete/libkopete/ui/addressbookselectordialog.h
@@ -0,0 +1,90 @@
+/*
+ AddressBookSelectorDialog
+ Nice Dialog to select a KDE AddressBook contact
+
+ 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 ADDRESSBOOKSELECTORDIALOG_H
+#define ADDRESSBOOKSELECTORDIALOG_H
+
+#include <kdemacros.h>
+#include "kopete_export.h"
+#include <kdialogbase.h>
+
+namespace KABC
+{
+ class AddressBook;
+ class Addressee;
+}
+
+namespace Kopete
+{
+namespace UI
+{
+
+class AddressBookSelectorWidget;
+
+/**
+ * A dialog that uses AddressBookSelectorWidget to allow the user
+ * to select a KDE addressbook contact. If you want to use special features
+ * you can use @see addressBookSelectorWidget() to get the pointer to the
+ * AddressBookSelectorWidget object and set the desired options there.
+ *
+ * @author Duncan Mac-Vicar Prett <[email protected]>
+ */
+class KOPETE_EXPORT AddressBookSelectorDialog : public KDialogBase
+{
+ Q_OBJECT
+public:
+ /**
+ * The constructor of an empty AddressBookSelectorWidget
+ */
+ AddressBookSelectorDialog( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent=0L, const char *name=0L, bool modal = false );
+ /**
+ * The destructor of the dialog
+ */
+ ~AddressBookSelectorDialog();
+
+ /**
+ * @returns the AddressBookSelectorWidget widget so that additional
+ * parameters can be set by using it.
+ */
+ AddressBookSelectorWidget *addressBookSelectorWidget() const
+ { return m_addressBookSelectorWidget; };
+
+ /**
+ * Creates a modal dialog, lets the user to select a addressbook contact
+ * and returns when the dialog is closed.
+ *
+ * @returns the selected contact, or a null addressee if the user
+ * pressed the Cancel button. Optionally
+ */
+ static KABC::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L );
+
+protected slots:
+ virtual void accept();
+ virtual void reject();
+ void slotWidgetAddresseeListClicked( QListViewItem *addressee );
+protected:
+ AddressBookSelectorWidget *m_addressBookSelectorWidget;
+};
+
+} // namespace UI
+} // namespace Kopete
+
+#endif
+
+// vim: set noet ts=4 sts=4 sw=4:
+