Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

Allow in the future to select css style

parent b999f1fe
......@@ -19,7 +19,9 @@
#include "markdownconfigurewidgettest.h"
#include "../markdownconfigurewidget.h"
#include <QComboBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QTest>
QTEST_MAIN(MarkdownConfigureWidgetTest)
......@@ -35,4 +37,11 @@ void MarkdownConfigureWidgetTest::shouldHaveDefaultValue()
QHBoxLayout *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
QLabel *lab = w.findChild<QLabel *>(QStringLiteral("labelcss"));
QVERIFY(lab);
QVERIFY(!lab->text().isEmpty());
QComboBox *mCssCombobox = w.findChild<QComboBox *>(QStringLiteral("csscombobox"));
QVERIFY(mCssCombobox);
}
......@@ -19,12 +19,24 @@
#include "markdownconfigurewidget.h"
#include <QHBoxLayout>
#include <QComboBox>
#include <QLabel>
#include <KLocalizedString>
MarkdownConfigureWidget::MarkdownConfigureWidget(QWidget *parent)
: MessageComposer::PluginEditorConvertTextConfigureWidget(parent)
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mainLayout->setMargin(0);
QLabel *lab = new QLabel(i18n("Select CSS"), this);
lab->setObjectName(QStringLiteral("labelcss"));
mainLayout->addWidget(lab);
mCssCombobox = new QComboBox(this);
mCssCombobox->setObjectName(QStringLiteral("csscombobox"));
mainLayout->addWidget(mCssCombobox);
}
MarkdownConfigureWidget::~MarkdownConfigureWidget()
......
......@@ -21,7 +21,7 @@
#define MARKDOWNCONFIGUREWIDGET_H
#include <MessageComposer/PluginEditorConvertTextConfigureWidget>
class QComboBox;
class MarkdownConfigureWidget : public MessageComposer::PluginEditorConvertTextConfigureWidget
{
Q_OBJECT
......@@ -32,6 +32,8 @@ public:
void loadSettings() override;
void saveSettings() override;
void resetSettings() override;
private:
QComboBox *mCssCombobox = nullptr;
};
#endif // MARKDOWNCONFIGUREWIDGET_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