Akonadi

tagselectioncombobox.h
1/*
2 SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
3 SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@kde.org>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "akonadiwidgets_export.h"
11
12// AkonadiCore
13#include "akonadi/tag.h"
14
15#include <QComboBox>
16
17#include <memory>
18
19namespace Akonadi
20{
21class TagSelectionComboBoxPrivate;
22
23/**
24 * @brief The TagSelectionCombo class
25 */
26class AKONADIWIDGETS_EXPORT TagSelectionComboBox : public QComboBox
27{
28 Q_OBJECT
29public:
30 explicit TagSelectionComboBox(QWidget *parent = nullptr);
31 ~TagSelectionComboBox() override;
32
33 void setCheckable(bool checkable);
34 bool checkable() const;
35
36 Tag::List selection() const;
37 QStringList selectionNames() const;
38 void setSelection(const Tag::List &selection);
39 void setSelection(const QStringList &selection);
40
41 void hidePopup() override;
42
43protected:
44 void keyPressEvent(QKeyEvent *event) override;
45 bool eventFilter(QObject *receiver, QEvent *event) override;
46
47Q_SIGNALS:
48 void selectionChanged(const Akonadi::Tag::List &selection);
49
50private:
51 std::unique_ptr<TagSelectionComboBoxPrivate> const d;
52};
53
54} // namespace
The TagSelectionCombo class.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.