TextCustomEditor::RichTextBrowser Class

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

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

Public Functions

RichTextBrowser(QWidget *parent = nullptr)
virtual ~RichTextBrowser() override
bool searchSupport() const
void setDefaultFontSize(int val)
void setSearchSupport(bool b)
void setTextToSpeechSupport(bool b)
void setWebShortcutSupport(bool b)
bool textToSpeechSupport() const
bool webShortcutSupport() const
int zoomFactor() const

Public Slots

void slotDisplayMessageIndicator(const QString &message)
void slotSpeakText()
void slotZoomReset()

Signals

void findText()
void say(const QString &text)

Protected Functions

virtual void addExtraMenuEntry(QMenu *menu, QPoint pos)
QMenu *mousePopupMenu(QPoint pos)

Reimplemented Protected Functions

virtual void contextMenuEvent(QContextMenuEvent *event) override
virtual bool event(QEvent *ev) override
virtual void keyPressEvent(QKeyEvent *event) override
virtual void wheelEvent(QWheelEvent *e) override

Detailed Description

Member Function Documentation

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

Constructs a new RichTextBrowser.

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

Destroys the browser.

[virtual protected] void RichTextBrowser::addExtraMenuEntry(QMenu *menu, QPoint pos)

Adds extra menu entries at the given position. Can be overridden by subclasses.

[override virtual protected] void RichTextBrowser::contextMenuEvent(QContextMenuEvent *event)

Handles context menu events.

[override virtual protected] bool RichTextBrowser::event(QEvent *ev)

Handles general events.

[signal] void RichTextBrowser::findText()

[override virtual protected] void RichTextBrowser::keyPressEvent(QKeyEvent *event)

Handles key press events.

[protected] QMenu *RichTextBrowser::mousePopupMenu(QPoint pos)

[signal] void RichTextBrowser::say(const QString &text)

bool RichTextBrowser::searchSupport() const

Returns whether text search is supported.

See also setSearchSupport().

void RichTextBrowser::setDefaultFontSize(int val)

Sets the default font size.

void RichTextBrowser::setSearchSupport(bool b)

Sets whether to support text search functionality.

See also searchSupport().

void RichTextBrowser::setTextToSpeechSupport(bool b)

Sets whether to support text-to-speech.

See also textToSpeechSupport().

void RichTextBrowser::setWebShortcutSupport(bool b)

Sets whether to support web shortcuts.

See also webShortcutSupport().

[slot] void RichTextBrowser::slotDisplayMessageIndicator(const QString &message)

Displays a message to the user.

[slot] void RichTextBrowser::slotSpeakText()

Speaks the selected text.

[slot] void RichTextBrowser::slotZoomReset()

Resets the zoom level to the default.

bool RichTextBrowser::textToSpeechSupport() const

Returns whether text-to-speech is supported.

See also setTextToSpeechSupport().

bool RichTextBrowser::webShortcutSupport() const

Returns whether web shortcut support is enabled.

See also setWebShortcutSupport().

[override virtual protected] void RichTextBrowser::wheelEvent(QWheelEvent *e)

Handles mouse wheel events for zoom.

int RichTextBrowser::zoomFactor() const

Returns the current zoom factor.