Akonadi Contacts

selectaddresstypecombobox.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 <KContacts/Address>
13 #include <QComboBox>
14 
15 namespace Akonadi
16 {
17 /**
18  * @short A widget for selecting the type of an address.
19  */
21 {
22  Q_OBJECT
23 
24 public:
25  /**
26  * Creates a new address type combo.
27  *
28  * @param parent The parent widget.
29  */
30  explicit SelectAddressTypeComboBox(QWidget *parent = nullptr);
31 
32  /**
33  * Destroys the address type combo.
34  */
35  ~SelectAddressTypeComboBox() override;
36 
37  /**
38  * Sets the type that shall be selected in the combobox.
39  * @param type KABC address type to set.
40  */
42 
43  /**
44  * Returns the type that is currently selected.
45  */
47 
48 private Q_SLOTS:
49  void selected(int);
50  void otherSelected();
51 
52 private:
53  void update();
54 
56  int mLastSelected = 0;
57  QList<int> mTypeList;
58 };
59 
60 }
Q_OBJECTQ_OBJECT
SelectAddressTypeComboBox(QWidget *parent=nullptr)
Creates a new address type combo.
Q_SLOTSQ_SLOTS
~SelectAddressTypeComboBox() override
Destroys the address type combo.
A widget for selecting the type of an address.
void setType(KContacts::Address::Type type)
Sets the type that shall be selected in the combobox.
QObject * parent() const const
A widget for editing the display name of a contact.
KContacts::Address::Type type() const
Returns the type that is currently selected.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Dec 6 2023 04:02:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.