Warning, file /pim/mailcommon/src/interfaces/rulewidgethandler.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* -*- mode: C++; c-file-style: "gnu" -*- 0002 0003 SPDX-FileCopyrightText: 2004 Ingo Kloecker <kloecker@kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "search/searchpattern.h" 0011 0012 #include <QByteArray> 0013 0014 class QWidget; 0015 class QStackedWidget; 0016 class QString; 0017 class QObject; 0018 0019 namespace MailCommon 0020 { 0021 /** 0022 * @short An interface to filter/search rule widget handlers 0023 */ 0024 class RuleWidgetHandler 0025 { 0026 public: 0027 virtual ~RuleWidgetHandler() = default; 0028 0029 [[nodiscard]] virtual QWidget *createFunctionWidget(int number, QStackedWidget *functionStack, const QObject *receiver, bool isAkonadiSearch) const = 0; 0030 [[nodiscard]] virtual QWidget *createValueWidget(int number, QStackedWidget *valueStack, const QObject *receiver) const = 0; 0031 [[nodiscard]] virtual MailCommon::SearchRule::Function function(const QByteArray &field, const QStackedWidget *functionStack) const = 0; 0032 [[nodiscard]] virtual QString value(const QByteArray &field, const QStackedWidget *functionStack, const QStackedWidget *valueStack) const = 0; 0033 [[nodiscard]] virtual QString prettyValue(const QByteArray &field, const QStackedWidget *functionStack, const QStackedWidget *valueStack) const = 0; 0034 [[nodiscard]] virtual bool handlesField(const QByteArray &field) const = 0; 0035 virtual void reset(QStackedWidget *functionStack, QStackedWidget *valueStack) const = 0; 0036 [[nodiscard]] virtual bool 0037 setRule(QStackedWidget *functionStack, QStackedWidget *valueStack, const MailCommon::SearchRule::Ptr rule, bool isAkonadiSearch) const = 0; 0038 [[nodiscard]] virtual bool update(const QByteArray &field, QStackedWidget *functionStack, QStackedWidget *valueStack) const = 0; 0039 }; 0040 }