\param parent parent object
*/
LightApp_ModuleAction::ActionSet::ActionSet( QObject* parent )
-: QtxActionSet( parent )
+: QtxActionSet( parent )
{
}
In menu, the action is represented as a plain list of items, one per module.
- Only one module can be active at the moment. It can be set programmatically
+ Only one module can be active at the moment. It can be set programmatically
with setActiveModule() function. Use this method with empty string to turn
to the "neutral point". To get active module, use activeModule() function.
/*!
\brief Get active module.
- If there is no active module ("neutral point"), then the null string
+ If there is no active module ("neutral point"), then the null string
is returned.
\return active module name
w->insertAction( this, myCombo );
w->insertAction( this, myAdd );
w->insertAction( this, myRemove );
+ w->insertAction( this, myInfo );
w->insertAction( this, mySeparator );
w->insertAction( this, mySet );
update();
w->removeAction( myCombo );
w->removeAction( myAdd );
w->removeAction( myRemove );
+ w->removeAction( myInfo );
w->removeAction( mySeparator );
w->removeAction( mySet );
}
myCombo->setVisible( myMode & List );
myAdd->setVisible( myMode & AddRemove );
myRemove->setVisible( myMode & AddRemove );
+ myInfo->setVisible( myMode & All );
mySet->setVisible( myMode & Buttons );
}
int curId = mySet->moduleId( active() );
QList<QAction*> alist = mySet->actions();
cb->clear();
-
+
cb->addItem( icon(), text() );
cb->setId( 0, -1 );
/*!
\brief Called when action state is changed.
\internal
-
+
This slot is used to prevent making the parent action visible.
*/
void LightApp_ModuleAction::onChanged()
void LightApp_ModuleAction::onComboActivated( int id )
{
QApplication::postEvent( this, new ActivateEvent( QEvent::MaxUser, id ) );
-}
+}