Quassel IRC
Pre-Release
|
#include </tmp/quassel/src/uisupport/styledlabel.h>
Public Types | |
enum | ResizeMode { NoResize, DynamicResize, ResizeOnHover } |
Signals | |
void | clickableActivated (const Clickable &click) |
Public Member Functions | |
StyledLabel (QWidget *parent=0) | |
void | setText (const QString &text) |
void | setCustomFont (const QFont &font) |
virtual QSize | sizeHint () const |
QTextOption::WrapMode | wrapMode () const |
void | setWrapMode (QTextOption::WrapMode mode) |
Qt::Alignment | alignment () const |
void | setAlignment (Qt::Alignment alignment) |
bool | toolTipEnabled () const |
void | setToolTipEnabled (bool) |
ResizeMode | resizeMode () const |
void | setResizeMode (ResizeMode) |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | enterEvent (QEvent *) |
virtual void | leaveEvent (QEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
int | posToCursor (const QPointF &pos) |
Private Member Functions | |
void | layout () |
void | updateSizeHint () |
void | updateToolTip () |
void | setHoverMode (int start, int length) |
void | endHoverMode () |
Private Attributes | |
QSize | _sizeHint |
QTextOption::WrapMode | _wrapMode |
Qt::Alignment | _alignment |
QTextLayout | _layout |
ClickableList | _clickables |
bool | _toolTipEnabled |
ResizeMode | _resizeMode |
QList< QTextLayout::FormatRange > | _layoutList |
QVector< QTextLayout::FormatRange > | _extraLayoutList |
Definition at line 29 of file styledlabel.h.
enum ResizeMode |
Definition at line 34 of file styledlabel.h.
StyledLabel | ( | QWidget * | parent = 0 | ) |
Definition at line 29 of file styledlabel.cpp.
References _alignment, _layout, and _wrapMode.
void setText | ( | const QString & | text | ) |
Definition at line 121 of file styledlabel.cpp.
References _clickables, _layout, endHoverMode(), UiStyle::StyledString::formatList, ClickableList::fromString(), layout(), Clickable::length(), UiStyle::mircToInternal(), UiStyle::PlainMsg, UiStyle::StyledString::plainText, Clickable::start(), UiStyle::styleString(), UiStyle::toTextLayoutList(), Clickable::type(), GraphicalUi::uiStyle(), and Clickable::Url.
Referenced by setCustomFont().
void setCustomFont | ( | const QFont & | font | ) |
Definition at line 45 of file styledlabel.cpp.
|
virtual |
Definition at line 102 of file styledlabel.cpp.
References _sizeHint.
|
inline |
Definition at line 48 of file styledlabel.h.
References _wrapMode.
void setWrapMode | ( | QTextOption::WrapMode | mode | ) |
Definition at line 53 of file styledlabel.cpp.
References _layout, _wrapMode, and layout().
Referenced by enterEvent(), leaveEvent(), and setResizeMode().
|
inline |
void setAlignment | ( | Qt::Alignment | alignment | ) |
Definition at line 67 of file styledlabel.cpp.
References _alignment, _layout, alignment(), and layout().
|
inline |
Definition at line 54 of file styledlabel.h.
References _toolTipEnabled.
void setToolTipEnabled | ( | bool | ) |
|
inline |
Definition at line 57 of file styledlabel.h.
References _resizeMode.
Referenced by enterEvent(), and leaveEvent().
void setResizeMode | ( | ResizeMode | mode | ) |
Definition at line 81 of file styledlabel.cpp.
References _resizeMode, DynamicResize, and setWrapMode().
|
signal |
Referenced by mousePressEvent().
|
protectedvirtual |
Definition at line 191 of file styledlabel.cpp.
References _extraLayoutList, and _layout.
|
protectedvirtual |
Definition at line 94 of file styledlabel.cpp.
References layout().
|
protectedvirtual |
Definition at line 232 of file styledlabel.cpp.
References resizeMode(), ResizeOnHover, and setWrapMode().
|
protectedvirtual |
Definition at line 239 of file styledlabel.cpp.
References endHoverMode(), resizeMode(), ResizeOnHover, and setWrapMode().
|
protectedvirtual |
Definition at line 216 of file styledlabel.cpp.
References _clickables, ClickableList::atCursorPos(), endHoverMode(), Clickable::isValid(), Clickable::length(), posToCursor(), setHoverMode(), and Clickable::start().
|
protectedvirtual |
Definition at line 247 of file styledlabel.cpp.
References _clickables, ClickableList::atCursorPos(), clickableActivated(), Clickable::isValid(), and posToCursor().
|
protected |
Definition at line 201 of file styledlabel.cpp.
References _layout.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 169 of file styledlabel.cpp.
References _layout, updateSizeHint(), and updateToolTip().
Referenced by resizeEvent(), setAlignment(), setText(), and setWrapMode().
|
private |
Definition at line 108 of file styledlabel.cpp.
References _layout, and _sizeHint.
Referenced by layout().
|
private |
|
private |
Definition at line 261 of file styledlabel.cpp.
References _extraLayoutList.
Referenced by mouseMoveEvent().
|
private |
Definition at line 278 of file styledlabel.cpp.
References _extraLayoutList.
Referenced by leaveEvent(), mouseMoveEvent(), and setText().
|
private |
Definition at line 74 of file styledlabel.h.
Referenced by sizeHint(), and updateSizeHint().
|
private |
Definition at line 75 of file styledlabel.h.
Referenced by setWrapMode(), StyledLabel(), and wrapMode().
|
private |
Definition at line 76 of file styledlabel.h.
Referenced by alignment(), setAlignment(), and StyledLabel().
|
private |
Definition at line 77 of file styledlabel.h.
Referenced by layout(), paintEvent(), posToCursor(), setAlignment(), setCustomFont(), setText(), setWrapMode(), StyledLabel(), updateSizeHint(), and updateToolTip().
|
private |
Definition at line 78 of file styledlabel.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and setText().
|
private |
Definition at line 79 of file styledlabel.h.
Referenced by toolTipEnabled().
|
private |
Definition at line 80 of file styledlabel.h.
Referenced by resizeMode(), and setResizeMode().
|
private |
Definition at line 82 of file styledlabel.h.
|
private |
Definition at line 83 of file styledlabel.h.
Referenced by endHoverMode(), paintEvent(), and setHoverMode().