Mailcommon

tagrulewidgethandler.h
1 /*
2  SPDX-FileCopyrightText: 2013-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "interfaces/rulewidgethandler.h"
10 
11 namespace MailCommon
12 {
13 class TagRuleWidgetHandler : public MailCommon::RuleWidgetHandler
14 {
15 public:
16  TagRuleWidgetHandler()
17  : MailCommon::RuleWidgetHandler()
18  {
19  }
20 
21  ~TagRuleWidgetHandler() override = default;
22 
23  QWidget *createFunctionWidget(int number, QStackedWidget *functionStack, const QObject *receiver, bool isBalooSearch) const override;
24 
25  QWidget *createValueWidget(int number, QStackedWidget *valueStack, const QObject *receiver) const override;
26 
27  SearchRule::Function function(const QByteArray &field, const QStackedWidget *functionStack) const override;
28 
29  QString value(const QByteArray &field, const QStackedWidget *functionStack, const QStackedWidget *valueStack) const override;
30 
31  QString prettyValue(const QByteArray &field, const QStackedWidget *functionStack, const QStackedWidget *valueStack) const override;
32 
33  bool handlesField(const QByteArray &field) const override;
34 
35  void reset(QStackedWidget *functionStack, QStackedWidget *valueStack) const override;
36 
37  bool setRule(QStackedWidget *functionStack, QStackedWidget *valueStack, const SearchRule::Ptr rule, bool isBalooSearch) const override;
38 
39  bool update(const QByteArray &field, QStackedWidget *functionStack, QStackedWidget *valueStack) const override;
40 };
41 }
std::shared_ptr< SearchRule > Ptr
Defines a pointer to a search rule.
Definition: searchrule.h:29
Function
Describes operators for comparison of field and contents.
Definition: searchrule.h:40
An interface to filter/search rule widget handlers.
void update(Part *part, const QByteArray &data, qint64 dataSize)
KGuiItem reset()
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.