Mantid
|
Defines a mapping between a workspace ID and a pixmap to use for an icon. More...
#include <WorkspaceIcons.h>
Public Member Functions | |
QPixmap | getIcon (const std::string &workspaceID) const |
Returns an icon for the given ID. More... | |
std::string | getIconID (const std::string &workspaceID) const |
Returns an icon ID for the given workspace ID. More... | |
WorkspaceIcons () | |
Default constructor. More... | |
Private Member Functions | |
void | initInternalLookup () |
Defines the mapping between ID & pixmap name. More... | |
Private Attributes | |
QMap< std::string, std::string > | m_idToPixmapName |
Internal map instance. More... | |
Defines a mapping between a workspace ID and a pixmap to use for an icon.
Definition at line 19 of file WorkspaceIcons.h.
MantidQt::API::WorkspaceIcons::WorkspaceIcons | ( | ) |
Default constructor.
Definition at line 20 of file WorkspaceIcons.cpp.
References initInternalLookup().
QPixmap MantidQt::API::WorkspaceIcons::getIcon | ( | const std::string & | workspaceID | ) | const |
Returns an icon for the given ID.
workspaceID | A string giving the ID for a workspace |
std::runtime_error | if no icon can be found |
Definition at line 26 of file WorkspaceIcons.cpp.
References MantidQt::API::getQPixmap(), and m_idToPixmapName.
std::string MantidQt::API::WorkspaceIcons::getIconID | ( | const std::string & | workspaceID | ) | const |
Returns an icon ID for the given workspace ID.
Get the string ID representing the icon.
workspaceID | :: a string representing the ID of the workspace |
Definition at line 40 of file WorkspaceIcons.cpp.
References m_idToPixmapName.
Referenced by MantidQt::MantidWidgets::ProjectSaveModel::makeWorkspaceInfoObject().
|
private |
Defines the mapping between ID & pixmap name.
Definition at line 51 of file WorkspaceIcons.cpp.
References m_idToPixmapName.
Referenced by WorkspaceIcons().
|
private |
Internal map instance.
Definition at line 33 of file WorkspaceIcons.h.
Referenced by getIcon(), getIconID(), and initInternalLookup().