Added ability to pass context with marked text to Ui::FlatLabel.
This commit is contained in:
parent
fc2c553670
commit
29ce965e61
2 changed files with 11 additions and 3 deletions
|
|
@ -269,8 +269,14 @@ void FlatLabel::setText(const QString &text) {
|
||||||
textUpdated();
|
textUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlatLabel::setMarkedText(const TextWithEntities &textWithEntities) {
|
void FlatLabel::setMarkedText(
|
||||||
_text.setMarkedText(_st.style, textWithEntities, _labelMarkedOptions);
|
const TextWithEntities &textWithEntities,
|
||||||
|
const std::any &context) {
|
||||||
|
_text.setMarkedText(
|
||||||
|
_st.style,
|
||||||
|
textWithEntities,
|
||||||
|
_labelMarkedOptions,
|
||||||
|
context);
|
||||||
textUpdated();
|
textUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,9 @@ public:
|
||||||
void setTextColorOverride(std::optional<QColor> color);
|
void setTextColorOverride(std::optional<QColor> color);
|
||||||
|
|
||||||
void setText(const QString &text);
|
void setText(const QString &text);
|
||||||
void setMarkedText(const TextWithEntities &textWithEntities);
|
void setMarkedText(
|
||||||
|
const TextWithEntities &textWithEntities,
|
||||||
|
const std::any &context = {});
|
||||||
void setSelectable(bool selectable);
|
void setSelectable(bool selectable);
|
||||||
void setDoubleClickSelectsParagraph(bool doubleClickSelectsParagraph);
|
void setDoubleClickSelectsParagraph(bool doubleClickSelectsParagraph);
|
||||||
void setContextCopyText(const QString ©Text);
|
void setContextCopyText(const QString ©Text);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue