Developer Documentation
VSI::Button Class Reference

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

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

Signals

void pressed ()
 emmited if the button gets pressed
 

Public Member Functions

 Button (QGraphicsItem *_parent=0)
 Constructor.
 
 Button (const QString &_text, QGraphicsItem *_parent=0)
 Constructor.
 
 ~Button ()
 Destructor.
 
QRectF boundingRect () const
 Bounding rectangle.
 
void setGeometry (const QRectF &_rect)
 Sets the geometry.
 
void paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0)
 Button glow painting.
 
void setBackgroundBrush (QBrush _brush)
 Sets the background brush.
 
void setBackgroundPen (QPen _pen)
 Sets the background pen.
 
- Public Member Functions inherited from VSI::Text
 Text (QGraphicsItem *_parent=0)
 Constructor.
 
 Text (const QString &_text, QGraphicsItem *_parent=0)
 Constructor.
 
 ~Text ()
 Destrucotr. More...
 
QPainterPath shape () const
 Returns the shape for proper repainting/event handling.
 
QBrush backgroundBrush ()
 Returns the current background brush.
 
QPen backgroundPen ()
 Returns the current 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 void hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *_event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event)
 
- Protected Member Functions inherited from VSI::Text
virtual QSizeF sizeHint (Qt::SizeHint _which, const QSizeF &_constraint=QSizeF()) const
 

Private Attributes

QBrush backgroundBrush_
 
QPen backgroundPen_
 
bool glow_
 

Detailed Description

Widgets that represents a clickable button based on VSI::Text

Definition at line 67 of file button.hh.


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