MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtIconAndTextureManager Class Reference

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 DtIconAndTextureManagergetInstance ()
 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< DtNodeIconFilemyUserIconFiles
 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 DtIconAndTextureManagertheInstance
 Instance of ourselves.

Private Member Functions

 DtIconAndTextureManager ()
 Constructor.
 DtIconAndTextureManager (const DtIconAndTextureManager &copy)
 Copy Constructor.
DtIconAndTextureManageroperator= (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.

Detailed Description

This singleton class manages the icons and textures.

Member Typedef Documentation

typedef std::map< MAKRti::DtString, QIcon* > DtIconAndTextureManager::DtFilenameIconMap
protected

Our Map of icons ( filename to QIcon )

typedef std::map< MAKRti::DtString, QPixmap* > DtIconAndTextureManager::DtFilenamePixmapMap
protected

Our Map of pixmaps ( filename to QPixmap )

typedef std::map< MAKRti::DtString, GLuint* > DtIconAndTextureManager::DtFilenameTextureMap
protected

Our Map of textures ( filename to texture handle )

typedef std::map< MAKRti::DtString, MAKRti::DtString > DtIconAndTextureManager::DtNodeIdFilenameMap
protected

Our maps of identifiers to icon/texture filename.

Constructor & Destructor Documentation

DtIconAndTextureManager::DtIconAndTextureManager ( )
private

Constructor.

DtIconAndTextureManager::DtIconAndTextureManager ( const DtIconAndTextureManager copy)
private

Copy Constructor.

virtual DtIconAndTextureManager::~DtIconAndTextureManager ( )
privatevirtual

Destructor.

Member Function Documentation

QIcon DtIconAndTextureManager::getIcon ( DtStandardIconId  id)

Get a standard icon as a QIcon.

QIcon DtIconAndTextureManager::getIcon ( const MAKRti::DtFilename &  filename)

Get an icon by filename as a QPixmap.

static DtIconAndTextureManager* DtIconAndTextureManager::getInstance ( )
static

Gets the instance.

const MAKRti::DtString& DtIconAndTextureManager::getNodeFilename ( const MAKRti::DtString &  processName,
const MAKRti::DtString &  federateType,
const MAKRti::DtString &  federateName 
) const
protected

Returns the image file name for the given node.

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.

GLuint DtIconAndTextureManager::getNodeTexture ( const MAKRti::DtString &  processName,
const MAKRti::DtString &  federateType,
const MAKRti::DtString &  federateName 
)

Get texture based on process name / federate type.

QPixmap DtIconAndTextureManager::getPixmap ( DtStandardIconId  id)

Get a standard icon as a QPixmap.

QPixmap DtIconAndTextureManager::getPixmap ( const MAKRti::DtFilename &  filename)

Get an icon by filename as a QPixmap.

GLuint DtIconAndTextureManager::getTexture ( DtStandardTextureId  id)

Get a standard texture.

void DtIconAndTextureManager::initialize ( )

Initialize everything.

void DtIconAndTextureManager::loadIcon ( const MAKRti::DtFilename &  filename,
QPixmap **  pm,
QIcon **  icon 
)
protected

Load an icon.

void DtIconAndTextureManager::loadNodeIcons ( )
protected

Loads all of the federate node icons.

void DtIconAndTextureManager::loadNodeTextures ( )
protected

Loads all of the federate node textures.

void DtIconAndTextureManager::loadStandardIcon ( const MAKRti::DtFilename &  filename,
DtStandardIconId  id 
)
protected

Loads a standard icon.

void DtIconAndTextureManager::loadStandardIcons ( )
protected

Loads all of the standard icons.

void DtIconAndTextureManager::loadStandardTexture ( const MAKRti::DtFilename &  filename,
DtStandardTextureId  id 
)
protected

Loads a standard texture.

void DtIconAndTextureManager::loadStandardTextures ( )
protected

Loads all of the standard textures.

GLuint* DtIconAndTextureManager::loadTexture ( const MAKRti::DtFilename &  filename)
protected

Load a texture.

DtIconAndTextureManager& DtIconAndTextureManager::operator= ( const DtIconAndTextureManager rhs)
private

operator=

void DtIconAndTextureManager::saveToFile ( )
protected

Saves the icon associations out to the configuration file.

void DtIconAndTextureManager::setNodeImageFile ( const MAKRti::DtString &  id,
DtFederateIdentifierType  associationType,
const MAKRti::DtFilename &  imageFile 
)

Sets a new image file for the given node.

Member Data Documentation

DtNodeIdFilenameMap DtIconAndTextureManager::myFederateNamesToIcons
protected

Our maps of identifiers to icon/texture filename.

DtNodeIdFilenameMap DtIconAndTextureManager::myFederateTypesToIcons
protected

Our maps of identifiers to icon/texture filename.

std::list< MAKRti::DtFilename > DtIconAndTextureManager::myImageDirs
protected

Directories in which to look for image files.

DtFilenameIconMap DtIconAndTextureManager::myMappedIcons
protected
DtFilenamePixmapMap DtIconAndTextureManager::myMappedPixmaps
protected
DtFilenameTextureMap DtIconAndTextureManager::myMappedTextures
protected
DtNodeIdFilenameMap DtIconAndTextureManager::myProcessNamesToIcons
protected

Our maps of identifiers to icon/texture filename.

std::vector< QIcon* > DtIconAndTextureManager::myStandardIcons
protected

Standard icons.

std::vector< QPixmap* > DtIconAndTextureManager::myStandardPixmaps
protected

Standard pixmaps.

std::vector< GLuint* > DtIconAndTextureManager::myStandardTextures
protected

Standard textures.

bool DtIconAndTextureManager::myTexturesInitialized
protected

Whether the textures have yet been initialized.

std::vector< DtNodeIconFile > DtIconAndTextureManager::myUserIconFiles
protected

Icon files specified by the user's xml file.

const MAKRti::DtFilename DtIconAndTextureManager::theIconXmlFile
static

The name of the xml file listing user defined icons.

const MAKRti::DtFilename DtIconAndTextureManager::theImagesDir
static

Default icon directories.

DtIconAndTextureManager* DtIconAndTextureManager::theInstance
staticprotected

Instance of ourselves.

const MAKRti::DtFilename DtIconAndTextureManager::theMakIconsDir
static

Default icon directories.

const MAKRti::DtFilename DtIconAndTextureManager::theStdBloomFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdDefaultFederateFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdDisconnectedFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdErrorFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdForwarderFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdLightweightFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdNotJoinedFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdRtiexecFile
static

Standard image filenames.

const MAKRti::DtFilename DtIconAndTextureManager::theStdWarnFile
static

Standard image filenames.


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

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)