}
}
-
-//! Return toggle buttons on/off state
-LightApp_SimpleGuiStateMap LightApp_Dialog::getActiveState() const {
-
- LightApp_SimpleGuiStateMap state;
- ObjectMap::const_iterator anIt = myObjects.begin(),
- aLast = myObjects.end();
- for( ; anIt!=aLast; anIt++ )
- {
- QToolButton* btn = ( QToolButton* )anIt.data().myBtn;
- const bool isOn = btn->isOn();
- const int id = anIt.key();
- state[id] = isOn;
- }
-
- return state;
-}
-
-/*! Restores the state of toggle buttons -
-to activate the buttons, deactivated by deactivateAll()
-*/
-void LightApp_Dialog::restoreState(const LightApp_SimpleGuiStateMap& stateMap) {
- LightApp_SimpleGuiStateMap::const_iterator it = stateMap.begin(),
- aLast = stateMap.end();
- for (; it != aLast; it++) {
- int btnId = it.key();
- bool btnOn = (bool) it.data();
- if (btnOn) activateObject(btnId);
- }
-}
-
-
-
/*!
Passes to widget name, type and id of selected object
\param id - identificator of object selection widget
#pragma warning ( disable:4251 )
#endif
-
-
- typedef QMap<int, int> LightApp_SimpleGuiStateMap;
-
/*!
\class LightApp_Dialog
Base class for all LightApp dialogs.
typedef QValueList<int> TypesList;
typedef QMap<int,QStringList> SelectedObjects;
-
enum ObjectWg
{
Label = 0x00000001,
//! Set all object selection buttons to inactive state
void deactivateAll();
-
-
- //! Return toggle buttons on/off state
- LightApp_SimpleGuiStateMap getActiveState() const;
-
- //! Restores the state of toggle buttons -
- // to activate the buttons, deactivated by deactivateAll()
- void restoreState(const LightApp_SimpleGuiStateMap&);
-
signals:
//! selection in certain widget is changed
void selectionChanged ( int );