![]() |
VR-Forces 4.0.4 Class Documentation
|
Container symbol used to hold one or more other symbols derived from DtSymbol. More...

Public Member Functions | |
| DtCompositeSymbol (const DtCompositeSymbol &orig) | |
| standard | |
| DtCompositeSymbol & | operator= (const DtCompositeSymbol &orig) |
| virtual | ~DtCompositeSymbol () |
| DtCompositeSymbol (DtSymbolDrawer &drawer) | |
| default constructor | |
| DtCompositeSymbol (DtSymbolDrawer &drawer, const DtDisplayPoint ¢er) | |
| virtual DtSymbol * | clone () const |
| Returns an instance of a symbol which is a copy of this. | |
| virtual bool | setLocationData (const QPolygon *) |
| This function is used so that multipoint symbols have the same interface as single point symbols In the single point case, it takes the first value and sets the origin from that. | |
| void | shift (QPoint p) |
| Move the center of this object by p amount. | |
| virtual void | draw (QPainter &paint) const |
| virtual void | drawHidden (QPainter &paint) const |
| virtual const DtDisplayPoint | centerPoint () const |
| Set/get the location of the center of the symbol. | |
| virtual bool | select (const QPoint &point) |
| Checks to see if any children symbols intersect. | |
| virtual void | addSymbol (DtSymbol *symbol, bool isALabel=false) |
| Adds a child symbol to the composite. | |
| virtual void | removeSymbol (const DtSymbol *symbol, bool deleteSymbol=true, bool resetMainSymbol=false) |
| Removes a child symbol from the composite. | |
| virtual void | removeSymbol (int iIndex, bool deleteSymbol=true, bool resetMainSymbol=false) |
| virtual void | removeAllSymbols (const QVector< DtSymbol * > &except=QVector< DtSymbol * >()) |
| Removes all child symbols from the composite. | |
| virtual DtSymbol * | setMainSymbol (DtSymbol *symbol) |
| Set/get the center symbol. | |
| virtual DtSymbol * | mainSymbol () const |
| virtual DtSymbol * | getSymbolByName (const QString &name) |
| Get a symbol by using its name. | |
| virtual bool | isComposite () |
| Returns true if this symbol is a combination of others (this returns true) | |
| virtual QSize | bbox () const |
| Calculates size of the composite based on its children. | |
| virtual QRect | selBbox () const |
| Get the selection box (area where you can select an item) | |
| virtual bool | overlapsSymbol (const DtSymbol &aSymbol, const DtSymbol_OverlapTest aTest=DtSymbol_BoxPieces, const float aTolerance=0) const |
| Returns true if the two symbols overlap Different intersection tests are available. | |
| virtual bool | labelsOverlapsSymbol (const DtSymbol &aSymbol, const DtSymbol_OverlapTest aTest=DtSymbol_BoundingBox, const float aTolerance=0) const |
| virtual DtSymbolList * | childrenList () const |
| virtual DtSymbolList * | labelList () const |
| virtual bool | show (DtShowHideContext module) |
| Show this symbol and any other symbol in the hidden list. | |
| virtual bool | hide (DtShowHideContext module) |
| Hide symbols that are shown and put into hidden list. | |
| virtual void | setDrawOrder () |
| Creates the draw order list for the symbols. | |
| virtual DtSymbol * | editableSymbol () |
| Returns the symbol that can be edited via an event handler. | |
| virtual int | labelOffset (const DtSymbol *s) const |
| Returns the label offset from the main symbols bounding box. | |
| virtual void | setLabelOffset (int i) |
| virtual const QPoint & | lowestLabelOffset () const |
| Returns the parent offset of the last label drawn. | |
| virtual void | setTransparencyLevel (int i) |
| Transparency information. | |
| virtual void | hideAllChildren (DtShowHideContext iModule=DtDefaultShowHideContext) |
| Hides all children but keeps main symbol shown. | |
| virtual void | showAllChildren (DtShowHideContext iModule=DtDefaultShowHideContext) |
| Shows all children. | |
| virtual void | setShadowText (bool b) |
| Cycles through all children and set shadow text to be true (if they are TTS symbol). | |
| virtual void | blockSignals (bool) |
| Blocks signals from being emitted from this symbol. | |
| virtual bool | originIsCenterOfMass () const |
| Asks main symbol if the origin is center of call. | |
| virtual void | setCacheSymbolAsBitmap (bool) |
| Get/set whether or not the drawer should cache this symbol as a bitmap. | |
| virtual void | setShowIndicatorOption (int) |
| int | showIndicatorOption () const |
| virtual DtShowHideContext | mapIndicatorOptionToContext (int) const |
| virtual void | setHighlight (const bool highlight) |
| Set/get the highlight flag (whether the symbol should be drawn highlighted). | |
| virtual bool | editMode () |
| Extends the editMode functions from basic DtySymbol to propagate correctly. | |
| virtual void | setEditMode (bool onOff) |
| virtual void | reset () |
| Resets any relevant information associated with this symbol. | |
Static Public Member Functions | |
| static DtSymbol * | create (DtSymbolDrawer &drawer) |
Protected Slots | |
| virtual void | symbolDestroyed (const DtSymbol *s) |
| Called when this symbol is destroyed outside of this composite symbol. | |
| virtual void | symbolRemoved (const DtSymbol *s) |
| Removes a symbol without deleting it. | |
Protected Member Functions | |
| virtual bool | transparentCacheChanged () const |
| virtual void | cacheTransparentVariables () |
| virtual void | setChildrenList (DtSymbolList *list) |
| Sets the symbol children list. | |
| virtual bool | forceUpdate () const |
| If any children want to redraw, this symbol needs to be redrawn. | |
| virtual void | draw (DtSymbol *symbol, QPainter &paint) const |
| Draws the symbol. | |
| virtual void | drawHidden (DtSymbol *symbol, QPainter &paint) const |
| virtual void | setScaleBy (double factor) |
| Scaling factors. | |
| virtual bool | isScalable () const |
| Return true/false if this is a scalable symbol. By default returns false. | |
| virtual void | setupSelect () |
| Called before a selection is made, clears out the mySelectedChildren list. | |
| virtual void | selectSymbols () |
| virtual void | wasHidden (DtSymbol *sym) |
| The following two methods are only called if the parent is hidden Called when a child symbol of this symbol is hidden. | |
| virtual void | wasShown (DtSymbol *sym) |
| Called when a child symbol of this symbol is shown. | |
Protected Attributes | |
| DtSymbolList * | myChildrenList |
| DtSymbolList * | myLabelList |
| DtSymbol * | myMainSymbol |
| DtSymbolList * | myDrawOrder |
| DtSymbolList * | mySelectedChildren |
| int | myLabelOffset |
| QPoint | myLastParentOffset |
| bool | myShadowText |
| int | myShowIndicatorOption |
Private Member Functions | |
| DtCompositeSymbol () | |
| Not implemented. Private to ensure it is only constructed with a drawer. | |
Container symbol used to hold one or more other symbols derived from DtSymbol.
Mouse messages are routed from the composite children all the way up to the root composite symbol - they are not processed by the children.
| DtCompositeSymbol::DtCompositeSymbol | ( | const DtCompositeSymbol & | orig | ) |
standard
| virtual DtCompositeSymbol::~DtCompositeSymbol | ( | ) | [virtual] |
| DtCompositeSymbol::DtCompositeSymbol | ( | DtSymbolDrawer & | drawer | ) |
default constructor
| DtCompositeSymbol::DtCompositeSymbol | ( | DtSymbolDrawer & | drawer, |
| const DtDisplayPoint & | center | ||
| ) |
| DtCompositeSymbol::DtCompositeSymbol | ( | ) | [private] |
Not implemented. Private to ensure it is only constructed with a drawer.
| DtCompositeSymbol& DtCompositeSymbol::operator= | ( | const DtCompositeSymbol & | orig | ) |
| virtual DtSymbol* DtCompositeSymbol::clone | ( | ) | const [virtual] |
Returns an instance of a symbol which is a copy of this.
The caller is responsible for freeing the memory.
Reimplemented from DtSymbol.
Reimplemented in DtMovingObjectSymbol, DtEntitySymbol, DtPointObjectSymbol, DtLineObjectSymbol, DtAggregateSymbol, DtCircleObjectSymbol, DtNameLabelSymbol, DtAreaObjectSymbol, and DtCompositeLabelSymbol.
| virtual bool DtCompositeSymbol::setLocationData | ( | const QPolygon * | ) | [virtual] |
This function is used so that multipoint symbols have the same interface as single point symbols In the single point case, it takes the first value and sets the origin from that.
Reimplemented from DtSymbol.
Reimplemented in DtCircleObjectSymbol.
| void DtCompositeSymbol::shift | ( | QPoint | p | ) | [virtual] |
Move the center of this object by p amount.
Reimplemented from DtSymbol.
Reimplemented in DtMovingObjectSymbol, DtPointObjectSymbol, and DtAggregateSymbol.
| virtual void DtCompositeSymbol::draw | ( | QPainter & | paint | ) | const [virtual] |
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol.
| virtual void DtCompositeSymbol::drawHidden | ( | QPainter & | paint | ) | const [virtual] |
Reimplemented from DtSymbol.
| virtual const DtDisplayPoint DtCompositeSymbol::centerPoint | ( | ) | const [virtual] |
Set/get the location of the center of the symbol.
Also set the children if they have the offset variable
Reimplemented from DtSymbol.
Reimplemented in DtPointObjectSymbol, DtAggregateSymbol, and DtMovingObjectSymbol.
| virtual bool DtCompositeSymbol::select | ( | const QPoint & | point | ) | [virtual] |
Checks to see if any children symbols intersect.
Reimplemented from DtSymbol.
Reimplemented in DtPointObjectSymbol, DtMovingObjectSymbol, DtAreaObjectSymbol, DtLineObjectSymbol, and DtCircleObjectSymbol.
| virtual void DtCompositeSymbol::addSymbol | ( | DtSymbol * | symbol, |
| bool | isALabel = false |
||
| ) | [virtual] |
Adds a child symbol to the composite.
The first symbol added becomes the center symbol. If isALabel is true it will also be added to the label list.
Reimplemented in DtCompositeLabelSymbol.
| virtual void DtCompositeSymbol::removeSymbol | ( | const DtSymbol * | symbol, |
| bool | deleteSymbol = true, |
||
| bool | resetMainSymbol = false |
||
| ) | [virtual] |
Removes a child symbol from the composite.
If resetMainSymbol is true, sets main symbol to first child if the original main symbol is removed
| virtual void DtCompositeSymbol::removeSymbol | ( | int | iIndex, |
| bool | deleteSymbol = true, |
||
| bool | resetMainSymbol = false |
||
| ) | [virtual] |
| virtual void DtCompositeSymbol::removeAllSymbols | ( | const QVector< DtSymbol * > & | except = QVector< DtSymbol * >() | ) | [virtual] |
Removes all child symbols from the composite.
Supply an optional vector list of symbols to not remove. Note that all children removed are also deleted
| virtual DtSymbol* DtCompositeSymbol::setMainSymbol | ( | DtSymbol * | symbol | ) | [virtual] |
Set/get the center symbol.
This way, we can change the center of the symbol after the first has been added. setMainSymbol returns the old main symbol
| virtual DtSymbol* DtCompositeSymbol::mainSymbol | ( | ) | const [virtual] |
| virtual DtSymbol* DtCompositeSymbol::getSymbolByName | ( | const QString & | name | ) | [virtual] |
Get a symbol by using its name.
If it doesn't exist, then return null.
| virtual bool DtCompositeSymbol::isComposite | ( | ) | [inline, virtual] |
Returns true if this symbol is a combination of others (this returns true)
Reimplemented from DtSymbol.
| virtual QSize DtCompositeSymbol::bbox | ( | ) | const [virtual] |
Calculates size of the composite based on its children.
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol, and DtMovingObjectSymbol.
| virtual QRect DtCompositeSymbol::selBbox | ( | ) | const [virtual] |
Get the selection box (area where you can select an item)
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol, DtMovingObjectSymbol, and DtPointObjectSymbol.
| virtual bool DtCompositeSymbol::overlapsSymbol | ( | const DtSymbol & | aSymbol, |
| const DtSymbol_OverlapTest | aTest = DtSymbol_BoxPieces, |
||
| const float | aTolerance = 0 |
||
| ) | const [virtual] |
Returns true if the two symbols overlap Different intersection tests are available.
Less exact tests are faster. Tolerance controls the overlap. Use the default of 0 for symbols which can touch but not overlap. Positive numbers force more space between symbols, negative numbers allow for overlap.
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol.
| virtual bool DtCompositeSymbol::labelsOverlapsSymbol | ( | const DtSymbol & | aSymbol, |
| const DtSymbol_OverlapTest | aTest = DtSymbol_BoundingBox, |
||
| const float | aTolerance = 0 |
||
| ) | const [virtual] |
Reimplemented in DtAggregateSymbol.
| virtual DtSymbolList* DtCompositeSymbol::childrenList | ( | ) | const [virtual] |
| virtual DtSymbolList* DtCompositeSymbol::labelList | ( | ) | const [virtual] |
| virtual bool DtCompositeSymbol::show | ( | DtShowHideContext | module | ) | [virtual] |
Show this symbol and any other symbol in the hidden list.
Reimplemented from DtSymbol.
| virtual bool DtCompositeSymbol::hide | ( | DtShowHideContext | module | ) | [virtual] |
Hide symbols that are shown and put into hidden list.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::setDrawOrder | ( | ) | [virtual] |
Creates the draw order list for the symbols.
| virtual DtSymbol* DtCompositeSymbol::editableSymbol | ( | ) | [virtual] |
Returns the symbol that can be edited via an event handler.
Reimplemented in DtMovingObjectSymbol.
| virtual int DtCompositeSymbol::labelOffset | ( | const DtSymbol * | s | ) | const [virtual] |
Returns the label offset from the main symbols bounding box.
If internal variable is -1, returns half the width of the bounding box of the specified symbol, else returns the value of myLabelOffset
| virtual void DtCompositeSymbol::setLabelOffset | ( | int | i | ) | [virtual] |
| virtual const QPoint& DtCompositeSymbol::lowestLabelOffset | ( | ) | const [virtual] |
Returns the parent offset of the last label drawn.
| virtual void DtCompositeSymbol::setTransparencyLevel | ( | int | ) | [virtual] |
Transparency information.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::hideAllChildren | ( | DtShowHideContext | iModule = DtDefaultShowHideContext | ) | [virtual] |
Hides all children but keeps main symbol shown.
| virtual void DtCompositeSymbol::showAllChildren | ( | DtShowHideContext | iModule = DtDefaultShowHideContext | ) | [virtual] |
Shows all children.
| virtual void DtCompositeSymbol::setShadowText | ( | bool | b | ) | [virtual] |
Cycles through all children and set shadow text to be true (if they are TTS symbol).
All children that are DtCompositeSymbol will have their setShadowText method called. When future items are added, if they are composite symbols or labels, and shadow text is true, they will have setShadowText(true) called for them
| virtual void DtCompositeSymbol::blockSignals | ( | bool | ) | [virtual] |
Blocks signals from being emitted from this symbol.
Overridden to allow for possible recursive usage
Reimplemented from DtSymbol.
| virtual bool DtCompositeSymbol::originIsCenterOfMass | ( | ) | const [virtual] |
Asks main symbol if the origin is center of call.
Reimplemented from DtSymbol.
| static DtSymbol* DtCompositeSymbol::create | ( | DtSymbolDrawer & | drawer | ) | [static] |
Reimplemented in DtNameLabelSymbol, DtPointObjectSymbol, DtLineObjectSymbol, DtAreaObjectSymbol, and DtCircleObjectSymbol.
| virtual void DtCompositeSymbol::setCacheSymbolAsBitmap | ( | bool | ) | [virtual] |
Get/set whether or not the drawer should cache this symbol as a bitmap.
Currently only supported for font symbols. The drawer holds the image cache based on a cache key returned by the symbol. Default caching is false. Default cache key is "Symbol";
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::setShowIndicatorOption | ( | int | ) | [virtual] |
| int DtCompositeSymbol::showIndicatorOption | ( | ) | const [inline] |
References myShowIndicatorOption.
| virtual DtShowHideContext DtCompositeSymbol::mapIndicatorOptionToContext | ( | int | ) | const [virtual] |
| virtual void DtCompositeSymbol::setHighlight | ( | const bool | highlight | ) | [virtual] |
Set/get the highlight flag (whether the symbol should be drawn highlighted).
Reimplemented from DtSymbol.
Reimplemented in DtPointObjectSymbol, DtLineObjectSymbol, DtMovingObjectSymbol, and DtCircleObjectSymbol.
| virtual bool DtCompositeSymbol::editMode | ( | ) | [virtual] |
Extends the editMode functions from basic DtySymbol to propagate correctly.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::setEditMode | ( | bool | onOff | ) | [virtual] |
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::reset | ( | ) | [virtual] |
Resets any relevant information associated with this symbol.
Currently only calls reset on any static animation data
Reimplemented from DtSymbol.
| virtual bool DtCompositeSymbol::transparentCacheChanged | ( | ) | const [protected, virtual] |
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::cacheTransparentVariables | ( | ) | [protected, virtual] |
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::symbolDestroyed | ( | const DtSymbol * | s | ) | [protected, virtual, slot] |
Called when this symbol is destroyed outside of this composite symbol.
| virtual void DtCompositeSymbol::symbolRemoved | ( | const DtSymbol * | s | ) | [protected, virtual, slot] |
Removes a symbol without deleting it.
| virtual void DtCompositeSymbol::setChildrenList | ( | DtSymbolList * | list | ) | [protected, virtual] |
Sets the symbol children list.
| virtual bool DtCompositeSymbol::forceUpdate | ( | ) | const [protected, virtual] |
If any children want to redraw, this symbol needs to be redrawn.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::draw | ( | DtSymbol * | symbol, |
| QPainter & | paint | ||
| ) | const [protected, virtual] |
Draws the symbol.
Override for any specific drawing. Called for each symbol to be drawn
Reimplemented in DtMovingObjectSymbol, and DtPointObjectSymbol.
| virtual void DtCompositeSymbol::drawHidden | ( | DtSymbol * | symbol, |
| QPainter & | paint | ||
| ) | const [protected, virtual] |
| virtual void DtCompositeSymbol::setScaleBy | ( | double | factor | ) | [protected, virtual] |
Scaling factors.
Reimplemented from DtSymbol.
| virtual bool DtCompositeSymbol::isScalable | ( | ) | const [protected, virtual] |
Return true/false if this is a scalable symbol. By default returns false.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::setupSelect | ( | ) | [protected, virtual] |
Called before a selection is made, clears out the mySelectedChildren list.
| virtual void DtCompositeSymbol::selectSymbols | ( | ) | [protected, virtual] |
| virtual void DtCompositeSymbol::wasHidden | ( | DtSymbol * | ) | [protected, virtual] |
The following two methods are only called if the parent is hidden Called when a child symbol of this symbol is hidden.
Reimplemented from DtSymbol.
| virtual void DtCompositeSymbol::wasShown | ( | DtSymbol * | ) | [protected, virtual] |
Called when a child symbol of this symbol is shown.
Reimplemented from DtSymbol.
DtSymbolList* DtCompositeSymbol::myChildrenList [protected] |
DtSymbolList* DtCompositeSymbol::myLabelList [protected] |
DtSymbol* DtCompositeSymbol::myMainSymbol [protected] |
DtSymbolList* DtCompositeSymbol::myDrawOrder [protected] |
Reimplemented from DtSymbol.
DtSymbolList* DtCompositeSymbol::mySelectedChildren [protected] |
int DtCompositeSymbol::myLabelOffset [protected] |
QPoint DtCompositeSymbol::myLastParentOffset [protected] |
bool DtCompositeSymbol::myShadowText [protected] |
int DtCompositeSymbol::myShowIndicatorOption [protected] |
Referenced by showIndicatorOption().