Commit 3ab8d7f6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add support for define type where we can apply type

parent 0389cc4b
Pipeline #50376 passed with stage
in 41 minutes and 47 seconds
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(PIM_VERSION "5.16.44")
set(PIM_VERSION "5.16.45")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -21,6 +21,7 @@ public:
delete mComposerInterface;
}
PluginEditorInterface::ApplyOnFieldTypes mApplyOnFieldTypes;
PluginActionType mActionType;
QWidget *mParentWidget = nullptr;
KPIMTextEdit::RichTextEditor *mRichTextEditor = nullptr;
......@@ -96,3 +97,13 @@ bool PluginEditorInterface::processProcessKeyEvent(QKeyEvent *event)
Q_UNUSED(event)
return false;
}
PluginEditorInterface::ApplyOnFieldTypes PluginEditorInterface::applyOnFieldTypes() const
{
return d->mApplyOnFieldTypes;
}
void PluginEditorInterface::setApplyOnFieldTypes(PluginEditorInterface::ApplyOnFieldTypes types)
{
d->mApplyOnFieldTypes = types;
}
......@@ -31,6 +31,10 @@ class MESSAGECOMPOSER_EXPORT PluginEditorInterface : public PimCommon::AbstractG
{
Q_OBJECT
public:
enum ApplyOnFieldType { Composer = 1, EmailFields = 2, SubjectField = 4, All = Composer | EmailFields | SubjectField };
Q_FLAG(ApplyOnFieldType)
Q_DECLARE_FLAGS(ApplyOnFieldTypes, ApplyOnFieldType)
explicit PluginEditorInterface(QObject *parent = nullptr);
~PluginEditorInterface() override;
......@@ -51,6 +55,9 @@ public:
virtual bool processProcessKeyEvent(QKeyEvent *event);
Q_REQUIRED_RESULT PluginEditorInterface::ApplyOnFieldTypes applyOnFieldTypes() const;
void setApplyOnFieldTypes(PluginEditorInterface::ApplyOnFieldTypes types);
Q_SIGNALS:
void emitPluginActivated(MessageComposer::PluginEditorInterface *interface);
void insertText(const QString &str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment