Akonadi Contacts

messagingwidget.h
1 /*
2  This file is part of Contact Editor.
3 
4  SPDX-FileCopyrightText: 2016 eyeOS S.L.U., a Telefonica company, [email protected]
5  SPDX-FileCopyrightText: 2016-2020 Laurent Montel <montel.org>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #pragma once
11 
12 #include <QWidget>
13 
14 #include "contacteditor_private_export.h"
15 
16 class QToolButton;
17 
18 namespace KContacts
19 {
20 class Impp;
21 }
22 
23 namespace ContactEditor
24 {
25 class PreferredLineEditWidget;
26 class ContactEditorComboBox;
27 class CONTACTEDITOR_TESTS_EXPORT MessagingWidget : public QWidget
28 {
29  Q_OBJECT
30 public:
31  explicit MessagingWidget(QWidget *parent = nullptr);
32  ~MessagingWidget() override;
33 
34  void updateAddRemoveButton(bool addButtonEnabled);
35  KContacts::Impp imAddress() const;
36  void setIMAddress(const KContacts::Impp &address);
37  void setPreferred(bool b);
38  void clearWidget();
39  void setReadOnly(bool readOnly);
40 Q_SIGNALS:
41  void addWidget(ContactEditor::MessagingWidget *);
42  void removeWidget(ContactEditor::MessagingWidget *);
43  void preferredChanged(ContactEditor::MessagingWidget *);
44 
45 private:
46  void slotAddMessaging();
47  void slotRemoveMessaging();
48  void slotPreferredChanged();
49  PreferredLineEditWidget *mMessagingEdit = nullptr;
50  QToolButton *mAddButton = nullptr;
51  QToolButton *mRemoveButton = nullptr;
52  ContactEditor::ContactEditorComboBox *mProtocolCombo = nullptr;
53 };
54 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:09:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.