#include <text.h>
|
| | Text (const QString &txt="", const QFont &font=QFont(), bool enableElide=false, const QString &rawText=QString(), const TextType &type=NORMAL, const QColor &custom=Style::getColor(Style::MainText)) |
| |
| virtual | ~Text () |
| |
| void | setText (const QString &txt) |
| |
| void | selectText (const QString &txt, const std::pair< int, int > &point) |
| |
| void | selectText (const QRegularExpression &exp, const std::pair< int, int > &point) |
| |
| void | deselectText () |
| |
| void | setWidth (qreal width) final |
| |
| void | selectionMouseMove (QPointF scenePos) final |
| |
| void | selectionStarted (QPointF scenePos) final |
| |
| void | selectionCleared () final |
| |
| void | selectionDoubleClick (QPointF scenePos) final |
| |
| void | selectionTripleClick (QPointF scenePos) final |
| |
| void | selectionFocusChanged (bool focusIn) final |
| |
| bool | isOverSelection (QPointF scenePos) const final |
| |
| QString | getSelectedText () const final |
| |
| void | fontChanged (const QFont &font) final |
| |
| QRectF | boundingRect () const final |
| |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) final |
| |
| void | visibilityChanged (bool keepInMemory) final |
| |
| void | reloadTheme () final |
| |
| qreal | getAscent () const final |
| |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) final |
| |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) final |
| |
| void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) final |
| |
| QString | getText () const final |
| |
| QString | getLinkAt (QPointF scenePos) const |
| | Extracts the target of a link from the text at a given coordinate. More...
|
| |
| int | getColumn () const |
| |
| int | type () const final |
| |
|
| void | selectText (QTextCursor &cursor, const std::pair< int, int > &point) |
| |
| QColor | textColor () const |
| |
Definition at line 29 of file text.h.
◆ TextType
| Enumerator |
|---|
| NORMAL | |
| ACTION | |
| CUSTOM | |
Definition at line 34 of file text.h.
◆ Text()
| Text::Text |
( |
const QString & |
txt = "", |
|
|
const QFont & |
font = QFont(), |
|
|
bool |
enableElide = false, |
|
|
const QString & |
rawText = QString(), |
|
|
const TextType & |
type = NORMAL, |
|
|
const QColor & |
custom = Style::getColor(Style::MainText) |
|
) |
| |
◆ ~Text()
◆ boundingRect()
| QRectF Text::boundingRect |
( |
| ) |
const |
|
finalvirtual |
◆ cursorFromPos()
| int Text::cursorFromPos |
( |
QPointF |
scenePos, |
|
|
bool |
fuzzy = true |
|
) |
| const |
|
protected |
◆ deselectText()
| void Text::deselectText |
( |
| ) |
|
◆ extractImgTooltip()
| QString Text::extractImgTooltip |
( |
int |
pos | ) |
const |
|
protected |
◆ extractSanitizedText()
| QString Text::extractSanitizedText |
( |
int |
from, |
|
|
int |
to |
|
) |
| const |
|
protected |
◆ fontChanged()
| void Text::fontChanged |
( |
const QFont & |
font | ) |
|
|
finalvirtual |
◆ freeResources()
| void Text::freeResources |
( |
| ) |
|
|
protected |
◆ getAscent()
| qreal Text::getAscent |
( |
| ) |
const |
|
finalvirtual |
◆ getLinkAt()
| QString Text::getLinkAt |
( |
QPointF |
scenePos | ) |
const |
Extracts the target of a link from the text at a given coordinate.
- Parameters
-
| scenePos | Position in scene coordinates |
- Returns
- The link target URL, or an empty string if there is no link there
Definition at line 308 of file text.cpp.
◆ getSelectedText()
| QString Text::getSelectedText |
( |
| ) |
const |
|
finalvirtual |
◆ getSelectionEnd()
| int Text::getSelectionEnd |
( |
| ) |
const |
|
protected |
◆ getSelectionStart()
| int Text::getSelectionStart |
( |
| ) |
const |
|
protected |
◆ getText()
| QString Text::getText |
( |
| ) |
const |
|
finalvirtual |
◆ hasSelection()
| bool Text::hasSelection |
( |
| ) |
const |
|
protected |
◆ hoverMoveEvent()
| void Text::hoverMoveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
final |
◆ idealSize()
| QSizeF Text::idealSize |
( |
| ) |
|
|
protectedvirtual |
◆ isOverSelection()
| bool Text::isOverSelection |
( |
QPointF |
scenePos | ) |
const |
|
finalvirtual |
◆ mousePressEvent()
| void Text::mousePressEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
final |
◆ mouseReleaseEvent()
| void Text::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
final |
◆ paint()
| void Text::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget |
|
) |
| |
|
finalvirtual |
◆ regenerate()
| void Text::regenerate |
( |
| ) |
|
|
protected |
◆ reloadTheme()
| void Text::reloadTheme |
( |
| ) |
|
|
finalvirtual |
◆ selectionCleared()
| void Text::selectionCleared |
( |
| ) |
|
|
finalvirtual |
◆ selectionDoubleClick()
| void Text::selectionDoubleClick |
( |
QPointF |
scenePos | ) |
|
|
finalvirtual |
◆ selectionFocusChanged()
| void Text::selectionFocusChanged |
( |
bool |
focusIn | ) |
|
|
finalvirtual |
◆ selectionMouseMove()
| void Text::selectionMouseMove |
( |
QPointF |
scenePos | ) |
|
|
finalvirtual |
◆ selectionStarted()
| void Text::selectionStarted |
( |
QPointF |
scenePos | ) |
|
|
finalvirtual |
◆ selectionTripleClick()
| void Text::selectionTripleClick |
( |
QPointF |
scenePos | ) |
|
|
finalvirtual |
◆ selectText() [1/3]
| void Text::selectText |
( |
const QRegularExpression & |
exp, |
|
|
const std::pair< int, int > & |
point |
|
) |
| |
◆ selectText() [2/3]
| void Text::selectText |
( |
const QString & |
txt, |
|
|
const std::pair< int, int > & |
point |
|
) |
| |
◆ selectText() [3/3]
| void Text::selectText |
( |
QTextCursor & |
cursor, |
|
|
const std::pair< int, int > & |
point |
|
) |
| |
|
private |
◆ setText()
| void Text::setText |
( |
const QString & |
txt | ) |
|
◆ setWidth()
| void Text::setWidth |
( |
qreal |
width | ) |
|
|
finalvirtual |
◆ textColor()
| QColor Text::textColor |
( |
| ) |
const |
|
private |
◆ visibilityChanged()
| void Text::visibilityChanged |
( |
bool |
keepInMemory | ) |
|
|
finalvirtual |
◆ ascent
◆ color
◆ customColor
◆ defFont
◆ defStyleSheet
| QString Text::defStyleSheet |
|
private |
◆ dirty
◆ doc
| QTextDocument* Text::doc = nullptr |
|
protected |
◆ elide
◆ keepInMemory
| bool Text::keepInMemory = false |
|
private |
◆ rawText
◆ selectedText
| QString Text::selectedText |
|
private |
◆ selectionAnchor
| int Text::selectionAnchor = -1 |
|
private |
◆ selectionEnd
| int Text::selectionEnd = -1 |
|
private |
◆ selectionHasFocus
| bool Text::selectionHasFocus = true |
|
private |
◆ size
◆ text
◆ textType
◆ width
The documentation for this class was generated from the following files: