Commit 0506db6d authored by Laurent Montel's avatar Laurent Montel 😁

Add gravatar config widget

parent ac1286d3
......@@ -10,5 +10,6 @@ kcoreaddons_add_plugin(messageviewer_gravatarconfigplugin JSON messageviewer_gra
target_link_libraries(messageviewer_gravatarconfigplugin
KF5::MessageViewer
KF5::PimCommon
KF5::Gravatar
KF5::I18n
)
......@@ -18,11 +18,18 @@
*/
#include "gravatarconfiguresettingspluginwidget.h"
#include <QVBoxLayout>
#include <Gravatar/GravatarConfigWidget>
GravatarConfigureSettingsPluginWidget::GravatarConfigureSettingsPluginWidget(QWidget *parent)
: MessageViewer::MessageViewerConfigureSettingsPluginWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setMargin(0);
mGravatarConfigWidget = new Gravatar::GravatarConfigWidget(this);
mGravatarConfigWidget->setObjectName(QStringLiteral("gravatarconfigwidget"));
mainLayout->addWidget(mGravatarConfigWidget);
}
GravatarConfigureSettingsPluginWidget::~GravatarConfigureSettingsPluginWidget()
......@@ -32,12 +39,15 @@ GravatarConfigureSettingsPluginWidget::~GravatarConfigureSettingsPluginWidget()
void GravatarConfigureSettingsPluginWidget::loadSettings()
{
mGravatarConfigWidget->doLoadFromGlobalSettings();
}
void GravatarConfigureSettingsPluginWidget::saveSettings()
{
mGravatarConfigWidget->save();
}
void GravatarConfigureSettingsPluginWidget::resetSettings()
{
mGravatarConfigWidget->doResetToDefaultsOther();
}
......@@ -21,7 +21,9 @@
#define GRAVATARCONFIGURESETTINGSPLUGINWIDGET_H
#include <MessageViewer/MessageViewerConfigureSettingsPluginWidget>
namespace Gravatar {
class GravatarConfigWidget;
}
class GravatarConfigureSettingsPluginWidget : public MessageViewer::MessageViewerConfigureSettingsPluginWidget
{
Q_OBJECT
......@@ -29,10 +31,12 @@ public:
explicit GravatarConfigureSettingsPluginWidget(QWidget *parent = nullptr);
~GravatarConfigureSettingsPluginWidget() override;
public:
void loadSettings() override;
void saveSettings() override;
void resetSettings() override;
private:
Gravatar::GravatarConfigWidget *mGravatarConfigWidget = nullptr;
};
#endif // GRAVATARCONFIGURESETTINGSPLUGINWIDGET_H
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