Developer Documentation
|
#include <Plugin-VSI/scene/text.hh>
Public Member Functions | |
Text (QGraphicsItem *_parent=0) | |
Constructor. | |
Text (const QString &_text, QGraphicsItem *_parent=0) | |
Constructor. | |
~Text () | |
Destrucotr. More... | |
virtual void | setGeometry (const QRectF &_rect) |
Sets the geometry. | |
QPainterPath | shape () const |
Returns the shape for proper repainting/event handling. | |
virtual void | paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0) |
Background painting. | |
virtual QRectF | boundingRect () const |
Bounding rectangle. More... | |
QBrush | backgroundBrush () |
Returns the current background brush. | |
virtual void | setBackgroundBrush (QBrush _brush) |
Sets the background brush. | |
QPen | backgroundPen () |
Returns the current background pen. | |
virtual void | setBackgroundPen (QPen _pen) |
Sets the background pen. | |
void | setBackground (bool _leftOut, bool _rightOut) |
Enables background painting. | |
void | clearBackground () |
Disables backgorund painting. | |
void | setHorizontalStretch (bool _stretch) |
Should this widget be stretchable in horizontal direction. | |
void | setAlignment (Qt::Alignment _alignment) |
Placement of the text in a stretched widget. | |
void | setText (QString _text) |
Set displayed text. | |
QString | text () |
Get displayed text. | |
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.
|
virtual |