MD::Text Class

template <typename Trait> class MD::Text

Text item in Paragraph. More...

Header: #include <md4qt/doc.h>
CMake: find_package(md4qt REQUIRED COMPONENTS md4qt)
target_link_libraries(mytarget PRIVATE md4qt::md4qt)
Inherits: MD::ItemWithOpts
Inherited By:

MD::FootnoteRef and MD::LineBreak

Public Functions

void applyText(const MD::Text<Trait> &t)
std::shared_ptr<MD::Item<Trait>> clone(MD::Document<Trait> *doc = nullptr) const override
void setText(const typename Trait::String &t)
const typename Trait::String &text() const
MD::ItemType type() const override

Detailed Description

Member Function Documentation

void Text::applyText(const MD::Text<Trait> &t)

Apply other text to this.

t Value to apply.

std::shared_ptr<MD::Item<Trait>> Text::clone(MD::Document<Trait> *doc = nullptr) const

Clone this text item.

doc Parent of new item.

void Text::setText(const typename Trait::String &t)

Set text content.

t New value.

See also text().

const typename Trait::String &Text::text() const

Returns text content.

See also setText().

MD::ItemType Text::type() const

Returns type of the item.