Commit d0ed099c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to implement folder settings plugins

parent db122a6a
Pipeline #27811 failed with stage
in 60 minutes and 1 second
set(messageviewer_expireaccounttrashfolderonfigplugin_SRCS
set(messageviewer_expireaccounttrashfolderconfigplugin_SRCS
expireaccounttrashfolderconfigplugin.cpp
expireaccounttrashfolderconfigdialog.cpp
expireaccounttrashfolderconfigwidget.cpp
)
kcoreaddons_add_plugin(messageviewer_expireaccounttrashfolderconfigplugin JSON messageviewer_expireaccounttrashfolderconfigplugin.json SOURCES
${messageviewer_expireaccounttrashfolderonfigplugin_SRCS} INSTALL_NAMESPACE messageviewer/configuresettings)
${messageviewer_expireaccounttrashfolderconfigplugin_SRCS} INSTALL_NAMESPACE messageviewer/configuresettings)
target_link_libraries(messageviewer_expireaccounttrashfolderconfigplugin
KF5::MessageViewer
......
set(messageviewer_folderconfiguresettingsplugin_SRCS
folderconfiguresettingsplugin.cpp
)
kcoreaddons_add_plugin(messageviewer_folderconfiguresettingsplugin JSON messageviewer_folderconfiguresettingsplugin.json SOURCES
${messageviewer_folderconfiguresettingsplugin_SRCS} INSTALL_NAMESPACE messageviewer/configuresettings)
target_link_libraries(messageviewer_folderconfiguresettingsplugin
KF5::MessageViewer
KF5::I18n
KF5::MailCommon
)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "folderconfiguresettingsplugin.h"
#include <KPluginFactory>
#include <QPointer>
K_PLUGIN_CLASS_WITH_JSON(FolderConfigureSettingsPlugin, "messageviewer_folderconfiguresettingsplugin.json")
FolderConfigureSettingsPlugin::FolderConfigureSettingsPlugin(QObject *parent, const QList<QVariant> &)
: MessageViewer::MessageViewerConfigureSettingsPlugin(parent)
{
}
FolderConfigureSettingsPlugin::~FolderConfigureSettingsPlugin()
{
}
void FolderConfigureSettingsPlugin::showConfigureDialog(QWidget *parent)
{
// QPointer<ExpireAccountTrashFolderConfigDialog> dlg = new ExpireAccountTrashFolderConfigDialog(parent);
// dlg->exec();
// delete dlg;
}
#include "folderconfiguresettingsplugin.moc"
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef FOLDERCONFIGURESETTINGSPLUGIN_H
#define FOLDERCONFIGURESETTINGSPLUGIN_H
#include <MessageViewer/MessageViewerConfigureSettingsPlugin>
#include <QVariant>
class FolderConfigureSettingsPlugin : public MessageViewer::MessageViewerConfigureSettingsPlugin
{
Q_OBJECT
public:
explicit FolderConfigureSettingsPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~FolderConfigureSettingsPlugin() override;
void showConfigureDialog(QWidget *parent) override;
};
#endif // FOLDERCONFIGURESETTINGSPLUGIN_H
{
"KPlugin": {
"Description": "This plugin allows you to configure folder settings.",
"Name": "Folder Settings",
"ServiceTypes": [
"MessageViewerConfigureSettingsPlugin/Plugin"
],
"Version": "1.0"
},
"X-KDE-MessageViewer-Configure-Order": "100"
}
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