Toolbox Qt
|
Display a link with a custom text. More...
Public Member Functions | |
RichLink () | |
Create empty rich link object. | |
RichLink (const QUrl &link, const QString &display=QString()) | |
Create a RichLink object. | |
void | setLink (const QUrl &link) |
Set URL lin to use. | |
void | setDisplayText (const QString &display) |
Set text to display for the link. | |
bool | isValid () const |
Use to verify rich link validity. | |
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) | |
Display a link with a custom text.
Include with:
|
default |
Create empty rich link object.
Calling isValid()
on it will return false
.
|
explicit |
Create a RichLink object.
[in] | link | URL to used as a link |
[in] | display | Text to display |
void tbq::RichLink::setLink | ( | const QUrl & | link | ) |
void tbq::RichLink::setDisplayText | ( | const QString & | display | ) |
bool tbq::RichLink::isValid | ( | ) | const |
Use to verify rich link validity.
Rich link is considered valid is URL is valid.
true
if rich link is valid const QUrl & tbq::RichLink::getUrl | ( | ) | const |
Get URL used in the link.
const QString & tbq::RichLink::getTextDisplayed | ( | ) | const |
Get displayed text of the link.
QString tbq::RichLink::toHtml | ( | ) | const |
Convert rich link to html string that can be used (like in QLabel
for example)