Mailcommon

filteractionwithcommand.h
1/*
2 * SPDX-FileCopyrightText: 1996-1998 Stefan Taferner <taferner@kde.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 *
6 */
7
8#pragma once
9
10#include "filteractionwithurl.h"
11#include <QList>
12class QTemporaryFile;
13
14namespace MailCommon
15{
16class FilterActionWithCommand : public FilterActionWithUrl
17{
19
20public:
21 /**
22 * @copydoc FilterAction::FilterAction
23 */
24 FilterActionWithCommand(const QString &name, const QString &label, QObject *parent = nullptr);
25
26 /**
27 * @copydoc FilterAction::createParamWidget
28 */
29 QWidget *createParamWidget(QWidget *parent) const override;
30
31 /**
32 * @copydoc FilterAction::applyParamWidgetValue
33 */
34 void applyParamWidgetValue(QWidget *paramWidget) override;
35
36 /**
37 * @copydoc FilterAction::setParamWidgetValue
38 */
39 void setParamWidgetValue(QWidget *paramWidget) const override;
40
41 /**
42 * @copydoc FilterAction::clearParamWidget
43 */
44 void clearParamWidget(QWidget *paramWidget) const override;
45
46 /**
47 * Substitutes various placeholders for data from the message
48 * resp. for filenames containing that data. Currently, only %n is
49 * supported, where n in an integer >= 0. %n gets substituted for
50 * the name of a tempfile holding the n'th message part, with n=0
51 * meaning the body of the message.
52 */
53 [[nodiscard]] virtual QString substituteCommandLineArgsFor(const KMime::Message::Ptr &aMsg, QList<QTemporaryFile *> &aTempFileList) const;
54
55 [[nodiscard]] virtual ReturnCode genericProcess(ItemContext &context, bool filtering) const;
56};
57}
QString name() const
Returns identifier name, ie.
ReturnCode
Describes the possible return codes of filter processing:
QString label() const
Returns i18n'd label, ie.
The filter dialog.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:07:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.