Commit 69283e33 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement plugin

parent eed0cdaa
Pipeline #27471 failed with stage
in 60 minutes
......@@ -64,7 +64,7 @@ find_package(KF5Parts ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Prison ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(MAILCOMMON_LIB_VERSION "5.14.80")
set(MAILCOMMON_LIB_VERSION "5.15.41")
set(GRAVATAR_LIB_VERSION "5.14.80")
set(PIMCOMMON_LIB_VERSION "5.14.80")
set(GRANTLEETHEME_LIB_VERSION "5.14.80")
......
set(messageviewer_expireaccounttrashfolderonfigplugin_SRCS
expireaccounttrashfolderconfigplugin.cpp
)
kcoreaddons_add_plugin(messageviewer_expireaccounttrashfolderconfigplugin JSON messageviewer_expireaccounttrashfolderconfigplugin.json SOURCES
${messageviewer_expireaccounttrashfolderonfigplugin_SRCS} INSTALL_NAMESPACE messageviewer/configuresettings)
target_link_libraries(messageviewer_expireaccounttrashfolderconfigplugin
KF5::MessageViewer
KF5::I18n
)
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 "expireaccounttrashfolderconfigplugin.h"
#include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(ExpireAccountTrashFolderConfigPlugin, "messageviewer_expireaccounttrashfolderconfigplugin.json")
ExpireAccountTrashFolderConfigPlugin::ExpireAccountTrashFolderConfigPlugin(QObject *parent, const QList<QVariant> &)
: MessageViewer::MessageViewerConfigureSettingsPlugin(parent)
{
}
ExpireAccountTrashFolderConfigPlugin::~ExpireAccountTrashFolderConfigPlugin()
{
}
void ExpireAccountTrashFolderConfigPlugin::showConfigureDialog(QWidget *parent)
{
// QPointer<ExpireAccountTrashFolderConfigPluginDialog> dlg = new ExpireAccountTrashFolderConfigPluginDialog(parent);
// dlg->exec();
// delete dlg;
}
#include "expireaccounttrashfolderconfigplugin.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 EXPIREACCOUNTTRASHFOLDERCONFIGPLUGIN_H
#define EXPIREACCOUNTTRASHFOLDERCONFIGPLUGIN_H
#include <MessageViewer/MessageViewerConfigureSettingsPlugin>
#include <QVariant>
class ExpireAccountTrashFolderConfigPlugin : public MessageViewer::MessageViewerConfigureSettingsPlugin
{
Q_OBJECT
public:
explicit ExpireAccountTrashFolderConfigPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~ExpireAccountTrashFolderConfigPlugin() override;
void showConfigureDialog(QWidget *parent) override;
};
#endif // EXPIREACCOUNTTRASHFOLDERCONFIGPLUGIN_H
{
"KPlugin": {
"Description": "This plugin allows you to configure expire trash folder for each accounts.",
"Name": "Expire Trash Folder",
"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