Akonadi

tageditwidget.h
1 /*
2  This file is part of Akonadi
3 
4  Copyright (c) 2014 Christian Mollekopf <[email protected]>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #ifndef AKONADI_TAGEDITWIDGET_P_H
23 #define AKONADI_TAGEDITWIDGET_P_H
24 
25 #include <QWidget>
26 #include "tag.h"
27 #include "akonadiwidgets_export.h"
28 
29 namespace Akonadi
30 {
31 
32 class TagModel;
38 class AKONADIWIDGETS_EXPORT TagEditWidget : public QWidget
39 {
40  Q_OBJECT
41 public:
42  explicit TagEditWidget(QWidget *parent = nullptr);
43  explicit TagEditWidget(Akonadi::TagModel *model, QWidget *parent = nullptr, bool enableSelection = false);
44  ~TagEditWidget() override;
45 
46  void setModel(Akonadi::TagModel *model);
47  Akonadi::TagModel *model() const;
48 
49  void setSelectionEnabled(bool enabled);
50  bool selectionEnabled() const;
51 
52  void setSelection(const Akonadi::Tag::List &tags);
53  Q_REQUIRED_RESULT Akonadi::Tag::List selection() const;
54 
55 protected:
56  bool eventFilter(QObject *watched, QEvent *event) override;
57 
58 private:
59  class Private;
61 };
62 
63 }
64 
65 #endif
A widget that offers facilities to add/remove tags and optionally provides a way to select tags...
Definition: tageditwidget.h:38
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 22:43:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.