[q-lang-cvs] qcalc/examples guiexamples.qcalc,1.13,1.14
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-28 09:53:16
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24948 Modified Files: guiexamples.qcalc Log Message: add label and pixmap examples Index: guiexamples.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/guiexamples.qcalc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** guiexamples.qcalc 23 Nov 2007 22:41:30 -0000 1.13 --- guiexamples.qcalc 28 Nov 2007 09:53:12 -0000 1.14 *************** *** 1,4 **** ! // qcalc 1.0, created Sat Nov 17 19:27:00 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"GUI element"),((0,2),"Value"),((0,3),"Display"),((2,0),"Checkbox"),((2,1),"= checkbox (\"test\",true)"),((2,2),"= B3"),((2,3),"= checkbox (\"test\",B3)"),((4,0),"Combobox"),((4,1),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((4,2),"= B5"),((4,3),"= combobox ([\"apples\",\"bananas\",\"oranges\"],B5)"),((5,0),"Comboedit"),((5,1),"= comboedit ([\"apples\",\"bananas\",\"oranges\"],\"bananas\")"),((5,2),"= B6"),((5,3),"= comboedit ([\"apples\",\"bananas\",\"oranges\"],B6)"),((6,0),"Int Spinbox"),((6,1),"= spinbox (0,100,5,40)"),((6,2),"= B7"),((6,3),"= spinbox (0,100,5,B7)"),((7,0),"Float Spinbox"),((7,1),"= spinbox (0.0,10.0,0.5,4.0)"),((7,2),"= B8"),((7,3),"= spinbox (0.0,10.0,0.5,B8)"),((9,0),"Spinbox with special value"),((9,1),"= spinbox (-1,10,1,0,\"Any\")"),((9,2),"= B10"),((9,3),"= spinbox (-1,10,1,B10,\"Any\")"),((10,0),"Spinbox with prefix"),((10,1),"= spinbox (-0.1,10,0.1,0,\"Any\",\"$ \")"),((10,2),"= B11"),((10,3),"= spinbox (-0.1,10,0.1,B11,\"Any\",\"$ \")"),((11,0),"Spinbox with suffix"),((11,1),"= spinbox (-1,72,1,10,\"Any\",\"\",\"pt\")"),((11,2),"= B12"),((11,3),"= spinbox (-1,72,1,B12,\"Any\",\"\",\"pt\")"),((13,0),"Horizontal slider"),((13,1),"= hslider (0,100,1,50)"),((13,2),"= B14"),((13,3),"= hslider (0,100,1,B14)"),((14,0),"Vertical slider"),((14,1),"= vslider (0,100,1,50)"),((14,2),"= B15"),((14,3),"= vslider (0,100,1,B15)"),((16,0),"Pushbutton"),((16,1),"= pushbutton \"Push me!\""),((16,2),"= B17"),((16,3),"N/A"),((17,0),"Pushbutton with icon"),((17,1),"= pushbutton (\"Push me!\",which \"../pixmaps/1rightarrow.png\")"),((17,2),"= B18"),((17,3),"N/A"),((18,0),"Togglebutton with icon"),((18,1),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((18,2),"= B19"),((18,3),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\",B19)"),((20,0),"\"Buddies\" (linked elements)"),((20,1),"= hslider (0,100,1,D21)"),((20,2),"= B21"),((20,3),"= spinbox (0,100,1,B21)"),((22,0),("Alternative \"remote control\" of GUI elements using setval",1,4)),((24,0),"GUI element A (click here)"),((24,1),"Transfer A -> B"),((24,2),"GUI element B (display)"),((24,3),"Value of B"),((26,0),"= checkbox \"A\""),((26,1),"= setval 'C27 A27"),((26,2),"= checkbox \"B\""),((26,3),"= C27"),((27,0),"= spinbox (-0.1,10,0.1,0,\"Any\")"),((27,1),"= setval 'C28 A28"),((27,2),"= spinbox (-0.1,10,0.1,0,\"Any\")"),((27,3),"= C28"),((28,0),"= spinbox (-5,100,5,40,\"Any\")"),((28,1),"= setval 'C29 A29"),((28,2),"= spinbox (-1,100,1,40,\"Any\")"),((28,3),"= C29"),((29,0),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((29,1),"= setval 'C30 A30"),((29,2),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((29,3),"= C30"),((30,0),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((30,1),"= setval 'C31 A31"),((30,2),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((30,3),"= C31"),((32,0),("Task button example. Shows how to operate a Q thread using a toggle button. See the script tab for the Q code implementing this example.",1,4)),((34,0),"Seconds for countdown:"),((34,1),"= spinbox (1,60,1,10)"),((35,0),"Push here to start counting:"),((35,1),"= taskbutton \"&Run me!\" (task B35)"),((35,2),"= spinbox (0,999999)"),((37,0),"Action button example:"),((37,1),"= actionbutton \"Random &number\" random"),((37,2),"= B38"),((39,0),"An \"open file\" action:"),((39,1),"= open_file"),((40,0),"The file you chose:"),((40,1),("",1,3))] // [(14,55),(32,35)] // [(0,162),(1,116),(2,139),(3,125)] --- 1,4 ---- ! // qcalc 1.0, created Wed Nov 28 10:08:35 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"GUI element"),((0,2),"Value"),((0,3),"Display"),((2,0),"Checkbox"),((2,1),"= checkbox (\"test\",true)"),((2,2),"= B3"),((2,3),"= checkbox (\"test\",B3)"),((4,0),"Combobox"),((4,1),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((4,2),"= B5"),((4,3),"= combobox ([\"apples\",\"bananas\",\"oranges\"],B5)"),((5,0),"Comboedit"),((5,1),"= comboedit ([\"apples\",\"bananas\",\"oranges\"],\"bananas\")"),((5,2),"= B6"),((5,3),"= comboedit ([\"apples\",\"bananas\",\"oranges\"],B6)"),((6,0),"Int Spinbox"),((6,1),"= spinbox (0,100,5,40)"),((6,2),"= B7"),((6,3),"= spinbox (0,100,5,B7)"),((7,0),"Float Spinbox"),((7,1),"= spinbox (0.0,10.0,0.5,4.0)"),((7,2),"= B8"),((7,3),"= spinbox (0.0,10.0,0.5,B8)"),((9,0),"Spinbox with special value"),((9,1),"= spinbox (-1,10,1,0,\"Any\")"),((9,2),"= B10"),((9,3),"= spinbox (-1,10,1,B10,\"Any\")"),((10,0),"Spinbox with prefix"),((10,1),"= spinbox (-0.1,10,0.1,0,\"Any\",\"$ \")"),((10,2),"= B11"),((10,3),"= spinbox (-0.1,10,0.1,B11,\"Any\",\"$ \")"),((11,0),"Spinbox with suffix"),((11,1),"= spinbox (-1,72,1,10,\"Any\",\"\",\"pt\")"),((11,2),"= B12"),((11,3),"= spinbox (-1,72,1,B12,\"Any\",\"\",\"pt\")"),((13,0),"Horizontal slider"),((13,1),"= hslider (0,100,1,50)"),((13,2),"= B14"),((13,3),"= hslider (0,100,1,B14)"),((14,0),"Vertical slider"),((14,1),"= vslider (0,100,1,50)"),((14,2),"= B15"),((14,3),"= vslider (0,100,1,B15)"),((16,0),"Pushbutton"),((16,1),"= pushbutton \"Push me!\""),((16,2),"= B17"),((16,3),"N/A"),((17,0),"Pushbutton with icon"),((17,1),"= pushbutton (\"Push me!\",which \"../pixmaps/1rightarrow.png\")"),((17,2),"= B18"),((17,3),"N/A"),((18,0),"Togglebutton with icon"),((18,1),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((18,2),"= B19"),((18,3),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\",B19)"),((20,0),"\"Buddies\" (linked elements)"),((20,1),"= hslider (0,100,1,D21)"),((20,2),"= B21"),((20,3),"= spinbox (0,100,1,B21)"),((22,0),("Alternative \"remote control\" of GUI elements using setval",1,4)),((24,0),"GUI element A (click here)"),((24,1),"Transfer A -> B"),((24,2),"GUI element B (display)"),((24,3),"Value of B"),((26,0),"= checkbox \"A\""),((26,1),"= setval 'C27 A27"),((26,2),"= checkbox \"B\""),((26,3),"= C27"),((27,0),"= spinbox (-0.1,10,0.1,0,\"Any\")"),((27,1),"= setval 'C28 A28"),((27,2),"= spinbox (-0.1,10,0.1,0,\"Any\")"),((27,3),"= C28"),((28,0),"= spinbox (-5,100,5,40,\"Any\")"),((28,1),"= setval 'C29 A29"),((28,2),"= spinbox (-1,100,1,40,\"Any\")"),((28,3),"= C29"),((29,0),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((29,1),"= setval 'C30 A30"),((29,2),"= combobox ([\"apples\",\"bananas\",\"oranges\"],\"oranges\")"),((29,3),"= C30"),((30,0),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((30,1),"= setval 'C31 A31"),((30,2),"= togglebutton (\"Toggle me!\",which \"../pixmaps/flag.png\")"),((30,3),"= C31"),((32,0),("Task button example. Shows how to operate a Q thread using a toggle button. See the script tab for the Q code implementing this example.",1,4)),((34,0),"Seconds for countdown:"),((34,1),"= spinbox (1,60,1,10)"),((35,0),"Push here to start counting:"),((35,1),"= taskbutton \"&Run me!\" (task B35)"),((35,2),"= spinbox (0,999999)"),((37,0),"Action button example:"),((37,1),"= actionbutton \"Random &number\" random"),((37,2),"= B38"),((39,0),"An \"open file\" action:"),((39,1),"= open_file"),((40,0),"The file you chose:"),((40,1),("",1,3)),((42,0),("= label \"<center><h1>Labels and Pixmaps</h1></center>\"",2,3)),((45,0),("= label (sprintf \"<big><b>%s</b></big>\" C46,C47)",2,2)),((45,2),"= comboedit [\"Hello, world!\",\"Richtext!\"]"),((46,2),"= combobox [\"a\",\"c\",\"l\",\"r\",\"t\",\"b\",\"ca\",\"cc\",\"cl\",\"cr\",\"ta\",\"tc\",\"tl\",\"tr\",\"ba\",\"bc\",\"bl\",\"br\"]"),((47,0),("= A46",1,2)),((49,0),("= pixmap (which $ \"../pixmaps/\"++C50,C53,if C52 then 2 else if C51 then 1 else 0)",4,2)),((49,2),"= comboedit [\"floppybuddy.gif\",\"1rightarrow.png\",\"flag.png\"]"),((50,2),"= checkbox \"Scale\""),((51,2),"= checkbox \"Animate\""),((52,2),"= combobox [\"a\",\"c\",\"l\",\"r\",\"t\",\"b\",\"ca\",\"cc\",\"cl\",\"cr\",\"ta\",\"tc\",\"tl\",\"tr\",\"ba\",\"bc\",\"bl\",\"br\"]"),((54,0),"Embed pixmap as a label:"),((56,0),("= label (sprintf \"<img src=%s/>\" $ which $ \"../pixmaps/\"++C57,C58)",4,2)),((56,2),"= comboedit [\"floppybuddy.gif\",\"1rightarrow.png\",\"flag.png\"]"),((57,2),"= combobox [\"a\",\"c\",\"l\",\"r\",\"t\",\"b\",\"ca\",\"cc\",\"cl\",\"cr\",\"ta\",\"tc\",\"tl\",\"tr\",\"ba\",\"bc\",\"bl\",\"br\"]")] // [(14,55),(32,35)] // [(0,162),(1,116),(2,139),(3,125)] |