![]() |
![]() |
#include <Iguana/Studio/interface/IgQtFocusManager.h>
Public Slots | |
void | windowActivated (QWidget *widget) |
Public Member Functions | |
IgQtFocusManager (IgState *state, std::map< QWidget *, IgView * > *views) | |
Private Attributes | |
IgView * | m_oldView |
IgState * | m_state |
std::map< QWidget *, IgView * > * | m_views |
Definition at line 24 of file IgQtFocusManager.h.
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 }
IgView* IgQtFocusManager::m_oldView [private] |
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.