Commit 5d3ddee3 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement create link

parent 4070b2bd
......@@ -51,7 +51,7 @@ void InsertTemplateCommandPluginEditorInterface::createAction(KActionCollection
ac->addAction(QStringLiteral("insert_template_command"), mCommandAction);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::insertCommand, this, &InsertTemplateCommandPluginEditorInterface::slotInsertCommand);
MessageComposer::PluginActionType type(mCommandAction, MessageComposer::PluginActionType::ToolBar);
setActionType(type);
setActionTypes(type);
}
void InsertTemplateCommandPluginEditorInterface::slotOpenMenu()
......
......@@ -11,6 +11,8 @@ set(kmail_markdownplugin_SRCS
markdownconverter.cpp
markdownpreviewdialog.cpp
markdownenginepage.cpp
markdowncreatelinkwidget.cpp
markdowncreatelinkdialog.cpp
)
......
......@@ -17,3 +17,5 @@ add_kmail_converttext_unittest(markdownplugintest.cpp "../markdownenginepage.cpp
add_kmail_converttext_unittest(markdownconfigurewidgettest.cpp "../markdownconfigurewidget.cpp")
add_kmail_converttext_unittest(markdownconfiguredialogtest.cpp "../markdownconfiguredialog.cpp;../markdownconfigurewidget.cpp")
add_kmail_converttext_unittest(markdownpreviewdialogtest.cpp "../markdownpreviewdialog.cpp;../markdownpreviewwidget.cpp;../markdownenginepage.cpp;../markdownconverter.cpp")
add_kmail_converttext_unittest(markdowncreatelinkwidgettest.cpp "")
add_kmail_converttext_unittest(markdowncreatelinkdialogtest.cpp "")
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "markdowncreatelinkdialogtest.h"
#include <QTest>
QTEST_MAIN(MarkdownCreateLinkDialogTest)
MarkdownCreateLinkDialogTest::MarkdownCreateLinkDialogTest(QObject *parent)
: QObject(parent)
{
}
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MARKDOWNCREATELINKDIALOGTEST_H
#define MARKDOWNCREATELINKDIALOGTEST_H
#include <QObject>
class MarkdownCreateLinkDialogTest : public QObject
{
Q_OBJECT
public:
explicit MarkdownCreateLinkDialogTest(QObject *parent = nullptr);
~MarkdownCreateLinkDialogTest() = default;
};
#endif // MARKDOWNCREATELINKDIALOGTEST_H
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "markdowncreatelinkwidgettest.h"
#include <QTest>
QTEST_MAIN(MarkdownCreateLinkWidgetTest)
MarkdownCreateLinkWidgetTest::MarkdownCreateLinkWidgetTest(QObject *parent)
: QObject(parent)
{
}
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MARKDOWNCREATELINKWIDGETTEST_H
#define MARKDOWNCREATELINKWIDGETTEST_H
#include <QObject>
class MarkdownCreateLinkWidgetTest : public QObject
{
Q_OBJECT
public:
explicit MarkdownCreateLinkWidgetTest(QObject *parent = nullptr);
~MarkdownCreateLinkWidgetTest() = default;
};
#endif // MARKDOWNCREATELINKWIDGETTEST_H
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "markdowncreatelinkdialog.h"
#include "markdowncreatelinkwidget.h"
#include <KLocalizedString>
#include <QVBoxLayout>
#include <QDialogButtonBox>
MarkdownCreateLinkDialog::MarkdownCreateLinkDialog(QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mMarkdownCreateLinkWidget = new MarkdownCreateLinkWidget(this);
mMarkdownCreateLinkWidget->setObjectName(QStringLiteral("markdowncreatelinkwidget"));
mainLayout->addWidget(mMarkdownCreateLinkWidget);
}
MarkdownCreateLinkDialog::~MarkdownCreateLinkDialog()
{
}
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MARKDOWNCREATELINKDIALOG_H
#define MARKDOWNCREATELINKDIALOG_H
#include <QDialog>
class MarkdownCreateLinkWidget;
class MarkdownCreateLinkDialog : public QDialog
{
Q_OBJECT
public:
explicit MarkdownCreateLinkDialog(QWidget *parent = nullptr);
~MarkdownCreateLinkDialog();
private:
MarkdownCreateLinkWidget *mMarkdownCreateLinkWidget = nullptr;
};
#endif // MARKDOWNCREATELINKDIALOG_H
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "markdowncreatelinkwidget.h"
#include <KLocalizedString>
#include <QHBoxLayout>
MarkdownCreateLinkWidget::MarkdownCreateLinkWidget(QWidget *parent)
: QWidget(parent)
{
}
MarkdownCreateLinkWidget::~MarkdownCreateLinkWidget()
{
}
/*
Copyright (C) 2019 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MARKDOWNCREATELINKWIDGET_H
#define MARKDOWNCREATELINKWIDGET_H
#include <QWidget>
class MarkdownCreateLinkWidget : public QWidget
{
Q_OBJECT
public:
explicit MarkdownCreateLinkWidget(QWidget *parent = nullptr);
~MarkdownCreateLinkWidget();
};
#endif // MARKDOWNCREATELINKWIDGET_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