Libksieve

sievepreviewgeneratedcodewidget.cpp
1 /*
2  SPDX-FileCopyrightText: 2020-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "sievepreviewgeneratedcodewidget.h"
8 #include <QHBoxLayout>
9 #include <QTextEdit>
10 using namespace KSieveUi;
11 SievePreviewGeneratedCodeWidget::SievePreviewGeneratedCodeWidget(QWidget *parent)
12  : QWidget(parent)
13  , mTextEdit(new QTextEdit(this))
14 {
15  auto mainLayout = new QHBoxLayout(this);
16  mainLayout->setObjectName(QStringLiteral("mainLayout"));
17  mainLayout->setContentsMargins({});
18 
19  mTextEdit->setObjectName(QStringLiteral("mTextEdit"));
20  mTextEdit->setReadOnly(true);
21  mainLayout->addWidget(mTextEdit);
22 }
23 
24 SievePreviewGeneratedCodeWidget::~SievePreviewGeneratedCodeWidget()
25 {
26 }
27 
28 void SievePreviewGeneratedCodeWidget::setCode(const QString &str)
29 {
30  mTextEdit->setText(str);
31 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.