Akonadi

tagselectioncombobox.h
1 /*
2  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
3  SPDX-FileCopyrightText: 2020 Daniel Vr├ítil <[email protected]>
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 
19 namespace Akonadi
20 {
21 class TagSelectionComboBoxPrivate;
22 
23 /**
24  * @brief The TagSelectionCombo class
25  */
26 class AKONADIWIDGETS_EXPORT TagSelectionComboBox : public QComboBox
27 {
28  Q_OBJECT
29 public:
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 
43 protected:
44  void keyPressEvent(QKeyEvent *event) override;
45  bool eventFilter(QObject *receiver, QEvent *event) override;
46 
47 Q_SIGNALS:
48  void selectionChanged(const Akonadi::Tag::List &selection);
49 
50 private:
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-2022 The KDE developers.
Generated on Tue Dec 6 2022 03:53:34 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.