Author: aschnell Date: Thu Mar 12 18:40:39 2009 New Revision: 56103 URL: http://svn.opensuse.org/viewcvs/yast?rev=56103&view=rev Log: - use extension.gv for graphviz files - extended example to test loading of different graphs Added: trunk/ycp-ui-bindings/examples/graph1.gv (contents, props changed) - copied, changed from r56102, trunk/ycp-ui-bindings/examples/graph.dot trunk/ycp-ui-bindings/examples/graph2.gv trunk/ycp-ui-bindings/examples/graph3.gv Removed: trunk/ycp-ui-bindings/examples/graph.dot Modified: trunk/ycp-ui-bindings/examples/Graph1.ycp trunk/ycp-ui-bindings/examples/Graph2.ycp Modified: trunk/ycp-ui-bindings/examples/Graph1.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/Graph1.ycp?rev=56103&r1=56102&r2=56103&view=diff ============================================================================== --- trunk/ycp-ui-bindings/examples/Graph1.ycp (original) +++ trunk/ycp-ui-bindings/examples/Graph1.ycp Thu Mar 12 18:40:39 2009 @@ -16,14 +16,15 @@ UI::OpenDialog( `VBox( `HSpacing(60), - `Graph(`id(`graph), "graph.dot", "dot"), + `Graph(`id(`graph), "graph1.gv", "dot"), `PushButton(`id(`close), `opt(`default), "&Close") ) ); while (true) { - any widget = UI::UserInput(); + symbol widget = (symbol) UI::UserInput(); + if (widget == `close || widget == `cancel) break; } Modified: trunk/ycp-ui-bindings/examples/Graph2.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/Graph2.ycp?rev=56103&r1=56102&r2=56103&view=diff ============================================================================== --- trunk/ycp-ui-bindings/examples/Graph2.ycp (original) +++ trunk/ycp-ui-bindings/examples/Graph2.ycp Thu Mar 12 18:40:39 2009 @@ -16,14 +16,35 @@ UI::OpenDialog( `VBox( `HSpacing(60), - `Graph(`id(`graph), "graph.dot", "neato"), - `PushButton(`id(`close), `opt(`default), "&Close") + `Graph(`id(`graph), "graph1.gv", "dot"), + `HBox( + `PushButton(`id(`load1), `opt(`default), "Load 1"), + `PushButton(`id(`load2), `opt(`default), "Load 2"), + `PushButton(`id(`load3), `opt(`default), "Load 3"), + `PushButton(`id(`close), `opt(`default), "&Close") + ) ) ); while (true) { - any widget = UI::UserInput(); + symbol widget = (symbol) UI::UserInput(); + + switch (widget) + { + case `load1: + UI::ChangeWidget(`id(`graph), `Filename, "graph1.gv"); + break; + + case `load2: + UI::ChangeWidget(`id(`graph), `Filename, "graph2.gv"); + break; + + case `load3: + UI::ChangeWidget(`id(`graph), `Filename, "graph3.gv"); + break; + } + if (widget == `close || widget == `cancel) break; } Copied: trunk/ycp-ui-bindings/examples/graph1.gv (from r56102, trunk/ycp-ui-bindings/examples/graph.dot) URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/graph1.gv?p2=trunk/ycp-ui-bindings/examples/graph1.gv&p1=trunk/ycp-ui-bindings/examples/graph.dot&r1=56102&r2=56103&rev=56103&view=diff ============================================================================== --- trunk/ycp-ui-bindings/examples/graph.dot (original) +++ trunk/ycp-ui-bindings/examples/graph1.gv Thu Mar 12 18:40:39 2009 @@ -1,5 +1,7 @@ digraph G { + node [style="filled", fontname="Helvetica"]; + A; B; C; Added: trunk/ycp-ui-bindings/examples/graph2.gv URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/graph2.gv?rev=56103&view=auto ============================================================================== --- trunk/ycp-ui-bindings/examples/graph2.gv (added) +++ trunk/ycp-ui-bindings/examples/graph2.gv Thu Mar 12 18:40:39 2009 @@ -0,0 +1,14 @@ +digraph G +{ + node [style="filled", fillcolor="yellow", fontname="Helvetica"]; + + A; + B; + C; + D; + + A -> C; + A -> D; + B -> C; + B -> D; +} Added: trunk/ycp-ui-bindings/examples/graph3.gv URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/graph3.gv?rev=56103&view=auto ============================================================================== --- trunk/ycp-ui-bindings/examples/graph3.gv (added) +++ trunk/ycp-ui-bindings/examples/graph3.gv Thu Mar 12 18:40:39 2009 @@ -0,0 +1,19 @@ +digraph G +{ + node [style="filled", fillcolor="green", fontname="Helvetica"]; + + A; + B; + C; + D; + E; + F; + + A -> C; + A -> D; + B -> C; + B -> D; + + E -> F; + F -> E; +} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org