Commit ab042f62 authored by Laurent Montel's avatar Laurent Montel 😁

Create config dialogbox

parent 7e1f819f
set(kmail_externalcomposereditorplugin_SRCS
externalcomposerplugineditor.cpp
externalcomposerplugineditorinterface.cpp
externalcomposerconfiguredialog.cpp
externalcomposerconfigurewidget.cpp
)
kcoreaddons_add_plugin(kmail_externalcomposereditorplugin JSON kmail_externalcomposereditorplugin.json SOURCES
......
/*
Copyright (C) 2017 Montel Laurent <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 "externalcomposerconfiguredialog.h"
#include "externalcomposerconfigurewidget.h"
#include <KIdentityManagement/IdentityManager>
#include <KLocalizedString>
ExternalComposerConfigureDialog::ExternalComposerConfigureDialog(QWidget *parent)
: PimCommon::ConfigurePluginDialog(parent)
, mConfigureWidget(nullptr)
{
setWindowTitle(i18n("Configure \"Automatic Add Contacts\" Plugin"));
initLayout();
}
ExternalComposerConfigureDialog::~ExternalComposerConfigureDialog()
{
}
QWidget *ExternalComposerConfigureDialog::createLayout()
{
mConfigureWidget = new ExternalComposerConfigureWidget(this);
return mConfigureWidget;
}
void ExternalComposerConfigureDialog::save()
{
mConfigureWidget->saveSettings();
}
void ExternalComposerConfigureDialog::load()
{
mConfigureWidget->loadSettings();
}
void ExternalComposerConfigureDialog::reset()
{
mConfigureWidget->resetSettings();
}
void ExternalComposerConfigureDialog::help()
{
showHelp(QStringLiteral("kmail2"), QString());
}
/*
Copyright (C) 2017 Montel Laurent <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 EXTERNALCOMPOSERCONFIGUREDIALOG_H
#define EXTERNALCOMPOSERCONFIGUREDIALOG_H
#include <PimCommon/ConfigurePluginDialog>
class ExternalComposerConfigureWidget;
class ExternalComposerConfigureDialog : public PimCommon::ConfigurePluginDialog
{
Q_OBJECT
public:
explicit ExternalComposerConfigureDialog(QWidget *parent = nullptr);
~ExternalComposerConfigureDialog();
protected:
QWidget *createLayout() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
void load() Q_DECL_OVERRIDE;
void reset() Q_DECL_OVERRIDE;
void help() Q_DECL_OVERRIDE;
private:
ExternalComposerConfigureWidget *mConfigureWidget;
};
#endif // EXTERNALCOMPOSERCONFIGUREDIALOG_H
/*
Copyright (C) 2017 Montel Laurent <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 "externalcomposerconfigurewidget.h"
#include <KLocalizedString>
#include <KConfigGroup>
#include <KSharedConfig>
#include <QVBoxLayout>
ExternalComposerConfigureWidget::ExternalComposerConfigureWidget(QWidget *parent)
: MessageComposer::PluginEditorInitConfigureWidget(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
}
ExternalComposerConfigureWidget::~ExternalComposerConfigureWidget()
{
}
void ExternalComposerConfigureWidget::loadSettings()
{
}
void ExternalComposerConfigureWidget::saveSettings()
{
}
void ExternalComposerConfigureWidget::resetSettings()
{
}
/*
Copyright (C) 2017 Montel Laurent <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 CONFIRMADDRESSCONFIGUREWIDGET_H
#define CONFIRMADDRESSCONFIGUREWIDGET_H
#include <QWidget>
#include <MessageComposer/PluginEditorInitConfigureWidget>
class ExternalComposerConfigureTab;
class ExternalComposerConfigureWidget : public MessageComposer::PluginEditorInitConfigureWidget
{
Q_OBJECT
public:
explicit ExternalComposerConfigureWidget(QWidget *parent = nullptr);
~ExternalComposerConfigureWidget();
void loadSettings() Q_DECL_OVERRIDE;
void saveSettings() Q_DECL_OVERRIDE;
void resetSettings() Q_DECL_OVERRIDE;
};
#endif // CONFIRMADDRESSCONFIGUREWIDGET_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