Pimcommon

recentaddresswidget.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5
6*/
7
8#pragma once
9
10#include "pimcommonakonadi_export.h"
11#include <QStringList>
12#include <QWidget>
13class KConfig;
14class QListWidget;
15class QLineEdit;
16class QToolButton;
17
18namespace PimCommon
19{
20/**
21 * @brief The RecentAddressWidget class
22 * @author Laurent Montel <montel@kde.org>
23 */
24class PIMCOMMONAKONADI_EXPORT RecentAddressWidget : public QWidget
25{
26 Q_OBJECT
27public:
28 explicit RecentAddressWidget(QWidget *parent = nullptr);
29 ~RecentAddressWidget() override;
30
31 void setAddresses(const QStringList &addrs);
32 void storeAddresses(KConfig *config);
33 [[nodiscard]] bool wasChanged() const;
34
35protected:
36 void updateButtonState();
37 bool eventFilter(QObject *o, QEvent *e) override;
38
39private:
40 PIMCOMMONAKONADI_NO_EXPORT void slotAddItem();
41 PIMCOMMONAKONADI_NO_EXPORT void slotRemoveItem();
42 PIMCOMMONAKONADI_NO_EXPORT void slotUpdateAddButton(const QString &str);
43 PIMCOMMONAKONADI_NO_EXPORT void slotCustomContextMenuRequested(const QPoint &pos);
44 QLineEdit *const mLineEdit;
45 QToolButton *const mNewButton;
46 QToolButton *const mRemoveButton;
47 QListWidget *const mListView;
48 bool mDirty = false;
49};
50}
The RecentAddressWidget class.
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:12:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.