Commit e4d2856d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement preview code

parent 9c1a926f
......@@ -19,6 +19,7 @@
#include "sievepreviewgeneratedcodewidget.h"
#include <QHBoxLayout>
#include <QTextEdit>
using namespace KSieveUi;
SievePreviewGeneratedCodeWidget::SievePreviewGeneratedCodeWidget(QWidget *parent)
: QWidget(parent)
......@@ -26,9 +27,19 @@ SievePreviewGeneratedCodeWidget::SievePreviewGeneratedCodeWidget(QWidget *parent
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins(0, 0, 0, 0);
mTextEdit = new QTextEdit(this);
mTextEdit->setObjectName(QStringLiteral("mTextEdit"));
mTextEdit->setReadOnly(true);
mainLayout->addWidget(mTextEdit);
}
SievePreviewGeneratedCodeWidget::~SievePreviewGeneratedCodeWidget()
{
}
void SievePreviewGeneratedCodeWidget::setCode(const QString &str)
{
mTextEdit->setText(str);
}
......@@ -28,6 +28,8 @@ class SievePreviewGeneratedCodeWidget : public QWidget
public:
explicit SievePreviewGeneratedCodeWidget(QWidget *parent = nullptr);
~SievePreviewGeneratedCodeWidget();
void setCode(const QString &str);
private:
QTextEdit *mTextEdit = nullptr;
};
......
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