[q-lang-cvs] qcalc calclib.q,1.45,1.46 qcalc.q,1.194,1.195
Brought to you by:
agraef
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; |