6 #ifndef nodeIconManager_H_
7 #define nodeIconManager_H_
9 #include <vlutil/vlFilename.h>
10 #include <QtGui/QPixmap>
11 #include <QtGui/QIcon>
12 #include <QtCore/QDir>
60 const MAKRti::DtString& federateType,
const MAKRti::DtString& federateName );
64 const MAKRti::DtString& federateType,
const MAKRti::DtString& federateName );
73 QPixmap
getPixmap(
const MAKRti::DtFilename& filename );
79 QIcon
getIcon(
const MAKRti::DtFilename& filename );
84 const MAKRti::DtFilename& imageFile );
107 void loadIcon(
const MAKRti::DtFilename& filename, QPixmap** pm, QIcon** icon );
110 GLuint*
loadTexture(
const MAKRti::DtFilename& filename );
113 const MAKRti::DtString&
getNodeFilename(
const MAKRti::DtString& processName,
114 const MAKRti::DtString& federateType,
const MAKRti::DtString& federateName )
const;
DtIconAndTextureManager()
Constructor.
void loadStandardIcons()
Loads all of the standard icons.
Definition: iconAndTextureManager.h:44
Definition: iconAndTextureManager.h:43
Definition: iconAndTextureManager.h:37
static const MAKRti::DtFilename theMakIconsDir
Default icon directories.
Definition: iconAndTextureManager.h:180
static const MAKRti::DtFilename theStdRtiexecFile
Standard image filenames.
Definition: iconAndTextureManager.h:195
void loadStandardTexture(const MAKRti::DtFilename &filename, DtStandardTextureId id)
Loads a standard texture.
std::vector< QPixmap * > myStandardPixmaps
Standard pixmaps.
Definition: iconAndTextureManager.h:145
DtIconAndTextureManager & operator=(const DtIconAndTextureManager &rhs)
operator=
static DtIconAndTextureManager * getInstance()
Gets the instance.
std::list< MAKRti::DtFilename > myImageDirs
Directories in which to look for image files.
Definition: iconAndTextureManager.h:174
Definition: iconAndTextureManager.h:40
void setNodeImageFile(const MAKRti::DtString &id, DtFederateIdentifierType associationType, const MAKRti::DtFilename &imageFile)
Sets a new image file for the given node.
std::vector< DtNodeIconFile > myUserIconFiles
Icon files specified by the user's xml file.
Definition: iconAndTextureManager.h:151
Definition: iconAndTextureManager.h:28
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.
std::vector< QIcon * > myStandardIcons
Standard icons.
Definition: iconAndTextureManager.h:148
DtNodeIdFilenameMap myFederateNamesToIcons
Our maps of identifiers to icon/texture filename.
Definition: iconAndTextureManager.h:168
static const MAKRti::DtFilename theStdNotJoinedFile
Standard image filenames.
Definition: iconAndTextureManager.h:191
static const MAKRti::DtFilename theIconXmlFile
The name of the xml file listing user defined icons.
Definition: iconAndTextureManager.h:184
void loadNodeTextures()
Loads all of the federate node textures.
GLuint * loadTexture(const MAKRti::DtFilename &filename)
Load a texture.
Definition: iconAndTextureManager.h:24
DtStandardIconId
Identifiers for standard icons.
Definition: iconAndTextureManager.h:34
void initialize()
Initialize everything.
virtual ~DtIconAndTextureManager()
Destructor.
DtFilenameTextureMap myMappedTextures
Definition: iconAndTextureManager.h:155
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.
Definition: iconAndTextureManager.h:30
bool myTexturesInitialized
Whether the textures have yet been initialized.
Definition: iconAndTextureManager.h:136
GLuint getTexture(DtStandardTextureId id)
Get a standard texture.
Definition: iconAndTextureManager.h:27
Definition: iconAndTextureManager.h:21
static const MAKRti::DtFilename theStdWarnFile
Standard image filenames.
Definition: iconAndTextureManager.h:188
static DtIconAndTextureManager * theInstance
Instance of ourselves.
Definition: iconAndTextureManager.h:139
Definition: iconAndTextureManager.h:39
Definition: iconAndTextureManager.h:23
std::map< MAKRti::DtString, QIcon * > DtFilenameIconMap
Our Map of icons ( filename to QIcon )
Definition: iconAndTextureManager.h:162
static const MAKRti::DtFilename theStdDefaultFederateFile
Standard image filenames.
Definition: iconAndTextureManager.h:193
Definition: iconAndTextureManager.h:41
DtNodeIdFilenameMap myProcessNamesToIcons
Our maps of identifiers to icon/texture filename.
Definition: iconAndTextureManager.h:170
DtFilenameIconMap myMappedIcons
Definition: iconAndTextureManager.h:163
Definition: iconAndTextureManager.h:45
std::map< MAKRti::DtString, GLuint * > DtFilenameTextureMap
Our Map of textures ( filename to texture handle )
Definition: iconAndTextureManager.h:154
static const MAKRti::DtFilename theStdBloomFile
Standard image filenames.
Definition: iconAndTextureManager.h:192
void saveToFile()
Saves the icon associations out to the configuration file.
GLuint getNodeTexture(const MAKRti::DtString &processName, const MAKRti::DtString &federateType, const MAKRti::DtString &federateName)
Get texture based on process name / federate type.
static const MAKRti::DtFilename theStdErrorFile
Standard image filenames.
Definition: iconAndTextureManager.h:189
void loadStandardIcon(const MAKRti::DtFilename &filename, DtStandardIconId id)
Loads a standard icon.
DtFilenamePixmapMap myMappedPixmaps
Definition: iconAndTextureManager.h:159
Definition: iconAndTextureManager.h:36
DtNodeIdFilenameMap myFederateTypesToIcons
Our maps of identifiers to icon/texture filename.
Definition: iconAndTextureManager.h:169
std::map< MAKRti::DtString, QPixmap * > DtFilenamePixmapMap
Our Map of pixmaps ( filename to QPixmap )
Definition: iconAndTextureManager.h:158
static const MAKRti::DtFilename theStdLightweightFile
Standard image filenames.
Definition: iconAndTextureManager.h:196
DtStandardTextureId
Identifiers for standard textures.
Definition: iconAndTextureManager.h:19
QIcon getIcon(DtStandardIconId id)
Get a standard icon as a QIcon.
DtFederateIdentifierType
Definition: assistantEnums.h:10
Definition: iconAndTextureManager.h:29
static const MAKRti::DtFilename theStdForwarderFile
Standard image filenames.
Definition: iconAndTextureManager.h:194
This singleton class manages the icons and textures.
Definition: iconAndTextureManager.h:49
Definition: iconAndTextureManager.h:22
static const MAKRti::DtFilename theImagesDir
Default icon directories.
Definition: iconAndTextureManager.h:179
Definition: iconAndTextureManager.h:25
std::vector< GLuint * > myStandardTextures
Standard textures.
Definition: iconAndTextureManager.h:142
static const MAKRti::DtFilename theStdDisconnectedFile
Standard image filenames.
Definition: iconAndTextureManager.h:190
Definition: iconAndTextureManager.h:38
std::map< MAKRti::DtString, MAKRti::DtString > DtNodeIdFilenameMap
Our maps of identifiers to icon/texture filename.
Definition: iconAndTextureManager.h:167
void loadIcon(const MAKRti::DtFilename &filename, QPixmap **pm, QIcon **icon)
Load an icon.
QPixmap getPixmap(DtStandardIconId id)
Get a standard icon as a QPixmap.
Definition: iconAndTextureManager.h:26
void loadStandardTextures()
Loads all of the standard textures.
Definition: iconAndTextureManager.h:42
void loadNodeIcons()
Loads all of the federate node icons.