VR-Forces 4.0.4 Class Documentation
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtSymbol Class Reference

class from which all other symbol types are derived. More...

Inheritance diagram for DtSymbol:
Inheritance graph
[legend]

List of all members.

Public Types

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

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

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

Public Member Functions

virtual ~DtSymbol ()
 destructor
 DtSymbol (const DtSymbol &orig)
 copy constructor
DtSymboloperator= (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 DtSymbolclone () const
 Returns an instance of a symbol which is a copy of this.
virtual void setName (const QString &name)
 The specific name of this symbol.
virtual const QString & name () const
virtual void setHighlight (const bool highlight)
 Set/get the highlight flag (whether the symbol should be drawn highlighted).
virtual bool highlight () const
virtual bool selected () const
virtual const DtDisplayPoint centerPoint () const
 The real visual center of the symbol in display coordinates.
virtual const DtDisplayPoint topLeftPoint () const
 The real visual top left corner of the symbol in display coordinates.
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.
virtual const QPolygon * getLocationData () const
 Provided for a simpler interface to subclasses.
virtual void setOrigin (const QPoint &center)
 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 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 DtSymbolDrawerdrawer () const
virtual QSize bbox () const
 the bounding box - this queries the drawer
virtual QRect brect () const
virtual QRect selBbox () const
 the selection box (area where you can select an item)
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 bool show (DtShowHideContext module)
 Shows/hides the symbol.
virtual bool hide (DtShowHideContext module)
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 void wasHidden (DtSymbol *)
 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 *)
 Called when a child symbol of this symbol is shown.
virtual bool isShown () const
virtual DtSymbolparent () const
virtual void setParent (DtSymbol *dad)
virtual bool isComposite ()
 ---- Type information
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)
 ---- Mouse selecting options
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 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 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 DtStaticAnimDatastaticAnimData () 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 bool forceUpdate () const
 Override this function and return true if this symbol wants to update every tick regardless of performance enhancements.
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 DtSymboldragClone () const
virtual void setScaleBy (double factor)
 Scaling factors.
virtual double scaleBy () const
virtual bool isScalable () const
 Return true/false if this is a scalable symbol. By default returns false.
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 void setTransparencyLevel (int)
 Transparency information.
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 transparentCacheChanged () const
virtual void cacheTransparentVariables ()
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 DtSymbolDrawersymbolDrawer ()
 Sets the new drawer to be the supplied drawer.
virtual DtSymbolDrawersetDrawer (const DtSymbolDrawer &)
virtual DtSymbolDrawerbackupDrawer () 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 DtSymbolDisplayOptionssymbolDisplayOptions ()
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
virtual void blockSignals (bool)
 Blocks signals from being emitted from this symbol.
virtual bool originIsCenterOfMass () const
 Returns true if the origin is the center of mass (center of all points) in the symbol.
virtual void setCacheSymbolAsBitmap (bool)
 Get/set whether or not the drawer should cache this symbol as a bitmap.
bool cacheSymbolAsBitmap () const
virtual const QString & bitmapSymbolCacheKey () const
 Returns a cache key that can be used to lookup in a bitmap cache.
virtual void reset ()
 Resets any relevant information associated with this symbol.
virtual bool editMode ()
 Set/get the edit mode option to enable update properties when hidden because of edition.
virtual void setEditMode (bool onOff)

Static Public Member Functions

static DtNullDrawernullDrawer ()

Protected Member Functions

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.

Protected Attributes

DtSymbolDrawermySymbolDrawer
DtSymbolDrawermyBackupDrawer
QPoint myOrigin
bool myActiveOffsetToParent
QPoint myOffsetToParent
bool myHighlight
bool myIsShown
bool myIsSelectable
bool myEditable
bool myInternalSelectable
QString myName
QString myCategoryTag
DtSymbolGeometry myGeometry
DtSymbolmyParent
DtSymbolmyDragClone
 If this symbol is being dragged, then this will point to the symbol that was cloned for the drag.
bool myIsOriginal
bool myAllowEditOnSelection
bool myAddToDrawOrder
double myScaleFactor
DtStaticAnimDatamyStaticAnimData
bool myEmitVisibilityChange
DtSymbol_DrawOrder myDrawOrder
QTimer * myTimer
DtSymbolCompositeDrawOptions myDrawOnComposite
bool myShouldSelect
 Set to true if part of a composite and a user has selected a part of the composite that should be selected.
int myTransparencyLevel
 Information for symbol transparency and transparent drawing.
QPixmap * myTransparentImage
DtSymbolmyTransparentCachedSymbol
DtSymbolDisplayOptionsmySymbolDisplayOptions
bool myAdjustPoints
QVector< DtShowHideContextmyHiddenByModules
QVector< DtShowHideContextmyIgnoreContexts
bool myRemoveIfOffscreen
bool myCacheSymbolAsBitmap
bool myEditMode
QString mySymbolBitmapCacheKey

Static Protected Attributes

static DtNullDrawer theNullDrawer

Detailed Description

class from which all other symbol types are derived.

This class can also double as a Point symbol type.


Member Enumeration Documentation

Type of overlap test.

Ranges from fastest with most false positive overlaps to slowest but most exact.

Enumerator:
DtSymbol_BoundingSphere 

one sphere over the entire object

DtSymbol_BoundingBox 

one box over the entire object

DtSymbol_SpherePieces 

one sphere per component.

DtSymbol_BoxPieces 

one box per component

DtSymbol_Exact 

An exact bit per bit comparison.

Enumerator:
DtSymbol_DrawAsEntered 
DtSymbol_DrawFirst 

Draws underneath all else.

DtSymbol_DrawLast 

Draws on top all else.

Enumerator:
DtSymbol_Always 
DtSymbol_Never 

Always draw symbol if part of composite.

DtSymbol_OnlyIfCloned 

Never draw symbol if part of composite.


Constructor & Destructor Documentation

virtual DtSymbol::~DtSymbol ( ) [virtual]

destructor

DtSymbol::DtSymbol ( const DtSymbol orig)

copy constructor

Drawer is non-const since it does memory management.


Member Function Documentation

DtSymbol& 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

virtual void DtSymbol::copyDataFrom ( const DtSymbol symbol) [virtual]

Differs from the equal operator in that this method could copy a different set of data than the = operator.

Subclasses will handle most of the burden here, but this class will just copy the origin

Reimplemented in DtNameLabelSymbol, DtEntitySymbol, and DtMovingObjectSymbol.

virtual DtSymbol* DtSymbol::clone ( ) const [virtual]
virtual void DtSymbol::setName ( const QString &  name) [virtual]

The specific name of this symbol.

Reimplemented in DtNameLabelSymbol.

virtual const QString& DtSymbol::name ( ) const [virtual]
virtual void DtSymbol::setHighlight ( const bool  highlight) [virtual]

Set/get the highlight flag (whether the symbol should be drawn highlighted).

Reimplemented in DtCompositeSymbol, DtTTSSymbol, DtLineSymbol, DtResizableCircleSymbol, DtPointObjectSymbol, DtLineObjectSymbol, DtMovingObjectSymbol, and DtCircleObjectSymbol.

virtual bool DtSymbol::highlight ( ) const [virtual]
virtual bool DtSymbol::selected ( ) const [virtual]

Reimplemented in DtResizableCircleSymbol, and DtLineSymbol.

virtual const DtDisplayPoint DtSymbol::centerPoint ( ) const [virtual]

The real visual center of the symbol in display coordinates.

Reimplemented in DtLineSymbol, DtCompositeSymbol, DtPolygonSymbol, DtPointObjectSymbol, DtAggregateSymbol, and DtMovingObjectSymbol.

virtual const DtDisplayPoint DtSymbol::topLeftPoint ( ) const [virtual]

The real visual top left corner of the symbol in display coordinates.

virtual bool DtSymbol::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 in DtLineSymbol, DtResizableCircleSymbol, DtCompositeSymbol, and DtCircleObjectSymbol.

virtual const QPolygon* DtSymbol::getLocationData ( ) const [virtual]

Provided for a simpler interface to subclasses.

Since there is only one point (the origin), this routine will return NULL

Reimplemented in DtLineSymbol, DtResizableCircleSymbol, and DtLineObjectSymbol.

virtual void DtSymbol::setOrigin ( const QPoint &  center) [virtual]

Set the display coordinate that will become the 0,0 point for drawing this symbol.

On most symbols, this will be the same as the center point, but this doesn not need to be the case

Reimplemented in DtResizableCircleSymbol, DtPointObjectSymbol, DtAggregateSymbol, and DtMovingObjectSymbol.

virtual void DtSymbol::setOrigin ( int  x,
int  y 
) [virtual]
virtual const QPoint DtSymbol::origin ( ) const [virtual]

returns the display origin for the symbol.

On most symbols, this will be the same as the center point, but this doesn not need to be the case

Reimplemented in DtPointObjectSymbol, DtAggregateSymbol, and DtMovingObjectSymbol.

virtual void DtSymbol::shift ( QPoint  p) [virtual]
virtual void DtSymbol::draw ( QPainter &  paint) const [virtual]

Reimplemented in DtAggregateSymbol, and DtCompositeSymbol.

virtual void DtSymbol::drawHidden ( QPainter &  paint) const [virtual]

Reimplemented in DtCompositeSymbol.

virtual const DtSymbolDrawer& DtSymbol::drawer ( ) const [virtual]
virtual QSize DtSymbol::bbox ( ) const [virtual]

the bounding box - this queries the drawer

Reimplemented in DtCompositeSymbol, DtAggregateSymbol, and DtMovingObjectSymbol.

virtual QRect DtSymbol::brect ( ) const [virtual]
virtual QRect DtSymbol::selBbox ( ) const [virtual]

the selection box (area where you can select an item)

  • this queries the drawer

Reimplemented in DtCompositeSymbol, DtAggregateSymbol, DtMovingObjectSymbol, and DtPointObjectSymbol.

virtual void DtSymbol::clearOffsetToParent ( ) [virtual]

Set/get the offset to the parent.

Set this if you want your child to always stay a constant distance from its parent. The offset is devined as the vector from the parent to its child

virtual void DtSymbol::setOffsetToParent ( const QPoint &  offsetToParent) [virtual]
virtual const QPoint* DtSymbol::offsetToParent ( ) const [virtual]

if the offsetToParent blit has been cleared, this returns null

virtual bool DtSymbol::show ( DtShowHideContext  module) [virtual]

Shows/hides the symbol.

A symbol which is hidden is not drawn when the symbol manager goes to draw the symbol. Returns true if show/hide state changed. Supply a context to allow the control of when a symbol is ultimately shown. A symbol will not be shown until all hidden contexts are removed.

Reimplemented in DtCompositeSymbol.

virtual bool DtSymbol::hide ( DtShowHideContext  module) [virtual]

Reimplemented in DtCompositeSymbol.

virtual void DtSymbol::show ( ) [virtual]

Use this method to show the symbol regardless of how many contexts have hidden it.

Same as show(DtDefaultShowHideContext)

virtual void DtSymbol::hide ( ) [virtual]

Use this method to hide a symbol without context. Same as hide(DtDefaultShowHideContext)

virtual void DtSymbol::addIgnoreContext ( DtShowHideContext  ) [virtual]

Add/remove contexts for hide() to ignore.

Note that if a context is added, and the object is hidden by that context, it will remain hidden

virtual void DtSymbol::removeIgnoreContext ( DtShowHideContext  ) [virtual]
const QVector< DtShowHideContext > & DtSymbol::ignoreContexts ( ) const [inline]

References myIgnoreContexts.

virtual void DtSymbol::wasHidden ( DtSymbol ) [virtual]

The following two methods are only called if the parent is hidden Called when a child symbol of this symbol is hidden.

Reimplemented in DtCompositeSymbol.

virtual void DtSymbol::wasShown ( DtSymbol ) [virtual]

Called when a child symbol of this symbol is shown.

Reimplemented in DtCompositeSymbol.

virtual bool DtSymbol::isShown ( ) const [virtual]
virtual DtSymbol* DtSymbol::parent ( ) const [virtual]
virtual void DtSymbol::setParent ( DtSymbol dad) [virtual]
virtual bool DtSymbol::isComposite ( ) [inline, virtual]

---- Type information

Returns true if this symbol is a combination of others (this returns false unless the class is inherited)

Reimplemented in DtCompositeSymbol.

virtual DtSymbolGeometry DtSymbol::geometry ( ) const [virtual]
virtual void DtSymbol::setGeometry ( DtSymbolGeometry  geom) [virtual]
virtual void DtSymbol::setCategoryTag ( const QString &  name) [virtual]

A tag is the name of this type of symbol such as velocity vector name or force or whatever.

virtual const QString& DtSymbol::categoryTag ( ) const [virtual]
virtual bool DtSymbol::select ( const QPoint &  aPoint) [virtual]

---- Mouse selecting options

Returns true if the point intersects the symbol, if the symbol is selectable.

Reimplemented in DtResizableCircleSymbol, DtLineSymbol, DtCircleSymbol, DtPolygonSymbol, DtCompositeSymbol, DtPointObjectSymbol, DtMovingObjectSymbol, DtAreaObjectSymbol, DtLineObjectSymbol, and DtCircleObjectSymbol.

virtual bool DtSymbol::select ( const QPoint &  aPoint,
const QSize &  rectangleSize 
) [virtual]

Returns true if the rectangle intersects the symbol, if the symbol is selectable.

Reimplemented in DtLineSymbol, DtResizableCircleSymbol, DtCircleSymbol, DtPointObjectSymbol, DtMovingObjectSymbol, DtLineObjectSymbol, and DtCircleObjectSymbol.

virtual void DtSymbol::setSelectable ( bool  value) [virtual]

Set/get the ability to select with this symbol.

true by default. A Selectable symbol is a symbol that you can click on the screen using a mouse or keyboard

virtual bool DtSymbol::isSelectable ( ) const [virtual]
virtual void DtSymbol::setEditable ( bool  b) [virtual]

Accessors for whether or not this line can be edited.

By default it is not

Reimplemented in DtNameLabelSymbol.

virtual bool DtSymbol::editable ( ) const [virtual]

Reimplemented in DtNameLabelSymbol.

virtual void DtSymbol::setAllowEditOnSelection ( bool  b) [virtual]

Sets the fact that even if this symbol is not marked editable, it can become editable upon selection (myHighlight is true)

Reimplemented in DtNameLabelSymbol.

virtual bool DtSymbol::allowEditOnSelection ( ) const [virtual]
virtual void DtSymbol::setInternalSelectable ( bool  value) [virtual]

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 DtSymbol::isInternalSelectable ( ) const [virtual]
virtual void DtSymbol::setAddToDrawOrder ( bool  b) [virtual]

Add this item to the draw order regardless of whether or not it is visible on the screen.

By default this is false

virtual bool DtSymbol::addToDrawOrder ( ) const [virtual]

Reimplemented in DtEntitySymbol.

virtual bool DtSymbol::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 in DtCompositeSymbol, and DtAggregateSymbol.

virtual bool DtSymbol::overlapsAreaSymbol ( const DtSymbol aSymbol,
const DtSymbol_OverlapTest  aTest = DtSymbol_BoxPieces,
const float  aTolerance = 0 
) const [virtual]

handles the case when aSymbol spans an area, such as a bitmap or a text symbol.

virtual bool DtSymbol::overlapsLineSymbol ( DtSymbol aSymbol,
const float  aTolerance = 0 
) const [virtual]

handles the case when aSymbol is composed of line segments, such as a line, polygon, or route.

virtual bool DtSymbol::isOriginal ( ) const [virtual]

Returns true if this symbol is an original symbol, otherwise return false.

virtual DtStaticAnimData* DtSymbol::staticAnimData ( ) const [virtual]

If true, will not draw this symbol if it is part of a composite symbol.

Useful for wanting to attach symbols to composites that are hidden from view

virtual bool DtSymbol::drawOnComposite ( ) const [virtual]
virtual bool DtSymbol::drawFirst ( ) const [virtual]

If true, this symbol will always be drawn first.

If more than one symbol has this property as true, they will be drawn first in the order added to the view list

virtual void DtSymbol::setDrawFirst ( bool  b) [virtual]
virtual bool DtSymbol::drawLast ( ) const [virtual]

If true, this symbol will always be drawn last.

If more than one symbol has this property as true, they will be drawn last in the order added to the view list

virtual void DtSymbol::setDrawLast ( bool  b) [virtual]
virtual bool DtSymbol::selectAdditionalSymbols ( QList< DtSymbol * > &  additionalSymbols) [virtual]

This routine is called during symbol selection time to see if the selection of this symbol requires other symbols to be selected as well.

This routine will only be called if this symbol is scheduled to be selected. Return true if the symbols in that have been put into the supplied list are to be selected

virtual bool DtSymbol::forceUpdate ( ) const [virtual]

Override this function and return true if this symbol wants to update every tick regardless of performance enhancements.

Calls down to the drawer to see if this symbol needs to update

Reimplemented in DtCompositeSymbol.

virtual void DtSymbol::setColor ( const QColor &  color) [virtual]

Noop function to allow subclasses to override.

As a base, symbols do not have color, but this routine will give an options to allow for a generic interface and have subclasses implement a color scheme

Reimplemented in DtNameLabelSymbol, and DtColorizedSymbol.

Referenced by DtSymbolDescriptor::setupOptionSymbolInformation().

virtual void DtSymbol::clearColor ( ) [virtual]

Noop function to allow subclasses to clear out any color information.

Reimplemented in DtNameLabelSymbol, and DtColorizedSymbol.

virtual bool DtSymbol::adjustPoints ( QPolygon &  pnts,
bool  constrain 
) [virtual]

Opportunity to adjust the point array to some desired other points.

By default call setLocationData(). Return true if points have been modified

Reimplemented in DtResizableCircleSymbol, DtNameLabelSymbol, DtPointObjectSymbol, DtLineObjectSymbol, and DtBoxSymbol.

virtual void DtSymbol::setDragClone ( DtSymbol clone) [virtual]

Contains the symbol that is being dragged that represents this symbol.

The myParent variable also contains this information, however, since the parent can either be the parent in a composite symbol or a drag, this member function should be used to be sure

virtual DtSymbol* DtSymbol::dragClone ( ) const [virtual]
virtual void DtSymbol::setScaleBy ( double  factor) [virtual]

Scaling factors.

Reimplemented in DtCompositeSymbol, and DtTTFUnitSymbol.

virtual double DtSymbol::scaleBy ( ) const [virtual]
virtual bool DtSymbol::isScalable ( ) const [virtual]

Return true/false if this is a scalable symbol. By default returns false.

Reimplemented in DtCompositeSymbol, DtCircleSymbol, DtTTSSymbol, and DtBMPSymbol.

virtual void DtSymbol::enableVisibilityChange ( bool  b) [virtual]
virtual void DtSymbol::scheduleDisplayComplete ( int  ) [virtual]

Sets a QTimer for the specified amount of time to fire off and then call the displayComplete() slot.

virtual void DtSymbol::setShouldSelect ( bool  ) [virtual]
virtual bool DtSymbol::shouldSelect ( ) const [virtual]
virtual void DtSymbol::setTransparencyLevel ( int  ) [virtual]

Transparency information.

Reimplemented in DtCompositeSymbol.

Referenced by DtSymbolDescriptor::setupOptionSymbolInformation().

virtual int DtSymbol::transparencyLevel ( ) const [virtual]
virtual bool DtSymbol::needsTransparentRedraw ( ) const [virtual]

Will return true if there is no cached image or internal variables have changed such that the cached image needs a redraw.

virtual QPixmap* DtSymbol::transparentImage ( ) const [virtual]
virtual QPixmap* DtSymbol::cacheTransparentImage ( const QPixmap &  pixmap) [virtual]
virtual QPixmap* DtSymbol::cacheTransparentImage ( const QImage &  image) [virtual]
virtual bool DtSymbol::transparentCacheChanged ( ) const [virtual]
virtual void DtSymbol::cacheTransparentVariables ( ) [virtual]

Reimplemented in DtCompositeSymbol.

virtual bool DtSymbol::wantsTransparentDraw ( ) const [virtual]

Will return true if transparent percent is not 0 or 100.

bool DtSymbol::operator== ( const DtSymbol orig) const
bool DtSymbol::operator!= ( const DtSymbol orig) const
virtual DtSymbolDrawer* DtSymbol::symbolDrawer ( ) [virtual]

Sets the new drawer to be the supplied drawer.

Returns a pointer to the last drawer contained

virtual DtSymbolDrawer* DtSymbol::setDrawer ( const DtSymbolDrawer ) [virtual]
virtual DtSymbolDrawer& DtSymbol::backupDrawer ( ) const [virtual]

Returns the drawer that was set as a backup.

If there is no backup drawer, the current drawer is returned

virtual void DtSymbol::setBackupDrawer ( DtSymbolDrawer ) [virtual]
static DtNullDrawer* DtSymbol::nullDrawer ( ) [static]
virtual bool DtSymbol::removeIfOffScreen ( ) const [virtual]

Return true/false if this symbol should be removed if it is off screen By default is true.

void DtSymbol::setRemoveIfOffScreen ( bool  b) [inline]

Default is true.

Note that subclasses can override this to keep the symbol onscreen even if this variable is false. This is a fallback in case subclasses do not implement this method

References myRemoveIfOffscreen.

virtual const DtSymbolDisplayOptions* DtSymbol::symbolDisplayOptions ( ) const [virtual]
virtual int DtSymbol::displayOptionsCache ( ) const [virtual]
void DtSymbol::setAdjustPoints ( bool  b) [inline]

Reimplemented in DtLineObjectSymbol.

References myAdjustPoints.

bool DtSymbol::adjustPoints ( ) const [inline]

Reimplemented in DtLineObjectSymbol.

References myAdjustPoints.

const QVector< DtShowHideContext > & DtSymbol::hiddenByModules ( ) const [inline]

Routines to access which modules this symbol is hidden by.

References myHiddenByModules.

bool DtSymbol::hiddenByModule ( DtShowHideContext  module) const [inline]

References myHiddenByModules.

virtual void DtSymbol::blockSignals ( bool  ) [virtual]

Blocks signals from being emitted from this symbol.

Overridden to allow for possible recursive usage

Reimplemented in DtCompositeSymbol.

virtual bool DtSymbol::originIsCenterOfMass ( ) const [virtual]

Returns true if the origin is the center of mass (center of all points) in the symbol.

By default returns false (meaning the origin is the center)

Reimplemented in DtLineSymbol, and DtCompositeSymbol.

virtual void DtSymbol::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 in DtCompositeSymbol.

bool DtSymbol::cacheSymbolAsBitmap ( ) const [inline]

References myCacheSymbolAsBitmap.

virtual const QString& DtSymbol::bitmapSymbolCacheKey ( ) const [virtual]

Returns a cache key that can be used to lookup in a bitmap cache.

Default returns "Symbol". Might be recalculated when called

Reimplemented in DtTTSSymbol.

virtual void DtSymbol::reset ( ) [virtual]

Resets any relevant information associated with this symbol.

Currently only calls reset on any static animation data

Reimplemented in DtCompositeSymbol.

virtual bool DtSymbol::editMode ( ) [virtual]

Set/get the edit mode option to enable update properties when hidden because of edition.

Initially used to draw indicators when in edition bause the heading is being changed from the FE Indicators redrawed: Bounding box

Reimplemented in DtCompositeSymbol.

virtual void DtSymbol::setEditMode ( bool  onOff) [virtual]

Reimplemented in DtCompositeSymbol.

virtual void DtSymbol::invalidateStaticAnimData ( ) [virtual, slot]

This gets called when modified symbols exist and the original symbol has been destroyed.

In theory this should never happen, but just in case it does, I want to invalidate all shared data to avoid a crash.

virtual void DtSymbol::displayComplete ( ) [virtual, slot]

Call when the display of this symbol is complete.

Will emit displayComplete(const DtSymbol*) signal so others can determine what to do with this symbol

virtual void DtSymbol::clearDragClone ( QObject ) [virtual, slot]

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.

Sent when an original symbol has been destroyed - (so that the drawer can remove that cache)

void DtSymbol::destroyed ( const DtSymbol ) [signal]

Called when we are destroyed, this will give our drawers a chance to update any cached information.

This differs from the above only in that it passes the "this" pointer as the symbol being destroyed

void DtSymbol::originChanged ( const DtSymbol ) [signal]

Sent when setOrigin is called with a different origin.

void DtSymbol::visibilityChanged ( const DtSymbol ) [signal]

Sent when visibility change sending is enabled and a symbol is shown or hidden when it wasn't before.

void DtSymbol::displayComplete ( const DtSymbol ) [signal]

Called from displayComplete()

bool DtSymbol::overlapsBoundingSphere ( const DtSymbol aSymbol,
const float  aTolerance 
) const [protected]

Returns true if the bounding spheres of the symbols intersect and the symbols are intersectable.

bool DtSymbol::overlapsBoundingBox ( const DtSymbol aSymbol,
const float  aTolerance 
) const [protected]

Returns true if the bounding boxes of the symbols intersect and the symbols are intersectable.


Member Data Documentation

QPoint DtSymbol::myOrigin [protected]
QPoint DtSymbol::myOffsetToParent [protected]
QString DtSymbol::myName [protected]

Reimplemented in DtNameLabelSymbol.

QString DtSymbol::myCategoryTag [protected]

If this symbol is being dragged, then this will point to the symbol that was cloned for the drag.

double DtSymbol::myScaleFactor [protected]

Reimplemented in DtCompositeSymbol.

QTimer* DtSymbol::myTimer [protected]

Set to true if part of a composite and a user has selected a part of the composite that should be selected.

Information for symbol transparency and transparent drawing.

QPixmap* DtSymbol::myTransparentImage [protected]

Referenced by adjustPoints(), and setAdjustPoints().

Referenced by hiddenByModule(), and hiddenByModules().

Referenced by ignoreContexts().

Referenced by setRemoveIfOffScreen().

Referenced by cacheSymbolAsBitmap().

QString DtSymbol::mySymbolBitmapCacheKey [mutable, protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)