[mythtv] Help with settings wizards

Matt Zimmerman mdz at debian.org
Thu Jun 5 00:36:16 EDT 2003


On Wed, Jun 04, 2003 at 11:20:17PM -0400, Joseph A. Caputo wrote:

> On Wednesday 04 June 2003 10:56 pm, Matt Zimmerman wrote:
> > The widgets always update the corresponding Setting whenever they are
> > changed, so you can connect the valueChanged signal to make things
> > happen when something in the UI is changed (look at how the triggered
> > stuff works).
> 
> True, but here's the problem I see:  there is no way to hide or
> desensitize a widget in the current architecture.  The
> TriggeredSettingsGroup spoofs the ability to hide a widget by allowing you
> to create an empty box (say a VerticalSettingsGroup) and raise/lower it
> w.r.t. the widget you want to hide.  The Settings class doesn't expose the
> underlying widget publicly, so there's no way to manipulate it.

There is no underlying widget; a Setting exists independent of any UI.
Widgets are created which are attached to a setting and can manipulate it.

If you want to connect widgets together in a certain way, you write a custom
group.  The group is responsible for creating widgets for its children, and
can connect them, lay them out, etc. as it wishes.

The triggered group was created to swap between the different codec settings
in the recording profile editor, and then was abused just a tiny bit to hide
settings that weren't applicable based on the value of another setting.  It
might be better to set them inactive (grayed out) in this case, but I was
lazy.  If you want to do it a different way, feel free.

> > However, I think that if you find you want to do something like this,
> > you're probably using the wrong widgets.  If you use UI elements which
> > fit the nature of the data, this kind of thing doesn't come up.
> 
> Apparently there aren't any widgets that fit the nature of this data.  I
> think I'll do the following:  two independent checkboxes; the Help text on
> the "Navigate Buttons" checkbox will have a note to the effect that this
> option is meaningless if "ShowWholeTree" is turned on.

Is it also the case than "ShowWholeTree" is meaningless if "Navigate
Buttons" is turned on?  That would be implied by your 'mutually exclusive'
description earlier.

-- 
 - mdz


More information about the mythtv-dev mailing list