Mailcommon

tagwidget.h
1 /*
2  SPDX-FileCopyrightText: 2012-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "mailcommon_export.h"
10 
11 #include "tag.h"
12 
13 #include <QWidget>
14 
15 class QLineEdit;
16 class KColorCombo;
17 class KIconButton;
18 class KKeySequenceWidget;
19 class QCheckBox;
20 class KActionCollection;
21 
22 namespace MailCommon
23 {
24 class TagWidgetPrivate;
25 class MAILCOMMON_EXPORT TagWidget : public QWidget
26 {
27  Q_OBJECT
28 public:
29  explicit TagWidget(const QList<KActionCollection *> &actionCollections, QWidget *parent = nullptr);
30  ~TagWidget() override;
31 
32  void recordTagSettings(MailCommon::Tag::Ptr tag);
33 
34  Q_REQUIRED_RESULT QLineEdit *tagNameLineEdit() const;
35  Q_REQUIRED_RESULT QCheckBox *textColorCheck() const;
36  Q_REQUIRED_RESULT QCheckBox *textFontCheck() const;
37  Q_REQUIRED_RESULT QCheckBox *backgroundColorCheck() const;
38  Q_REQUIRED_RESULT QCheckBox *inToolBarCheck() const;
39 
40  Q_REQUIRED_RESULT KColorCombo *textColorCombo() const;
41  Q_REQUIRED_RESULT KColorCombo *backgroundColorCombo() const;
42 
43  Q_REQUIRED_RESULT QCheckBox *textBoldCheck() const;
44  Q_REQUIRED_RESULT QCheckBox *textItalicCheck() const;
45 
46  Q_REQUIRED_RESULT KIconButton *iconButton() const;
47 
48  Q_REQUIRED_RESULT KKeySequenceWidget *keySequenceWidget() const;
49 
50  void setTagTextColor(const QColor &color);
51  void setTagBackgroundColor(const QColor &color);
52  void setTagTextFormat(bool bold, bool italic);
53 
54 Q_SIGNALS:
55  void changed();
56  void iconNameChanged(const QString &);
57 
58 private:
59  void slotEmitChangeCheck();
60  std::unique_ptr<TagWidgetPrivate> const d;
61 };
62 }
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.