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 ContactEditor
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  */
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 }
61 
void setType(KContacts::Address::Type type)
Sets the type that shall be selected in the combobox.
~SelectAddressTypeComboBox()
Destroys the address type combo.
Q_OBJECTQ_OBJECT
KContacts::Address::Type type() const
Returns the type that is currently selected.
SelectAddressTypeComboBox(QWidget *parent=nullptr)
Creates a new address type combo.
Q_SLOTSQ_SLOTS
QObject * parent() const const
A widget for selecting the type of an address.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jun 23 2021 23:09:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.