qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
#include <timestamp.h>
Public Member Functions | |
Timestamp (const QDateTime &time, const QString &format, const QFont &font) | |
QDateTime | getTime () |
![]() | |
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 |
Protected Member Functions | |
QSizeF | idealSize () |
![]() | |
void | regenerate () |
void | freeResources () |
int | cursorFromPos (QPointF scenePos, bool fuzzy=true) const |
int | getSelectionEnd () const |
int | getSelectionStart () const |
bool | hasSelection () const |
QString | extractSanitizedText (int from, int to) const |
QString | extractImgTooltip (int pos) const |
Private Attributes | |
QDateTime | time |
Additional Inherited Members | |
![]() | |
enum | TextType { NORMAL, ACTION, CUSTOM } |
![]() | |
enum | GraphicsItemType { ChatLineContentType = QGraphicsItem::UserType + 1 } |
![]() | |
QTextDocument * | doc = nullptr |
QSizeF | size |
qreal | width = 0.0 |
Definition at line 28 of file timestamp.h.
Timestamp::Timestamp | ( | const QDateTime & | time, |
const QString & | format, | ||
const QFont & | font | ||
) |
Definition at line 22 of file timestamp.cpp.
QDateTime Timestamp::getTime | ( | ) |
|
protectedvirtual |
Reimplemented from Text.
Definition at line 33 of file timestamp.cpp.
|
private |
Definition at line 39 of file timestamp.h.