2008/10/2 Chris Cannam <[EMAIL PROTECTED]>:
> On Thu, Oct 2, 2008 at 6:29 PM, Emanuel Rumpf <[EMAIL PROTECTED]> wrote:
>> I don't see, why we would need to manage menu state.
>> Doesn't qt handle this automatically? (selection, deselection)
>
> No. There are methods to set availability on actions, but there's no
> way to declare that a group of actions should be available only if a
> particular condition holds, which is what we need.
>
> Unless I'm missing something clever in Qt?
>
QActions can be grouped in QActionGroups or QMenus
Both, QActionGroups and QMenus have
the properties setVisible(bool) and setEnabled(bool)
I'm not sure if that's enough.
Maybe you're talking about checking a condition onMouseOver ?
Otherwise, the condition could be checked in the toggle slot.
example:
void conditionChanged( cond_name, menu_or_action ){
if( cond_name == "playing" ){
cond_true = seq.isPlaying();
menu_or_action.setEnabled( cond_true );
}else if ()....
}
Emanuel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel