![]() |
VR-Forces 4.1 Class Documentation
|
Base class for all the symbol mappers override with your own mapper functions that know about DIS or HLA or otherwise. More...

Public Slots | |
| virtual void | setLabelColor (const QColor &color) |
| virtual void | setUsingAnimation (bool b) |
| virtual void | removeChainedMapper (QObject *) |
Signals | |
| void | labelColorChanged (const QColor &color) |
Public Member Functions | |
| DtBaseSymbolMapper () | |
| DtBaseSymbolMapper (DtBaseSymbolMapper *) | |
| Calls chainSymbolMapper to add this symbol mapper into a chain to call down to create a symbol if this mapper does not create it. | |
| virtual | ~DtBaseSymbolMapper () |
| virtual DtSymbol * | createSymbol (const DtModelData &d) |
| Creates a symbol based on the specified type. | |
| virtual void | setDrawerColl (DtDrawerColl *dc) |
| virtual DtDrawerColl * | drawerColl () const |
| virtual bool | init () |
| Initialize system to add creator functions. | |
| virtual bool | load (const char *filename, bool replace=false) |
| Loads a file, or multiple files if the file buffer has file separated by a ; (semi-colon). | |
| virtual bool | save (const char *filename) |
| Writes out contents to specified file. | |
| virtual bool | addSymbolToList (DtDescriptor *sd, bool replace=false) |
| virtual bool | addSymbolToList (DtSymbolDescriptor *sd, bool replace=false) |
| virtual DtSymbolDescriptor * | getStringKeyedSymbolDesc (const QString &key) const |
| Uses straight string key rather than an entity identifier. | |
| virtual void | addStringKeyedSymbolToList (DtSymbolDescriptor *desc) |
| virtual void | getSymbolDescriptors (DtSDList *list) const |
| Fills the list will all the symbol descriptors in the entity keyed and string keyed lists. | |
| virtual DtSymbolDescriptor * | fullLookup (const QString &key) const |
| Returns a descriptor by looking in both trees. | |
| virtual DtSymbolDrawer * | lookupDrawer (const DtDrawerKey &key, DtSymbolDescriptor *symDesc) |
| virtual DtSymbolDrawer * | lookupDrawer (DtSymbolDescriptor *symDesc) |
| virtual DtTTSDrawer & | labelDrawer () |
| virtual QColor | labelColor () const |
| virtual void | removeEntries (const DtBaseSymbolMapper &mapper) |
| Removes symbols from entity list found in supplied mapper. | |
| virtual void | removeAllEntries (const DtSDList &mapper) |
| virtual void | removeEntry (DtSymbolDescriptor *sd) |
| Removes entry from all lists without deleting. To free memory, free descriptor. | |
| virtual const DtSDList & | entities () const |
| virtual int | defaultTransparencyFor (const DtEntityMapperKey &key) const |
| virtual void | postLoadCleanup () |
| Does any post load cleanup of a new symbol map file. | |
| virtual QPixmap | getIcon (const DtModelData *d) |
| Will return appropriate icon for supplied model. | |
| virtual void | setIconSize (const QSize size) |
| virtual QSize | iconSize () const |
| virtual QPixmap | finalizeSymbolPixmap (const DtSymbol *) const |
| const QString & | filename () const |
| virtual void | clear () |
| virtual void | addSymbolCreateCallback (int type, DtSymbolCreatorCallback fcn, void *usr=NULL) |
| Accessors to add/remove callbacks for model data types. | |
| virtual void | removeSymbolCreateCallback (int type) |
| virtual DtSymbolDescriptor * | getSymbolDesc (const DtEntityMapperKey &key) const |
| virtual DtSymbolDescriptor * | getSymbolDesc (const DtModelData &data) const |
| virtual DtCompositeSymbol * | createSymbolOfType (const DtEntityMapperKey &type, int force, DtSymbolCreatorFcn fcn) |
| virtual void | addPostCreateCallback (int iType, DtPostSymbolCreateCallbackFcn fcn, void *usr) |
| Adds a callback to be invoked any time a symbol is created. | |
| virtual void | removePostCreateCallback (int iType, DtPostSymbolCreateCallbackFcn fcn, void *usr) |
| Removes the post create callback if all three items match. | |
| virtual void | removeAllPostCreateCallbacks () |
| Removes all post update callbacks. | |
| virtual DtSymbol * | createMainSymbol (const DtEntityMapperKey &emk, int force) |
| Given the information, creates what would be the main symbol of the particular type. | |
| virtual DtMapReader * | createReader (QString extension) |
| virtual QColor | defaultColorFor (const DtEntityMapperKey &key) const |
| Returns default color based on type of object. | |
| virtual QColor | defaultColorFor (const DtModelData &data) const |
| virtual DtTTSSymbol * | createLabelSymbol () |
| virtual void | setMediaMapper (DtBaseMapper *map) |
| virtual void | addColor (const DtEntityMapperKey &, const QColor &) |
| Adds default colors for object types. | |
| virtual void | addNameLabel (DtNameLabelSymbol *symbol) |
| virtual void | addLabelLabel (DtNameLabelSymbol *symbol) |
| virtual void | chainSymbolMapper (DtBaseSymbolMapper *) |
| virtual void | clearCache () |
| virtual void | setDeleteChainedMappers (bool) |
| If true, delete chained symbol mappers when destroying this object. Default is false. | |
| virtual bool | deleteChainedMappers () const |
| virtual void | setCacheSymbolOptions (int) |
| Sets the options for how to signal to cache text objects as bitmap. | |
| int | cacheSymbolOptions () const |
| virtual DtSymbol * | createSymbolFromDescription (DtSymbolDescriptor *symDesc, const DtEntityMapperKey &key) |
| 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. | |
Public Member Functions inherited from DtBaseMapper | |
| DtBaseMapper () | |
| virtual | ~DtBaseMapper () |
Public Member Functions inherited from DtArchivableObject | |
| DtArchivableObject (QString name, DtArchivableObjectCreator fcn) | |
| This constructor will add this object to the archivable object factory. | |
| DtArchivableObject (QString name) | |
| DtArchivableObject () | |
| virtual | ~DtArchivableObject () |
| virtual QString | name () const |
| DtArchiver * | archiver () |
| Returns the archiver of this object. | |
| virtual void | read (QTextStream &s) |
| Reads/writes archiver. | |
| virtual void | write (QTextStream &s) |
| virtual void | setLevel (int i) |
| virtual int | level () const |
| virtual DtArchivableObject * | clone () |
| Allows for cloning of this object. | |
Static Public Member Functions | |
| static DtBaseSymbolMapper * | create () |
| Returns a newly created instance of a DtBaseSymbolMapper. | |
| static void | addReader (QString extension, DtMapReaderCreatorFcn fcn) |
| Static functions to add instances of map readers. | |
| static void | cleanupReaders () |
| Call to cleanup memory owned by myMapReaders member. | |
Protected Member Functions | |
| 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 | removeEntry (DtSymbolDescriptor *sd, DtSDList &list) |
| virtual void | invokePostCreateCallbacks (DtSymbol *, const DtModelData &) |
| virtual bool | addEntry (DtSymbolDescriptor *sd, DtSDList &list, bool replace) |
Protected Attributes | |
| DtSymbolCreators | myCreators |
| DtDrawerColl * | myDrawerCollection |
| DtSDList | myEntitySDList |
| DtSDList | myOrderedList |
| QHash< QString, DtSymbolDescriptor * > | myStringKeyedSDList |
| DtNullDrawer | myNullDrawer |
| DtTTSDrawer | myLabelDrawer |
| DtBaseMapper * | myMediaMapper |
| DtOrderedKeyList< DtObjectColor * > | myColors |
| QColor | myLabelColor |
| bool | myUsingAnimation |
| QSize | myIconSize |
| QHash< QString, QPixmap * > | myIconCache |
| QList< DtPostCreateCallbackInfo > | myPostCreateCallbacks |
| QString | myFilename |
| DtPtrQList< DtBaseSymbolMapper * > | myChainedMappers |
| bool | myDeleteChainedMappers |
| QString | myComment |
| int | myCacheSymbolOptions |
| DtBaseSymbolMapper * | myParent |
| If a parent exists, and, this symbol mapper does not have the symbol descriptor, check the parent. | |
Static Protected Attributes | |
| static DtMapReaders * | myMapReaders |
| static const QSize | theDefaultIconSize |
Private Member Functions | |
| DtBaseSymbolMapper (const DtBaseSymbolMapper &orig) | |
| DtBaseSymbolMapper & | operator= (const DtBaseSymbolMapper orig) |
Base class for all the symbol mappers override with your own mapper functions that know about DIS or HLA or otherwise.
This base class also doubles up as a null symbol mapper. - it always returns the null symbol on a create Symbol call
This class does not implement any default creators. Subclass from this class if you want to chain in your symbol mapper without dragging in other creators.
Subclass from one of the other symbol mappers to extend functionalit of that class and set the creator in the factory for the symbol mapper if you wish to replace that functionality (or add to it).
If you are creating the mapper as a plugin, subclass from this class, using the constructor that takes another symbol mapper (or call chainSymbolMapper() after you create yours)
| DtBaseSymbolMapper::DtBaseSymbolMapper | ( | ) |
| DtBaseSymbolMapper::DtBaseSymbolMapper | ( | DtBaseSymbolMapper * | ) |
Calls chainSymbolMapper to add this symbol mapper into a chain to call down to create a symbol if this mapper does not create it.
|
virtual |
|
private |
|
virtual |
Creates a symbol based on the specified type.
If a mapping does not exist, a NULL symbol is returned
Reimplemented in DtOverlaySymbolMapper, and DtFormationSymbolMapper.
|
virtual |
|
virtual |
|
virtual |
Initialize system to add creator functions.
Reimplemented in DtOverlaySymbolMapper, and DtSymbolMapper.
Loads a file, or multiple files if the file buffer has file separated by a ; (semi-colon).
The result of the file load will be the creation of symbol descriptors. The load will look at the file extension ad try to match to a known reader. If the reader exists, an instance of that reader will be created and that reader will be told to load the file and populate this mapper with the results.
If replace is true, it will remove any current instance and replace with the new one found
|
virtual |
Writes out contents to specified file.
Written out in order of keys in internal lists, so file that is stored might be in a different order than read in. Calls down to map reader to do saving
|
virtual |
Implements DtBaseMapper.
|
virtual |
|
virtual |
Uses straight string key rather than an entity identifier.
|
virtual |
|
virtual |
Fills the list will all the symbol descriptors in the entity keyed and string keyed lists.
This will return the contents of the ordered list
Implements DtBaseMapper.
|
virtual |
Returns a descriptor by looking in both trees.
It will look in the string dictionary before the entity dictionary
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Removes symbols from entity list found in supplied mapper.
|
virtual |
|
virtual |
Removes entry from all lists without deleting. To free memory, free descriptor.
|
virtual |
|
virtual |
|
virtual |
Does any post load cleanup of a new symbol map file.
|
virtual |
Will return appropriate icon for supplied model.
Reimplemented in DtOverlaySymbolMapper, and DtEntityEditorSymbolMapper.
|
virtual |
|
virtual |
|
virtual |
|
inline |
References myFilename.
|
virtual |
|
virtual |
Accessors to add/remove callbacks for model data types.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Adds a callback to be invoked any time a symbol is created.
Use the type to specify the type that you want the callback for or -1 for all types
|
virtual |
Removes the post create callback if all three items match.
|
virtual |
Removes all post update callbacks.
Only call if you really want to disable these callbacks as they cannot be replaced without executing the code that originally added them
|
virtual |
Given the information, creates what would be the main symbol of the particular type.
Reimplemented in DtFormationSymbolMapper.
|
static |
Returns a newly created instance of a DtBaseSymbolMapper.
Reimplemented in DtOverlaySymbolMapper, and DtSymbolMapper.
|
static |
Static functions to add instances of map readers.
|
static |
Call to cleanup memory owned by myMapReaders member.
Current called as part of application cleanup
|
virtual |
|
virtual |
Returns default color based on type of object.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Adds default colors for object types.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
If true, delete chained symbol mappers when destroying this object. Default is false.
|
virtual |
|
virtual |
Sets the options for how to signal to cache text objects as bitmap.
Currently only supports main symbol (font), name and label
|
inline |
References myCacheSymbolOptions.
|
virtual |
|
virtual |
If a symbol descriptor has the given name, then, create an object based on that mapper key.
Default implementation returns NULL
Reimplemented in DtOverlaySymbolMapper.
|
virtualslot |
|
virtualslot |
|
virtualslot |
|
signal |
|
protectedvirtual |
Called after symbol is created, used to apply additional modifications to symbol.
Reimplemented in DtOverlaySymbolMapper, and DtSymbolMapper.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
Referenced by filename().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by cacheSymbolOptions().
|
protected |
If a parent exists, and, this symbol mapper does not have the symbol descriptor, check the parent.
Will walk the chain of parents to find it