q-lang-cvs Mailing List for Q - Equational Programming Language (Page 13)
Brought to you by:
agraef
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(106) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(219) |
Feb
(152) |
Mar
|
Apr
(92) |
May
(45) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
(111) |
Oct
(52) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(23) |
Jun
(46) |
Jul
(158) |
Aug
(22) |
Sep
|
Oct
(26) |
Nov
(11) |
Dec
(49) |
2006 |
Jan
(57) |
Feb
(196) |
Mar
(10) |
Apr
(41) |
May
(149) |
Jun
(308) |
Jul
(11) |
Aug
(25) |
Sep
(15) |
Oct
|
Nov
|
Dec
(15) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(15) |
May
(204) |
Jun
(112) |
Jul
(7) |
Aug
(16) |
Sep
(134) |
Oct
(313) |
Nov
(262) |
Dec
(83) |
2008 |
Jan
(81) |
Feb
(83) |
Mar
(21) |
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Albert G. <ag...@us...> - 2007-11-28 08:25:58
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27956 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.196 retrieving revision 1.197 diff -C2 -d -r1.196 -r1.197 *** qcalc.q 28 Nov 2007 08:18:37 -0000 1.196 --- qcalc.q 28 Nov 2007 08:25:55 -0000 1.197 *************** *** 2841,2846 **** (qt_val "QTableItem" "Never"); pixmap_gui (I,J) X:QtObject (S,A,B) ! = qt X SET PM || qt X "setAlignment" (alignment A) || qt X "setScaledContents" (B=1) --- 2841,2850 ---- (qt_val "QTableItem" "Never"); + def NULLMOV = qt_new "QMovie" (); + pixmap_gui (I,J) X:QtObject (S,A,B) ! = qt X "setPixmap" NULLPM || ! qt X "setMovie" NULLMOV || ! qt X SET PM || qt X "setAlignment" (alignment A) || qt X "setScaledContents" (B=1) |
From: Albert G. <ag...@us...> - 2007-11-28 08:18:42
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27216 Modified Files: calclib.q qcalc.q Log Message: add alignment support for label and pixmap cells Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.195 retrieving revision 1.196 diff -C2 -d -r1.195 -r1.196 *** qcalc.q 28 Nov 2007 07:14:22 -0000 1.195 --- qcalc.q 28 Nov 2007 08:18:37 -0000 1.196 *************** *** 2774,2779 **** qt X "setPageStep" STEP || qt X "setValue" INIT; ! label_gui (I,J) () S:String = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X --- 2774,2780 ---- qt X "setPageStep" STEP || qt X "setValue" INIT; ! label_gui (I,J) () (S,A) = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || + qt X "setAlignment" (alignment A) || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X *************** *** 2783,2792 **** (qt_val "QTableItem" "Never"); ! label_gui (I,J) X:QtObject S:String ! = qt X "setText" S; ! pixmap_gui (I,J) () (S,B) = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || qt X SET PM || qt X "setScaledContents" (B=1) || qt TABLE "setCellWidget" (I,J,X) || IT --- 2784,2830 ---- (qt_val "QTableItem" "Never"); ! def ALIGN = dict ! ["a", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignVCenter"; ! "c", qt_val "Qt" "AlignCenter"; ! "l", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignVCenter"; ! "r", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignVCenter"; ! "t", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignTop"; ! "b", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignBottom"; ! "ac", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignVCenter"; ! "cc", qt_val "Qt" "AlignCenter"; ! "lc", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignVCenter"; ! "rc", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignVCenter"; ! "at", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignTop"; ! "ct", qt_val "Qt" "AlignHCenter" or qt_val "Qt" "AlignTop"; ! "lt", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignTop"; ! "rt", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignTop"; ! "ab", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignBottom"; ! "cb", qt_val "Qt" "AlignHCenter" or qt_val "Qt" "AlignBottom"; ! "lb", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignBottom"; ! "rb", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignBottom"; ! "ca", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignVCenter"; ! "cl", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignVCenter"; ! "cr", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignVCenter"; ! "ta", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignTop"; ! "tc", qt_val "Qt" "AlignHCenter" or qt_val "Qt" "AlignTop"; ! "tl", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignTop"; ! "tr", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignTop"; ! "ba", qt_val "Qt" "AlignAuto" or qt_val "Qt" "AlignBottom"; ! "bc", qt_val "Qt" "AlignHCenter" or qt_val "Qt" "AlignBottom"; ! "bl", qt_val "Qt" "AlignLeft" or qt_val "Qt" "AlignBottom"; ! "br", qt_val "Qt" "AlignRight" or qt_val "Qt" "AlignBottom"]; ! ! alignment A:String ! = N where N:Int = ALIGN!A; ! alignment _ = ALIGN!"a" otherwise; ! label_gui (I,J) X:QtObject (S,A) ! = qt X "setAlignment" (alignment A) || ! qt X "setText" S; ! ! pixmap_gui (I,J) () (S,A,B) = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || qt X SET PM || + qt X "setAlignment" (alignment A) || qt X "setScaledContents" (B=1) || qt TABLE "setCellWidget" (I,J,X) || IT *************** *** 2803,2808 **** (qt_val "QTableItem" "Never"); ! pixmap_gui (I,J) X:QtObject (S,B) ! = qt X SET PM || qt X "setScaledContents" (B=1) where (CLS,SET) = if B=2 then ("QMovie","setMovie") --- 2841,2848 ---- (qt_val "QTableItem" "Never"); ! pixmap_gui (I,J) X:QtObject (S,A,B) ! = qt X SET PM || ! qt X "setAlignment" (alignment A) || ! qt X "setScaledContents" (B=1) where (CLS,SET) = if B=2 then ("QMovie","setMovie") *************** *** 3756,3767 **** "^\\+\\+\\+ Label: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, S1:String = val S1, ! IT:QtObject = make_gui label_gui (I1,J1) S1; = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Pixmap: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (S1,B1) = val S1, ! IT:QtObject = make_gui pixmap_gui (I1,J1) (S1,B1); // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; --- 3796,3807 ---- "^\\+\\+\\+ Label: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (S1,A1) = val S1, ! IT:QtObject = make_gui label_gui (I1,J1) (S1,A1); = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] where [(K1,S1)] = regex "" "^\\+\\+\\+ Pixmap: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (S1,A1,B1) = val S1, ! IT:QtObject = make_gui pixmap_gui (I1,J1) (S1,A1,B1); // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** calclib.q 28 Nov 2007 07:14:21 -0000 1.46 --- calclib.q 28 Nov 2007 08:18:37 -0000 1.47 *************** *** 174,184 **** /* Basic GUI elements. */ ! label S:String = printf "\f+++ Label: %s %s\n" (str (I,J),str S) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; ! pixmap S:String = pixmap (S,0); pixmap (S:String,B:Int) ! = printf "\f+++ Pixmap: %s %s\n" (str (I,J),str (S,B)) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; --- 174,192 ---- /* Basic GUI elements. */ ! label S:String = label (S,"a"); ! label (S:String,A:String) ! = printf "\f+++ Label: %s %s\n" (str (I,J),str (S,A)) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; ! pixmap S:String = pixmap (S,"a",0); ! pixmap (S:String,A:String) ! = pixmap (S,A,0); pixmap (S:String,B:Int) ! = pixmap (S,"a",B); ! pixmap (S:String,B:Int,A:String) ! = pixmap (S,A,B); ! pixmap (S:String,A:String,B:Int) ! = printf "\f+++ Pixmap: %s %s\n" (str (I,J),str (S,A,B)) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; |
From: Albert G. <ag...@us...> - 2007-11-28 07:14:27
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22007 Modified Files: calclib.q qcalc.q Log Message: add support for scaled and animated (gif,mng) pixmaps Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.194 retrieving revision 1.195 diff -C2 -d -r1.194 -r1.195 *** qcalc.q 28 Nov 2007 06:34:22 -0000 1.194 --- qcalc.q 28 Nov 2007 07:14:22 -0000 1.195 *************** *** 2786,2797 **** = qt X "setText" S; ! pixmap_gui (I,J) () S:String = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || ! qt X "setPixmap" PM || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X ! where PM = if null S then NULLPM ! else qt_new "QPixmap" S, X:QtObject = qt_object "QLabel" TABLE "MyPixmap" (I,J) [] [] [], --- 2786,2801 ---- = qt X "setText" S; ! pixmap_gui (I,J) () (S,B) = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || ! qt X SET PM || ! qt X "setScaledContents" (B=1) || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X ! where (CLS,SET) = ! if B=2 then ("QMovie","setMovie") ! else ("QPixmap","setPixmap"), ! PM = if null S then NULLPM ! else qt_new CLS S, X:QtObject = qt_object "QLabel" TABLE "MyPixmap" (I,J) [] [] [], *************** *** 2799,2807 **** (qt_val "QTableItem" "Never"); ! pixmap_gui (I,J) X:QtObject S:String ! = qt X "setPixmap" PM ! where PM = if null S then NULLPM ! else qt_new "QPixmap" S; /* Text<->value conversion routines for spinboxes. */ --- 2803,2814 ---- (qt_val "QTableItem" "Never"); ! pixmap_gui (I,J) X:QtObject (S,B) ! = qt X SET PM || qt X "setScaledContents" (B=1) ! where (CLS,SET) = ! if B=2 then ("QMovie","setMovie") ! else ("QPixmap","setPixmap"), ! PM = if null S then NULLPM ! else qt_new CLS S; /* Text<->value conversion routines for spinboxes. */ *************** *** 3755,3760 **** "^\\+\\+\\+ Pixmap: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, S1:String = val S1, ! IT:QtObject = make_gui pixmap_gui (I1,J1) S1; // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; --- 3762,3767 ---- "^\\+\\+\\+ Pixmap: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (S1,B1) = val S1, ! IT:QtObject = make_gui pixmap_gui (I1,J1) (S1,B1); // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** calclib.q 28 Nov 2007 06:11:55 -0000 1.45 --- calclib.q 28 Nov 2007 07:14:21 -0000 1.46 *************** *** 178,182 **** where (I,J) = get YYKEY; ! pixmap S:String = printf "\f+++ Pixmap: %s %s\n" (str (I,J),str S) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; --- 178,184 ---- where (I,J) = get YYKEY; ! pixmap S:String = pixmap (S,0); ! pixmap (S:String,B:Int) ! = printf "\f+++ Pixmap: %s %s\n" (str (I,J),str (S,B)) || flush || yyset (I,J) S || S where (I,J) = get YYKEY; |
From: Albert G. <ag...@us...> - 2007-11-28 06:34:35
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13707 Modified Files: qcalc.q Log Message: bugfix: merge/dissociate cells sometimes looses the cell widget Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** qcalc.q 28 Nov 2007 06:11:55 -0000 1.193 --- qcalc.q 28 Nov 2007 06:34:22 -0000 1.194 *************** *** 1584,1590 **** merge_cells _ _ _ ! = EDITED := true || update_title || save_undo (I,J;N,M) ! where (I,J) = real_index (I,J), (N,M) = cell_span (I,J) ! where IT:QtObject = set_current_cell (I,J) || spanned_table_item (I,J) (N,M) if not null SEL and then all is_empty SEL --- 1584,1592 ---- merge_cells _ _ _ ! = EDITED := true || update_title || save_undo (I,J;N,M) || ! if is_qt_object X then post CBQ '(check_last_gui (I,J,X)) ! where (I,J) = (I1,J1), (N,M) = cell_span (I,J) ! where (I1,J1) = real_index (I,J), X = gui_elem (I1,J1), ! IT:QtObject = set_current_cell (I,J) || spanned_table_item (I,J) (N,M) if not null SEL and then all is_empty SEL *************** *** 1601,1606 **** dissociate_cell (I,J) = set_current_cell (I,J) || qt IT "setSpan" (1,1) || ! EDITED := true || update_title || save_undo (I,J;1,1) ! where IT = get_table_item (I,J); get_spans SEL = sort indexcmp SEL --- 1603,1610 ---- dissociate_cell (I,J) = set_current_cell (I,J) || qt IT "setSpan" (1,1) || ! EDITED := true || update_title || save_undo (I,J;1,1) || ! if is_qt_object X then post CBQ '(check_last_gui (I1,J1,X)) ! where IT = get_table_item (I,J), ! (I1,J1) = real_index (I,J), X = gui_elem (I1,J1); get_spans SEL = sort indexcmp SEL *************** *** 3199,3207 **** set_current_cell (I,J) || spanned_table_item (I,J) (N1,M1) || UNDO_LIST := UL || REDO_LIST := [(I,J;N,M)|get REDO_LIST] || ! EDITED := (#UL<>get LAST_SAVE) || update_title where [(I,J;N,M)|UL] = get UNDO_LIST, SP = foldl insert (get SPANS) $ filter istuple $ reverse UL, ! (N1,M1) = undo_span SP (I,J); redo = //printf "*** redo: %s\n" (str W) || --- 3203,3213 ---- set_current_cell (I,J) || spanned_table_item (I,J) (N1,M1) || UNDO_LIST := UL || REDO_LIST := [(I,J;N,M)|get REDO_LIST] || ! EDITED := (#UL<>get LAST_SAVE) || update_title || ! if is_qt_object X then post CBQ '(check_last_gui (I1,J1,X)) where [(I,J;N,M)|UL] = get UNDO_LIST, SP = foldl insert (get SPANS) $ filter istuple $ reverse UL, ! (N1,M1) = undo_span SP (I,J), ! (I1,J1) = real_index (I,J), X = gui_elem (I1,J1); redo = //printf "*** redo: %s\n" (str W) || *************** *** 3240,3245 **** set_current_cell (I,J) || spanned_table_item (I,J) (N,M) || UNDO_LIST := [(I,J;N,M)|UL] || REDO_LIST := RL || ! EDITED := (#UL+1<>get LAST_SAVE) || update_title ! where [(I,J;N,M)|RL] = get REDO_LIST, UL = get UNDO_LIST; /* Syntax highlighting. ****************************************************/ --- 3246,3253 ---- set_current_cell (I,J) || spanned_table_item (I,J) (N,M) || UNDO_LIST := [(I,J;N,M)|UL] || REDO_LIST := RL || ! EDITED := (#UL+1<>get LAST_SAVE) || update_title || ! if is_qt_object X then post CBQ '(check_last_gui (I1,J1,X)) ! where [(I,J;N,M)|RL] = get REDO_LIST, UL = get UNDO_LIST, ! (I1,J1) = real_index (I,J), X = gui_elem (I1,J1); /* Syntax highlighting. ****************************************************/ |
From: Albert G. <ag...@us...> - 2007-11-28 06:11:59
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10282 Modified Files: calclib.q qcalc.q Log Message: added pixmap GUI element Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.192 retrieving revision 1.193 diff -C2 -d -r1.192 -r1.193 *** qcalc.q 28 Nov 2007 04:38:42 -0000 1.192 --- qcalc.q 28 Nov 2007 06:11:55 -0000 1.193 *************** *** 2782,2785 **** --- 2782,2804 ---- = qt X "setText" S; + pixmap_gui (I,J) () S:String + = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || + qt X "setPixmap" PM || + qt TABLE "setCellWidget" (I,J,X) || IT + if not is_nil IT and then not is_nil X + where PM = + if null S then NULLPM + else qt_new "QPixmap" S, + X:QtObject = qt_object "QLabel" TABLE + "MyPixmap" (I,J) [] [] [], + IT:QtObject = make_table_item (I,J,X) + (qt_val "QTableItem" "Never"); + + pixmap_gui (I,J) X:QtObject S:String + = qt X "setPixmap" PM + where PM = + if null S then NULLPM + else qt_new "QPixmap" S; + /* Text<->value conversion routines for spinboxes. */ *************** *** 2819,2824 **** gui_set_slider); "MyLabel", (label_gui, ! gui_get_label,gui_getc_label, gui_set_label); "MyPushButton", (pushbutton_gui, gui_get_pushbutton,gui_getc_pushbutton, --- 2838,2846 ---- gui_set_slider); "MyLabel", (label_gui, ! gui_get_nop,gui_getc_nop, gui_set_label); + "MyPixmap", (pixmap_gui, + gui_get_nop,gui_getc_nop, + gui_set_pixmap); "MyPushButton", (pushbutton_gui, gui_get_pushbutton,gui_getc_pushbutton, *************** *** 2841,2848 **** gui_class X = C where (C|_) = qt_mob_data X; ! = "MyCheckBox" if class_name X = "QCheckTableItem"; = if qt X "isEditable" () then "MyComboEdit" else "MyComboBox" ! if class_name X = "QComboTableItem"; gui_gettype X = F where C:String = gui_class X, (F|_) = GUI_TYPES!C; --- 2863,2871 ---- gui_class X = C where (C|_) = qt_mob_data X; ! where C:String = class_name X: ! = "MyCheckBox" if C = "QCheckTableItem"; = if qt X "isEditable" () then "MyComboEdit" else "MyComboBox" ! if C = "QComboTableItem"; gui_gettype X = F where C:String = gui_class X, (F|_) = GUI_TYPES!C; *************** *** 2851,2854 **** --- 2874,2881 ---- /* Get the value of a GUI element. */ + gui_hasval X = neq GV gui_get_nop + where C:String = gui_class X, (_,GV,_,_) = GUI_TYPES!C; + = false otherwise; + gui_getval X = GV X where C:String = gui_class X, (_,GV,_,_) = GUI_TYPES!C; // = printf "unknown GUI element %s\n" (class_name X) || 0; *************** *** 2878,2884 **** = qt X "value" (); - gui_get_label X - = qt X "text" (); - /* Get the value in string form. */ --- 2905,2908 ---- *************** *** 2913,2919 **** = str $ qt X "value" (); - gui_getc_label X - = qt X "text" (); - /* Set the value of a GUI element from a string. */ --- 2937,2940 ---- *************** *** 2981,2984 **** --- 3002,3012 ---- if checkstr 'Y where 'Y = valq S; + gui_set_pixmap X S + = qt X "setPixmap" PM + where PM = + if null Y then NULLPM + else qt_new "QPixmap" Y + if checkstr 'Y where 'Y = valq S; + // Convert a spinbox value; use the special value text and the text->value // converter if available. *************** *** 3034,3038 **** submit_val (I,J) Y if checkval Y ! where Y = gui_getval X; gui_clear X (I,J) --- 3062,3067 ---- submit_val (I,J) Y if checkval Y ! where Y = gui_getval X ! if gui_hasval X; gui_clear X (I,J) *************** *** 3714,3717 **** --- 3743,3752 ---- (I1,J1) = val K1, S1:String = val S1, IT:QtObject = make_gui label_gui (I1,J1) S1; + = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] + where [(K1,S1)] = regex "" + "^\\+\\+\\+ Pixmap: (\\([0-9]+,[0-9]+\\)) (.*)$" S + (reg 1,reg 2), + (I1,J1) = val K1, S1:String = val S1, + IT:QtObject = make_gui pixmap_gui (I1,J1) S1; // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** calclib.q 28 Nov 2007 04:25:36 -0000 1.44 --- calclib.q 28 Nov 2007 06:11:55 -0000 1.45 *************** *** 40,50 **** /* Definition of GUI elements in table cells. Currently supported are (rich) ! text labels, checkboxes, comboboxes (both non-editable and editable), ! spinboxes, horizontal and vertical sliders, push buttons and toggle ! buttons. You can find examples for all of these in the guiexamples.qcalc ! spreadsheet included in the QCalc distribution. */ ! public label ARGS, checkbox ARGS, combobox ARGS, comboedit ARGS, spinbox ARGS, ! hslider ARGS, vslider ARGS, pushbutton ARGS, togglebutton ARGS; /* The action button is a special push button which has an associated Q --- 40,50 ---- /* Definition of GUI elements in table cells. Currently supported are (rich) ! text labels, pixmaps, checkboxes, comboboxes (both non-editable and ! editable), spinboxes, horizontal and vertical sliders, push buttons and ! toggle buttons. You can find examples for all of these in the ! guiexamples.qcalc spreadsheet included in the QCalc distribution. */ ! public label ARGS, pixmap ARGS, checkbox ARGS, combobox ARGS, comboedit ARGS, ! spinbox ARGS, hslider ARGS, vslider ARGS, pushbutton ARGS, togglebutton ARGS; /* The action button is a special push button which has an associated Q *************** *** 178,181 **** --- 178,185 ---- where (I,J) = get YYKEY; + pixmap S:String = printf "\f+++ Pixmap: %s %s\n" (str (I,J),str S) || + flush || yyset (I,J) S || S + where (I,J) = get YYKEY; + checkbox S:String = checkbox (S,false); |
From: Albert G. <ag...@us...> - 2007-11-28 04:38:46
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28017 Modified Files: qcalc.q Log Message: fix segfault in content_from_editor Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** qcalc.q 28 Nov 2007 04:25:37 -0000 1.191 --- qcalc.q 28 Nov 2007 04:38:42 -0000 1.192 *************** *** 1136,1141 **** content_from_editor IT DATA EDIT ! = clear_cell (I,J) || set_cell (I,J) $ qt EDIT "text" () ! where (I,J) = real_index IT; /* Some convenience functions for accessing the table. */ --- 1136,1141 ---- content_from_editor IT DATA EDIT ! = clean_cell (I,J) || set_cell (I,J) S ! where (I,J) = real_index IT, S = qt EDIT "text" (); /* Some convenience functions for accessing the table. */ |
From: Albert G. <ag...@us...> - 2007-11-28 04:25:42
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22196 Modified Files: calclib.q qcalc.q Log Message: added label GUI element Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.190 retrieving revision 1.191 diff -C2 -d -r1.190 -r1.191 *** qcalc.q 26 Nov 2007 14:35:45 -0000 1.190 --- qcalc.q 28 Nov 2007 04:25:37 -0000 1.191 *************** *** 684,688 **** // Use this for debugging if debug_invoke doesn't work (see below). // = printf "qt_invoke: %s %s %s\n" (str OBJ,str SLOT,str ARGS) || ! // fail if neq SLOT timer; // Blacklist #1: these are always inhibited in recursive mode if we are not in // local mode. --- 684,688 ---- // Use this for debugging if debug_invoke doesn't work (see below). // = printf "qt_invoke: %s %s %s\n" (str OBJ,str SLOT,str ARGS) || ! // fail if neq SLOT timer; // Blacklist #1: these are always inhibited in recursive mode if we are not in // local mode. *************** *** 1201,1206 **** = false otherwise; ! current_edited = real_index ! (qt TABLE "currEditRow" (),qt TABLE "currEditCol" ()) if qt TABLE "isEditing" (); current_cell = (current_row,current_col); --- 1201,1205 ---- = false otherwise; ! current_edited = (qt TABLE "currEditRow" (),qt TABLE "currEditCol" ()) if qt TABLE "isEditing" (); current_cell = (current_row,current_col); *************** *** 1224,1230 **** gui_clear (I,J) || clear_cell1 (I,J) || // make sure that edit mode is cleared, too ! if eq current_edited (I,J) then ! qt TABLE "setEditMode" (qt_val "QTable" "NotEditing",I,J) ! where X:QtObject = gui_elem (I,J); = clear_cell1 (I,J) otherwise; --- 1223,1230 ---- gui_clear (I,J) || clear_cell1 (I,J) || // make sure that edit mode is cleared, too ! if eq (real_index (I1,J1)) (I,J) then ! qt TABLE "setEditMode" (qt_val "QTable" "NotEditing",I1,J1) ! where X:QtObject = gui_elem (I,J), ! (I1,J1) = current_edited; = clear_cell1 (I,J) otherwise; *************** *** 1261,1265 **** = qt TABLE "setPixmap" (I,J,PM) if (I,J) = real_index (I,J); ! edit_cell (I,J) = get_table_item (I,J) || qt TABLE "editCell" (I,J); end_edit ACCEPT (I,J) --- 1261,1266 ---- = qt TABLE "setPixmap" (I,J,PM) if (I,J) = real_index (I,J); ! edit_cell (I,J) = get_table_item (I,J) || set_current_cell (I,J) || ! qt TABLE "editCell" (I,J); end_edit ACCEPT (I,J) *************** *** 1392,1399 **** check_editing = EDITED := true || ! recursive (end_edit true (I,J)) || finish_edit true (I,J) if not is_gui_elem (I,J) ! where (I,J) = current_edited; = finish_edit true (I,J) where (I,J,S) = get LAST_EDIT; --- 1393,1400 ---- check_editing = EDITED := true || ! recursive (end_edit true (I1,J1)) || finish_edit true (I,J) if not is_gui_elem (I,J) ! where (I1,J1) = current_edited, (I,J) = real_index (I1,J1); = finish_edit true (I,J) where (I,J,S) = get LAST_EDIT; *************** *** 1405,1409 **** clicked _ _ (I,J) = check_editing || fail ! if neq current_edited (real_index (I,J)); = updatemsg (I,J) if not qt TABLE "isEditing" (); --- 1406,1410 ---- clicked _ _ (I,J) = check_editing || fail ! if neq (real_index current_edited) (real_index (I,J)); = updatemsg (I,J) if not qt TABLE "isEditing" (); *************** *** 1419,1423 **** focus_widget (I,J) = qt X "setFocus" () ! if not is_nil X where X:QtObject = qt TABLE "cellWidget" (I,J) if not qt TABLE "isReadOnly" (); --- 1420,1425 ---- focus_widget (I,J) = qt X "setFocus" () ! if not is_nil X and then ! (qt X "focusPolicy" () <> qt_val "QWidget" "NoFocus") where X:QtObject = qt TABLE "cellWidget" (I,J) if not qt TABLE "isReadOnly" (); *************** *** 2768,2771 **** --- 2770,2785 ---- qt X "setPageStep" STEP || qt X "setValue" INIT; + label_gui (I,J) () S:String + = qt X "setBackgroundMode" (qt_val "Qt" "PaletteBase") || + qt TABLE "setCellWidget" (I,J,X) || IT + if not is_nil IT and then not is_nil X + where X:QtObject = qt_object "QLabel" (S,TABLE) + "MyLabel" (I,J) [] [] [], + IT:QtObject = make_table_item (I,J,X) + (qt_val "QTableItem" "Never"); + + label_gui (I,J) X:QtObject S:String + = qt X "setText" S; + /* Text<->value conversion routines for spinboxes. */ *************** *** 2804,2807 **** --- 2818,2824 ---- gui_get_slider,gui_getc_slider, gui_set_slider); + "MyLabel", (label_gui, + gui_get_label,gui_getc_label, + gui_set_label); "MyPushButton", (pushbutton_gui, gui_get_pushbutton,gui_getc_pushbutton, *************** *** 2861,2864 **** --- 2878,2884 ---- = qt X "value" (); + gui_get_label X + = qt X "text" (); + /* Get the value in string form. */ *************** *** 2893,2896 **** --- 2913,2919 ---- = str $ qt X "value" (); + gui_getc_label X + = qt X "text" (); + /* Set the value of a GUI element from a string. */ *************** *** 2954,2957 **** --- 2977,2984 ---- if checknum 'Y where 'Y = valq S; + gui_set_label X S + = qt X "setText" Y + if checkstr 'Y where 'Y = valq S; + // Convert a spinbox value; use the special value text and the text->value // converter if available. *************** *** 3681,3684 **** --- 3708,3717 ---- IT:QtObject = make_gui slider_gui (I1,J1) (MIN,MAX,STEP,INIT,VERT); + = results_loop T0 (insert U ((I1,J1),IT)) [(I,J)|V] + where [(K1,S1)] = regex "" + "^\\+\\+\\+ Label: (\\([0-9]+,[0-9]+\\)) (.*)$" S + (reg 1,reg 2), + (I1,J1) = val K1, S1:String = val S1, + IT:QtObject = make_gui label_gui (I1,J1) S1; // anything else just gets passed to the digest function, and we try again = local (digest S) || results_loop T0 U [(I,J)|V]; Index: calclib.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/calclib.q,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** calclib.q 23 Nov 2007 21:11:27 -0000 1.43 --- calclib.q 28 Nov 2007 04:25:36 -0000 1.44 *************** *** 39,49 **** public matrix KEY Xs, rowvect KEY Xs, colvect KEY Xs; ! /* Definition of GUI elements in table cells. Currently supported are ! checkboxes, comboboxes (both non-editable and editable), spinboxes, ! horizontal and vertical sliders, push buttons and toggle buttons. You can ! find examples for all of these in the guiexamples.qcalc spreadsheet ! included in the QCalc distribution. */ ! public checkbox ARGS, combobox ARGS, comboedit ARGS, spinbox ARGS, hslider ARGS, vslider ARGS, pushbutton ARGS, togglebutton ARGS; --- 39,49 ---- public matrix KEY Xs, rowvect KEY Xs, colvect KEY Xs; ! /* Definition of GUI elements in table cells. Currently supported are (rich) ! text labels, checkboxes, comboboxes (both non-editable and editable), ! spinboxes, horizontal and vertical sliders, push buttons and toggle ! buttons. You can find examples for all of these in the guiexamples.qcalc ! spreadsheet included in the QCalc distribution. */ ! public label ARGS, checkbox ARGS, combobox ARGS, comboedit ARGS, spinbox ARGS, hslider ARGS, vslider ARGS, pushbutton ARGS, togglebutton ARGS; *************** *** 174,177 **** --- 174,181 ---- /* Basic GUI elements. */ + label S:String = printf "\f+++ Label: %s %s\n" (str (I,J),str S) || + flush || yyset (I,J) S || S + where (I,J) = get YYKEY; + checkbox S:String = checkbox (S,false); |
From: Albert G. <ag...@us...> - 2007-11-26 21:34:02
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31779 Modified Files: example.qcalc Removed Files: simpson.q Log Message: reverted examples.qcalc to initial version; Eddie's examples can now be found in eds-example.qcalc Index: example.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/example.qcalc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** example.qcalc 15 Nov 2007 10:18:09 -0000 1.5 --- example.qcalc 26 Nov 2007 21:33:58 -0000 1.6 *************** *** 1,6 **** ! // qcalc 1.0, created Thu Nov 15 11:21:15 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"*** Erathosthenes' prime sieve ***"),((2,0),"Q stream of *all* primes"),((2,1),"= primes"),((3,0),"The first 50 primes"),((3,1),"= list $ take 50 B3"),((4,0),"The 111th prime"),((4,1),"= B3!111"),((5,0),"Product of the first 50"),((5,1),"= prd B4"),((6,1),"(This is a HUGE number, make the column bigger to see it all.)"),((8,1),"*** Linear Regression (Eddie Rucker) ***"),((9,0),"1"),((9,1),"3"),((10,0),"2"),((10,1),"5"),((11,0),"3"),((11,1),"7"),((12,0),"4"),((12,1),"9"),((13,0),"5"),((13,1),"10"),((14,0),"6"),((14,1),"13"),((15,0),"Least squares:"),((15,1),"= regress A10:A15 B10:B15"),((16,0),"Enter X:"),((16,1),"7"),((17,0),"Value at X:"),((17,1),"= B16 B17"),((19,1),"*** Normal Distribution (Eddie Rucker) ***"),((20,0),"Enter A:"),((20,1),"-1"),((21,0),"Enter B:"),((21,1),"1"),((22,0),"P(X>=A):"),((22,1),"= normal_above B21"),((23,0),"P(X<=B):"),((23,1),"= normal_below B22"),((24,0),"P(A<=X<=B):"),((24,1),"= normal B21 B22"),((26,1),"*** Playing with sums etc. ***"),((26,2),"Squares"),((26,3),"Cubes"),((27,1),"1"),((27,2),"= square B28"),((27,3),"= cube B28"),((28,1),"2"),((28,2),"= square B29"),((28,3),"= cube B29"),((29,1),"3"),((29,2),"= square B30"),((29,3),"= cube B30"),((30,1),"4"),((30,2),"= square B31"),((30,3),"= cube B31"),((31,1),"5"),((31,2),"= square B32"),((31,3),"= cube B32"),((32,1),"6"),((32,2),"= square B33"),((32,3),"= cube B33"),((33,1),"7"),((33,2),"= square B34"),((33,3),"= cube B34"),((34,1),"8"),((34,2),"= square B35"),((34,3),"= cube B35"),((35,1),"9"),((35,2),"= square B36"),((35,3),"= cube B36"),((36,1),"10"),((36,2),"= square B37"),((36,3),"= cube B37"),((38,0),"Sum"),((38,1),"= sum B28:B37"),((38,2),"= sum C28:C37"),((38,3),"= sum D28:D37"),((39,0),"Product"),((39,1),"= prd B28:B37"),((39,2),"= prd C28:C37"),((39,3),"= prd D28:D37"),((40,1),"Note that the range B28:B37 becomes a Q list:"),((41,1),"= B28:B37"),((44,1),"*** Geometric series ***"),((45,0),"Enter Q:"),((45,1),"= 1/3"),((46,0),"Series:"),((46,1),"= geom_series B46"),((47,0),"1"),((47,1),"= B$47!A48"),((48,0),"2"),((48,1),"= B$47!A49"),((49,0),"3"),((49,1),"= B$47!A50"),((50,0),"4"),((50,1),"= B$47!A51"),((51,0),"5"),((51,1),"= B$47!A52"),((52,0),"6"),((52,1),"= B$47!A53"),((53,0),"7"),((53,1),"= B$47!A54"),((54,0),"8"),((54,1),"= B$47!A55"),((55,0),"9"),((55,1),"= B$47!A56"),((56,0),"10"),((56,1),"= B$47!A57"),((57,0),"11"),((57,1),"= B$47!A58"),((58,0),"12"),((58,1),"= B$47!A59"),((59,0),"13"),((59,1),"= B$47!A60"),((60,0),"14"),((60,1),"= B$47!A61"),((61,0),"15"),((61,1),"= B$47!A62"),((63,1),"Some calculations with rationals:"),((64,0),"Op1"),((64,1),"= 5%3"),((65,0),"Op2"),((65,1),"= 81%53"),((66,0),"Sum"),((66,1),"= B65+B66"),((67,0),"Product"),((67,1),"= B65*B66"),((68,0),"Quotient"),((68,1),"= B65 % B66"),((70,1),"Complex numbers:"),((71,0),"2^(1/i)"),((71,1),"= 2^(1/i)"),((72,0),"log2 of that"),((72,1),"= lg B72"),((73,0),"abs, arg of the log2"),((73,1),"= (abs B73,arg B73)"),((75,1),"Complex rationals:"),((76,1),"= (1+:2)%(3+:4)"),((77,1),"= square (5+:-5%18)")] ! // [(6,37)] ! // [(0,139),(1,308),(2,120),(3,163),(4,188)] // Start of script. Please do not remove this line. --- 1,6 ---- ! // qcalc 1.0, created Mon Nov 26 22:34:23 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"Erathosthenes' prime sieve"),((0,3),"Playing with sums etc."),((0,4),"Squares"),((0,5),"Cubes"),((1,3),"1"),((1,4),"= square D2"),((1,5),"= cube D2"),((2,0),"Q stream of *all* primes"),((2,1),"= primes"),((2,3),"2"),((2,4),"= square D3"),((2,5),"= cube D3"),((3,0),"The first 50 primes"),((3,1),"= list $ take 50 B3"),((3,3),"3"),((3,4),"= square D4"),((3,5),"= cube D4"),((4,0),"The 111th prime"),((4,1),"= B3!111"),((4,3),"4"),((4,4),"= square D5"),((4,5),"= cube D5"),((5,0),"Product of the first 50"),((5,1),"= prd B4"),((5,3),"5"),((5,4),"= square D6"),((5,5),"= cube D6"),((6,1),"(This is a HUGE number, make the column bigger to see it all.)"),((6,3),"6"),((6,4),"= square D7"),((6,5),"= cube D7"),((7,3),"7"),((7,4),"= square D8"),((7,5),"= cube D8"),((8,1),"Some calculations with rationals:"),((8,3),"8"),((8,4),"= square D9"),((8,5),"= cube D9"),((9,0),"Op1"),((9,1),"= 5%3"),((9,3),"9"),((9,4),"= square D10"),((9,5),"= cube D10"),((10,0),"Op2"),((10,1),"= 81%53"),((10,3),"10"),((10,4),"= square D11"),((10,5),"= cube D11"),((11,0),"Sum"),((11,1),"= B10+B11"),((12,0),"Product"),((12,1),"= B10*B11"),((12,2),"Sum"),((12,3),"= sum D2:D11"),((12,4),"= sum E2:E11"),((12,5),"= sum F2:F11"),((13,0),"Quotient"),((13,1),"= B10 % B11"),((13,2),"Product"),((13,3),"= prd D2:D11"),((13,4),"= prd E2:E11"),((13,5),"= prd F2:F11"),((14,3),"Note that the range D2:D11"),((15,1),"Complex numbers:"),((15,3),"becomes a Q list:"),((16,0),"2^(1/i)"),((16,1),"= 2^(1/i)"),((16,3),"= $D$2:$D$11"),((17,0),"log2 of that"),((17,1),"= lg B17"),((18,0),"abs, arg of the log2"),((18,1),"= (abs B18,arg B18)"),((19,3),"Geometric series:"),((20,1),"Complex rationals:"),((20,2),"Enter Q:"),((20,3),"= 1/3"),((21,1),"= (1+:2)%(3+:4)"),((21,2),"Series:"),((21,3),"= geom_series D21"),((22,1),"= square (5+:-5%18)"),((22,2),"1"),((22,3),"= D$22!C23"),((23,2),"2"),((23,3),"= D$22!C24"),((24,2),"3"),((24,3),"= D$22!C25"),((25,2),"4"),((25,3),"= D$22!C26"),((26,2),"5"),((26,3),"= D$22!C27"),((27,2),"6"),((27,3),"= D$22!C28"),((28,2),"7"),((28,3),"= D$22!C29"),((29,2),"8"),((29,3),"= D$22!C30"),((30,2),"9"),((30,3),"= D$22!C31"),((31,2),"10"),((31,3),"= D$22!C32"),((32,2),"11"),((32,3),"= D$22!C33"),((33,2),"12"),((33,3),"= D$22!C34"),((34,2),"13"),((34,3),"= D$22!C35"),((35,2),"14"),((35,3),"= D$22!C36"),((36,2),"15"),((36,3),"= D$22!C37")] ! // [] ! // [(0,155),(1,404),(2,57),(3,174),(4,120),(5,163)] // Start of script. Please do not remove this line. *************** *** 19,48 **** primes = sieve {2..}; sieve {N|Ns} = {N|sieve {M:M in Ns,M mod N<>0}}; - - /* Simple regression (Eddie Rucker). */ - - regress X Y = \Z . A + B * Z - where B = (sxy X Y) / (sxy X X), - A = (mean Y) - B * (mean X); - - mean L = sum L / #L; - sxy X Y = (sum $ zipwith (*) X Y) - (sum X * sum Y) / #X; - - /* Normal distribution (Eddie Rucker). - - normal A B => probability of (A<=X<=B) - e.g.: normal (-1) 1 => 0.682688 - - normal_below A => probability of (X<=A) - normal_above A => probability of (X>=A) */ - - import simpson; - - normal = integrate normal_f; - normal_f X = 0.3989422804014327 * exp (-0.5*X*X); - - normal_below A = 0.5 + integrate normal_f 0.0 A if A > 0; - = 0.5 - integrate normal_f 0.0 A if A < 0; - = 0.5 otherwise; - - normal_above A = 1.0 - normal_below A; --- 19,20 ---- --- simpson.q DELETED --- |
From: Albert G. <ag...@us...> - 2007-11-26 21:32:04
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30963 Added Files: eds-example.qcalc Log Message: added Eddie Rucker's examples --- NEW FILE: eds-example.qcalc --- // qcalc 1.0, created Mon Nov 26 22:17:41 2007 -*-Q-*- -*- coding: UTF-8 -*- // [((0,0),"Take the gamma of B1:"),((0,1),"4.3"),((0,2),"gamma B1 ="),((0,3),"= gamma 4.3"),((1,0),"Factorial is based on gamma:"),((1,1),"8"),((1,2),"factorial B2 ="),((1,3),"= factorial B2"),((3,0),"How many ways can we choose"),((3,1),"Size of group:"),((3,2),"8"),((3,3),"Answer:"),((3,4),"= permutations C4 C5"),((4,0),"some elements from a set when order"),((4,1),"Number to choose:"),((4,2),"4"),((5,0),"is important."),((7,0),"How many ways can we choose"),((7,1),"Size of group:"),((7,2),"8"),((7,3),"Answer:"),((7,4),"= combinations C8 C9"),((8,0),"some elements from a set when order"),((8,1),"Number to choose:"),((8,2),"4"),((9,0),"is *not* important."),((11,0),"Binomial Distribution"),((11,1),"Times coin tossed:"),((11,2),"3"),((11,3),"Answer:"),((11,4),"= binomialDist C12 C13 C14"),((12,0),"A coin is tossed C12 times. What is"),((12,1),"Number of Heads:"),((12,2),"2"),((13,0),"the probability of getting exactly "),((13,1),"Prob. of a Head:"),((13,2),".5"),((14,0),"C13 heads"),((16,0),"Dates"),((16,1),"Values"),((16,2),"Percent Change"),((17,0),"2000"),((17,1),"10"),((18,0),"2001"),((18,1),"15"),((18,2),"= 100*percentChange B18 B19"),((19,0),"2002"),((19,1),"12"),((19,2),"= 100*percentChange B19 B20"),((20,0),"2003"),((20,1),"16"),((20,2),"= 100*percentChange B20 B21"),((21,0),"2004"),((21,1),"19"),((21,2),"= 100*percentChange B21 B22"),((23,0),"Given a set of numbers"),((23,1),"Numbers"),((24,0),"we can find the following:"),((24,1),"3"),((25,1),"2"),((26,1),"4"),((27,1),"5"),((28,1),"3"),((29,1),"4"),((30,1),"2"),((31,1),"3"),((32,1),"2"),((33,0),"Mean:"),((33,1),"= mean B25:B33"),((34,0),"Mode:"),((34,1),"= mode (sort (<) B25:B33)"),((35,0),"Median:"),((35,1),"= median B25:B33"),((36,0),"Lower Quartile:"),((36,1),"= lowerQuartile B25:B33"),((37,0),"Upper Quartile:"),((37,1),"= upperQuartile B25:B33"),((38,0),"Range:"),((38,1),"= range B25:B33"),((39,0),"Population Variance:"),((39,1),"= populationVariance B25:B33"),((40,0),"Population Standard Deviation:"),((40,1),"= populationSTD B25:B33"),((41,0),"Sample Variance:"),((41,1),"= sampleVariance B25:B33"),((42,0),"Sample Standard Deviation:"),((42,1),"= sampleSTD B25:B33"),((44,0),"Find outliers of a group"),((44,1),"Numbers"),((45,1),"1"),((46,1),"30"),((47,1),"3"),((48,1),"-20"),((49,1),"5"),((50,1),"6"),((51,1),"7"),((52,0),"outliers = "),((52,1),"= outliers (sort (<) B46:B52)"),((54,0),"Regression"),((54,1),"X"),((54,2),"Y"),((55,0),"Find the best fitting line for the"),((55,1),"1"),((55,2),"4"),((56,0),"points to the right."),((56,1),"2"),((56,2),"6"),((57,1),"3"),((57,2),"7"),((58,1),"4"),((58,2),"9"),((59,1),"5"),((59,2),"12"),((60,1),"7"),((60,2),"13"),((62,0),"Least Squares:"),((62,1),"= regression B56:B61 C56:C61"),((63,0),"Value of regression at point B63"),((63,1),"9"),((63,2),"= regression B56:B61 C56:C61 B64"),((64,0),"correlation of coefficient"),((64,1),"= correlation B56:B61 C56:C61"),((65,0),"SSE"),((65,1),"= _SSE B56:B61 C56:C61"),((66,0),"MSE"),((66,1),"= _MSE B56:B61 C56:C61"),((68,0),"Assuming a Normal distribution"),((69,0),"Mean:"),((69,1),"30"),((70,0),"Standard Deviation:"),((70,1),"5"),((71,1),"23"),((71,2),"41"),((72,0),"Probability X is between B71 and C71"),((72,1),"= normal (zScore B72 B70 B71) (zScore C72 B70 B71)"),((73,0),"Probability X is above B71"),((73,1),"= normalAbove (zScore B72 B70 C72)"),((74,0),"Probability X is below B71"),((74,1),"= normalBelow (zScore B72 B70 B71)")] // [] // [(0,380),(1,181),(2,164),(3,117),(4,117)] // Start of script. Please do not remove this line. /* Written by Eddie Rucker 2006-2007 This library contains various functions that I have used for various projects and some I thought up for fun. I don't promise they will be efficient or be useful and I don't provide a warranty of any kind. Use at your own risk! */ public var const pi = 3.1415926535897931; public (\\) X Y @ (-); public medianSorted, median, lowerQuartileSorted, lowerQuartile, maximum, minimum, upperGamma, lowerGamma, percentChange, outliers, deleteOutliers, mean, mode, range, sampleVariance, populationVariance, sampleSTD, populationSTD, correlation, integrate, regression, _SXY, _SSE, _MSE, zScore, normal, normalBelow, normalAbove, gamma, factorial, permutations, combinations, binomialDist, beta, erf, efc; /* remove elements of Y from X (like set difference) example [1,2,3,4,5,1,6] \\ [1,3] => [2,4,5,6] */ [] \\ Y:List = []; Xs:List \\ [] = Xs; Xs:List \\ [Y|Ys] = (del_ Xs Y []) \\ Ys; /* remove an element K from a list */ private del_; del_ [] K Acc = reverse Acc; del_ [K|Ls] K Acc = del_ Ls K Acc; del_ [L|Ls] K Acc = del_ Ls K [L|Acc]; /* gamma */ gamma 1 = 1; gamma Z:Int = _FAIL_ if Z <= 0; = (Z-1) * gamma (Z-1) otherwise; gamma Z:Num = pi / (sin (pi*Z) * gamma (1-Z)) if re Z < 0.5; = 2.506628274631 * T^(Z-0.5) * exp(-T)*(0.99999999999980993 + sum [P!N/(Z+N) : N in [0..7]]) where T = Z + 6.5, P = [676.5203681218851, -1259.1392167224028, 771.32342877765313, -176.61502916214059, 12.507343278686905, -0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7]; /* factorial of integer N */ factorial N:Int = gamma (N+1); /* permutation R from N elements */ permutations N:Int R:Int = _FAIL_ if (N < 0) or else (N < R); = permutation_ N (N-R) 1 otherwise; permutation_ N N S = S; permutation_ N R S = permutation_ (N-1) R (N*S); /* combination R from N elements */ combinations N:Int R:Int = _FAIL_ if (N < 0) or else (N < R); = 0 if N < R; = (permutations N Diff) div (factorial Diff) if R >= Diff where Diff = N-R; = (permutations N R) div (factorial R) otherwise; /* binomial distribution with probability P */ binomialDist N:Int X:Int P:Float = _FAIL_ if (X < 0) or else ((P <= 0.0) and (P >= 1.0)); = (combinations N X) * (P^X) * (1.0-P)^(N-X) otherwise; /* percentage increase/decrease from X to Y */ percentChange X Y = (Y - X)/X; /* median assuming that L is sorted an average of the two medians is returned in case #L is even */ medianSorted L:List = _FAIL_ if #L < 3; where M = (#L) div 2: = (L!(M-1) + L!M) / 2 if #L mod 2 = 0; = L!M otherwise; /* return the median assuming that L is not sorted */ median = medianSorted . sort (<); /* return the mode assuming that L is sorted */ mode [X|Xs] where L = reverse (mode_ Xs X 0 0 []): = [] if L = [X|Xs]; = L; mode_ [] CurrElem OldCount CurrCount Acc = Acc if CurrCount < OldCount; = [CurrElem|Acc] if CurrCount = OldCount; = [CurrElem] if CurrCount > OldCount; mode_ [X|Xs] CurrElem OldCount CurrCount Acc = mode_ Xs X OldCount (CurrCount + 1) Acc if X = CurrElem; = mode_ Xs X CurrCount 0 [CurrElem] if CurrCount > OldCount; = mode_ Xs X CurrCount 0 [CurrElem|Acc] if CurrCount = OldCount; = mode_ Xs X OldCount 0 Acc if CurrCount < OldCount; /* lower quartile assuming that L is sorted */ lowerQuartileSorted L:List = medianSorted (take (#L div 2) L); /* lower quartile assuming that L is not sorted */ lowerQuartile = lowerQuartileSorted . sort (<); /* upper quartile assuming that L is sorted */ upperQuartileSorted L:List = medianSorted (drop (ceil (#L+1) div 2) L); /* upper quartile assuming that L is not sorted */ upperQuartile = upperQuartileSorted . sort (<); /* outliers assuming that L is sorted uses the 1.5*Interquartile method */ outliers L:List = filter (\Y. (Y < LB) or else (Y > UB)) L where (UQ, LQ) = (upperQuartileSorted L, lowerQuartileSorted L), IRQ = 1.5 * (UQ - LQ), (LB, UB) = (LQ - IRQ, UQ + IRQ); /* removes outliers from L; assume that L is sorted */ deleteOutliers L:List = L \\ (outliers L); /* returns mean of a list L */ mean L:List = (sum L) / #L; /* maximum of a list */ minimum L:List = foldl1 min L; /* minimum of a list */ maximum L:List = foldl1 max L; /* returns the range of list L */ range L:List = (maximum L) - (minimum L); private sqr; sqr X = X * X; /* returns the sample variance of L */ sampleVariance L:List = ((sum (map sqr L)) - (sqr (sum L))/N) / (N - 1) where N = #L; /* sample standard deviation */ sampleSTD L:List = sqrt (sampleVariance L); /* returns the population variance of L */ populationVariance L:List = ((sum (map sqr L)) - (sqr (sum L))/N) / N where N = #L; /* population standard of L */ populationSTD L:List = sqrt (populationVariance L); /* returns the covariance of lists X and Y */ covariance X:List Y:List = ((sum (zipwith (*) X Y)) - (sum X) * (sum Y) / #X) / (#X - 1); /* returns the correlation coefficient of Lists X and Y */ correlation X:List Y:List = (covariance X Y) / (sqrt (sampleVariance X) * sqrt (sampleVariance Y)); /* Numeric integration using the Recursive Simpson's Rule */ integrate F A:Real B:Real = rsr F A FA B FB 0.0000005 Est where FA = F A, FB = F B, M = 0.5*(A+B), Est = ((abs (M-A)/6.0) * (FA + 4.0*(F M) + FB)); /* rsr = Recursive Simpson's Rule */ private rsr; rsr F A FA B FB Err Sum where M = 0.5*(A+B), C = abs (M-A)/6.0, FM = F M, L = C * (FA + 4.0*F (0.5*(A+M)) + FM), R = C * (FM + 4.0*F (0.5*(M+B)) + FB), C2 = L+R-Sum: = L + R + C2/15.0 if abs C2 <= 15.0*Err; = (rsr F A FA M FM (0.5*Err) L) + (rsr F M FM B FB (0.5*Err) R); /* examples of integration These methods are not the best algorithms! DON'T USE THEM FOR SERIOUS WORK! example: lowerGamma 1 10 => 0.999954669331989 octave: gammai(1,10) => ans = 0.99995 */ lowerGamma A X = 1.0 - exp(-X) if A = 1; = 1.0/gamma A * integrate (\T. exp(-T) * T^E) 0.0 X where E = A - 1; /* incomplete upper gamma */ upperGamma A X = (gamma A) - lowerGamma A X; /* error function */ erf X = 1.12837916709551 * integrate (\Z . exp(-Z*Z)) 0.0 X; /* complementary error function */ erfc X = abs (1.0 - erf X); /* cumulative chi-square distribution Please don't use this! chiSquareCDF X D = erf (sqrt (0.5*X)) if D = 1; = (lowerGamma (D/2) (X/2))/gamma(D/2); */ /* Beta function */ beta X Y = (gamma X * gamma Y) / gamma (X + Y); /* regression stuff regression X Y => \X1 . A+B*X1 examples: regression [1,2,3,4] [3,4,5,6] => \X1 . 2.0+1.0*X1 regression [1,2,3,4] [3,4,5,6] 5 => 7.0 */ /* sum of squares */ _SXY X:List Y:List = (sum $ zipwith (*) X Y) - (sum X * sum Y) / (#X); private _SR; _SR X:List Y:List = (_SXY X Y)^2 / _SXY X X; /* sum of squares error */ _SSE X:List Y:List = (_SXY Y Y) - _SR X Y; /* sum of mean squares error */ _MSE X:List Y:List = _SSE X Y / (#X - 2); regression X:List Y:List = \Z . A + B * Z where B = (_SXY X Y) / (_SXY X X), A = (mean Y) - B * (mean X); /* Normal Distribution normal A B => probability of P(A<X<B) normalBelow A => P(X<A) normalAbove A => P(X>A) */ zScore X Mean Std = (X-Mean) / Std; /* normal PDF function */ private normalPDF; normalPDF Z:Real = 0.3989422804014327 * exp (-0.5*Z*Z); /* normal A B => probability of P(A<X<B) */ normal = integrate normalPDF; normalBelow Z:Real = 0.5 + integrate normalPDF 0.0 Z if Z > 0.0; = 0.5 - integrate normalPDF 0.0 Z if Z < 0.0; = 0.5; normalAbove Z:Real = 1.0 - normalBelow Z; |
From: Albert G. <ag...@us...> - 2007-11-26 14:35:50
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12656 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.189 retrieving revision 1.190 diff -C2 -d -r1.189 -r1.190 *** qcalc.q 26 Nov 2007 09:31:06 -0000 1.189 --- qcalc.q 26 Nov 2007 14:35:45 -0000 1.190 *************** *** 717,723 **** init_interp || ABORTED := false || statusmsg "Computation aborted" || ! normal_cursor if get ABORTED; ! = normal_cursor otherwise; /* Queue GUI updates for later processing during evaluations. */ --- 717,723 ---- init_interp || ABORTED := false || statusmsg "Computation aborted" || ! normal_cursor || false if get ABORTED; ! = normal_cursor || true otherwise; /* Queue GUI updates for later processing during evaluations. */ *************** *** 854,860 **** // background task: digest 'X = X; - // pending updates: - digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W - if get STATE = 4; // other messages from the inferior process: --- 854,857 ---- *************** *** 3070,3074 **** merge_undo L:List = //printf "*** merge undo: %s ++ %s\n" (str L0,str L) || ! UNDO_LIST := [L0++L|UL] where [L0|UL] = get UNDO_LIST if not null L --- 3067,3071 ---- merge_undo L:List = //printf "*** merge undo: %s ++ %s\n" (str L0,str L) || ! UNDO_LIST := [merge_lists L0 L|UL] where [L0|UL] = get UNDO_LIST if not null L *************** *** 3077,3085 **** merge_undo L:List = //printf "*** merge undo: %s ++ %s\n" (str (DI,DJ,L0),str L) || ! UNDO_LIST := [(I,J,L0++L)|UL] where [(I,J,L0:List)|UL] = get UNDO_LIST if not null L where L = filter (neg is_gui_elem.fst) $ undo_cellvals L; undo_cellvals (I,J) = [undo_cellval (I,J)]; --- 3074,3086 ---- merge_undo L:List = //printf "*** merge undo: %s ++ %s\n" (str (DI,DJ,L0),str L) || ! UNDO_LIST := [(I,J,merge_lists L0 L)|UL] where [(I,J,L0:List)|UL] = get UNDO_LIST if not null L where L = filter (neg is_gui_elem.fst) $ undo_cellvals L; + // XXXFIXME: We should remove duplicates here. + merge_lists L1 L2 + = L1++L2; + undo_cellvals (I,J) = [undo_cellval (I,J)]; *************** *** 3552,3558 **** /* Recompute the given cells. */ ! compute V = begin_compute || ! do submit V || collect_results emptyhdict V || ! end_compute_test; collect_results U V --- 3553,3576 ---- /* Recompute the given cells. */ ! def UQ = semaphore; // temporary storage for queueing deferred cell updates ! ! /* We go to some lengths here to implement this fully tail-recursively, in ! order to prevent stack overflows on the deferred propagation of cell values ! changed via setval et al or any of the GUI element functions while a ! computation is already in progress. To achieve this, the accumulated list ! of updated cell indices U is passed around between compute and process_sel2 ! (which call each other tail-recursively). When the cascade of updates ! eventually ends, we finally call the merge_undo function on this list to ! update the undo list in one go. */ ! ! compute V:List = compute ([],V); ! compute (U,V) = /* Some cells were updated, process them (tail-)recursively ! after the current computation has finished. */ ! process_sel2 (U++U1,W) ! where (U1,W) = try UQ ! if begin_compute || do submit V || ! collect_results emptyhdict V || ! end_compute_test; ! = merge_undo U otherwise; collect_results U V *************** *** 3560,3565 **** results_loop T0 U [] ! // we're finished; process any pending cell updates ! = post MSGS $ zipwith append (keys U) (vals U) if not null U; = () otherwise; results_loop T0 U [(I,J)|V] --- 3578,3585 ---- results_loop T0 U [] ! // we're finished; queue any pending cell updates s.t. they are executed later ! = post UQ (K,W) ! where K = keys U, V = vals U, W = zipwith append K V ! if not null U; = () otherwise; results_loop T0 U [(I,J)|V] *************** *** 3801,3805 **** = false otherwise; ! process_sel2 W = if check_interp then compute V where W = map (flip (flip sub 0) 1) W, // Exclude all toplevel GUI elements from this list --- 3821,3828 ---- = false otherwise; ! process_sel2 W:List ! = process_sel2 ([],W); ! process_sel2 (U,W) ! = if check_interp then compute (U,V) where W = map (flip (flip sub 0) 1) W, // Exclude all toplevel GUI elements from this list *************** *** 3810,3813 **** --- 3833,3837 ---- CHK = foldl process2 false W if not null W and then check_interp; + = merge_undo U otherwise; clear_sel W = do (flip cell_setval ()) W || do clear_cell W || compute V |
From: Albert G. <ag...@us...> - 2007-11-26 14:24:19
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32436 Modified Files: midiio.qcalc Log Message: cosmetic changes Index: midiio.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/midiio.qcalc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** midiio.qcalc 26 Nov 2007 02:13:30 -0000 1.4 --- midiio.qcalc 26 Nov 2007 14:24:13 -0000 1.5 *************** *** 1,6 **** ! // qcalc 1.0, created Mon Nov 26 03:05:30 2007 -*-Q-*- -*- coding: UTF-8 -*- // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (-1,15,1,-1,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= xnote_name C5 D5"),((5,0),"Note Off"),((5,2),"= spinbox (-1,15,1,-1,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= xnote_name C6 D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (-1,15,1,-1,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((6,6),"= pitch_val D7 E7"),((7,0),"Controller"),((7,2),"= spinbox (-1,15,1,-1,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((7,6),"= ctrl_name D8"),((8,0),"Program"),((8,2),"= spinbox (-1,15,1,-1,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((8,6),"= prog_name D9"),((9,0),"Aftertouch"),((9,2),"= spinbox (-1,15,1,-1,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (-1,15,1,-1,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((10,6),"= xnote_name C11 D11"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,15,1,D$14)"),((16,3),"= spinbox (0,127,1,60)"),((16,4),"= spinbox (0,127,1,64)"),((16,5),"= outsendbutton C$14 (note_on C17 D17 E17)"),((16,6),"= xnote_name C17 D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,15,1,D$14)"),((17,3),"= spinbox (0,127,1,60)"),((17,4),"= spinbox (0,127,1,64)"),((17,5),"= outsendbutton C$14 (note_off C18 D18 E18)"),((17,6),"= xnote_name C18 D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,15,1,D$14)"),((18,3),"= spinbox (0,127,1,0)"),((18,4),"= spinbox (0,127,1,64)"),((18,5),"= outsendbutton C$14 (pitch_wheel C19 D19 E19)"),((18,6),"= pitch_val D19 E19"),((19,0),"Controller"),((19,2),"= spinbox (0,15,1,D$14)"),((19,3),"= spinbox (0,127,1,0)"),((19,4),"= spinbox (0,127,1,0)"),((19,5),"= outsendbutton C$14 (ctrl_change C20 D20 E20)"),((19,6),"= ctrl_name D20"),((20,0),"Program"),((20,2),"= spinbox (0,15,1,D$14)"),((20,3),"= spinbox (0,127,1,0)"),((20,5),"= outsendbutton C$14 (prog_change C21 D21)"),((20,6),"= prog_name D21"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,15,1,D$14)"),((21,3),"= spinbox (0,127,1,0)"),((21,5),"= outsendbutton C$14 (chan_press C22 D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,15,1,D$14)"),((22,3),"= spinbox (0,127,1,60)"),((22,4),"= spinbox (0,127,1,64)"),((22,5),"= outsendbutton C$14 (key_press C23 D23 E23)"),((22,6),"= xnote_name C23 D23")] // [] ! // [(0,126),(1,146),(5,83),(6,185)] // Start of script. Please do not remove this line. --- 1,6 ---- ! // qcalc 1.0, created Mon Nov 26 15:28:25 2007 -*-Q-*- -*- coding: UTF-8 -*- // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (-1,15,1,-1,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= xnote_name C5 D5"),((5,0),"Note Off"),((5,2),"= spinbox (-1,15,1,-1,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= xnote_name C6 D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (-1,15,1,-1,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((6,6),"= pitch_val D7 E7"),((7,0),"Controller"),((7,2),"= spinbox (-1,15,1,-1,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((7,6),"= ctrl_name D8"),((8,0),"Program"),((8,2),"= spinbox (-1,15,1,-1,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((8,6),"= prog_name D9"),((9,0),"Aftertouch"),((9,2),"= spinbox (-1,15,1,-1,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (-1,15,1,-1,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((10,6),"= xnote_name C11 D11"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,15,1,D$14)"),((16,3),"= spinbox (0,127,1,60)"),((16,4),"= spinbox (0,127,1,64)"),((16,5),"= outsendbutton C$14 (note_on C17 D17 E17)"),((16,6),"= xnote_name C17 D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,15,1,D$14)"),((17,3),"= spinbox (0,127,1,60)"),((17,4),"= spinbox (0,127,1,64)"),((17,5),"= outsendbutton C$14 (note_off C18 D18 E18)"),((17,6),"= xnote_name C18 D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,15,1,D$14)"),((18,3),"= spinbox (0,127,1,0)"),((18,4),"= spinbox (0,127,1,64)"),((18,5),"= outsendbutton C$14 (pitch_wheel C19 D19 E19)"),((18,6),"= pitch_val D19 E19"),((19,0),"Controller"),((19,2),"= spinbox (0,15,1,D$14)"),((19,3),"= spinbox (0,127,1,0)"),((19,4),"= spinbox (0,127,1,0)"),((19,5),"= outsendbutton C$14 (ctrl_change C20 D20 E20)"),((19,6),"= ctrl_name D20"),((20,0),"Program"),((20,2),"= spinbox (0,15,1,D$14)"),((20,3),"= spinbox (0,127,1,0)"),((20,5),"= outsendbutton C$14 (prog_change C21 D21)"),((20,6),"= prog_name D21"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,15,1,D$14)"),((21,3),"= spinbox (0,127,1,0)"),((21,5),"= outsendbutton C$14 (chan_press C22 D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,15,1,D$14)"),((22,3),"= spinbox (0,127,1,60)"),((22,4),"= spinbox (0,127,1,64)"),((22,5),"= outsendbutton C$14 (key_press C23 D23 E23)"),((22,6),"= xnote_name C23 D23")] // [] ! // [(0,126),(1,146),(5,83),(6,165)] // Start of script. Please do not remove this line. |
From: Albert G. <ag...@us...> - 2007-11-26 09:31:11
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12407 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.188 retrieving revision 1.189 diff -C2 -d -r1.188 -r1.189 *** qcalc.q 26 Nov 2007 02:23:37 -0000 1.188 --- qcalc.q 26 Nov 2007 09:31:06 -0000 1.189 *************** *** 3668,3672 **** = do flag [(I,J)|V] if (if time-T0>=0.5 then wait_cursor) || ! local (qt APP "processEvents" 100) || get ABORTED; = results_loop T0 U [(I,J)|V] otherwise; --- 3668,3674 ---- = do flag [(I,J)|V] if (if time-T0>=0.5 then wait_cursor) || ! end_recursive || ! local (qt APP "processEvents" 100) || ! begin_recursive || get ABORTED; = results_loop T0 U [(I,J)|V] otherwise; |
From: Albert G. <ag...@us...> - 2007-11-26 02:23:40
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26247 Modified Files: qcalc.q Log Message: bugfix: empty string wasn't highlighted in script editor Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.187 retrieving revision 1.188 diff -C2 -d -r1.187 -r1.188 *** qcalc.q 25 Nov 2007 13:26:48 -0000 1.187 --- qcalc.q 26 Nov 2007 02:23:37 -0000 1.188 *************** *** 3211,3216 **** comment S, comment_start S, ident S; ! tok (S,[1,2]) = string S; ! tok (S,[3,4]) = string_start S; tok (S,[5]) = shebang S; tok (S,[6]) = comment S; --- 3211,3216 ---- comment S, comment_start S, ident S; ! tok (S,[1|_]) = string S; ! tok (S,[3|_]) = string_start S; tok (S,[5]) = shebang S; tok (S,[6]) = comment S; |
From: Albert G. <ag...@us...> - 2007-11-26 02:13:36
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21930/examples Modified Files: midiio.qcalc midiutil.q Log Message: cosmetic changes Index: midiutil.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/midiutil.q,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** midiutil.q 25 Nov 2007 15:35:17 -0000 1.1 --- midiutil.q 26 Nov 2007 02:13:31 -0000 1.2 *************** *** 2,17 **** --- 2,37 ---- /* Helper functions used in the midiio.qcalc example. */ + /* Translate MidiShare time in msecs to min:sec:msec format. */ + + public timestr MSECS; + /* Translate MIDI note numbers to note and GM percussion names. */ public note_name N, perc_name N; + /* Use note or percussion names, depending on the channel number. */ + + public xnote_name CH N; + /* Translate GM controller and program numbers. */ public ctrl_name N, prog_name N; + /* Translate pitch wheel value. */ + + public pitch_val LSB MSB; + /* Implementation. */ import dict; + timestr MS = sprintf "%d:%02d:%03d" (M,S,MS) + where S = MS div 1000, MS = MS mod 1000, + M = S div 60, S = S mod 60; + + pitch_val LSB:Int MSB:Int + = MSB*128+LSB-8192 if (LSB>=0) and then (MSB>=0); + pitch_val _ _ = "N/A" otherwise; + def NOTE_NAMES = ("C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"); *************** *** 19,22 **** --- 39,45 ---- note_name _ = "N/A" otherwise; + xnote_name 9 N = perc_name N; + xnote_name CH N = note_name N otherwise; + def GMPROG = dict [(0, "Acoustic Grand Piano"), Index: midiio.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/midiio.qcalc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** midiio.qcalc 25 Nov 2007 15:35:17 -0000 1.3 --- midiio.qcalc 26 Nov 2007 02:13:30 -0000 1.4 *************** *** 1,6 **** ! // qcalc 1.0, created Sun Nov 25 16:12:11 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (0,16,1,0,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= note_name D5"),((5,0),"Note Off"),((5,2),"= spinbox (0,16,1,0,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= note_name D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (0,16,1,0,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((7,0),"Controller"),((7,2),"= spinbox (0,16,1,0,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((8,0),"Program"),((8,2),"= spinbox (0,16,1,0,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,4),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((9,0),"Aftertouch"),((9,2),"= spinbox (0,16,1,0,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,4),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (0,16,1,0,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,16,1,D$14,\" \")"),((16,3),"= spinbox (-1,127,1,60,\" \")"),((16,4),"= spinbox (-1,127,1,64,\" \")"),((16,5),"= outsendbutton C$14 (note_on (C17-1) D17 E17)"),((16,6),"= note_name D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,16,1,D$14,\" \")"),((17,3),"= spinbox (-1,127,1,60,\" \")"),((17,4),"= spinbox (-1,127,1,64,\" \")"),((17,5),"= outsendbutton C$14 (note_off (C18-1) D18 E18)"),((17,6),"= note_name D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,16,1,D$14,\" \")"),((18,3),"= spinbox (-1,127,1,0,\" \")"),((18,4),"= spinbox (-1,127,1,64,\" \")"),((18,5),"= outsendbutton C$14 (pitch_wheel (C19-1) D19 E19)"),((19,0),"Controller"),((19,2),"= spinbox (0,16,1,D$14,\" \")"),((19,3),"= spinbox (-1,127,1,1,\" \")"),((19,4),"= spinbox (-1,127,1,0,\" \")"),((19,5),"= outsendbutton C$14 (ctrl_change (C20-1) D20 E20)"),((20,0),"Program"),((20,2),"= spinbox (0,16,1,D$14,\" \")"),((20,3),"= spinbox (-1,127,1,0,\" \")"),((20,4),"= spinbox (-1,127,1,-1,\" \")"),((20,5),"= outsendbutton C$14 (prog_change (C21-1) D21)"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,16,1,D$14,\" \")"),((21,3),"= spinbox (-1,127,1,0,\" \")"),((21,4),"= spinbox (-1,127,1,-1,\" \")"),((21,5),"= outsendbutton C$14 (chan_press (C22-1) D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,16,1,D$14,\" \")"),((22,3),"= spinbox (-1,127,1,60,\" \")"),((22,4),"= spinbox (-1,127,1,64,\" \")"),((22,5),"= outsendbutton C$14 (key_press (C23-1) D23 E23)")] // [] ! // [(0,126),(1,146),(5,83)] // Start of script. Please do not remove this line. --- 1,6 ---- ! // qcalc 1.0, created Mon Nov 26 03:05:30 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (-1,15,1,-1,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= xnote_name C5 D5"),((5,0),"Note Off"),((5,2),"= spinbox (-1,15,1,-1,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= xnote_name C6 D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (-1,15,1,-1,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((6,6),"= pitch_val D7 E7"),((7,0),"Controller"),((7,2),"= spinbox (-1,15,1,-1,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((7,6),"= ctrl_name D8"),((8,0),"Program"),((8,2),"= spinbox (-1,15,1,-1,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((8,6),"= prog_name D9"),((9,0),"Aftertouch"),((9,2),"= spinbox (-1,15,1,-1,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (-1,15,1,-1,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((10,6),"= xnote_name C11 D11"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,15,1,D$14)"),((16,3),"= spinbox (0,127,1,60)"),((16,4),"= spinbox (0,127,1,64)"),((16,5),"= outsendbutton C$14 (note_on C17 D17 E17)"),((16,6),"= xnote_name C17 D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,15,1,D$14)"),((17,3),"= spinbox (0,127,1,60)"),((17,4),"= spinbox (0,127,1,64)"),((17,5),"= outsendbutton C$14 (note_off C18 D18 E18)"),((17,6),"= xnote_name C18 D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,15,1,D$14)"),((18,3),"= spinbox (0,127,1,0)"),((18,4),"= spinbox (0,127,1,64)"),((18,5),"= outsendbutton C$14 (pitch_wheel C19 D19 E19)"),((18,6),"= pitch_val D19 E19"),((19,0),"Controller"),((19,2),"= spinbox (0,15,1,D$14)"),((19,3),"= spinbox (0,127,1,0)"),((19,4),"= spinbox (0,127,1,0)"),((19,5),"= outsendbutton C$14 (ctrl_change C20 D20 E20)"),((19,6),"= ctrl_name D20"),((20,0),"Program"),((20,2),"= spinbox (0,15,1,D$14)"),((20,3),"= spinbox (0,127,1,0)"),((20,5),"= outsendbutton C$14 (prog_change C21 D21)"),((20,6),"= prog_name D21"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,15,1,D$14)"),((21,3),"= spinbox (0,127,1,0)"),((21,5),"= outsendbutton C$14 (chan_press C22 D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,15,1,D$14)"),((22,3),"= spinbox (0,127,1,60)"),((22,4),"= spinbox (0,127,1,64)"),((22,5),"= outsendbutton C$14 (key_press C23 D23 E23)"),((22,6),"= xnote_name C23 D23")] // [] ! // [(0,126),(1,146),(5,83),(6,185)] // Start of script. Please do not remove this line. *************** *** 38,43 **** outport_spinbox = spinbox (0,255,1,0); ! inchan_spinbox = spinbox (0,16,1,0,"Any"); ! outchan_spinbox = spinbox (1,16,1,1); /* Translate symbolic port and channel names. */ --- 38,43 ---- outport_spinbox = spinbox (0,255,1,0); ! inchan_spinbox = spinbox (-1,15,1,-1,"Any"); ! outchan_spinbox = spinbox (0,15,1,0); /* Translate symbolic port and channel names. */ *************** *** 46,50 **** portno N:Int = N; ! channo "Any" = 0; channo N:Int = N; --- 46,50 ---- portno N:Int = N; ! channo "Any" = -1; channo N:Int = N; *************** *** 52,56 **** clearbutton = actionbutton "Clear" ! (matrix (row+1,1) [[""," "," "," "] : K in [1..7]] || ()); /* Reset the MIDI output area to defaults. */ --- 52,62 ---- clearbutton = actionbutton "Clear" ! (matrix (row+1,1) [[""," "," "," "], ! [""," "," "," "], ! [""," "," "," "], ! [""," "," "," "], ! [""," "," ",""], ! [""," "," ",""], ! [""," "," "," "]] || ()); /* Reset the MIDI output area to defaults. */ *************** *** 60,66 **** ["",CH,60,64], ["",CH,0,64], ! ["",CH,1,0], ! ["",CH,0," "], ! ["",CH,0," "], ["",CH,60,64]] || ()); --- 66,72 ---- ["",CH,60,64], ["",CH,0,64], ! ["",CH,0,0], ! ["",CH,0,""], ! ["",CH,0,""], ["",CH,60,64]] || ()); *************** *** 80,85 **** where IN:Int = client_ref NAME, NAME:String = midi_client_name IN, ! SEM:Semaphore = task_input, (I,J) = index, ! CHAN = CHAN-1; port_filter PORT --- 86,90 ---- where IN:Int = client_ref NAME, NAME:String = midi_client_name IN, ! SEM:Semaphore = task_input, (I,J) = index; port_filter PORT *************** *** 91,97 **** --- 96,108 ---- midi_accept_chan INREF CHAN true if CHAN >= 0; + def IN_T = ref 0; + + delta T0 T = T-T0 if T>=T0 where T0 = get T0; + = delta T0 (T+0x100000000) otherwise; + inprocess F SEM (I,J) IN PORT H:Thread B:Bool = puts "connecting input\n" || midi_connect IN INREF || + IN_T := midi_time || inprocess F SEM (I,J) IN PORT H (get SEM) if B; *************** *** 110,138 **** CONN = midi_connected IN INREF; inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_on CH N V) ! = rowvect (I+1,J+1) [TIME,CH+1,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!0; inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_off CH N V) ! = rowvect (I+2,J+1) [TIME,CH+1,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!1; inprocess F SEM (I,J) IN PORT H:Thread (TIME,pitch_wheel CH LSB MSB) ! = rowvect (I+3,J+1) [TIME,CH+1,LSB,MSB] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!2; inprocess F SEM (I,J) IN PORT H:Thread (TIME,ctrl_change CH N V) ! = rowvect (I+4,J+1) [TIME,CH+1,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!3; inprocess F SEM (I,J) IN PORT H:Thread (TIME,prog_change CH V) ! = rowvect (I+5,J+1) [TIME,CH+1,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!4; inprocess F SEM (I,J) IN PORT H:Thread (TIME,chan_press CH V) ! = rowvect (I+6,J+1) [TIME,CH+1,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!5; inprocess F SEM (I,J) IN PORT H:Thread (TIME,key_press CH N V) ! = rowvect (I+7,J+1) [TIME,CH+1,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!6; --- 121,149 ---- CONN = midi_connected IN INREF; inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_on CH N V) ! = rowvect (I+1,J+1) [timestr (delta IN_T TIME),CH,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!0; inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_off CH N V) ! = rowvect (I+2,J+1) [timestr (delta IN_T TIME),CH,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!1; inprocess F SEM (I,J) IN PORT H:Thread (TIME,pitch_wheel CH LSB MSB) ! = rowvect (I+3,J+1) [timestr (delta IN_T TIME),CH,LSB,MSB] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!2; inprocess F SEM (I,J) IN PORT H:Thread (TIME,ctrl_change CH N V) ! = rowvect (I+4,J+1) [timestr (delta IN_T TIME),CH,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!3; inprocess F SEM (I,J) IN PORT H:Thread (TIME,prog_change CH V) ! = rowvect (I+5,J+1) [timestr (delta IN_T TIME),CH,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!4; inprocess F SEM (I,J) IN PORT H:Thread (TIME,chan_press CH V) ! = rowvect (I+6,J+1) [timestr (delta IN_T TIME),CH,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!5; inprocess F SEM (I,J) IN PORT H:Thread (TIME,key_press CH N V) ! = rowvect (I+7,J+1) [timestr (delta IN_T TIME),CH,N,V] || inprocess F SEM (I,J) IN PORT H (get SEM) if F!6; *************** *** 162,168 **** --- 173,182 ---- SEM:Semaphore = task_input, (I,J) = index; + def OUT_T = ref 0; + outprocess SEM (I,J) OUT B:Bool = puts "connecting output\n" || midi_connect OUTREF OUT || + OUT_T := midi_time || outprocess SEM (I,J) OUT (get SEM) if B; *************** *** 188,191 **** outsend PORT MSG = //printf "%08d %s\n" (TIME,str MSG) || ! setval (row,1) TIME || midi_send OUTREF PORT MSG where TIME = midi_time; --- 202,206 ---- outsend PORT MSG = //printf "%08d %s\n" (TIME,str MSG) || ! setval (row,1) (timestr (delta OUT_T TIME)) || ! midi_send OUTREF PORT MSG where TIME = midi_time; |
From: Albert G. <ag...@us...> - 2007-11-25 15:35:36
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21118/examples Modified Files: midiio.qcalc Added Files: midiutil.q Log Message: moved helper functions to separate module, added helper functions to translate GM percussion, programs and controllers --- NEW FILE: midiutil.q --- /* Helper functions used in the midiio.qcalc example. */ /* Translate MIDI note numbers to note and GM percussion names. */ public note_name N, perc_name N; /* Translate GM controller and program numbers. */ public ctrl_name N, prog_name N; /* Implementation. */ import dict; def NOTE_NAMES = ("C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"); note_name N:Int = sprintf "%s%d" (NOTE_NAMES!(N mod 12),N div 12) if N>=0; note_name _ = "N/A" otherwise; def GMPROG = dict [(0, "Acoustic Grand Piano"), (1, "Bright Acoustic Piano"), (2, "Electric Grand Piano"), (3, "Honky-Tonk Piano"), (4, "Electric Piano 1"), (5, "Electric Piano 2"), (6, "Harpsichord"), (7, "Clavinet"), (8, "Celesta"), (9, "Glockenspiel"), (10, "Music Box"), (11, "Vibraphone"), (12, "Marimba"), (13, "Xylophone"), (14, "Tubular Bells"), (15, "Dulcimer"), (16, "Drawbar Organ"), (17, "Percussive Organ"), (18, "Rock Organ"), (19, "Church Organ"), (20, "Reed Organ"), (21, "Accordion"), (22, "Harmonica"), (23, "Tango Accordian"), (24, "Acoustic Guitar (nylon)"), (25, "Acoustic Guitar (steel)"), (26, "Electric Guitar (jazz)"), (27, "Electric Guitar (clean)"), (28, "Electric Guitar (muted)"), (29, "Overdriven Guitar"), (30, "Distortion Guitar"), (31, "Guitar Harmonics"), (32, "Acoustic Bass"), (33, "Electric Bass (finger)"), (34, "Electric Bass (pick)"), (35, "Fretless Bass"), (36, "Slap Bass 1"), (37, "Slap Bass 2"), (38, "Synth Bass 1"), (39, "Synth Bass 2"), (40, "Violin"), (41, "Viola"), (42, "Cello"), (43, "Contrabass"), (44, "Tremolo Strings"), (45, "Pizzicato Strings"), (46, "Orchestral Strings"), (47, "Timpani"), (48, "String Ensemble 1"), (49, "String Ensemble 2"), (50, "SynthStrings 1"), (51, "SynthStrings 2"), (52, "Choir Aahs"), (53, "Voice Oohs"), (54, "Synth Voice"), (55, "Orchestra Hit"), (56, "Trumpet"), (57, "Trombone"), (58, "Tuba"), (59, "Muted Trumpet"), (60, "French Horn"), (61, "Brass Section"), (62, "SynthBrass 1"), (63, "SynthBrass 2"), (64, "Soprano Sax"), (65, "Alto Sax"), (66, "Tenor Sax"), (67, "Baritone Sax"), (68, "Oboe"), (69, "English Horn"), (70, "Bassoon"), (71, "Clarinet"), (72, "Piccolo"), (73, "Flute"), (74, "Recorder"), (75, "Pan Flute"), (76, "Blown Bottle"), (77, "Shakuhachi"), (78, "Whistle"), (79, "Ocarina"), (80, "Lead 1 (square)"), (81, "Lead 2 (sawtooth)"), (82, "Lead 3 (calliope)"), (83, "Lead 4 (chiff)"), (84, "Lead 5 (charang)"), (85, "Lead 6 (voice)"), (86, "Lead 7 (fifths)"), (87, "Lead 8 (bass+lead)"), (88, "Pad 1 (new age)"), (89, "Pad 2 (warm)"), (90, "Pad 3 (polysynth)"), (91, "Pad 4 (choir)"), (92, "Pad 5 (bowed)"), (93, "Pad 6 (metallic)"), (94, "Pad 7 (halo)"), (95, "Pad 8 (sweep)"), (96, "FX 1 (rain)"), (97, "FX 2 (soundtrack)"), (98, "FX 3 (crystal)"), (99, "FX 4 (atmosphere)"), (100, "FX 5 (brightness)"), (101, "FX 6 (goblins)"), (102, "FX 7 (echoes)"), (103, "FX 8 (sci-fi)"), (104, "Sitar"), (105, "Banjo"), (106, "Shamisen"), (107, "Koto"), (108, "Kalimba"), (109, "Bagpipe"), (110, "Fiddle"), (111, "Shanai"), (112, "Tinkle Bell"), (113, "Agogo"), (114, "Steel Drums"), (115, "Woodblock"), (116, "Taiko Drum"), (117, "Melodic Tom"), (118, "Synth Drum"), (119, "Reverse Cymbal"), (120, "Guitar Fret Noise"), (121, "Breath Noise"), (122, "Seashore"), (123, "Bird Tweet"), (124, "Telephone Ring"), (125, "Helicopter"), (126, "Applause"), (127, "Gunshot")], GMPERC = dict [(35, "Acoustic Bass Drum"), (36, "Bass Drum 1"), (37, "Side Stick"), (38, "Acoustic Snare"), (39, "Hand Clap"), (40, "Electric Snare"), (41, "Low Floor Tom"), (42, "Closed Hi-Hat"), (43, "High Floor Tom"), (44, "Pedal Hi-Hat"), (45, "Low Tom"), (46, "Open Hi-Hat"), (47, "Low-Mid Tom"), (48, "Hi-Mid Tom"), (49, "Crash Cymbal 1"), (50, "High Tom"), (51, "Ride Cymbal 1"), (52, "Chinese Cymbal"), (53, "Ride Bell"), (54, "Tambourine"), (55, "Splash Cymbal"), (56, "Cowbell"), (57, "Crash Cymbal 2"), (58, "Vibraslap"), (59, "Ride Cymbal 2"), (60, "Hi Bongo"), (61, "Low Bongo"), (62, "Mute Hi Conga"), (63, "Open Hi Conga"), (64, "Low Conga"), (65, "High Timbale"), (66, "Low Timbale"), (67, "High Agogo"), (68, "Low Agogo"), (69, "Cabasa"), (70, "Maracas"), (71, "Short Whistle"), (72, "Long Whistle"), (73, "Short Guiro"), (74, "Long Guiro"), (75, "Claves"), (76, "Hi Wood Block"), (77, "Low Wood Block"), (78, "Mute Cuica"), (79, "Open Cuica"), (80, "Mute Triangle"), (81, "Open Triangle")], GMCTRL = dict [(0, "Bank Select"), (1, "Modulation Wheel (coarse)"), (2, "Breath controller (coarse)"), (4, "Foot Pedal (coarse)"), (5, "Portamento Time (coarse)"), (6, "Data Entry (coarse)"), (7, "Volume (coarse)"), (8, "Balance (coarse)"), (10, "Pan position (coarse)"), (11, "Expression (coarse)"), (12, "Effect Control 1 (coarse)"), (13, "Effect Control 2 (coarse)"), (16, "General Purpose Slider 1"), (17, "General Purpose Slider 2"), (18, "General Purpose Slider 3"), (19, "General Purpose Slider 4"), (32, "Bank Select (fine)"), (33, "Modulation Wheel (fine)"), (34, "Breath controller (fine)"), (36, "Foot Pedal (fine)"), (37, "Portamento Time (fine)"), (38, "Data Entry (fine)"), (39, "Volume (fine)"), (40, "Balance (fine)"), (42, "Pan position (fine)"), (43, "Expression (fine)"), (44, "Effect Control 1 (fine)"), (45, "Effect Control 2 (fine)"), (64, "Hold Pedal (on/off)"), (65, "Portamento (on/off)"), (66, "Sustenuto Pedal (on/off)"), (67, "Soft Pedal (on/off)"), (68, "Legato Pedal (on/off)"), (69, "Hold 2 Pedal (on/off)"), (70, "Sound Variation"), (71, "Sound Timbre"), (72, "Sound Release Time"), (73, "Sound Attack Time"), (74, "Sound Brightness"), (75, "Sound Control 6"), (76, "Sound Control 7"), (77, "Sound Control 8"), (78, "Sound Control 9"), (79, "Sound Control 10"), (80, "General Purpose Button 1 (on/off)"), (81, "General Purpose Button 2 (on/off)"), (82, "General Purpose Button 3 (on/off)"), (83, "General Purpose Button 4 (on/off)"), (91, "Effects Level"), (92, "Tremulo Level"), (93, "Chorus Level"), (94, "Celeste Level"), (95, "Phaser Level"), (96, "Data Button increment"), (97, "Data Button decrement"), (98, "Non-registered Parameter (fine)"), (99, "Non-registered Parameter (coarse)"), (100, "Registered Parameter (fine)"), (101, "Registered Parameter (coarse)"), (120, "All Sound Off"), (121, "All Controllers Off"), (122, "Local Keyboard (on/off)"), (123, "All Notes Off"), (124, "Omni Mode Off"), (125, "Omni Mode On"), (126, "Mono Operation"), (127, "Poly Operation")]; perc_name N:Int = S where S:String = GMPERC!N; perc_name _ = "N/A" otherwise; ctrl_name N:Int = S where S:String = GMCTRL!N; ctrl_name _ = "N/A" otherwise; prog_name N:Int = S where S:String = GMPROG!N; prog_name _ = "N/A" otherwise; Index: midiio.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/midiio.qcalc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** midiio.qcalc 25 Nov 2007 15:06:17 -0000 1.2 --- midiio.qcalc 25 Nov 2007 15:35:17 -0000 1.3 *************** *** 1,3 **** ! // qcalc 1.0, created Sun Nov 25 16:10:11 2007 -*-Q-*- -*- coding: UTF-8 -*- // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (0,16,1,0,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= note_name D5"),((5,0),"Note Off"),((5,2),"= spinbox (0,16,1,0,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= note_name D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (0,16,1,0,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((7,0),"Controller"),((7,2),"= spinbox (0,16,1,0,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((8,0),"Program"),((8,2),"= spinbox (0,16,1,0,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,4),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((9,0),"Aftertouch"),((9,2),"= spinbox (0,16,1,0,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,4),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (0,16,1,0,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,16,1,D$14,\" \")"),((16,3),"= spinbox (-1,127,1,60,\" \")"),((16,4),"= spinbox (-1,127,1,64,\" \")"),((16,5),"= outsendbutton C$14 (note_on (C17-1) D17 E17)"),((16,6),"= note_name D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,16,1,D$14,\" \")"),((17,3),"= spinbox (-1,127,1,60,\" \")"),((17,4),"= spinbox (-1,127,1,64,\" \")"),((17,5),"= outsendbutton C$14 (note_off (C18-1) D18 E18)"),((17,6),"= note_name D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,16,1,D$14,\" \")"),((18,3),"= spinbox (-1,127,1,0,\" \")"),((18,4),"= spinbox (-1,127,1,64,\" \")"),((18,5),"= outsendbutton C$14 (pitch_wheel (C19-1) D19 E19)"),((19,0),"Controller"),((19,2),"= spinbox (0,16,1,D$14,\" \")"),((19,3),"= spinbox (-1,127,1,1,\" \")"),((19,4),"= spinbox (-1,127,1,0,\" \")"),((19,5),"= outsendbutton C$14 (ctrl_change (C20-1) D20 E20)"),((20,0),"Program"),((20,2),"= spinbox (0,16,1,D$14,\" \")"),((20,3),"= spinbox (-1,127,1,0,\" \")"),((20,4),"= spinbox (-1,127,1,-1,\" \")"),((20,5),"= outsendbutton C$14 (prog_change (C21-1) D21)"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,16,1,D$14,\" \")"),((21,3),"= spinbox (-1,127,1,0,\" \")"),((21,4),"= spinbox (-1,127,1,-1,\" \")"),((21,5),"= outsendbutton C$14 (chan_press (C22-1) D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,16,1,D$14,\" \")"),((22,3),"= spinbox (-1,127,1,60,\" \")"),((22,4),"= spinbox (-1,127,1,64,\" \")"),((22,5),"= outsendbutton C$14 (key_press (C23-1) D23 E23)")] // [] --- 1,3 ---- ! // qcalc 1.0, created Sun Nov 25 16:12:11 2007 -*-Q-*- -*- coding: UTF-8 -*- // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (0,16,1,0,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= note_name D5"),((5,0),"Note Off"),((5,2),"= spinbox (0,16,1,0,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= note_name D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (0,16,1,0,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((7,0),"Controller"),((7,2),"= spinbox (0,16,1,0,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((8,0),"Program"),((8,2),"= spinbox (0,16,1,0,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,4),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((9,0),"Aftertouch"),((9,2),"= spinbox (0,16,1,0,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,4),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (0,16,1,0,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,16,1,D$14,\" \")"),((16,3),"= spinbox (-1,127,1,60,\" \")"),((16,4),"= spinbox (-1,127,1,64,\" \")"),((16,5),"= outsendbutton C$14 (note_on (C17-1) D17 E17)"),((16,6),"= note_name D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,16,1,D$14,\" \")"),((17,3),"= spinbox (-1,127,1,60,\" \")"),((17,4),"= spinbox (-1,127,1,64,\" \")"),((17,5),"= outsendbutton C$14 (note_off (C18-1) D18 E18)"),((17,6),"= note_name D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,16,1,D$14,\" \")"),((18,3),"= spinbox (-1,127,1,0,\" \")"),((18,4),"= spinbox (-1,127,1,64,\" \")"),((18,5),"= outsendbutton C$14 (pitch_wheel (C19-1) D19 E19)"),((19,0),"Controller"),((19,2),"= spinbox (0,16,1,D$14,\" \")"),((19,3),"= spinbox (-1,127,1,1,\" \")"),((19,4),"= spinbox (-1,127,1,0,\" \")"),((19,5),"= outsendbutton C$14 (ctrl_change (C20-1) D20 E20)"),((20,0),"Program"),((20,2),"= spinbox (0,16,1,D$14,\" \")"),((20,3),"= spinbox (-1,127,1,0,\" \")"),((20,4),"= spinbox (-1,127,1,-1,\" \")"),((20,5),"= outsendbutton C$14 (prog_change (C21-1) D21)"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,16,1,D$14,\" \")"),((21,3),"= spinbox (-1,127,1,0,\" \")"),((21,4),"= spinbox (-1,127,1,-1,\" \")"),((21,5),"= outsendbutton C$14 (chan_press (C22-1) D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,16,1,D$14,\" \")"),((22,3),"= spinbox (-1,127,1,60,\" \")"),((22,4),"= spinbox (-1,127,1,64,\" \")"),((22,5),"= outsendbutton C$14 (key_press (C23-1) D23 E23)")] // [] *************** *** 8,12 **** in qcalc. */ ! import calclib, midi; /* Open MidiShare clients. */ --- 8,12 ---- in qcalc. */ ! import calclib, midi, midiutil; /* Open MidiShare clients. */ *************** *** 16,26 **** _ = midi_connect INREF INREF; - /* Helper function to translate MIDI note numbers to note names. */ - - def NOTE_NAMES = ("C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"); - - note_name N:Int = sprintf "%s%d" (NOTE_NAMES!(N mod 12),N div 12) if N>=0; - note_name _ = "N/A" otherwise; - /* Create and parse numbered client names, to resolve ambiguities. */ --- 16,19 ---- |
From: Albert G. <ag...@us...> - 2007-11-25 15:06:21
|
Update of /cvsroot/q-lang/qcalc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9392/examples Modified Files: midiio.qcalc Log Message: code cleanup, added MIDI output Index: midiio.qcalc =================================================================== RCS file: /cvsroot/q-lang/qcalc/examples/midiio.qcalc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** midiio.qcalc 22 Nov 2007 09:30:06 -0000 1.1 --- midiio.qcalc 25 Nov 2007 15:06:17 -0000 1.2 *************** *** 1,12 **** ! // qcalc 1.0, created Thu Nov 22 10:31:16 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),"Input:"),((1,1),"= client_combobox"),((1,2),"= port_spinbox"),((1,3),"= chan_spinbox"),((3,0),"= midiin_taskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= midiin_clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (0,16,1,0,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= note_name D5"),((5,0),"Note Off"),((5,2),"= spinbox (0,16,1,0,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (0,16,1,0,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((7,0),"Controller"),((7,2),"= spinbox (0,16,1,0,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((8,0),"Program"),((8,2),"= spinbox (0,16,1,0,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,4),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((9,0),"Aftertouch"),((9,2),"= spinbox (0,16,1,0,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,4),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (0,16,1,0,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)")] // [] // [(0,126),(1,146),(5,83)] // Start of script. Please do not remove this line. import calclib, midi; ! def MYNAME = "QCalc MIDI I/O", ! REF = midi_open MYNAME, _ = midi_connect REF REF; def NOTE_NAMES = ("C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"); --- 1,20 ---- ! // qcalc 1.0, created Sun Nov 25 16:10:11 2007 -*-Q-*- -*- coding: UTF-8 -*- ! // [((0,1),"MidiShare Client"),((0,2),"Port"),((0,3),"Channel"),((1,0),">>> Input:"),((1,1),"= inclient_combobox"),((1,2),"= inport_spinbox"),((1,3),"= inchan_spinbox"),((3,0),"= intaskbutton B2 C2 D2 F5:F11"),((3,1),"Time"),((3,2),"Channel"),((3,3),"Data #1"),((3,4),"Data #2"),((3,5),"= clearbutton"),((4,0),"Note On"),((4,2),"= spinbox (0,16,1,0,\" \")"),((4,3),"= spinbox (-1,127,1,-1,\" \")"),((4,4),"= spinbox (-1,127,1,-1,\" \")"),((4,5),"= togglebutton (\"Recv\",\"\",true)"),((4,6),"= note_name D5"),((5,0),"Note Off"),((5,2),"= spinbox (0,16,1,0,\" \")"),((5,3),"= spinbox (-1,127,1,-1,\" \")"),((5,4),"= spinbox (-1,127,1,-1,\" \")"),((5,5),"= togglebutton (\"Recv\",\"\",true)"),((5,6),"= note_name D6"),((6,0),"Pitch Wheel"),((6,2),"= spinbox (0,16,1,0,\" \")"),((6,3),"= spinbox (-1,127,1,-1,\" \")"),((6,4),"= spinbox (-1,127,1,-1,\" \")"),((6,5),"= togglebutton (\"Recv\",\"\",true)"),((7,0),"Controller"),((7,2),"= spinbox (0,16,1,0,\" \")"),((7,3),"= spinbox (-1,127,1,-1,\" \")"),((7,4),"= spinbox (-1,127,1,-1,\" \")"),((7,5),"= togglebutton (\"Recv\",\"\",true)"),((8,0),"Program"),((8,2),"= spinbox (0,16,1,0,\" \")"),((8,3),"= spinbox (-1,127,1,-1,\" \")"),((8,4),"= spinbox (-1,127,1,-1,\" \")"),((8,5),"= togglebutton (\"Recv\",\"\",true)"),((9,0),"Aftertouch"),((9,2),"= spinbox (0,16,1,0,\" \")"),((9,3),"= spinbox (-1,127,1,-1,\" \")"),((9,4),"= spinbox (-1,127,1,-1,\" \")"),((9,5),"= togglebutton (\"Recv\",\"\",true)"),((10,0),"Poly Aftertouch"),((10,2),"= spinbox (0,16,1,0,\" \")"),((10,3),"= spinbox (-1,127,1,-1,\" \")"),((10,4),"= spinbox (-1,127,1,-1,\" \")"),((10,5),"= togglebutton (\"Recv\",\"\",true)"),((12,1),"MidiShare Client"),((12,2),"Port"),((12,3),"Channel"),((13,0),">>> Output:"),((13,1),"= outclient_combobox"),((13,2),"= outport_spinbox"),((13,3),"= outchan_spinbox"),((15,0),"= outtaskbutton B14"),((15,1),"Time"),((15,2),"Channel"),((15,3),"Data #1"),((15,4),"Data #2"),((15,5),"= resetbutton D14"),((16,0),"Note On"),((16,2),"= spinbox (0,16,1,D$14,\" \")"),((16,3),"= spinbox (-1,127,1,60,\" \")"),((16,4),"= spinbox (-1,127,1,64,\" \")"),((16,5),"= outsendbutton C$14 (note_on (C17-1) D17 E17)"),((16,6),"= note_name D17"),((17,0),"Note Off"),((17,2),"= spinbox (0,16,1,D$14,\" \")"),((17,3),"= spinbox (-1,127,1,60,\" \")"),((17,4),"= spinbox (-1,127,1,64,\" \")"),((17,5),"= outsendbutton C$14 (note_off (C18-1) D18 E18)"),((17,6),"= note_name D18"),((18,0),"Pitch Wheel"),((18,2),"= spinbox (0,16,1,D$14,\" \")"),((18,3),"= spinbox (-1,127,1,0,\" \")"),((18,4),"= spinbox (-1,127,1,64,\" \")"),((18,5),"= outsendbutton C$14 (pitch_wheel (C19-1) D19 E19)"),((19,0),"Controller"),((19,2),"= spinbox (0,16,1,D$14,\" \")"),((19,3),"= spinbox (-1,127,1,1,\" \")"),((19,4),"= spinbox (-1,127,1,0,\" \")"),((19,5),"= outsendbutton C$14 (ctrl_change (C20-1) D20 E20)"),((20,0),"Program"),((20,2),"= spinbox (0,16,1,D$14,\" \")"),((20,3),"= spinbox (-1,127,1,0,\" \")"),((20,4),"= spinbox (-1,127,1,-1,\" \")"),((20,5),"= outsendbutton C$14 (prog_change (C21-1) D21)"),((21,0),"Aftertouch"),((21,2),"= spinbox (0,16,1,D$14,\" \")"),((21,3),"= spinbox (-1,127,1,0,\" \")"),((21,4),"= spinbox (-1,127,1,-1,\" \")"),((21,5),"= outsendbutton C$14 (chan_press (C22-1) D22)"),((22,0),"Poly Aftertouch"),((22,2),"= spinbox (0,16,1,D$14,\" \")"),((22,3),"= spinbox (-1,127,1,60,\" \")"),((22,4),"= spinbox (-1,127,1,64,\" \")"),((22,5),"= outsendbutton C$14 (key_press (C23-1) D23 E23)")] // [] // [(0,126),(1,146),(5,83)] // Start of script. Please do not remove this line. + /* This is a little example which demonstrates realtime MIDI input and output + in qcalc. */ + import calclib, midi; ! /* Open MidiShare clients. */ ! ! def INNAME = "QCalc MIDI Input", OUTNAME = "QCalc MIDI Output", ! INREF = midi_open INNAME, OUTREF = midi_open OUTNAME, ! _ = midi_connect INREF INREF; ! ! /* Helper function to translate MIDI note numbers to note names. */ def NOTE_NAMES = ("C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"); *************** *** 15,18 **** --- 23,28 ---- note_name _ = "N/A" otherwise; + /* Create and parse numbered client names, to resolve ambiguities. */ + make_client_name N = sprintf "%d %s" (N,midi_client_name N); *************** *** 20,29 **** client_name S = S where N:Int = sscanf S "%d", S:String = midi_client_name N; ! client_combobox = combobox $ filter ((<>MYNAME).client_name) $ map make_client_name midi_clients; ! port_spinbox = spinbox (-1,255,1,-1,"Any"); ! chan_spinbox = spinbox (0,16,1,0,"Any"); portno "Any" = -1; --- 30,52 ---- client_name S = S where N:Int = sscanf S "%d", S:String = midi_client_name N; ! /* Client selection comboboxes. */ ! ! inclient_combobox ! = combobox $ filter ((<>INNAME).client_name) $ map make_client_name midi_clients; ! outclient_combobox ! = combobox $ filter ((<>OUTNAME).client_name) $ ! map make_client_name midi_clients; ! /* Port and MIDI channel selection spinboxes. */ ! ! inport_spinbox = spinbox (-1,255,1,-1,"Any"); ! outport_spinbox = spinbox (0,255,1,0); ! ! inchan_spinbox = spinbox (0,16,1,0,"Any"); ! outchan_spinbox = spinbox (1,16,1,1); ! ! /* Translate symbolic port and channel names. */ portno "Any" = -1; *************** *** 33,50 **** channo N:Int = N; ! midiin_clearbutton ! = actionbutton "Clear" (matrix (row+1,1) [[""," "," "," "] : K in [1..7]] || ()); ! midiin_taskbutton NAME:String PORT CHAN F:List ! = taskbutton "Connect" $ midiin_task NAME (portno PORT) (channo CHAN) (tuple F); ! midiin_task NAME:String PORT:Int CHAN:Int F:Tuple ! = printf "opening client #%d %s (port %d, channel %d)\n" (IN,NAME,PORT,CHAN) || ! midi_connect IN REF || port_filter PORT || chan_filter CHAN || ! midiin_process F SEM (I,J) IN PORT ! (thread $ midiin_loop SEM (midi_get REF)) (get SEM) where IN:Int = client_ref NAME, --- 56,87 ---- channo N:Int = N; ! /* Clear the MIDI input area. */ ! ! clearbutton = actionbutton "Clear" (matrix (row+1,1) [[""," "," "," "] : K in [1..7]] || ()); ! /* Reset the MIDI output area to defaults. */ ! resetbutton CH = actionbutton "Reset" ! (matrix (row+1,1) [["",CH,60,64], ! ["",CH,60,64], ! ["",CH,0,64], ! ["",CH,1,0], ! ["",CH,0," "], ! ["",CH,0," "], ! ["",CH,60,64]] || ()); ! ! /* MIDI input task. This also starts a secondary thread handling the MIDI input. */ ! ! intaskbutton NAME:String PORT CHAN F:List ! = taskbutton "Connect" $ intask NAME (portno PORT) (channo CHAN) (tuple F); ! ! intask NAME:String PORT:Int CHAN:Int F:Tuple ! = printf "opening input client #%d %s (port %d, channel %d)\n" (IN,NAME,PORT,CHAN) || ! midi_connect IN INREF || port_filter PORT || chan_filter CHAN || ! inprocess F SEM (I,J) IN PORT ! (thread $ inloop SEM (midi_get INREF)) (get SEM) where IN:Int = client_ref NAME, *************** *** 54,116 **** port_filter PORT ! = do (flip (midi_accept_port REF) false) [0..255] || ! midi_accept_port REF PORT true if PORT >= 0; chan_filter CHAN ! = do (flip (midi_accept_chan REF) false) [0..15] || ! midi_accept_chan REF CHAN true if CHAN >= 0; ! midiin_process F SEM (I,J) IN PORT H:Thread B:Bool ! = puts "connecting\n" || ! midi_connect IN REF || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if B; ! = puts "disconnecting\n" || ! midi_disconnect IN REF || ! midiin_process F SEM (I,J) IN PORT H (get SEM) otherwise; ! midiin_process F SEM (I,J) IN PORT H:Thread 'X ! = puts "closing\n" || ! midi_send REF PORT stop || cancel H || ! midi_accept_all REF || ! midi_disconnect IN REF || ! taskbutton ("Connect",CONN) $ midiin_task NAME (portno PORT) (channo CHAN) F where (_,_,NAME,PORT,CHAN,F) = task_params 'X, ! CONN = midi_connected IN REF; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,note_on CH N V) = rowvect (I+1,J+1) [TIME,CH+1,N,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!0; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,note_off CH N V) = rowvect (I+2,J+1) [TIME,CH+1,N,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!1; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,pitch_wheel CH LSB MSB) = rowvect (I+3,J+1) [TIME,CH+1,LSB,MSB] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!2; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,ctrl_change CH N V) = rowvect (I+4,J+1) [TIME,CH+1,N,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!3; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,prog_change CH V) = rowvect (I+5,J+1) [TIME,CH+1,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!4; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,key_press CH N V) ! = rowvect (I+6,J+1) [TIME,CH+1,N,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!5; ! midiin_process F SEM (I,J) IN PORT H:Thread (TIME,chan_press CH V) ! = rowvect (I+7,J+1) [TIME,CH+1,V] || ! midiin_process F SEM (I,J) IN PORT H (get SEM) if F!6; ! midiin_process F SEM (I,J) IN PORT H:Thread _ ! = midiin_process F SEM (I,J) IN PORT H (get SEM) otherwise; ! midiin_loop SEM (_,_,TIME,MSG) = post SEM (TIME,MSG) || //printf "%08d %s\n" (TIME,str MSG) || ! midiin_loop SEM (midi_get REF); --- 91,198 ---- port_filter PORT ! = do (flip (midi_accept_port INREF) false) [0..255] || ! midi_accept_port INREF PORT true if PORT >= 0; chan_filter CHAN ! = do (flip (midi_accept_chan INREF) false) [0..15] || ! midi_accept_chan INREF CHAN true if CHAN >= 0; ! inprocess F SEM (I,J) IN PORT H:Thread B:Bool ! = puts "connecting input\n" || ! midi_connect IN INREF || ! inprocess F SEM (I,J) IN PORT H (get SEM) if B; ! = puts "disconnecting input\n" || ! midi_disconnect IN INREF || ! inprocess F SEM (I,J) IN PORT H (get SEM) otherwise; ! inprocess F SEM (I,J) IN PORT H:Thread 'X ! = puts "closing input\n" || ! midi_send INREF (max 0 PORT) stop || cancel H || ! midi_accept_all INREF || ! midi_disconnect IN INREF || ! taskbutton ("Connect",CONN) $ intask NAME (portno PORT) (channo CHAN) F where (_,_,NAME,PORT,CHAN,F) = task_params 'X, ! CONN = midi_connected IN INREF; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_on CH N V) = rowvect (I+1,J+1) [TIME,CH+1,N,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!0; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,note_off CH N V) = rowvect (I+2,J+1) [TIME,CH+1,N,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!1; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,pitch_wheel CH LSB MSB) = rowvect (I+3,J+1) [TIME,CH+1,LSB,MSB] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!2; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,ctrl_change CH N V) = rowvect (I+4,J+1) [TIME,CH+1,N,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!3; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,prog_change CH V) = rowvect (I+5,J+1) [TIME,CH+1,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!4; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,chan_press CH V) ! = rowvect (I+6,J+1) [TIME,CH+1,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!5; ! inprocess F SEM (I,J) IN PORT H:Thread (TIME,key_press CH N V) ! = rowvect (I+7,J+1) [TIME,CH+1,N,V] || ! inprocess F SEM (I,J) IN PORT H (get SEM) if F!6; ! inprocess F SEM (I,J) IN PORT H:Thread _ ! = inprocess F SEM (I,J) IN PORT H (get SEM) otherwise; ! /* The MIDI input loop. Receives incoming MIDI events and queues them ! in the input task semaphore for processing. */ ! ! inloop SEM (_,_,TIME,MSG) = post SEM (TIME,MSG) || //printf "%08d %s\n" (TIME,str MSG) || ! inloop SEM (midi_get INREF); ! ! /* MIDI output task. This just manages the client connection. */ ! ! outtaskbutton NAME:String ! = taskbutton "Connect" $ outtask NAME; ! ! outtask NAME:String ! = printf "opening output client #%d %s\n" (OUT,NAME) || ! midi_connect OUTREF OUT || ! outprocess SEM (I,J) OUT (get SEM) ! where OUT:Int = client_ref NAME, ! NAME:String = midi_client_name OUT, ! SEM:Semaphore = task_input, (I,J) = index; ! ! outprocess SEM (I,J) OUT B:Bool ! = puts "connecting output\n" || ! midi_connect OUTREF OUT || ! outprocess SEM (I,J) OUT (get SEM) ! if B; ! = puts "disconnecting output\n" || ! midi_disconnect OUTREF OUT || ! outprocess SEM (I,J) OUT (get SEM) ! otherwise; ! outprocess SEM (I,J) OUT 'X ! = puts "closing output\n" || ! midi_disconnect OUTREF OUT || ! taskbutton ("Connect",CONN) $ outtask NAME ! where (_,_,NAME) = task_params 'X, ! CONN = midi_connected OUTREF OUT; ! outprocess SEM (I,J) OUT _ ! = outprocess SEM (I,J) OUT (get SEM) ! otherwise; ! ! /* MIDI output actionbuttons. */ ! ! outsendbutton PORT MSG ! = actionbutton "Send" (outsend PORT MSG); ! ! outsend PORT MSG ! = //printf "%08d %s\n" (TIME,str MSG) || ! setval (row,1) TIME || midi_send OUTREF PORT MSG ! where TIME = midi_time; |
From: Albert G. <ag...@us...> - 2007-11-25 13:54:53
|
Update of /cvsroot/q-lang/qcalc/doc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12617/doc Modified Files: findreplace.png qcalc1.png qcalc2.png Log Message: update screenshots Index: qcalc2.png =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/qcalc2.png,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsVwy63u and /tmp/cvsQLbkjK differ Index: qcalc1.png =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/qcalc1.png,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsy1WPXy and /tmp/cvs6416kO differ Index: findreplace.png =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/findreplace.png,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsLuCjgE and /tmp/cvsYLpmOT differ |
From: Albert G. <ag...@us...> - 2007-11-25 13:43:21
|
Update of /cvsroot/q-lang/qcalc/doc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8212/doc Modified Files: qcalc.xml Log Message: update documentation Index: qcalc.xml =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/qcalc.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** qcalc.xml 25 Nov 2007 01:34:01 -0000 1.20 --- qcalc.xml 25 Nov 2007 13:43:12 -0000 1.21 *************** *** 55,59 **** </screenshot> <para> ! QCalc is a standard Qt application with menu, toolbar, main area (showing the spreadsheet by default) and a status bar which displays helpful status information. The spreadsheet takes the form of a table with columns numbered <guilabel>A</guilabel>, <guilabel>B</guilabel>, etc., and rows <guilabel>1</guilabel>, <guilabel>2</guilabel>, etc. The table is browsed with the usual mouse and keyboard operations. </para> <para> --- 55,59 ---- </screenshot> <para> ! QCalc is a standard Qt application with menu, toolbar, main area (showing the spreadsheet by default) and a status bar which displays helpful status information like the current cell index and the line number in the script editor. The spreadsheet takes the form of a table with columns numbered <guilabel>A</guilabel>, <guilabel>B</guilabel>, etc., and rows <guilabel>1</guilabel>, <guilabel>2</guilabel>, etc. The table is browsed with the usual mouse and keyboard operations. </para> <para> *************** *** 123,130 **** </para> <para> ! Rectangular ranges of spreadsheet cells can be selected by sweeping the mouse over them as usual, or by using the cursor keys while holding down the <keycap>Shift</keycap> key. You can also click a row or column header to select the entire row or column. NOTE: Selecting ranges of cells with the mouse or the keyboard can be hard to do if the cells contain editable GUI elements like comboboxes and spinboxes (see <xref linkend="basicguiops"/>). As a remedy, if you are not currently editing a cell, the <keycap>Esc</keycap> key allows you to switch the table from the default mode of operation to a special "read-only" mode. This mode is indicated by a tiny lock symbol in the status line. While the table is in read-only mode, editing operations on ranges of cells still work normally, but GUI elements are not activated when selected any more. This makes it much easier to browse the table and make selections with the mouse or the cursor keys. To leave read-only mode, either just press <keycap>Esc</keycap> again, or double-click on a cell or press <keycap>F3</keycap> to open a cell for editing. </para> <para> ! Selected ranges of cells can be deleted, cut, copied and pasted as usual. Using cut/copy and paste you can also transfer ranges between different instances of QCalc. Moreover, QCalc performs automatic adjustment of relative column and row indices in formulas. Thus, if you copy a cell containing the formula "<literal>= foo A1</literal>" to a position at an offset of, say, 2 rows and 3 columns from the original position, it will become "<literal>= foo D3</literal>". As usual, you can use the $ symbol to indicate absolute row or column indices (or both) which will not be adjusted. </para> <para> --- 123,130 ---- </para> <para> ! NOTE: Browsing the table and selecting ranges of cells with the mouse or the keyboard can be hard to do if the cells contain editable GUI elements like comboboxes and spinboxes (see <xref linkend="basicguiops"/>), since these will grab the focus when they are selected. As a remedy, if you are not currently editing a cell, the <keycap>Esc</keycap> key allows you to switch the table from the default mode of operation to a special "browse" mode which is indicated by a tiny lock symbol in the status line. While the table is in browse mode, editing operations on ranges of cells still work normally, but GUI elements are not activated when selected any more. This makes it much easier to browse the table and make selections with the mouse or the cursor keys. To leave browse mode, either just press <keycap>Esc</keycap> again, or double-click on a cell or press <keycap>F3</keycap> to open a cell for editing. </para> <para> ! Rectangular ranges of spreadsheet cells can be selected by sweeping the mouse over them as usual, or by using the cursor keys while holding down the <keycap>Shift</keycap> key. You can also click a row or column header to select the entire row or column. Selected ranges of cells can be deleted, cut, copied and pasted as usual. Using cut/copy and paste you can also transfer ranges between different instances of QCalc. Moreover, QCalc performs automatic adjustment of relative column and row indices in formulas. Thus, if you copy a cell containing the formula "<literal>= foo A1</literal>" to a position at an offset of, say, 2 rows and 3 columns from the original position, it will become "<literal>= foo D3</literal>". As usual, you can use the $ symbol to indicate absolute row or column indices (or both) which will not be adjusted. </para> <para> |
From: Albert G. <ag...@us...> - 2007-11-25 13:26:52
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1217 Modified Files: qcalc.q Log Message: add separate statusbar widget for line number display Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** qcalc.q 25 Nov 2007 12:55:38 -0000 1.186 --- qcalc.q 25 Nov 2007 13:26:48 -0000 1.187 *************** *** 199,204 **** ()], TASKPM = [TASKB,TASKA], // read-only indicator in the status bar ! ROSTAT = qt_new "QLabel" nil, _ = qt ROSTAT "setPixmap" UNLOCKED || qt STATUS "addWidget" (ROSTAT,0,true), // dictionary of edited and computed cells --- 199,209 ---- ()], TASKPM = [TASKB,TASKA], + // line number indicator in the status bar + LSTAT = qt_new "QLabel" (sprintf "L %d" 1,nil), + _ = qt LSTAT "setMinimumWidth" $ text_width LSTAT "L 9999" || + qt STATUS "addWidget" (LSTAT,0,true), // read-only indicator in the status bar ! ROSTAT = qt_new "QLabel" nil, ! _ = qt ROSTAT "setPixmap" UNLOCKED || qt STATUS "addWidget" (ROSTAT,0,true), // dictionary of edited and computed cells *************** *** 334,337 **** --- 339,344 ---- /* Helper functions for string manipulation. */ + text_width W S = qt FM "width" S where FM = qt W "fontMetrics" (); + special regsub ~OPTS ~REGEX ~S EXPR; regsub OPTS REGEX S EXPR *************** *** 598,605 **** where G = get GLOBAL; ! /* Set or unset the "locked" indicator in the status line. */ ! mode_indicator B ! = qt ROSTAT "setPixmap" (if B then LOCKED else UNLOCKED); /* Status updates of task buttons. Process events so that the arrow indicator --- 605,615 ---- where G = get GLOBAL; ! /* Set the line number indicator. */ ! linemsg N = qt LSTAT "setText" $ sprintf "L %d" N; ! ! /* Set or unset the "locked" indicator. */ ! ! modemsg B = qt ROSTAT "setPixmap" (if B then LOCKED else UNLOCKED); /* Status updates of task buttons. Process events so that the arrow indicator *************** *** 1316,1321 **** if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! mode_indicator false || ! fail // falls through if qt TABLE "isReadOnly" (); = // nuke the current cell --- 1326,1330 ---- if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! modemsg false || fail // falls through if qt TABLE "isReadOnly" (); = // nuke the current cell *************** *** 1335,1340 **** if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! mode_indicator false || ! fail // falls through if qt TABLE "isReadOnly" (); = if not qt TABLE "isEditing" () then --- 1344,1348 ---- if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! modemsg false || fail // falls through if qt TABLE "isReadOnly" (); = if not qt TABLE "isEditing" () then *************** *** 1375,1380 **** if not is_gui_elem (I,J) and then qt TABLE "isEditing" (); ! = qt TABLE "setReadOnly" RO || ! mode_indicator RO || qt TABLE "setFocus" () where RO = not qt TABLE "isReadOnly" () --- 1383,1387 ---- if not is_gui_elem (I,J) and then qt TABLE "isEditing" (); ! = qt TABLE "setReadOnly" RO || modemsg RO || qt TABLE "setFocus" () where RO = not qt TABLE "isReadOnly" () *************** *** 1442,1446 **** linenumbermsg _ _ N ! = statusmsg $ sprintf "Line %d" (N+1); /* More script editor operations. */ --- 1449,1453 ---- linenumbermsg _ _ N ! = linemsg (N+1); /* More script editor operations. */ |
From: Albert G. <ag...@us...> - 2007-11-25 12:55:42
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21117 Modified Files: qcalc.q Log Message: bugfixes, optimizations Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** qcalc.q 25 Nov 2007 11:31:14 -0000 1.185 --- qcalc.q 25 Nov 2007 12:55:38 -0000 1.186 *************** *** 994,998 **** = false; // From here on we assume that the process is still alive and kicking. ! where S:String = try2 MSGS: // We got some output, digest it and retry. = digest S || startup_loop (H,PID,MASTER); --- 994,998 ---- = false; // From here on we assume that the process is still alive and kicking. ! where S:String = try2 5 MSGS: // We got some output, digest it and retry. = digest S || startup_loop (H,PID,MASTER); *************** *** 1344,1348 **** accept _ _ _ where _ = LAST_EDIT := (), (I,J) = real_current_cell: ! = doprocess (I,J) || digest_loop if is_gui_elem (I,J); = EDITED := true || --- 1344,1350 ---- accept _ _ _ where _ = LAST_EDIT := (), (I,J) = real_current_cell: ! = doprocess (I,J) || digest_loop || ! if qt TABW "currentPageIndex" () = 0 then ! qt TABLE "setFocus" () if is_gui_elem (I,J); = EDITED := true || *************** *** 3562,3566 **** = statusmsg "Interpreter offline? (Check the error log!)" || do flag [(I,J)|V]; ! where S:String = try2 MSGS: // evaluation succeeded, we're good = update_cell (I,J) S || results_loop T0 (delete U (I,J)) V --- 3564,3568 ---- = statusmsg "Interpreter offline? (Check the error log!)" || do flag [(I,J)|V]; ! where S:String = try2 5 MSGS: // evaluation succeeded, we're good = update_cell (I,J) S || results_loop T0 (delete U (I,J)) V *************** *** 3662,3676 **** = results_loop T0 U [(I,J)|V] otherwise; ! /* Note that we try the semaphore *two* times before we give up and hand it over to the GUI, so that we can hopefully avoid the GUI kicking in for most simple calculations which execute almost instantaneously. */ ! try2 SEM = check2 SEM (get SEM) if #SEM>0; ! = sleep 0.1 || check2 SEM (try SEM); ! check2 SEM (formatted S:String) // preformatted string, pass that directly to the digest function ! = local (digest (formatted S)) || try2 SEM; ! check2 SEM S = S otherwise; /* Update a cell value with a computed result. */ --- 3664,3678 ---- = results_loop T0 U [(I,J)|V] otherwise; ! /* Note that we try the semaphore several times before we give up and hand it over to the GUI, so that we can hopefully avoid the GUI kicking in for most simple calculations which execute almost instantaneously. */ ! try2 N SEM = check2 N SEM (get SEM) if #SEM>0; ! = sleep 0.01 || check2 (N-1) SEM (try SEM) if N>0; ! check2 N SEM (formatted S:String) // preformatted string, pass that directly to the digest function ! = local (digest (formatted S)) || try2 N SEM; ! check2 N SEM S = S otherwise; /* Update a cell value with a computed result. */ *************** *** 3856,3860 **** /* Some nice fontification for compiler error and warning messages. */ - //format S = printf "-> '%s'\n" S || fail; format S if eq () (sscanf S "! File"): --- 3858,3861 ---- *************** *** 3914,3923 **** post_msg S = post_msgs $ split "\f" S if pos "\f" S >= 0; = post_msg1 S otherwise; ! post_msg1 S = catch () (post MSGS (format S)); ! post_msgs [S|L] = do (post MSGS) $ filter (neg null) L if null S; ! = post_msg1 S || do (post MSGS) $ filter (neg null) L otherwise; def BUF = ref ""; collect S where S = get BUF++S: --- 3915,3927 ---- post_msg S = post_msgs $ split "\f" S if pos "\f" S >= 0; = post_msg1 S otherwise; ! post_msg1 S = catch () (post MSGS (format (debugmsg S))); ! post_msgs [S|L] = do (post MSGS.debugmsg) $ filter (neg null) L if null S; ! = post_msg1 S || do (post MSGS.debugmsg) $ filter (neg null) L otherwise; + //debugmsg S = printf "-> '%s'\n" S || S; + debugmsg S = S; + def BUF = ref ""; collect S where S = get BUF++S: |
From: Albert G. <ag...@us...> - 2007-11-25 11:31:22
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24083 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** qcalc.q 25 Nov 2007 05:35:10 -0000 1.184 --- qcalc.q 25 Nov 2007 11:31:14 -0000 1.185 *************** *** 1534,1541 **** change_case FLAG R S X = S if not FLAG or else any isupper R; ! = strcat $ zipwith (++) (map F Ws) Ds if all (eq F) Fs ! where Ws = words S, Ds = delims S, ! [F|Fs] = map case_changer $ words X; = S otherwise; --- 1534,1541 ---- change_case FLAG R S X = S if not FLAG or else any isupper R; ! = strcat $ zipwith (++) Ds (map F Ws) if all (eq F) Fs ! where (Ds,Ws) = unzip $ words S, ! [F|Fs] = map (case_changer.snd) $ init $ words X; = S otherwise; *************** *** 1545,1550 **** capitalize S = toupper (take 1 S)++drop 1 S; ! words S = regex "g" "[[:alnum:]]+" S (reg 0); ! delims S = regex "g" "[^[:alnum:]]" S (reg 0) ++ [""]; find_state _ _ _ --- 1545,1549 ---- capitalize S = toupper (take 1 S)++drop 1 S; ! words S = regex "g" "[[:alnum:]]+" S (regskip,reg 0) ++ [(regskip,"")]; find_state _ _ _ |
From: Albert G. <ag...@us...> - 2007-11-25 05:35:13
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9501 Modified Files: qcalc.q Log Message: code cleanup Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** qcalc.q 24 Nov 2007 10:22:50 -0000 1.183 --- qcalc.q 25 Nov 2007 05:35:10 -0000 1.184 *************** *** 200,205 **** TASKPM = [TASKB,TASKA], // read-only indicator in the status bar ! ROSTAT = qt_new "QLabel" nil, ! _ = qt ROSTAT "setPixmap" UNLOCKED || qt STATUS "addWidget" (ROSTAT,0,true), // dictionary of edited and computed cells CELLS = ref emptyhdict, EVAL = ref emptyhdict, XREF = ref emptyhdict, --- 200,205 ---- TASKPM = [TASKB,TASKA], // read-only indicator in the status bar ! ROSTAT = qt_new "QLabel" nil, _ = qt ROSTAT "setPixmap" UNLOCKED || ! qt STATUS "addWidget" (ROSTAT,0,true), // dictionary of edited and computed cells CELLS = ref emptyhdict, EVAL = ref emptyhdict, XREF = ref emptyhdict, *************** *** 598,601 **** --- 598,606 ---- where G = get GLOBAL; + /* Set or unset the "locked" indicator in the status line. */ + + mode_indicator B + = qt ROSTAT "setPixmap" (if B then LOCKED else UNLOCKED); + /* Status updates of task buttons. Process events so that the arrow indicator on the task button is updated immediately. Currently we don't do anything *************** *** 1311,1315 **** if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! qt ROSTAT "setPixmap" UNLOCKED || fail // falls through if qt TABLE "isReadOnly" (); --- 1316,1320 ---- if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! mode_indicator false || fail // falls through if qt TABLE "isReadOnly" (); *************** *** 1330,1334 **** if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! qt ROSTAT "setPixmap" UNLOCKED || fail // falls through if qt TABLE "isReadOnly" (); --- 1335,1339 ---- if qt TABW "currentPageIndex" () = 0: = qt TABLE "setReadOnly" false || ! mode_indicator false || fail // falls through if qt TABLE "isReadOnly" (); *************** *** 1368,1375 **** if not is_gui_elem (I,J) and then qt TABLE "isEditing" (); ! = qt TABLE "setReadOnly" (not RO) || ! qt ROSTAT "setPixmap" (if RO then UNLOCKED else LOCKED) || qt TABLE "setFocus" () ! where RO = qt TABLE "isReadOnly" () otherwise; --- 1373,1380 ---- if not is_gui_elem (I,J) and then qt TABLE "isEditing" (); ! = qt TABLE "setReadOnly" RO || ! mode_indicator RO || qt TABLE "setFocus" () ! where RO = not qt TABLE "isReadOnly" () otherwise; |
From: Albert G. <ag...@us...> - 2007-11-25 01:34:06
|
Update of /cvsroot/q-lang/qcalc/doc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5166/doc Modified Files: qcalc.xml Log Message: update documentation Index: qcalc.xml =================================================================== RCS file: /cvsroot/q-lang/qcalc/doc/qcalc.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** qcalc.xml 23 Nov 2007 23:58:15 -0000 1.19 --- qcalc.xml 25 Nov 2007 01:34:01 -0000 1.20 *************** *** 120,128 **** </para> <para> ! There are also many useful keyboard and mouse shortcuts. You can browse through your spreadsheet with the mouse or the cursor keys, including the <keycap>Tab</keycap> and <keycap>Backtab</keycap> keys which traverse to the next and previous table cell, respectively. <keycap>F3</keycap> edits a cell, <keycap>Esc</keycap> aborts the edit (reverting the cell to its previous value), and <keycap>F2</keycap> or <keycap>Return</keycap> stores the edited value (and does any necessary computations). You can force reevaluation of a cell by pressing <keycap>F2</keycap> while the cell is ! selected, and a double click opens a cell for editing. You can also just start typing when a cell is selected, to overwrite its current value. All editing is done in place, right there in the cell; there is no separate line edit control as in other spreadsheets. Cell indices and formulas are shown in the status line when you click on them. </para> <para> ! Rectangular ranges of spreadsheet cells can be selected by sweeping the mouse over them as usual. You can also click a row or column header to select the entire row or column. Such ranges can be deleted, cut, copied and pasted as usual. Using cut/copy and paste you can also transfer ranges between different instances of QCalc. Moreover, QCalc performs automatic adjustment of relative column and row indices in formulas. Thus, if you copy a cell containing the formula "<literal>= foo A1</literal>" to a position at an offset of, say, 2 rows and 3 columns from the original position, it will become "<literal>= foo D3</literal>". As usual, you can use the $ symbol to indicate absolute row or column indices (or both) which will not be adjusted. </para> <para> --- 120,130 ---- </para> <para> ! There are also many useful keyboard and mouse shortcuts. You can browse through your spreadsheet with the mouse or the cursor keys, including the <keycap>Tab</keycap> and <keycap>Backtab</keycap> keys which traverse to the next and previous table cell (in row-major order), respectively. <keycap>F3</keycap> edits a cell, <keycap>Esc</keycap> aborts the edit (reverting the cell to its previous value), and <keycap>F2</keycap> or <keycap>Return</keycap> stores the edited value (and does any necessary computations). You can force reevaluation of a cell by pressing <keycap>F2</keycap> while the cell is selected, and a double click opens a cell for editing. You can also just start typing when a cell is selected, to overwrite its current value. All editing is done in place, right there in the cell; there is no separate line edit control as in other spreadsheets. Cell indices and formulas are shown in the status line when you click on them. </para> <para> ! Rectangular ranges of spreadsheet cells can be selected by sweeping the mouse over them as usual, or by using the cursor keys while holding down the <keycap>Shift</keycap> key. You can also click a row or column header to select the entire row or column. NOTE: Selecting ranges of cells with the mouse or the keyboard can be hard to do if the cells contain editable GUI elements like comboboxes and spinboxes (see <xref linkend="basicguiops"/>). As a remedy, if you are not currently editing a cell, the <keycap>Esc</keycap> key allows you to switch the table from the default mode of operation to a special "read-only" mode. This mode is indicated by a tiny lock symbol in the status line. While the table is in read-only mode, editing operations on ranges of cells still work normally, but GUI elements are not activated when selected any more. This makes it much easier to browse the table and make selections with the mouse or the cursor keys. To leave read-only mode, either just press <keycap>Esc</keycap> again, or double-click on a cell or press <keycap>F3</keycap> to open a cell for editing. ! </para> ! <para> ! Selected ranges of cells can be deleted, cut, copied and pasted as usual. Using cut/copy and paste you can also transfer ranges between different instances of QCalc. Moreover, QCalc performs automatic adjustment of relative column and row indices in formulas. Thus, if you copy a cell containing the formula "<literal>= foo A1</literal>" to a position at an offset of, say, 2 rows and 3 columns from the original position, it will become "<literal>= foo D3</literal>". As usual, you can use the $ symbol to indicate absolute row or column indices (or both) which will not be adjusted. </para> <para> *************** *** 136,140 **** </para> <para> ! QCalc has an unlimited undo/redo facility, so if you mess up your spreadsheet you can always go back and forth in time as needed. These operations also adjust the table size as needed. They may also shrink the table if there is unused extra space; this also happens when you load a spreadsheet from a file. However, as already mentioned, QCalc always keeps the spreadsheet at a minimum table size of 128x26. </para> </section> --- 138,142 ---- </para> <para> ! QCalc also has an unlimited undo/redo facility, so if you mess up your spreadsheet you can always go back and forth in time as needed. These operations also adjust the table size as needed. They may also shrink the table if there is unused extra space; this also happens when you load a spreadsheet from a file. However, as already mentioned, QCalc always keeps the spreadsheet at a minimum table size of 128x26. </para> </section> |
From: Albert G. <ag...@us...> - 2007-11-24 10:27:39
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4394 Modified Files: Makefile qcalc.q Log Message: Esc now also switches the table between read-write and read-only mode (the latter facilitates the selection of a range of cells containing GUI elements); also added a corresponding indicator (tiny lock symbol) to the status line Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** qcalc.q 23 Nov 2007 23:46:41 -0000 1.182 --- qcalc.q 24 Nov 2007 10:22:50 -0000 1.183 *************** *** 190,200 **** qt TIMER "start" 100, // some pixmaps ! [FLAG, RES, TASKB, TASKA, NULLPM] = map (qt_new "QPixmap") [which "pixmaps/flag.png", which "pixmaps/1rightarrow.png", which "pixmaps/1rightarrow.png", which "pixmaps/1rightarrow-green.png", ()], TASKPM = [TASKB,TASKA], // dictionary of edited and computed cells CELLS = ref emptyhdict, EVAL = ref emptyhdict, XREF = ref emptyhdict, --- 190,205 ---- qt TIMER "start" 100, // some pixmaps ! [FLAG, RES, TASKB, TASKA, LOCKED, UNLOCKED, NULLPM] = map (qt_new "QPixmap") [which "pixmaps/flag.png", which "pixmaps/1rightarrow.png", which "pixmaps/1rightarrow.png", which "pixmaps/1rightarrow-green.png", + which "pixmaps/locked.png", + which "pixmaps/unlocked.png", ()], TASKPM = [TASKB,TASKA], + // read-only indicator in the status bar + ROSTAT = qt_new "QLabel" nil, + _ = qt ROSTAT "setPixmap" UNLOCKED || qt STATUS "addWidget" (ROSTAT,0,true), // dictionary of edited and computed cells CELLS = ref emptyhdict, EVAL = ref emptyhdict, XREF = ref emptyhdict, *************** *** 1305,1308 **** --- 1310,1317 ---- where (I,J) = real_current_cell if qt TABW "currentPageIndex" () = 0: + = qt TABLE "setReadOnly" false || + qt ROSTAT "setPixmap" UNLOCKED || + fail // falls through + if qt TABLE "isReadOnly" (); = // nuke the current cell clear_cell (I,J) || *************** *** 1320,1323 **** --- 1329,1336 ---- where (I,J) = real_index (I,J) if qt TABW "currentPageIndex" () = 0: + = qt TABLE "setReadOnly" false || + qt ROSTAT "setPixmap" UNLOCKED || + fail // falls through + if qt TABLE "isReadOnly" (); = if not qt TABLE "isEditing" () then edit_cell (I,J) *************** *** 1345,1357 **** set_current_cell (if I+M<N then (I+M,J) else (0,J+1)) where (M,_) = cell_span (I,J) ! if (qt TABLE "hasFocus" () or else ! qt TABLE "isEditing" ()); ! cancel _ _ _ = end_edit false (I,J) || finish_edit false (I,J) if not is_gui_elem (I,J) and then ! qt TABLE "isEditing" () and then ! (qt TABW "currentPageIndex" () = 0) ! where _ = LAST_EDIT := (), (I,J) = real_current_cell; gui_update X (I,J) _ --- 1358,1376 ---- set_current_cell (if I+M<N then (I+M,J) else (0,J+1)) where (M,_) = cell_span (I,J) ! if qt TABLE "hasFocus" () or else ! qt TABLE "isEditing" (); ! cancel _ _ _ ! where _ = LAST_EDIT := (), (I,J) = real_current_cell ! if qt TABW "currentPageIndex" () = 0: ! = end_edit false (I,J) || finish_edit false (I,J) if not is_gui_elem (I,J) and then ! qt TABLE "isEditing" (); ! = qt TABLE "setReadOnly" (not RO) || ! qt ROSTAT "setPixmap" (if RO then UNLOCKED else LOCKED) || ! qt TABLE "setFocus" () ! where RO = qt TABLE "isReadOnly" () ! otherwise; gui_update X (I,J) _ *************** *** 1390,1394 **** = qt X "setFocus" () if not is_nil X ! where X:QtObject = qt TABLE "cellWidget" (I,J); next_cell _ _ _ = set_current_cell (I,J) --- 1409,1414 ---- = qt X "setFocus" () if not is_nil X ! where X:QtObject = qt TABLE "cellWidget" (I,J) ! if not qt TABLE "isReadOnly" (); next_cell _ _ _ = set_current_cell (I,J) Index: Makefile =================================================================== RCS file: /cvsroot/q-lang/qcalc/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 15 Nov 2007 00:10:35 -0000 1.12 --- Makefile 24 Nov 2007 10:22:50 -0000 1.13 *************** *** 15,19 **** appdir = $(pkgdatadir)/apps/$(app) ! PIXMAPS = pixmaps/qcalc.png pixmaps/flag.png pixmaps/1rightarrow.png pixmaps/1rightarrow-green.png DISTFILES = Makefile COPYING README calclib.q $(app).desktop $(app).q *.ui $(PIXMAPS) doc/Makefile doc/*.html doc/*.png doc/*.xml doc/*.texi doc/texinfo.tex examples/*.qcalc examples/*.q --- 15,19 ---- appdir = $(pkgdatadir)/apps/$(app) ! PIXMAPS = pixmaps/qcalc.png pixmaps/flag.png pixmaps/1rightarrow.png pixmaps/1rightarrow-green.png pixmaps/locked.png pixmaps/unlocked.png DISTFILES = Makefile COPYING README calclib.q $(app).desktop $(app).q *.ui $(PIXMAPS) doc/Makefile doc/*.html doc/*.png doc/*.xml doc/*.texi doc/texinfo.tex examples/*.qcalc examples/*.q |
From: Albert G. <ag...@us...> - 2007-11-24 10:22:53
|
Update of /cvsroot/q-lang/qcalc/pixmaps In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4394/pixmaps Added Files: locked.png unlocked.png Log Message: Esc now also switches the table between read-write and read-only mode (the latter facilitates the selection of a range of cells containing GUI elements); also added a corresponding indicator (tiny lock symbol) to the status line --- NEW FILE: unlocked.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: locked.png --- (This appears to be a binary file; contents omitted.) |