![]() |
MAK RTIspy API Documentation for HLA 1516
|
This singleton class manages the icons and textures. More...
Collaboration diagram for DtIconAndTextureManager:Public Member Functions | |
| void | initialize () |
| Initialize everything. | |
| GLuint | getNodeTexture (const MAKRti::DtString &processName, const MAKRti::DtString &federateType, const MAKRti::DtString &federateName) |
| Get texture based on process name / federate type. | |
| QPixmap | getNodePixmap (const MAKRti::DtString &processName, const MAKRti::DtString &federateType, const MAKRti::DtString &federateName) |
| Get the icon (as a QPixmap) based on process name / federate type. | |
| GLuint | getTexture (DtStandardTextureId id) |
| Get a standard texture. | |
| QPixmap | getPixmap (DtStandardIconId id) |
| Get a standard icon as a QPixmap. | |
| QPixmap | getPixmap (const MAKRti::DtFilename &filename) |
| Get an icon by filename as a QPixmap. | |
| QIcon | getIcon (DtStandardIconId id) |
| Get a standard icon as a QIcon. | |
| QIcon | getIcon (const MAKRti::DtFilename &filename) |
| Get an icon by filename as a QPixmap. | |
| void | setNodeImageFile (const MAKRti::DtString &id, DtFederateIdentifierType associationType, const MAKRti::DtFilename &imageFile) |
| Sets a new image file for the given node. | |
Static Public Member Functions | |
| static DtIconAndTextureManager * | getInstance () |
| Gets the instance. | |
Static Public Attributes | |
| static const MAKRti::DtFilename | theIconXmlFile |
| The name of the xml file listing user defined icons. | |
| static const MAKRti::DtFilename | theImagesDir |
| Default icon directories. | |
| static const MAKRti::DtFilename | theMakIconsDir |
| Default icon directories. | |
| static const MAKRti::DtFilename | theStdWarnFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdErrorFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdDisconnectedFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdNotJoinedFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdBloomFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdDefaultFederateFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdForwarderFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdRtiexecFile |
| Standard image filenames. | |
| static const MAKRti::DtFilename | theStdLightweightFile |
| Standard image filenames. | |
Protected Types | |
| typedef std::map < MAKRti::DtString, GLuint * > | DtFilenameTextureMap |
| Our Map of textures ( filename to texture handle ) | |
| typedef std::map < MAKRti::DtString, QPixmap * > | DtFilenamePixmapMap |
| Our Map of pixmaps ( filename to QPixmap ) | |
| typedef std::map < MAKRti::DtString, QIcon * > | DtFilenameIconMap |
| Our Map of icons ( filename to QIcon ) | |
Protected Member Functions | |
| void | loadStandardIcons () |
| Loads all of the standard icons. | |
| void | loadNodeIcons () |
| Loads all of the federate node icons. | |
| void | loadStandardTextures () |
| Loads all of the standard textures. | |
| void | loadNodeTextures () |
| Loads all of the federate node textures. | |
| void | loadStandardIcon (const MAKRti::DtFilename &filename, DtStandardIconId id) |
| Loads a standard icon. | |
| void | loadStandardTexture (const MAKRti::DtFilename &filename, DtStandardTextureId id) |
| Loads a standard texture. | |
| void | loadIcon (const MAKRti::DtFilename &filename, QPixmap **pm, QIcon **icon) |
| Load an icon. | |
| GLuint * | loadTexture (const MAKRti::DtFilename &filename) |
| Load a texture. | |
| const MAKRti::DtString & | getNodeFilename (const MAKRti::DtString &processName, const MAKRti::DtString &federateType, const MAKRti::DtString &federateName) const |
| Returns the image file name for the given node. | |
| void | saveToFile () |
| Saves the icon associations out to the configuration file. | |
Protected Attributes | |
| bool | myTexturesInitialized |
| Whether the textures have yet been initialized. | |
| std::vector< GLuint * > | myStandardTextures |
| Standard textures. | |
| std::vector< QPixmap * > | myStandardPixmaps |
| Standard pixmaps. | |
| std::vector< QIcon * > | myStandardIcons |
| Standard icons. | |
| std::vector< DtNodeIconFile > | myUserIconFiles |
| Icon files specified by the user's xml file. | |
| DtFilenameTextureMap | myMappedTextures |
| DtFilenamePixmapMap | myMappedPixmaps |
| DtFilenameIconMap | myMappedIcons |
| std::list< MAKRti::DtFilename > | myImageDirs |
| Directories in which to look for image files. | |
Static Protected Attributes | |
| static DtIconAndTextureManager * | theInstance = NULL |
| Instance of ourselves. | |
Private Member Functions | |
| DtIconAndTextureManager () | |
| Constructor. | |
| DtIconAndTextureManager (const DtIconAndTextureManager ©) | |
| Copy Constructor. | |
| DtIconAndTextureManager & | operator= (const DtIconAndTextureManager &rhs) |
| operator= | |
| virtual | ~DtIconAndTextureManager () |
| Destructor. | |
| typedef std::map < MAKRti::DtString, MAKRti::DtString > | DtNodeIdFilenameMap |
| Our maps of identifiers to icon/texture filename. | |
| DtNodeIdFilenameMap | myFederateNamesToIcons |
| Our maps of identifiers to icon/texture filename. | |
| DtNodeIdFilenameMap | myFederateTypesToIcons |
| Our maps of identifiers to icon/texture filename. | |
| DtNodeIdFilenameMap | myProcessNamesToIcons |
| Our maps of identifiers to icon/texture filename. | |
This singleton class manages the icons and textures.
|
protected |
Our Map of icons ( filename to QIcon )
|
protected |
Our Map of pixmaps ( filename to QPixmap )
|
protected |
Our Map of textures ( filename to texture handle )
|
protected |
Our maps of identifiers to icon/texture filename.
|
private |
Constructor.
Referenced by getInstance().
|
private |
Copy Constructor.
|
privatevirtual |
Destructor.
References myMappedIcons, myMappedPixmaps, myMappedTextures, and NULL.
| QIcon DtIconAndTextureManager::getIcon | ( | DtStandardIconId | id | ) |
Get a standard icon as a QIcon.
References DtNumStandardIcons, and myStandardIcons.
Referenced by DtAssistantLicenseQueryMgr::configWidget(), DtAssistantConnQueryMgr::configWidget(), DtAssistantConnConfigWidget::DtAssistantConnConfigWidget(), DtAssistantConnQueryWidget::DtAssistantConnQueryWidget(), DtAssistantMgr::DtAssistantMgr(), DtAssistantNotifyDialog::DtAssistantNotifyDialog(), DtConsoleWidget::DtConsoleWidget(), DtExecConsoleWidget::DtExecConsoleWidget(), DtFederateTree::DtFederateTree(), DtFomStatisticsDialog::DtFomStatisticsDialog(), DtLatencyTestDialog::DtLatencyTestDialog(), DtSyncPtDialog::DtSyncPtDialog(), DtConfigurablePropertyEditView::init(), DtAssistantPreferencesViewMgr::initialize(), DtRidWidget::refreshValues(), and DtFederationsViewDialog::setupMenus().
| QIcon DtIconAndTextureManager::getIcon | ( | const MAKRti::DtFilename & | filename | ) |
Get an icon by filename as a QPixmap.
References loadIcon().
|
static |
Gets the instance.
References DtIconAndTextureManager(), initialize(), NULL, and theInstance.
Referenced by DtAssistantLicenseQueryMgr::configWidget(), DtAssistantConnQueryMgr::configWidget(), DtNetworkMapWidget::drawForwarderNodes(), DtNetworkMapWidget::drawNodes(), DtNetworkMapWidget::drawWarning(), DtAssistantConnConfigWidget::DtAssistantConnConfigWidget(), DtAssistantConnQueryWidget::DtAssistantConnQueryWidget(), DtAssistantMgr::DtAssistantMgr(), DtAssistantNotifyDialog::DtAssistantNotifyDialog(), DtAssistantTrayIconMgr::DtAssistantTrayIconMgr(), DtConsoleWidget::DtConsoleWidget(), DtExecConsoleWidget::DtExecConsoleWidget(), DtFederateIconChooserDlg::DtFederateIconChooserDlg(), DtFederateTree::DtFederateTree(), DtFomStatisticsDialog::DtFomStatisticsDialog(), DtLatencyTestDialog::DtLatencyTestDialog(), DtSyncPtDialog::DtSyncPtDialog(), DtTreesAndGraphWidget::DtTreesAndGraphWidget(), DtConfigurablePropertyEditView::init(), DtAssistantPreferencesViewMgr::initialize(), DtRidWidget::refreshValues(), DtFederationsViewDialog::setFederateIdentifierType(), DtFederationsViewDialog::setupMenus(), DtFederationsViewDialog::showDeadFederateInfo(), DtFederationsViewDialog::showFederateInfo(), DtAssistantFederateViewMgr::showFederateStatsDialog(), DtFederationsViewDialog::showFederationInfo(), DtAssistantFomViewMgr::showFomDialog(), DtFederationsViewDialog::showForwarderInfo(), DtFederationsViewDialog::showLightweightInfo(), DtFederationsViewDialog::showPeerForwarderInfo(), DtFederationsViewDialog::showRtiexecInfo(), and DtFederationsViewDialog::updateFederateIcon().
|
protected |
Returns the image file name for the given node.
References myFederateNamesToIcons, myFederateTypesToIcons, and myProcessNamesToIcons.
Referenced by getNodePixmap(), and getNodeTexture().
| QPixmap DtIconAndTextureManager::getNodePixmap | ( | const MAKRti::DtString & | processName, |
| const MAKRti::DtString & | federateType, | ||
| const MAKRti::DtString & | federateName | ||
| ) |
Get the icon (as a QPixmap) based on process name / federate type.
References DtDefaultFederateIcon, DtForwarderIcon, DtLightweightIcon, DtRtiexecIcon, getNodeFilename(), getPixmap(), and myMappedPixmaps.
| GLuint DtIconAndTextureManager::getNodeTexture | ( | const MAKRti::DtString & | processName, |
| const MAKRti::DtString & | federateType, | ||
| const MAKRti::DtString & | federateName | ||
| ) |
Get texture based on process name / federate type.
References DtDefaultFederateTexture, DtForwarderTexture, DtLightweightTexture, DtRtiexecTexture, getNodeFilename(), getTexture(), loadNodeTextures(), loadStandardTextures(), myMappedTextures, and myTexturesInitialized.
| QPixmap DtIconAndTextureManager::getPixmap | ( | DtStandardIconId | id | ) |
Get a standard icon as a QPixmap.
References DtNumStandardIcons, and myStandardPixmaps.
Referenced by DtAssistantNotifyDialog::DtAssistantNotifyDialog(), getNodePixmap(), DtFederationsViewDialog::showFederationInfo(), and DtFederationsViewDialog::showPeerForwarderInfo().
| QPixmap DtIconAndTextureManager::getPixmap | ( | const MAKRti::DtFilename & | filename | ) |
Get an icon by filename as a QPixmap.
References loadIcon().
| GLuint DtIconAndTextureManager::getTexture | ( | DtStandardTextureId | id | ) |
Get a standard texture.
References DtNumStandardTextures, loadNodeTextures(), loadStandardTextures(), myStandardTextures, and myTexturesInitialized.
Referenced by getNodeTexture().
| void DtIconAndTextureManager::initialize | ( | ) |
Initialize everything.
References DtNodeIconXmlReader::getNodeIconFiles(), loadNodeIcons(), loadStandardIcons(), myImageDirs, myUserIconFiles, theIconXmlFile, theImagesDir, and theMakIconsDir.
Referenced by getInstance().
|
protected |
Load an icon.
References myImageDirs, myMappedIcons, and myMappedPixmaps.
Referenced by getIcon(), getPixmap(), loadNodeIcons(), loadStandardIcon(), loadTexture(), and setNodeImageFile().
|
protected |
Loads all of the federate node icons.
References DtIdentifyByFederateName, DtIdentifyByFederateType, DtIdentifyByProcessName, loadIcon(), myFederateNamesToIcons, myFederateTypesToIcons, myProcessNamesToIcons, and myUserIconFiles.
Referenced by initialize().
|
protected |
Loads all of the federate node textures.
References loadTexture(), and myUserIconFiles.
Referenced by getNodeTexture(), and getTexture().
|
protected |
Loads a standard icon.
References loadIcon(), myStandardIcons, and myStandardPixmaps.
Referenced by loadStandardIcons().
|
protected |
Loads all of the standard icons.
References DtBloomIcon, DtDefaultFederateIcon, DtDisconnectedIcon, DtErrorIcon, DtForwarderIcon, DtLightweightIcon, DtNotJoinedIcon, DtNumStandardIcons, DtRtiexecIcon, DtWarningIcon, loadStandardIcon(), myStandardIcons, myStandardPixmaps, theStdBloomFile, theStdDefaultFederateFile, theStdErrorFile, theStdForwarderFile, theStdLightweightFile, theStdNotJoinedFile, theStdRtiexecFile, and theStdWarnFile.
Referenced by initialize().
|
protected |
Loads a standard texture.
References loadTexture(), and myStandardTextures.
Referenced by loadStandardTextures().
|
protected |
Loads all of the standard textures.
References DtBloomTexture, DtDefaultFederateTexture, DtDisconnectedTexture, DtErrorTexture, DtForwarderTexture, DtLightweightTexture, DtNotJoinedTexture, DtNumStandardTextures, DtRtiexecTexture, DtWarningTexture, loadStandardTexture(), myStandardTextures, theStdBloomFile, theStdDefaultFederateFile, theStdErrorFile, theStdForwarderFile, theStdLightweightFile, theStdNotJoinedFile, theStdRtiexecFile, and theStdWarnFile.
Referenced by getNodeTexture(), and getTexture().
|
protected |
Load a texture.
References loadIcon(), and myMappedTextures.
Referenced by loadNodeTextures(), loadStandardTexture(), and setNodeImageFile().
|
private |
operator=
|
protected |
Saves the icon associations out to the configuration file.
References DtIdentifyByFederateName, DtIdentifyByFederateType, DtIdentifyByProcessName, DtNodeIconFile::fedIdType, DtNodeIconFile::imageFile, myFederateNamesToIcons, myFederateTypesToIcons, myProcessNamesToIcons, myUserIconFiles, DtNodeIconFile::nodeId, DtNodeIconXmlReader::setNodeIconFiles(), and theIconXmlFile.
Referenced by setNodeImageFile().
| void DtIconAndTextureManager::setNodeImageFile | ( | const MAKRti::DtString & | id, |
| DtFederateIdentifierType | associationType, | ||
| const MAKRti::DtFilename & | imageFile | ||
| ) |
Sets a new image file for the given node.
References DtIdentifyByFederateName, DtIdentifyByFederateType, DtIdentifyByProcessName, loadIcon(), loadTexture(), myFederateNamesToIcons, myFederateTypesToIcons, myProcessNamesToIcons, and saveToFile().
Referenced by DtFederationsViewDialog::updateFederateIcon().
|
protected |
Our maps of identifiers to icon/texture filename.
Referenced by getNodeFilename(), loadNodeIcons(), saveToFile(), and setNodeImageFile().
|
protected |
Our maps of identifiers to icon/texture filename.
Referenced by getNodeFilename(), loadNodeIcons(), saveToFile(), and setNodeImageFile().
|
protected |
Directories in which to look for image files.
Referenced by initialize(), and loadIcon().
|
protected |
Referenced by loadIcon(), and ~DtIconAndTextureManager().
|
protected |
Referenced by getNodePixmap(), loadIcon(), and ~DtIconAndTextureManager().
|
protected |
Referenced by getNodeTexture(), loadTexture(), and ~DtIconAndTextureManager().
|
protected |
Our maps of identifiers to icon/texture filename.
Referenced by getNodeFilename(), loadNodeIcons(), saveToFile(), and setNodeImageFile().
|
protected |
Standard icons.
Referenced by getIcon(), loadStandardIcon(), and loadStandardIcons().
|
protected |
Standard pixmaps.
Referenced by getPixmap(), loadStandardIcon(), and loadStandardIcons().
|
protected |
Standard textures.
Referenced by getTexture(), loadStandardTexture(), and loadStandardTextures().
|
protected |
Whether the textures have yet been initialized.
Referenced by getNodeTexture(), and getTexture().
|
protected |
Icon files specified by the user's xml file.
Referenced by initialize(), loadNodeIcons(), loadNodeTextures(), and saveToFile().
|
static |
The name of the xml file listing user defined icons.
Referenced by initialize(), and saveToFile().
|
static |
Default icon directories.
Referenced by initialize().
|
staticprotected |
Instance of ourselves.
Referenced by getInstance().
|
static |
Default icon directories.
Referenced by initialize().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().
|
static |
Standard image filenames.
Referenced by loadStandardIcons(), and loadStandardTextures().