OpenStudioCore:openstudio_lib
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Member Functions | Static Public Member Functions | List of all members
openstudio::IconLibrary Class Reference

#include <IconLibrary.hpp>

Public Member Functions

const QPixmap * findIcon (unsigned int val) const
 
const QPixmap * findMiniIcon (unsigned int val) const
 

Static Public Member Functions

static IconLibraryInstance ()
 If the class in not instantiated, this call will instantiate it. (So don't ever worry about it, just call Instance when you want to use the class) More...
 

Detailed Description

This class is a simple singleton that maps IddObjectType.value() to QPixmaps

Pretty straightforward. The class stores pointers, there is no real advantage to using pointers over by value semantics since Qt is doing internal reference counting in QPixMap anyway. Just check the pointer when you do a find operation on it, because it might return NULL.

Member Function Documentation

const QPixmap* openstudio::IconLibrary::findIcon ( unsigned int  val) const

gets an Icon

Parameters
valshould be an IddObjectType.value()
Returns
either a pointer to the Icon, or NULL if it isn't found
const QPixmap* openstudio::IconLibrary::findMiniIcon ( unsigned int  val) const

gets a MiniIcon

Parameters
valshould be an IddObjectType.value()
Returns
either a pointer to the MiniIcon, or NULL if it isn't found
static IconLibrary& openstudio::IconLibrary::Instance ( )
static

If the class in not instantiated, this call will instantiate it. (So don't ever worry about it, just call Instance when you want to use the class)