Toolbox Qt
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tbq::RichLink Class Reference

Display a link with a custom text. More...

Public Member Functions

 RichLink (const QUrl &link, const QString &display=QString())
 Create a RichLink object.
 
const QUrl & getUrl () const
 Get URL used in the link.
 
const QString & getTextDisplayed () const
 Get displayed text of the link.
 
QString toHtml () const
 Convert rich link to html string that can be used (like in QLabel for example)
 

Detailed Description

Display a link with a custom text.

Include with:

#include "toolboxqt/core/richlink.h"

Constructor & Destructor Documentation

◆ RichLink()

tbq::RichLink::RichLink ( const QUrl &  link,
const QString &  display = QString() 
)
explicit

Create a RichLink object.

Parameters
[in]linkURL to used as a link
[in]displayText to display
See also
toHtml()

Member Function Documentation

◆ getTextDisplayed()

const QString & tbq::RichLink::getTextDisplayed ( ) const

Get displayed text of the link.

Returns
Returns reference to displayed text.

◆ getUrl()

const QUrl & tbq::RichLink::getUrl ( ) const

Get URL used in the link.

Returns
Returns reference to URL link

◆ toHtml()

QString tbq::RichLink::toHtml ( ) const

Convert rich link to html string that can be used (like in QLabel for example)

Returns
Returns formatted HTML rich link.
If no display text has been set, the link will be displayed "as is".

The documentation for this class was generated from the following files: