CMS 3D CMS Logo

IgQtAppImageService Class Reference

#include <Iguana/Studio/interface/IgQtAppImageService.h>

Inheritance diagram for IgQtAppImageService:

IgStateElement

List of all members.

Public Member Functions

 IgQtAppImageService (IgState *state)
QPixmap * pixmapById (const int id)
void registerImage (const QPixmap *, const int id)
void registerImage (const QString &filename, const int id)
void registerImage (const char *data[], const int id)
 ~IgQtAppImageService (void)

Private Types

typedef std::map< int, QPixmap * > ImageMap

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (IgQtAppImageService)

Private Attributes

ImageMap m_images
IgStatem_state


Detailed Description

Definition at line 21 of file IgQtAppImageService.h.


Member Typedef Documentation

typedef std::map<int, QPixmap *> IgQtAppImageService::ImageMap [private]

Definition at line 40 of file IgQtAppImageService.h.


Constructor & Destructor Documentation

IgQtAppImageService::IgQtAppImageService ( IgState state  ) 

Definition at line 22 of file IgQtAppImageService.cc.

References ASSERT, and IgState::put().

00023     :m_state (state)
00024 {
00025     ASSERT (state);
00026     state->put (s_key, this);    
00027 }

IgQtAppImageService::~IgQtAppImageService ( void   ) 

Definition at line 29 of file IgQtAppImageService.cc.

References IgState::detach(), and m_state.

00030 {
00031     m_state->detach (s_key);    
00032 }


Member Function Documentation

IgQtAppImageService::IG_DECLARE_STATE_ELEMENT ( IgQtAppImageService   )  [private]

QPixmap * IgQtAppImageService::pixmapById ( const int  id  ) 

Definition at line 71 of file IgQtAppImageService.cc.

References m_images.

Referenced by IgSpareWindow::initToolBar(), IgRPhiWindow::initToolBar(), IgLegoWindow::initToolBar(), IgRZWindow::initToolBar(), Ig3DWindow::initToolBar(), and Ig3DBaseWindow::initToolBar().

00072 {
00073     return m_images[id];    
00074 }

void IgQtAppImageService::registerImage ( const QPixmap *  map,
const int  id 
)

Definition at line 47 of file IgQtAppImageService.cc.

References m_images.

00048 {
00049     QPixmap *pixmap = m_images[id];
00050     
00051     if (!pixmap)
00052     {   
00053         pixmap = new QPixmap (*map);
00054         m_images[id] = pixmap;  
00055     }
00056 }

void IgQtAppImageService::registerImage ( const QString &  filename,
const int  id 
)

Definition at line 59 of file IgQtAppImageService.cc.

References m_images.

00060 {
00061     QPixmap *pixmap = m_images[id];
00062     
00063     if (!pixmap)
00064     {   
00065         pixmap = new QPixmap (name);
00066         m_images[id] = pixmap;  
00067     }
00068 }

void IgQtAppImageService::registerImage ( const char *  data[],
const int  id 
)

Definition at line 35 of file IgQtAppImageService.cc.

References m_images.

Referenced by IgStudioDriver::setupMainWindow().

00036 {
00037     QPixmap *pixmap = m_images[id];
00038     
00039     if (!pixmap)
00040     {   
00041         pixmap = new QPixmap (data);
00042         m_images[id] = pixmap;  
00043     }
00044 }


Member Data Documentation

ImageMap IgQtAppImageService::m_images [private]

Definition at line 41 of file IgQtAppImageService.h.

Referenced by pixmapById(), and registerImage().

IgState* IgQtAppImageService::m_state [private]

Definition at line 39 of file IgQtAppImageService.h.

Referenced by ~IgQtAppImageService().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:26 2009 for CMSSW by  doxygen 1.5.4