[mythtv] How to enable/disable entire config pages on the fly?

John Pullan john.pullan at gmail.com
Fri Dec 16 09:26:43 EST 2005

On 16/12/05, Geoffrey Hausheer <mythtv0368 at phracturedblue.com> wrote:
> I am trying to fix the RecordingProfiles to make more sense from a
> transcoding perspective.  What i need to do is to enable entire pages
> depending on how the checkboxes are set.
> For example on Page 1 there is a checkbox that says 'Resize Video ...'
> When this box is checked, I want Page 2 to be the page which allows
> setting the width/height.
> When the box is cleared, I want Page 2 to be the codec-setting page.
> I can use a slot to catch a state-change on the button (which works
> fine), but calling setVisible or SetEnabled on the second window has
> no impact.  I assume this is because it has already been drawn in
> memory (if I use setVisible during construction, it behaves as
> expected, disabling the window).
> The only config type that seems to change on the fly is the
> TriggeredConfigurationGroup which is actually a stack, where the
> relevant element is raised to the top.  I don't see how this could be
> easily applied to my situation.  Any ideas?
> I'd also like to be able to click a box and have an item on the
> current page be greyed out.  Again, i would this setEnabled would work
> for this, but I've had no luck, and seen no instances in the code
> which works this way.
> Is any of this doable?
> Thanks,
> .Geoff

You probably don't want to use setVisible. It's used in relation to having
Setting objects  around to manipulate the database but without the
assocaited UI. setEnabled should be the way to go,  although it may not be
fully implemented on all UI objects. (it's used quite a bit within the
videosource.* stuff and it was also used within the channel editor,
scanwizard  etc)

The way I got around this kind of thing before was by using  a
TriggeredConfigurationGroup (also see videosource.* and scanwizardhelpers.*)
AFIAK it's hard to do this neatly any other way.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20051216/b2dcaba5/attachment.htm

More information about the mythtv-dev mailing list