diff --git a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp index f1abd020..aea2b5a0 100644 --- a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp +++ b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp @@ -1,67 +1,74 @@ /* Copyright (C) 2018-2019 Montel Laurent 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 "markdownconfigurewidget.h" #include #include #include #include #include #include MarkdownConfigureWidget::MarkdownConfigureWidget(QWidget *parent) : MessageComposer::PluginEditorConvertTextConfigureWidget(parent) { QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setObjectName(QStringLiteral("mainlayout")); mainLayout->setMargin(0); mLatexSupport = new QCheckBox(i18n("Enable embedded LaTeX"), this); mLatexSupport->setObjectName(QStringLiteral("latex")); mainLayout->addWidget(mLatexSupport); mExtraDefinitionLists = new QCheckBox(i18n("Enable PHP Markdown Extra definition lists"), this); mExtraDefinitionLists->setObjectName(QStringLiteral("extradefinitionlists")); mainLayout->addWidget(mExtraDefinitionLists); mainLayout->addStretch(1); } MarkdownConfigureWidget::~MarkdownConfigureWidget() { } void MarkdownConfigureWidget::loadSettings() { KConfigGroup grp(KSharedConfig::openConfig(), "Mardown"); mLatexSupport->setChecked(grp.readEntry("Enable Embedded Latex", false)); mExtraDefinitionLists->setChecked(grp.readEntry("Enable Extra Definition Lists", false)); } void MarkdownConfigureWidget::saveSettings() { KConfigGroup grp(KSharedConfig::openConfig(), "Mardown"); grp.writeEntry("Enable Embedded Latex", mLatexSupport->isChecked()); grp.writeEntry("Enable Extra Definition Lists", mExtraDefinitionLists->isChecked()); } void MarkdownConfigureWidget::resetSettings() { mLatexSupport->setChecked(false); mExtraDefinitionLists->setChecked(false); } + + +QString MarkdownConfigureWidget::helpAnchor() const +{ + //TODO + return {}; +} diff --git a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h index 3a2d5a6f..22db440f 100644 --- a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h +++ b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h @@ -1,40 +1,41 @@ /* Copyright (C) 2018-2019 Montel Laurent 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 MARKDOWNCONFIGUREWIDGET_H #define MARKDOWNCONFIGUREWIDGET_H #include class QCheckBox; class MarkdownConfigureWidget : public MessageComposer::PluginEditorConvertTextConfigureWidget { Q_OBJECT public: explicit MarkdownConfigureWidget(QWidget *parent = nullptr); ~MarkdownConfigureWidget() override; void loadSettings() override; void saveSettings() override; void resetSettings() override; + QString helpAnchor() const override; private: QCheckBox *mLatexSupport = nullptr; QCheckBox *mExtraDefinitionLists = nullptr; }; #endif // MARKDOWNCONFIGUREWIDGET_H