TextCustomEditor::PlainTextEditorWidget Class

The PlainTextEditorWidget class Author: Laurent Montel <montel@kde.org>. More...

Header: #include <TextCustomEditor/PlainTextEditorWidget>
CMake: find_package(KF6TextCustomEditor REQUIRED)
target_link_libraries(mytarget PRIVATE KF6::TextCustomEditor)

Public Functions

PlainTextEditorWidget(QWidget *parent = nullptr)
PlainTextEditorWidget(TextCustomEditor::PlainTextEditor *customEditor, QWidget *parent = nullptr)
virtual ~PlainTextEditorWidget() override
void clear()
TextCustomEditor::PlainTextEditor *editor() const
bool isEmpty() const
bool isReadOnly() const
void setPlainText(const QString &text)
void setReadOnly(bool readOnly)
void setSpellCheckingConfigFileName(const QString &_fileName)
QString toPlainText() const

Detailed Description

Member Function Documentation

[explicit] PlainTextEditorWidget::PlainTextEditorWidget(QWidget *parent = nullptr)

Constructs a new PlainTextEditorWidget.

[explicit] PlainTextEditorWidget::PlainTextEditorWidget(TextCustomEditor::PlainTextEditor *customEditor, QWidget *parent = nullptr)

Constructs a new PlainTextEditorWidget with a custom editor.

[override virtual noexcept] PlainTextEditorWidget::~PlainTextEditorWidget()

Destroys the widget.

void PlainTextEditorWidget::clear()

Clears all text from the editor.

TextCustomEditor::PlainTextEditor *PlainTextEditorWidget::editor() const

Returns the underlying PlainTextEditor instance.

bool PlainTextEditorWidget::isEmpty() const

Returns whether the editor is empty.

bool PlainTextEditorWidget::isReadOnly() const

Returns whether the editor is read-only.

void PlainTextEditorWidget::setPlainText(const QString &text)

Sets the plain text content of the editor.

void PlainTextEditorWidget::setReadOnly(bool readOnly)

Sets whether the editor is read-only.

See also isReadOnly().

void PlainTextEditorWidget::setSpellCheckingConfigFileName(const QString &_fileName)

Sets the configuration file name for spell checking.

QString PlainTextEditorWidget::toPlainText() const

Returns the plain text content of the editor.