Developer Documentation
VSI::Text Class Reference

#include <Plugin-VSI/scene/text.hh>

Inheritance diagram for VSI::Text:
VSI::Button

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_
 

Detailed Description

Layoutable text widget implementation with an optional background. The background can have convex or concave sides.

Definition at line 67 of file text.hh.

Constructor & Destructor Documentation

◆ ~Text()

VSI::Text::~Text ( )

Destrucotr.

Destructor.

Definition at line 95 of file text.cc.

Member Function Documentation

◆ boundingRect()

QRectF VSI::Text::boundingRect ( ) const
virtual

Bounding rectangle.

Bounding rect.

Reimplemented in VSI::Button.

Definition at line 342 of file text.cc.


The documentation for this class was generated from the following files: