Waste less space in nested layouts.
[kdepim.git] / messagecomposer / recipientspicker.h
blobfb929f2785709a1e8d0ae2b37c8e4b2f8b807ca3
1 /*
2 Copyright (c) 2010 Volker Krause <vkrause@kde.org>
3 This file was part of KMail.
4 Copyright (c) 2005 Cornelius Schumacher <schumacher@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
21 #ifndef MESSAGECOMPOSER_RECIPIENTSPICKER_H
22 #define MESSAGECOMPOSER_RECIPIENTSPICKER_H
24 #include <messagecomposer/recipient.h>
26 #include <kabc/addressee.h>
27 #include <kdialog.h>
29 namespace Akonadi {
30 class EmailAddressSelectionWidget;
33 namespace KLDAP {
34 class LdapSearchDialog;
37 namespace MessageComposer {
39 // ### temporary export
40 class MESSAGECOMPOSER_EXPORT RecipientsPicker : public KDialog
42 Q_OBJECT
44 public:
45 RecipientsPicker( QWidget *parent );
46 ~RecipientsPicker();
48 void setRecipients( const Recipient::List & );
50 void setDefaultType( Recipient::Type );
52 Q_SIGNALS:
53 void pickedRecipient( const Recipient & );
55 protected:
56 void readConfig();
57 void writeConfig();
59 void pick( Recipient::Type );
61 void keyPressEvent( QKeyEvent* );
63 protected Q_SLOTS:
64 void slotToClicked();
65 void slotCcClicked();
66 void slotBccClicked();
67 void slotPicked();
68 void slotSearchLDAP();
69 void ldapSearchResult();
70 void slotSelectionChanged();
72 private:
73 Akonadi::EmailAddressSelectionWidget *mView;
75 QPushButton *mToButton;
76 QPushButton *mCcButton;
77 QPushButton *mBccButton;
79 QPushButton *mSearchLDAPButton;
80 KLDAP::LdapSearchDialog *mLdapSearchDialog;
82 Recipient::Type mDefaultType;
87 #endif