diff --git a/kmail/editorconvertertextplugins/markdown/markdownconfiguredialog.cpp b/kmail/editorconvertertextplugins/markdown/markdownconfiguredialog.cpp index bb085f3a..2d4587d1 100644 --- a/kmail/editorconvertertextplugins/markdown/markdownconfiguredialog.cpp +++ b/kmail/editorconvertertextplugins/markdown/markdownconfiguredialog.cpp @@ -1,60 +1,62 @@ /* 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 "markdownconfiguredialog.h" #include "markdownconfigurewidget.h" #include +#include +#include MarkdownConfigureDialog::MarkdownConfigureDialog(QWidget *parent) : PimCommon::ConfigurePluginDialog(parent) { setWindowTitle(i18n("Configure Markdown Plugin")); initLayout(); } MarkdownConfigureDialog::~MarkdownConfigureDialog() { } QWidget *MarkdownConfigureDialog::createLayout() { mConfigureWidget = new MarkdownConfigureWidget(this); mConfigureWidget->setObjectName(QStringLiteral("configurewidget")); return mConfigureWidget; } void MarkdownConfigureDialog::save() { mConfigureWidget->saveSettings(); } void MarkdownConfigureDialog::load() { mConfigureWidget->loadSettings(); } void MarkdownConfigureDialog::reset() { mConfigureWidget->resetSettings(); } void MarkdownConfigureDialog::help() { - showHelp(QStringLiteral("kmail2"), mConfigureWidget->helpAnchor()); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://tools.ietf.org/html/rfc7763"))); } diff --git a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp index aea2b5a0..f1abd020 100644 --- a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp +++ b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.cpp @@ -1,74 +1,67 @@ /* 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 22db440f..3a2d5a6f 100644 --- a/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h +++ b/kmail/editorconvertertextplugins/markdown/markdownconfigurewidget.h @@ -1,41 +1,40 @@ /* 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