Messagelib

recipientspicker.h
1 /*
2  SPDX-FileCopyrightText: 2010 Volker Krause <[email protected]>
3  This file was part of KMail.
4  SPDX-FileCopyrightText: 2005 Cornelius Schumacher <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 #pragma once
9 
10 #include <MessageComposer/Recipient>
11 
12 #include <KContacts/Addressee>
13 #include <QDialog>
14 
15 class QPushButton;
16 class QLabel;
17 namespace PimCommon
18 {
19 class LdapSearchDialog;
20 }
21 
22 namespace Akonadi
23 {
24 class RecipientsPickerWidget;
25 }
26 
27 namespace MessageComposer
28 {
29 class RecipientsPicker : public QDialog
30 {
31  Q_OBJECT
32 
33 public:
34  explicit RecipientsPicker(QWidget *parent);
35  ~RecipientsPicker() override;
36 
37  void setRecipients(const Recipient::List &);
38 
39  void setDefaultType(Recipient::Type);
40 
41 Q_SIGNALS:
42  void pickedRecipient(const Recipient &, bool &);
43 
44 protected:
45  void readConfig();
46  void writeConfig();
47 
48  void pick(Recipient::Type);
49 
50  void keyPressEvent(QKeyEvent *) override;
51 
52 protected Q_SLOTS:
53  void slotToClicked();
54  void slotCcClicked();
55  void slotBccClicked();
56  void slotReplyToClicked();
57  void slotPicked();
58  void slotSearchLDAP();
59  void ldapSearchResult();
60  void slotSelectionChanged();
61 
62 private:
63  void updateLabel(int nbSelected);
64  Akonadi::RecipientsPickerWidget *const mView;
65 
66  PimCommon::LdapSearchDialog *mLdapSearchDialog = nullptr;
67 
68  Recipient::Type mDefaultType;
69  QPushButton *mUser4Button = nullptr;
70  QPushButton *mUser3Button = nullptr;
71  QPushButton *mUser2Button = nullptr;
72  QPushButton *mUser1Button = nullptr;
73  QLabel *const mSelectedLabel = nullptr;
74 };
75 }
Q_OBJECTQ_OBJECT
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Q_SLOTSQ_SLOTS
void readConfig()
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Mar 22 2023 04:07:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.