#include <QxGraph_Prs.h>
Public Types | |
| typedef std::map< int, std::list< QCanvasItem * > > | DMode2ItemList |
Public Member Functions | |
| QxGraph_Prs (QxGraph_Canvas *) | |
| virtual | ~QxGraph_Prs () |
| QxGraph_Canvas * | getCanvas () const |
| void | addItem (QCanvasItem *theItem, int theDMode=-1) |
| void | removeItem (QCanvasItem *theItem, int theDMode=-1) |
| QCanvasItem * | addRectangleItem (QRect theRect, int theDMode=-1) |
| QCanvasItem * | addPolygonItem (QPointArray thePA, int theDMode=-1) |
| QCanvasItem * | addLineItem (QPoint theStart, QPoint theEnd, int theDMode=-1) |
| QCanvasItem * | addEllipseItem (int theW, int theH, int theStartAngle, int theAngle, int theDMode=-1) |
| QCanvasItem * | addTextItem (QString theText, int theDMode=-1) |
| const DMode2ItemList & | getDisplayMap () const |
| const std::list< QCanvasItem * > & | getItems (int theDMode) |
| void | setDMode (int theDMode) |
| int | getDMode () const |
| virtual void | show () |
| virtual void | hide () |
| virtual void | setToUpdate (const bool) |
| bool | isToUpdate () |
Protected Member Functions | |
| virtual void | update () |
Private Attributes | |
| QxGraph_Canvas * | myCanvas |
| DMode2ItemList | myDisplayMap |
| int | myDMode |
| bool | needUpdate |
| typedef std::map< int, std::list<QCanvasItem*> > QxGraph_Prs.DMode2ItemList |
| QxGraph_Prs::QxGraph_Prs | ( | QxGraph_Canvas * | theCanvas | ) |
Constructor
References QxGraph_Canvas.addPrs(), and myCanvas.
| QxGraph_Prs::~QxGraph_Prs | ( | ) | [virtual] |
Destructor
References myDisplayMap.
| QxGraph_Canvas* QxGraph_Prs.getCanvas | ( | ) | const |
| void QxGraph_Prs::addItem | ( | QCanvasItem * | theItem, |
| int | theDMode = -1 |
||
| ) |
Add item to display in the view with index theDMode
References myDisplayMap, and myDMode.
| void QxGraph_Prs::removeItem | ( | QCanvasItem * | theItem, |
| int | theDMode = -1 |
||
| ) |
Remove item from the view with index theDMode
References myDisplayMap, and myDMode.
| QCanvasItem * QxGraph_Prs::addRectangleItem | ( | QRect | theRect, |
| int | theDMode = -1 |
||
| ) |
Add a QCanvasRectangle item for display mode DMode
References addItem(), myCanvas, RECTANGLE_BODY, and SUIT_Session.session().
| QCanvasItem * QxGraph_Prs::addPolygonItem | ( | QPointArray | thePA, |
| int | theDMode = -1 |
||
| ) |
Add a QCanvasPolygon item for display mode DMode
References addItem(), myCanvas, RECTANGLE_BODY, and SUIT_Session.session().
| QCanvasItem * QxGraph_Prs::addLineItem | ( | QPoint | theStart, |
| QPoint | theEnd, | ||
| int | theDMode = -1 |
||
| ) |
| QCanvasItem * QxGraph_Prs::addEllipseItem | ( | int | theW, |
| int | theH, | ||
| int | theStartAngle, | ||
| int | theAngle, | ||
| int | theDMode = -1 |
||
| ) |
Add a QCanvasEllipse item for display mode DMode
References addItem(), myCanvas, RECTANGLE_BODY, and SUIT_Session.session().
| QCanvasItem * QxGraph_Prs::addTextItem | ( | QString | theText, |
| int | theDMode = -1 |
||
| ) |
| const DMode2ItemList& QxGraph_Prs.getDisplayMap | ( | ) | const |
| const std::list<QCanvasItem*>& QxGraph_Prs.getItems | ( | int | theDMode | ) |
| void QxGraph_Prs.setDMode | ( | int | theDMode | ) |
| int QxGraph_Prs.getDMode | ( | ) | const |
| void QxGraph_Prs::show | ( | ) | [virtual] |
Adds all the items of this presentation for the current display mode to the canvas.
References isToUpdate(), myCanvas, myDisplayMap, myDMode, and update().
| void QxGraph_Prs::hide | ( | ) | [virtual] |
Removes all the items belonging to this presentation from the canvas.
References myDisplayMap.
| void QxGraph_Prs::setToUpdate | ( | const bool | theFlag | ) | [virtual] |
Prepare for full recomputation of the presentation
References needUpdate.
| bool QxGraph_Prs.isToUpdate | ( | ) |
| void QxGraph_Prs::update | ( | ) | [protected, virtual] |
Re-fills the presentation with items. Base implementation just resets <needUpdate> flag. It should be called at the end by re-implementations.
References setToUpdate().
QxGraph_Canvas* QxGraph_Prs.myCanvas [private] |
DMode2ItemList QxGraph_Prs.myDisplayMap [private] |
int QxGraph_Prs.myDMode [private] |
bool QxGraph_Prs.needUpdate [private] |