[mythtv] UIManagedTreeListType
Robert Currey
avalonforest at centurytel.net
Sat Nov 29 19:53:18 EST 2003
Hi,
I'm working on a myth module, and having some trouble with using
UIManagedTreeListType.
I figure I'm either not setting up my UIManagedTreeList correctly, or my
*-ui.xml is not right (or both). Much of this has been taken from mythmusic
(as I can figure where stuff is being done).
I'm not getting the border around the tree list to draw properly (easiest to
just link a pic ... http://avalonforest.net/misc/screen.jpg).
Here's the relevant code
Tivo::Tivo(MythMainWindow *parent, const char *name)
: MythThemedDialog(parent, "tivo_browse", "tivo-", name)
{
QString tivo_address = gContext->GetSetting("TivoAddress");
QString another_tivo_address = "192.168.100.245";
browser_tree = getUIManagedTreeListType("tivotreelist");
// connect(browser_tree, SIGNAL(nodeSelected(int, IntVector*)), this,
SLOT(handleTreeListSignals(int, IntVector*)));
tivo_tree = new GenericTree(tr("TiVo's"), false);
GenericTree *sub_node1 = tivo_tree->addNode(tivo_address, true);
sub_node1->addNode("progam1 on a tivo", 1, true);
sub_node1->addNode("progam2 on a tivo", 2, false);
sub_node1->addNode("progam3 on a tivo", 3, false);
GenericTree *sub_node2 = tivo_tree->addNode(another_tivo_address,
false);
sub_node2->addNode("progam1 on another tivo", 1, true);
sub_node2->addNode("progam2 on another tivo", 2, false);
sub_node2->addNode("progam3 on another tivo", 3, false);
browser_tree->assignTreeData(tivo_tree);
browser_tree->showWholeTree(true);
browser_tree->refresh();
}
And the tivo-ui.xml
<mythuitheme>
<window name="tivo_browse">
<font name="active" face="Arial">
<color>#ffffff</color>
<size>16</size>
<bold>yes</bold>
</font>
<font name="inactive" face="Arial">
<color>#9999cc</color>
<size>16</size>
<bold>yes</bold>
</font>
<font name="selected" face="Arial">
<color>#ffff00</color>
<size>16</size>
<bold>yes</bold>
</font>
<container name="background">
<image name="filler" draworder="0" fleximage="yes">
<filename>background.png</filename>
<position>0,0</position>
</image>
<image name="titlelines" draworder="0" fleximage="no">
<filename>trans-titles.png</filename>
<position>0,0</position>
</image>
</container>
<container name="tivo">
<area>0,10,800,310</area>
<managedtreelist name="tivotreelist" draworder="1" bins="2">
<area>40,10,720,270</area>
<image function="selectionbar"
filename="selectionbar.png"></image>
<image function="uparrow"
filename="mm_up_arrow.png"></image>
<image function="downarrow"
filename="mm_down_arrow.png"></image>
<image function="leftarrow"
filename="mm_left_arrow.png"></image>
<image function="rightarrow"
filename="mm_right_arrow.png"></image>
<bin number="1">
<area>30,16,190,250</area>
<fcnfont name="active" function="active"></fcnfont>
<fcnfont name="inactive" function="inactive"></fcnfont>
<fcnfont name="selected" function="selected"></fcnfont>
</bin>
<bin number="2">
<area>235,10,535,270</area>
<fcnfont name="active" function="active"></fcnfont>
<fcnfont name="selected" function="selected"></fcnfont>
<fcnfont name="inactive" function="inactive"></fcnfont>
</bin>
</managedtreelist>
</container>
</window>
</mythuitheme>
Help, pointers, doc links all welcome.
Thanks
Rob
P.S. not hard to guess where I'm going ... it involves tystudio/tyeditor
(and hopefully the functionality that cwingert has in his)
More information about the mythtv-dev
mailing list