Version: 6.3.1
Public Types | Public Member Functions | Protected Member Functions | Private Attributes

QxGraph_Prs Class Reference

#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_CanvasgetCanvas () 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 DMode2ItemListgetDisplayMap () 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_CanvasmyCanvas
DMode2ItemList myDisplayMap
int myDMode
bool needUpdate

Member Typedef Documentation

typedef std::map< int, std::list<QCanvasItem*> > QxGraph_Prs.DMode2ItemList

Constructor & Destructor Documentation

QxGraph_Prs::QxGraph_Prs ( QxGraph_Canvas theCanvas)

Constructor

References QxGraph_Canvas.addPrs(), and myCanvas.

QxGraph_Prs::~QxGraph_Prs ( ) [virtual]

Destructor

References myDisplayMap.


Member Function Documentation

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 
)

Add a QCanvasLine item for display mode DMode

References addItem(), and myCanvas.

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 
)

Add a QCanvasText item for display mode DMode

References addItem(), and myCanvas.

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().


Field Documentation

int QxGraph_Prs.myDMode [private]
bool QxGraph_Prs.needUpdate [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS