CMS 3D CMS Logo

IgQtFocusManager Class Reference

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

List of all members.

Public Slots

void windowActivated (QWidget *widget)

Public Member Functions

 IgQtFocusManager (IgState *state, std::map< QWidget *, IgView * > *views)

Private Attributes

IgViewm_oldView
IgStatem_state
std::map< QWidget *, IgView * > * m_views


Detailed Description

Definition at line 24 of file IgQtFocusManager.h.


Constructor & Destructor Documentation

IgQtFocusManager::IgQtFocusManager ( IgState state,
std::map< QWidget *, IgView * > *  views 
)

Definition at line 22 of file IgQtFocusManager.cc.

00023     : m_state (state),
00024       m_views (views),
00025       m_oldView (0)
00026 {    
00027 }


Member Function Documentation

void IgQtFocusManager::windowActivated ( QWidget *  widget  )  [slot]

Definition at line 30 of file IgQtFocusManager.cc.

References IgQtAppContextService::focusIn(), IgQtAppContextService::focusOut(), DBSPlugin::get(), m_oldView, and IgView::state().

00031 {    
00032     IgView *selectedView = (*m_views)[widget];
00033     IgState *newState = selectedView ? selectedView->state () : 0;
00034     IgState *oldState = m_oldView ? m_oldView->state () : 0;
00035     
00036 
00037     if (oldState)
00038     {
00039         IgQtAppContextService *contextService = IgQtAppContextService::get (oldState);
00040         contextService->focusOut ();
00041     }
00042     
00043     if (newState)
00044     {
00045         IgQtAppContextService *contextService = IgQtAppContextService::get (newState);
00046         contextService->focusIn ();    
00047     }
00048     
00049     m_oldView = selectedView;    
00050 }


Member Data Documentation

IgView* IgQtFocusManager::m_oldView [private]

Definition at line 39 of file IgQtFocusManager.h.

Referenced by windowActivated().

IgState* IgQtFocusManager::m_state [private]

Definition at line 37 of file IgQtFocusManager.h.

std::map<QWidget *, IgView *>* IgQtFocusManager::m_views [private]

Definition at line 38 of file IgQtFocusManager.h.


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