Developer Documentation
|
#include <Plugin-VSI/scene/text.hh>
Public Member Functions | |
Text (QGraphicsItem *_parent=0) | |
Constructor. More... | |
Text (const QString &_text, QGraphicsItem *_parent=0) | |
Constructor. More... | |
~Text () | |
Destrucotr. More... | |
virtual void | setGeometry (const QRectF &_rect) |
Sets the geometry. More... | |
QPainterPath | shape () const |
Returns the shape for proper repainting/event handling. More... | |
virtual void | paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0) |
Background painting. More... | |
virtual QRectF | boundingRect () const |
Bounding rectangle. More... | |
QBrush | backgroundBrush () |
Returns the current background brush. More... | |
virtual void | setBackgroundBrush (QBrush _brush) |
Sets the background brush. More... | |
QPen | backgroundPen () |
Returns the current background pen. More... | |
virtual void | setBackgroundPen (QPen _pen) |
Sets the background pen. More... | |
void | setBackground (bool _leftOut, bool _rightOut) |
Enables background painting. More... | |
void | clearBackground () |
Disables backgorund painting. More... | |
void | setHorizontalStretch (bool _stretch) |
Should this widget be stretchable in horizontal direction. More... | |
void | setAlignment (Qt::Alignment _alignment) |
Placement of the text in a stretched widget. More... | |
void | setText (QString _text) |
Set displayed text. More... | |
QString | text () |
Get displayed text. More... | |
Protected Member Functions | |
virtual QSizeF | sizeHint (Qt::SizeHint _which, const QSizeF &_constraint=QSizeF()) const |
Private Attributes | |
QString | text_ |
bool | backgroundSet_ |
QBrush | backgroundBrush_ |
QPen | backgroundPen_ |
bool | leftOut_ |
bool | rightOut_ |
Qt::Alignment | alignment_ |
bool | hStretch_ |
Layoutable text widget implementation with an optional background. The background can have convex or concave sides.
|
explicit |
VSI::Text::Text | ( | const QString & | _text, |
QGraphicsItem * | _parent = 0 |
||
) |
|
inline |
|
inline |
|
virtual |
void VSI::Text::clearBackground | ( | ) |
|
virtual |
void VSI::Text::setAlignment | ( | Qt::Alignment | _alignment | ) |
void VSI::Text::setBackground | ( | bool | _leftOut, |
bool | _rightOut | ||
) |
|
virtual |
|
virtual |
|
virtual |
void VSI::Text::setHorizontalStretch | ( | bool | _stretch | ) |
|
inline |
QPainterPath VSI::Text::shape | ( | ) | const |
|
protectedvirtual |