MD::LinkBase Class

template <typename Trait> class MD::LinkBase

Base class for links. 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::Image and MD::Link

Public Types

Public Functions

void applyLinkBase(const MD::LinkBase<Trait> &other, MD::Document<Trait> *doc = nullptr)
bool isEmpty() const
MD::LinkBase<Trait>::ParagraphSharedPointer p() const
void setP(MD::LinkBase<Trait>::ParagraphSharedPointer v)
void setText(const typename Trait::String &t)
void setTextPos(const MD::WithPosition &pos)
void setUrl(const typename Trait::String &u)
void setUrlPos(const MD::WithPosition &pos)
const typename Trait::String &text() const
const MD::WithPosition &textPos() const
const typename Trait::String &url() const
const MD::WithPosition &urlPos() const

Detailed Description

Base class for any links in Markdown, even images.

See also MD::Link and MD::Image.

Member Type Documentation

[alias] LinkBase::ParagraphSharedPointer

Type of a smart pointer to link's description.

Member Function Documentation

void LinkBase::applyLinkBase(const MD::LinkBase<Trait> &other, MD::Document<Trait> *doc = nullptr)

Apply other base of link to this.

other Value to apply.

doc Parent of new item.

bool LinkBase::isEmpty() const

Returns whether this link empty?

MD::LinkBase<Trait>::ParagraphSharedPointer LinkBase::p() const

Returns pointer to parsed text of link's description.

See also setP().

void LinkBase::setP(MD::LinkBase<Trait>::ParagraphSharedPointer v)

Set pointer to parsed text of link's description.

v New value.

See also p().

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

Set not parsed text of link's description.

t New value.

See also text().

void LinkBase::setTextPos(const MD::WithPosition &pos)

Set position of link's description.

pos New value.

See also textPos().

void LinkBase::setUrl(const typename Trait::String &u)

Set URL of the link.

u New value.

See also url().

void LinkBase::setUrlPos(const MD::WithPosition &pos)

Set position of URL.

pos New value.

See also urlPos().

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

Returns not parsed text of link's description.

See also setText().

const MD::WithPosition &LinkBase::textPos() const

Returns position of link's desciption.

See also setTextPos().

const typename Trait::String &LinkBase::url() const

Returns URL of the link.

See also setUrl().

const MD::WithPosition &LinkBase::urlPos() const

Returns position of URL.

See also setUrlPos().