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, sales@eyeos.com
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
15namespace Akonadi
16{
17/**
18 * @short A widget for selecting the type of an address.
19 */
21{
23
24public:
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 */
46 [[nodiscard]] KContacts::Address::Type type() const;
47
48private Q_SLOTS:
49 void selected(int);
50 void otherSelected();
51
52private:
53 void update();
54
56 int mLastSelected = 0;
57 QList<int> mTypeList;
58};
59
60}
A widget for selecting the type of an address.
~SelectAddressTypeComboBox() override
Destroys the address type combo.
void setType(KContacts::Address::Type type)
Sets the type that shall be selected in the combobox.
KContacts::Address::Type type() const
Returns the type that is currently selected.
SelectAddressTypeComboBox(QWidget *parent=nullptr)
Creates a new address type combo.
A widget for editing the display name of a contact.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:20 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.