VR-Forces 4.0.4 Class Documentation
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtOverlaySymbolMapper Class Reference
Inheritance diagram for DtOverlaySymbolMapper:
Inheritance graph
[legend]

List of all members.

Signals

void overlayDescriptorAdded (DtOverlaySymbolDescriptor *)
 Emitted when a descriptor is added via the addOverlayObject call.

Public Member Functions

 DtOverlaySymbolMapper ()
 DtOverlaySymbolMapper (DtBaseSymbolMapper *)
virtual ~DtOverlaySymbolMapper ()
virtual DtSymbol * createSymbol (const DtModelData &d)
 createSymbol() this will invoke createSymbol(context) then add the model data points to the symbol that is returned from createSymbol(context) then it will return the symbol
virtual void setColor (int currColor)
virtual void setWidth (int currWidth)
virtual int width ()
virtual bool init ()
 Initialize system to add creator functions.
virtual void addControlObjectCreator (int kind, DtControlObjectCreatorFcn fcn)
 Adds or replaces a creator used for control objects.
virtual QPixmap getIcon (const DtModelData *d)
 Will return appropriate icon for supplied model.
virtual DtCompositeSymbol * createPointSymbol (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn=DtPointObjectSymbol::create)
virtual DtCompositeSymbol * createLineObjectSymbol (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn=DtLineObjectSymbol::create)
virtual DtCompositeSymbol * createAreaObjectSymbol (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn=DtAreaObjectSymbol::create)
virtual DtCompositeSymbol * createCircleSymbol (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn=DtCircleObjectSymbol::create)
virtual DtEnvironmentalModelData * createObject (const QString &object, QVector< DtPoint > &points, const QString &name=QString::null)
 If a symbol descriptor has the given name, then, create an object based on that mapper key.
virtual DtOverlaySymbolDescriptor * addOverlayObject (const DtEntityMapperKey &, const QString &tab, const QString &symbolName, const QString &iconFileName, const QString &minimumDataPoints, DtSymbolDescriptor *symbolType, bool addToMenu=true)
 This routine will add a new overlay symbol (and associated symbol) descriptor to the internal mappings.
const QList
< DtOverlaySymbolDescriptor * > & 
additionalMenuItems () const
virtual bool creationKeyFor (const QString &name, DtEntityMapperKey &retKey) const
 Given an object name, fills in the retKey with the entity mapper key used to create the object.

Static Public Member Functions

static DtSymbol * processCreateCircleSymbol (DtOverlaySymbolMapper *mapper, const DtEntityMapperKey &type, int force)
static DtSymbol * processCreatePointSymbol (DtOverlaySymbolMapper *mapper, const DtEntityMapperKey &type, int force)
static DtSymbol * processCreateLineSymbol (DtOverlaySymbolMapper *mapper, const DtEntityMapperKey &type, int force)
static DtSymbol * processCreateAreaSymbol (DtOverlaySymbolMapper *mapper, const DtEntityMapperKey &type, int force)
static DtSymbol * createNewSymbol (const DtBaseSymbolMapper *mapper, const DtModelData &data, void *usr)
static DtBaseSymbolMapper * create ()
 Returns a newly created instance of a DtBaseSymbolMapper.

Protected Member Functions

virtual DtSymbol * processCreateSymbol (const DtEnvironmentalModelData &data, void *usr)
virtual DtSymbol * processCreateSymbol (const DtCompassModelData &data, void *usr)
virtual DtSymbol * getControlObjectSymbol (const DtEntityMapperKey &type, int force, const DtEnvironmentalModelData &data)
virtual void modifySymbol (DtSymbol *symbol, DtSymbolDescriptor *symDesc, int force, const DtEntityMapperKey &emk)
 Called after symbol is created, used to apply additional modifications to symbol.
virtual void addLayerLabel (DtNameLabelSymbol *symbol)
virtual void formatLabels (DtNameLabelSymbol *symbol, const DtEntityMapperKey &type)
virtual void formatColor (DtNameLabelSymbol *color, const DtEnvironmentalModelData &type)
virtual DtCompositeSymbol * createOverlaySymbol (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn)

Protected Attributes

unsigned char myCurrentColor
int myCurrentWidth
DtMultiLineDrawer myMultiLineDrawer
DtPolygonDrawer myPolygonDrawer
QHash< int,
DtControlObjectCreatorInfo > 
myControlObjectCreators
QList
< DtOverlaySymbolDescriptor * > 
myAdditionalMenuItems

Private Member Functions

 DtOverlaySymbolMapper (const DtOverlaySymbolMapper &orig)
DtOverlaySymbolMapper & operator= (const DtOverlaySymbolMapper orig)

Constructor & Destructor Documentation


Member Function Documentation

virtual DtSymbol* DtOverlaySymbolMapper::createSymbol ( const DtModelData &  d) [virtual]

createSymbol() this will invoke createSymbol(context) then add the model data points to the symbol that is returned from createSymbol(context) then it will return the symbol

Reimplemented from DtBaseSymbolMapper.

Reimplemented in DtFormationSymbolMapper.

virtual void DtOverlaySymbolMapper::setColor ( int  currColor) [virtual]
virtual void DtOverlaySymbolMapper::setWidth ( int  currWidth) [virtual]
virtual int DtOverlaySymbolMapper::width ( ) [virtual]
virtual bool DtOverlaySymbolMapper::init ( ) [virtual]

Initialize system to add creator functions.

Reimplemented from DtSymbolMapper.

virtual void DtOverlaySymbolMapper::addControlObjectCreator ( int  kind,
DtControlObjectCreatorFcn  fcn 
) [virtual]

Adds or replaces a creator used for control objects.

virtual QPixmap DtOverlaySymbolMapper::getIcon ( const DtModelData *  d) [virtual]

Will return appropriate icon for supplied model.

Reimplemented from DtBaseSymbolMapper.

Reimplemented in DtEntityEditorSymbolMapper.

static DtSymbol* DtOverlaySymbolMapper::processCreateCircleSymbol ( DtOverlaySymbolMapper *  mapper,
const DtEntityMapperKey &  type,
int  force 
) [static]
static DtSymbol* DtOverlaySymbolMapper::processCreatePointSymbol ( DtOverlaySymbolMapper *  mapper,
const DtEntityMapperKey &  type,
int  force 
) [static]
static DtSymbol* DtOverlaySymbolMapper::processCreateLineSymbol ( DtOverlaySymbolMapper *  mapper,
const DtEntityMapperKey &  type,
int  force 
) [static]
static DtSymbol* DtOverlaySymbolMapper::processCreateAreaSymbol ( DtOverlaySymbolMapper *  mapper,
const DtEntityMapperKey &  type,
int  force 
) [static]
static DtSymbol* DtOverlaySymbolMapper::createNewSymbol ( const DtBaseSymbolMapper *  mapper,
const DtModelData &  data,
void *  usr 
) [static]

Returns a newly created instance of a DtBaseSymbolMapper.

Reimplemented from DtSymbolMapper.

virtual DtEnvironmentalModelData* DtOverlaySymbolMapper::createObject ( const QString &  object,
QVector< DtPoint > &  points,
const QString &  name = QString::null 
) [virtual]

If a symbol descriptor has the given name, then, create an object based on that mapper key.

Checks both entity and interaction lists

Reimplemented from DtBaseSymbolMapper.

virtual DtOverlaySymbolDescriptor* DtOverlaySymbolMapper::addOverlayObject ( const DtEntityMapperKey &  ,
const QString &  tab,
const QString &  symbolName,
const QString &  iconFileName,
const QString &  minimumDataPoints,
DtSymbolDescriptor *  symbolType,
bool  addToMenu = true 
) [virtual]

This routine will add a new overlay symbol (and associated symbol) descriptor to the internal mappings.

The new item will be added to the menu system and the overlay palette. What will be returned is the new DtOverlaySymbolDescriptor and associated specific object descriptor: bmp - A bitmap image symbol (DtBmpSymbolDescriptor) ttf - A true type font image symbol (DtMMMSymbolDescriptor) uttf - A military standard font image symbol (DtUnicodeTTFSymbolDescriptor) box - A box symbol (DtBoxSymbolDescriptor) crc - A circle symbol (DtCircleSymbolDescriptor) tts - A resizable font image symbol. Used only for text blobs (DtTtsSymbolDescriptor) ply - A polygon symbol that can have textures and patterns applied to it (DtPolygonSymbolDescriptor)

You need to allocate one of the items above, filling in the correct information for the descriptor, and pass it into this method.

The DtOverlaySymbolDescriptor has an accessor symbolDescriptor() that will return an instance of the specific symbol you passed in.

Note that the iconFileName is the image to use in the menu when creating the item.

If addToMenu is true, emits the overlayDescriptorAdded message to add the item to the create menu and overlay palette. It will also add the descriptor to the myAdditionalMenuItems member variable which will be used if the overlay palette is created after the overlay object is added to allow it to pick up the new menu item

Note that the descriptor that is added will now be owned by this class. Do not delete the memory that has been passed into this method

References myAdditionalMenuItems.

virtual bool DtOverlaySymbolMapper::creationKeyFor ( const QString &  name,
DtEntityMapperKey &  retKey 
) const [virtual]

Given an object name, fills in the retKey with the entity mapper key used to create the object.

If the object does not exist, returns false

virtual DtSymbol* DtOverlaySymbolMapper::processCreateSymbol ( const DtEnvironmentalModelData &  data,
void *  usr 
) [protected, virtual]
virtual DtSymbol* DtOverlaySymbolMapper::processCreateSymbol ( const DtCompassModelData &  data,
void *  usr 
) [protected, virtual]
virtual DtSymbol* DtOverlaySymbolMapper::getControlObjectSymbol ( const DtEntityMapperKey &  type,
int  force,
const DtEnvironmentalModelData &  data 
) [protected, virtual]
virtual void DtOverlaySymbolMapper::modifySymbol ( DtSymbol *  symbol,
DtSymbolDescriptor *  symDesc,
int  force,
const DtEntityMapperKey &  emk 
) [protected, virtual]

Called after symbol is created, used to apply additional modifications to symbol.

Reimplemented from DtSymbolMapper.

virtual void DtOverlaySymbolMapper::addLayerLabel ( DtNameLabelSymbol *  symbol) [protected, virtual]
virtual void DtOverlaySymbolMapper::formatLabels ( DtNameLabelSymbol *  symbol,
const DtEntityMapperKey &  type 
) [protected, virtual]
virtual void DtOverlaySymbolMapper::formatColor ( DtNameLabelSymbol *  color,
const DtEnvironmentalModelData &  type 
) [protected, virtual]
virtual DtCompositeSymbol* DtOverlaySymbolMapper::createOverlaySymbol ( const DtEntityMapperKey &  type,
int  force,
DtSymbolCreatorFcn  fcn 
) [protected, virtual]

Emitted when a descriptor is added via the addOverlayObject call.

DtOverlaySymbolMapper& DtOverlaySymbolMapper::operator= ( const DtOverlaySymbolMapper  orig) [private]

Member Data Documentation

unsigned char DtOverlaySymbolMapper::myCurrentColor [protected]

Referenced by additionalMenuItems().


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)