Akonadi Contacts

phonecomboboxtype.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 "akonadi_contact_widgets_private_export.h"
13#include "editor/widgets/contacteditorcombobox.h"
14#include <KContacts/PhoneNumber>
15namespace Akonadi
16{
17/**
18 * @short A combobox to select a phone number type.
19 */
20class AKONADI_CONTACT_WIDGETS_TESTS_EXPORT PhoneComboBoxType : public Akonadi::ContactEditorComboBox
21{
22 Q_OBJECT
23
24public:
25 /**
26 * Creates a phone type combo.
27 *
28 * @param parent The parent widget.
29 */
30 explicit PhoneComboBoxType(QWidget *parent = nullptr);
31
32 /**
33 * Destroys the phone type combo.
34 */
36
37 /**
38 * Sets the phone number @p type that shall be selected.
39 */
40 void setType(KContacts::PhoneNumber::Type type);
41
42 /**
43 * Returns the selected phone number type.
44 */
45 [[nodiscard]] KContacts::PhoneNumber::Type type() const;
46
47 void resetToDefault();
48
49private:
50 void selected(int);
51 void otherSelected();
52 void update();
54 int mLastSelected = 0;
55 QList<int> mTypeList;
56};
57}
A combobox to select a phone number type.
~PhoneComboBoxType() override
Destroys the phone type combo.
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.