![]() |
VR-Forces 4.1 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. | |
Public Member Functions inherited from DtSymbol | |
| virtual | ~DtSymbol () |
| destructor | |
| DtSymbol (const DtSymbol &orig) | |
| copy constructor | |
| DtSymbol & | operator= (const DtSymbol &orig) |
| assignment operator Note that the copy constructor, by default, make the symbol non editable even if the source is editable | |
| DtSymbol (DtSymbolDrawer &drawer) | |
| Drawer is non-const since it does memory management. | |
| virtual void | copyDataFrom (const DtSymbol *symbol) |
| Differs from the equal operator in that this method could copy a different set of data than the = operator. | |
| virtual void | setName (const QString &name) |
| The specific name of this symbol. | |
| virtual const QString & | name () const |
| virtual bool | highlight () const |
| virtual bool | selected () const |
| virtual const DtDisplayPoint | topLeftPoint () const |
| The real visual top left corner of the symbol in display coordinates. | |
| virtual const QPolygon * | getLocationData () const |
| Provided for a simpler interface to subclasses. | |
| virtual void | setOrigin (const QPoint ¢er) |
| Set the display coordinate that will become the 0,0 point for drawing this symbol. | |
| virtual void | setOrigin (int x, int y) |
| Same as above. | |
| virtual const QPoint | origin () const |
| returns the display origin for the symbol. | |
| virtual const DtSymbolDrawer & | drawer () const |
| virtual QRect | brect () const |
| virtual void | clearOffsetToParent () |
| Set/get the offset to the parent. | |
| virtual void | setOffsetToParent (const QPoint &offsetToParent) |
| virtual const QPoint * | offsetToParent () const |
| if the offsetToParent blit has been cleared, this returns null | |
| virtual void | show () |
| Use this method to show the symbol regardless of how many contexts have hidden it. | |
| virtual void | hide () |
| Use this method to hide a symbol without context. Same as hide(DtDefaultShowHideContext) | |
| virtual void | addIgnoreContext (DtShowHideContext) |
| Add/remove contexts for hide() to ignore. | |
| virtual void | removeIgnoreContext (DtShowHideContext) |
| const QVector < DtShowHideContext > & | ignoreContexts () const |
| virtual bool | isShown () const |
| virtual DtSymbol * | parent () const |
| virtual void | setParent (DtSymbol *dad) |
| virtual DtSymbolGeometry | geometry () const |
| virtual void | setGeometry (DtSymbolGeometry geom) |
| virtual void | setCategoryTag (const QString &name) |
| A tag is the name of this type of symbol such as velocity vector name or force or whatever. | |
| virtual const QString & | categoryTag () const |
| virtual bool | select (const QPoint &aPoint, const QSize &rectangleSize) |
| Returns true if the rectangle intersects the symbol, if the symbol is selectable. | |
| virtual void | setSelectable (bool value) |
| Set/get the ability to select with this symbol. | |
| virtual bool | isSelectable () const |
| virtual void | setEditable (bool b) |
| Accessors for whether or not this line can be edited. | |
| virtual bool | editable () const |
| virtual void | setAllowEditOnSelection (bool b) |
| Sets the fact that even if this symbol is not marked editable, it can become editable upon selection (myHighlight is true) | |
| virtual bool | allowEditOnSelection () const |
| virtual void | setInternalSelectable (bool value) |
| The following two functions are internal values kept in order to make sure that if an object has been filter modified and not shown, that it will not be selectable. | |
| virtual bool | isInternalSelectable () const |
| virtual void | setAddToDrawOrder (bool b) |
| Add this item to the draw order regardless of whether or not it is visible on the screen. | |
| virtual bool | addToDrawOrder () const |
| virtual bool | overlapsAreaSymbol (const DtSymbol &aSymbol, const DtSymbol_OverlapTest aTest=DtSymbol_BoxPieces, const float aTolerance=0) const |
| handles the case when aSymbol spans an area, such as a bitmap or a text symbol. | |
| virtual bool | overlapsLineSymbol (DtSymbol &aSymbol, const float aTolerance=0) const |
| handles the case when aSymbol is composed of line segments, such as a line, polygon, or route. | |
| virtual bool | isOriginal () const |
| Returns true if this symbol is an original symbol, otherwise return false. | |
| virtual DtStaticAnimData * | staticAnimData () const |
| virtual void | setDrawOnComposite (DtSymbolCompositeDrawOptions opt) |
| If true, will not draw this symbol if it is part of a composite symbol. | |
| virtual bool | drawOnComposite () const |
| virtual DtSymbolCompositeDrawOptions | drawOnCompositeValue () const |
| virtual bool | drawFirst () const |
| If true, this symbol will always be drawn first. | |
| virtual void | setDrawFirst (bool b) |
| virtual bool | drawLast () const |
| If true, this symbol will always be drawn last. | |
| virtual void | setDrawLast (bool b) |
| virtual bool | selectAdditionalSymbols (QList< DtSymbol * > &additionalSymbols) |
| This routine is called during symbol selection time to see if the selection of this symbol requires other symbols to be selected as well. | |
| virtual void | setColor (const QColor &color) |
| Noop function to allow subclasses to override. | |
| virtual void | clearColor () |
| Noop function to allow subclasses to clear out any color information. | |
| virtual bool | adjustPoints (QPolygon &pnts, bool constrain) |
| Opportunity to adjust the point array to some desired other points. | |
| virtual void | setDragClone (DtSymbol *clone) |
| Contains the symbol that is being dragged that represents this symbol. | |
| virtual DtSymbol * | dragClone () const |
| virtual double | scaleBy () const |
| virtual void | enableVisibilityChange (bool b) |
| virtual void | scheduleDisplayComplete (int) |
| Sets a QTimer for the specified amount of time to fire off and then call the displayComplete() slot. | |
| virtual void | setShouldSelect (bool) |
| virtual bool | shouldSelect () const |
| virtual int | transparencyLevel () const |
| virtual bool | needsTransparentRedraw () const |
| Will return true if there is no cached image or internal variables have changed such that the cached image needs a redraw. | |
| virtual QPixmap * | transparentImage () const |
| virtual QPixmap * | cacheTransparentImage (const QPixmap &pixmap) |
| virtual QPixmap * | cacheTransparentImage (const QImage &image) |
| virtual bool | wantsTransparentDraw () const |
| Will return true if transparent percent is not 0 or 100. | |
| bool | operator== (const DtSymbol &orig) const |
| bool | operator!= (const DtSymbol &orig) const |
| virtual DtSymbolDrawer * | symbolDrawer () |
| Sets the new drawer to be the supplied drawer. | |
| virtual DtSymbolDrawer * | setDrawer (const DtSymbolDrawer &) |
| virtual DtSymbolDrawer & | backupDrawer () const |
| Returns the drawer that was set as a backup. | |
| virtual void | setBackupDrawer (DtSymbolDrawer *) |
| virtual bool | removeIfOffScreen () const |
| Return true/false if this symbol should be removed if it is off screen By default is true. | |
| void | setRemoveIfOffScreen (bool b) |
| Default is true. | |
| virtual void | setSymbolDisplayOptions (DtSymbolDisplayOptions *) |
| virtual const DtSymbolDisplayOptions * | symbolDisplayOptions () const |
| virtual DtSymbolDisplayOptions * | symbolDisplayOptions () |
| virtual int | displayOptionsCache () const |
| void | setAdjustPoints (bool) |
| bool | adjustPoints () const |
| const QVector < DtShowHideContext > & | hiddenByModules () const |
| Routines to access which modules this symbol is hidden by. | |
| bool | hiddenByModule (DtShowHideContext module) const |
| bool | cacheSymbolAsBitmap () const |
| virtual const QString & | bitmapSymbolCacheKey () const |
| Returns a cache key that can be used to lookup in a bitmap cache. | |
Static Public Member Functions | |
| static DtSymbol * | create (DtSymbolDrawer &drawer) |
Static Public Member Functions inherited from DtSymbol | |
| static DtNullDrawer * | nullDrawer () |
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 Member Functions inherited from DtSymbol | |
| bool | overlapsBoundingSphere (const DtSymbol &aSymbol, const float aTolerance) const |
| Returns true if the bounding spheres of the symbols intersect and the symbols are intersectable. | |
| bool | overlapsBoundingBox (const DtSymbol &aSymbol, const float aTolerance) const |
| Returns true if the bounding boxes of the symbols intersect and the symbols are intersectable. | |
Private Member Functions | |
| DtCompositeSymbol () | |
| Not implemented. Private to ensure it is only constructed with a drawer. | |
Additional Inherited Members | |
Public Types inherited from DtSymbol | |
| enum | DtSymbol_OverlapTest { DtSymbol_BoundingSphere = 0, DtSymbol_BoundingBox = 1, DtSymbol_SpherePieces = 2, DtSymbol_BoxPieces = 3, DtSymbol_Exact = 4 } |
| Type of overlap test. More... | |
| enum | DtSymbol_DrawOrder { DtSymbol_DrawAsEntered = 0, DtSymbol_DrawFirst = 1, DtSymbol_DrawLast = 2 } |
| enum | DtSymbolCompositeDrawOptions { DtSymbol_Always = 0, DtSymbol_Never = 1, DtSymbol_OnlyIfCloned = 2 } |
Public Slots inherited from DtSymbol | |
| virtual void | invalidateStaticAnimData () |
| This gets called when modified symbols exist and the original symbol has been destroyed. | |
| virtual void | displayComplete () |
| Call when the display of this symbol is complete. | |
| virtual void | clearDragClone (QObject *) |
| Called when the drag clone is destroyed outside of this context, we will be notified in that case to clear out this symbols internal pointer. | |
Signals inherited from DtSymbol | |
| void | originalSymbolDestroyed () |
| Sent when an original symbol has been destroyed - (so that the drawer can remove that cache) | |
| void | destroyed (const DtSymbol *) |
| Called when we are destroyed, this will give our drawers a chance to update any cached information. | |
| void | originChanged (const DtSymbol *) |
| Sent when setOrigin is called with a different origin. | |
| void | visibilityChanged (const DtSymbol *) |
| Sent when visibility change sending is enabled and a symbol is shown or hidden when it wasn't before. | |
| void | displayComplete (const DtSymbol *) |
| Called from displayComplete() | |
Static Protected Attributes inherited from DtSymbol | |
| static DtNullDrawer | theNullDrawer |
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 | ( | DtSymbolDrawer & | drawer | ) |
default constructor
| DtCompositeSymbol::DtCompositeSymbol | ( | DtSymbolDrawer & | drawer, |
| const DtDisplayPoint & | center | ||
| ) |
|
private |
Not implemented. Private to ensure it is only constructed with a drawer.
| DtCompositeSymbol& DtCompositeSymbol::operator= | ( | const DtCompositeSymbol & | orig | ) |
|
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 |
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.
|
virtual |
Move the center of this object by p amount.
Reimplemented from DtSymbol.
Reimplemented in DtMovingObjectSymbol, DtPointObjectSymbol, and DtAggregateSymbol.
|
virtual |
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol.
|
virtual |
Reimplemented from DtSymbol.
|
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 |
Checks to see if any children symbols intersect.
Reimplemented from DtSymbol.
Reimplemented in DtPointObjectSymbol, DtMovingObjectSymbol, DtAreaObjectSymbol, DtLineObjectSymbol, and DtCircleObjectSymbol.
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 |
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 |
|
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
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 |
|
virtual |
Get a symbol by using its name.
If it doesn't exist, then return null.
|
inlinevirtual |
Returns true if this symbol is a combination of others (this returns true)
Reimplemented from DtSymbol.
|
virtual |
Calculates size of the composite based on its children.
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol, and DtMovingObjectSymbol.
|
virtual |
Get the selection box (area where you can select an item)
Reimplemented from DtSymbol.
Reimplemented in DtAggregateSymbol, DtMovingObjectSymbol, and DtPointObjectSymbol.
|
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 |
Reimplemented in DtAggregateSymbol.
|
virtual |
|
virtual |
|
virtual |
Show this symbol and any other symbol in the hidden list.
Reimplemented from DtSymbol.
|
virtual |
Hide symbols that are shown and put into hidden list.
Reimplemented from DtSymbol.
|
virtual |
Creates the draw order list for the symbols.
|
virtual |
Returns the symbol that can be edited via an event handler.
Reimplemented in DtMovingObjectSymbol.
|
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 |
|
virtual |
Returns the parent offset of the last label drawn.
|
virtual |
Transparency information.
Reimplemented from DtSymbol.
|
virtual |
Hides all children but keeps main symbol shown.
|
virtual |
Shows all children.
|
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 |
Blocks signals from being emitted from this symbol.
Overridden to allow for possible recursive usage
Reimplemented from DtSymbol.
|
virtual |
Asks main symbol if the origin is center of call.
Reimplemented from DtSymbol.
|
static |
Reimplemented in DtNameLabelSymbol, DtPointObjectSymbol, DtLineObjectSymbol, DtAreaObjectSymbol, and DtCircleObjectSymbol.
|
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 |
|
inline |
References myShowIndicatorOption.
|
virtual |
|
virtual |
Set/get the highlight flag (whether the symbol should be drawn highlighted).
Reimplemented from DtSymbol.
Reimplemented in DtPointObjectSymbol, DtLineObjectSymbol, DtMovingObjectSymbol, and DtCircleObjectSymbol.
|
virtual |
Extends the editMode functions from basic DtySymbol to propagate correctly.
Reimplemented from DtSymbol.
|
virtual |
Resets any relevant information associated with this symbol.
Currently only calls reset on any static animation data
Reimplemented from DtSymbol.
|
protectedvirtual |
Reimplemented from DtSymbol.
|
protectedvirtual |
Reimplemented from DtSymbol.
|
protectedvirtualslot |
Called when this symbol is destroyed outside of this composite symbol.
|
protectedvirtualslot |
Removes a symbol without deleting it.
|
protectedvirtual |
Sets the symbol children list.
|
protectedvirtual |
If any children want to redraw, this symbol needs to be redrawn.
Reimplemented from DtSymbol.
|
protectedvirtual |
Draws the symbol.
Override for any specific drawing. Called for each symbol to be drawn
Reimplemented in DtMovingObjectSymbol, and DtPointObjectSymbol.
|
protectedvirtual |
|
protectedvirtual |
Scaling factors.
Reimplemented from DtSymbol.
|
protectedvirtual |
Return true/false if this is a scalable symbol. By default returns false.
Reimplemented from DtSymbol.
|
protectedvirtual |
Called before a selection is made, clears out the mySelectedChildren list.
|
protectedvirtual |
|
protectedvirtual |
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.
|
protectedvirtual |
Called when a child symbol of this symbol is shown.
Reimplemented from DtSymbol.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by showIndicatorOption().