[mythtv] How to create configuration settings
Jean-Yves Avenard
jyavenard at gmail.com
Sun May 10 17:28:38 UTC 2009
Hello
I'm trying to create an entry in the settings that look like this:
checkbox "text1" text2 list
all on one line, where text2/list will disappear if checkbox is unchecked.
---
So far, the best I've came up with is something like this:
class AC3UpmixSettings : public TriggeredConfigurationGroup
{
public:
AC3UpmixSettings(Setting *checkbox, ConfigurationGroup *group) :
TriggeredConfigurationGroup(false, false, false, false)
{
setTrigger(checkbox);
addTarget("1", group);
addTarget("0", new VerticalConfigurationGroup(false,false));
}
};
class AC3UpmixSettingsGroup : public HorizontalConfigurationGroup
{
public:
AC3UpmixSettingsGroup() :
HorizontalConfigurationGroup(false, false, false, false)
{
Setting* ac3upmix = AC3Upmix();
addChild(ac3upmix);
VerticalConfigurationGroup *agrp =
new VerticalConfigurationGroup(false, false, false, false);
agrp->addChild(SRCQuality());
AC3UpmixSettings *sub1 =
new AC3UpmixSettings(ac3upmix, agrp);
addChild(sub1);
}
};
This works fine with 0.21-release
But with trunk , it's unusable. Only a few horizontal pixels show up
for "text2/list"
What would be the best way to show items, all on one line ; with one
item depending on the status of another to be displayed.
Thanks in advance
Jean-Yves
More information about the mythtv-dev
mailing list