Public Member Functions | Protected Member Functions

SelectableTextBlock Class Reference
[GraphicsView]

This item holds text such as the state name, transition names, commentary blocks, etc. More...

#include <selectabletextblock.h>

Inherits SelectableBoxGraphic.

Collaboration diagram for SelectableTextBlock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SelectableTextBlock (QGraphicsObject *parent=NULL, TextBlock *textBlockModel=NULL)
 ~SelectableTextBlock ()
virtual void setSize (QPoint size)
 from base class

Protected Member Functions

void keyPressEvent (QKeyEvent *event)
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)

Detailed Description

This item holds text such as the state name, transition names, commentary blocks, etc.

This text block is selectable, movable, re-sizable, (TBD: and it can be given a fill color and border design). The text attributes are stored into the scxml file.

The amount of viewable text is determined by the box size. It is used to display text for state, state transitions, commentary text, or any other text in the scene. Another class, TextEditBox, allows users to edit and save the text. But the text box in this class is only for displaying text. The user can move the text box and re-size it for optimal placement in the scene.

The class is named SelecableTextBlock. It is derived from the base SelectableBoxGraphic. SelectableBoxGraphic provides a basic box with four corner-grabbers which provides the moving and resizing of the box. The SelectableTextBlock class adds a QGraphicsTextItem for text display.

This trick to making this work is re-sizing the QGraphicsTextItem when the user re-sizes the base SelectableBoxGraphic. This is accomplished via the setSize() virtual method in the base class. The derived SelectableTextBlock class re-implements the setSize() method, but the base class calls this method when the user re-sizes the block.


Constructor & Destructor Documentation

SelectableTextBlock::SelectableTextBlock ( QGraphicsObject *  parent = NULL,
TextBlock textBlockModel = NULL 
)

Here is the call graph for this function:

SelectableTextBlock::~SelectableTextBlock (  ) 

Member Function Documentation

void SelectableTextBlock::keyPressEvent ( QKeyEvent *  event  )  [protected]

Here is the call graph for this function:

void SelectableTextBlock::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Here is the call graph for this function:

void SelectableTextBlock::setSize ( QPoint  size  )  [virtual]

from base class

Reimplemented from SelectableBoxGraphic.

Here is the caller graph for this function:


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