hmg-svncommit Mailing List for HMG (Page 2)
Brought to you by:
roblez
You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(44) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ri...@us...> - 2011-12-21 17:31:44
|
Revision: 867 http://hmg.svn.sourceforge.net/hmg/?rev=867&view=rev Author: ricciz Date: 2011-12-21 17:31:35 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/drag_and_drop/demo_1_cmd.prg Modified: Changelog =================================================================== --- Changelog 2011-12-21 16:19:06 UTC (rev 866) +++ Changelog 2011-12-21 17:31:35 UTC (rev 867) @@ -16,6 +16,9 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * samples/drag_and_drop/demo_1_cmd.prg + 2011-12-21 17:15 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/button/demo_1.prg - samples/button/demo_2.prg Modified: samples/drag_and_drop/demo_1_cmd.prg =================================================================== --- samples/drag_and_drop/demo_1_cmd.prg 2011-12-21 16:19:06 UTC (rev 866) +++ samples/drag_and_drop/demo_1_cmd.prg 2011-12-21 17:31:35 UTC (rev 867) @@ -21,20 +21,98 @@ DEFINE MAINWINDOW oWindow1 ROW 10 COL 10 - WIDTH 400 - HEIGHT 200 + WIDTH 500 + HEIGHT 400 TITLE 'Drag and Drop demo' ONINIT oWindow1:Center() DEFINE LABEL oLabel1 - ROW 80; COL 50 + ROW 10; COL 10 WIDTH 300; HEIGHT 40 ALIGNMENT CENTER BORDER .T. - VALUE "Drag one or more files from explorer here." - OnDropDown { |oEvent| MyDropEvent(oEvent, ) } + VALUE "Drag one or more files from explorer into the objects." + OnDropDown { |oEvent| MyDropEvent(oEvent, "Label" ) } END LABEL - + + DEFINE CHECKBOX Check1 + Row 10 + Col 350 + Value .F. + Caption 'CheckBox!!!' + OnDropDown { |oEvent| MyDropEvent(oEvent, "Checkbox" ) } + END CHECKBOX + + DEFINE COMBOBOX oCombo1 + Row 40 + Col 350 + Width 100 + Items { "E - Item 1", "D - Item 2", "C - Item 3", "B - Item 4", "A - Item 5" } + Value 3 + OnDropDown { |oEvent| MyDropEvent(oEvent, "Combobox" ) } + END COMBOBOX + + DEFINE DATEPICKER oDatePicker2 + Row 80 + Col 350 + Value DATE() + UpDown .T. + OnDropDown { |oEvent| MyDropEvent(oEvent, "Datepicker" ) } + END DATEPICKER + + DEFINE EDITBOX oEditBox1 + Row 60 + Col 10 + Width 300 + Height 100 + Value "Checkbox, Datepicker, Label and Textbox work well." + HB_EOL() + HB_EOL() ; + + "Combobox did not work as a target." + HB_EOL() + HB_EOL() ; + + "Editbox, Listbox and Tree do not call OnDropDown." + OnDropDown { |oEvent| MyDropEvent(oEvent, "Editbox" ) } + END EDITBOX + + Define ListBox oList1 + Row 170 + Col 10 + Width 150 + Height 80 + Items {"Item 1","Item 2","Item 3","Item 4","Item 5"} + Value 3 + OnDropDown { |oEvent| MyDropEvent(oEvent, "Listbox" ) } + End ListBox + + DEFINE TEXTBOX oText1 + Row 260 + Col 10 + Width 300 + Value 'TextBox' + OnDropDown { |oEvent| MyDropEvent(oEvent, "Textbox" ) } + END TEXTBOX + + DEFINE TREE Tree1 + ROW 120 + COL 350 + WIDTH 140 + HEIGHT 200 + OnDropDown { |oEvent| MyDropEvent(oEvent, "Tree" ) } + + NODE "Item1" + TREEITEM "Item1.1" + TREEITEM "Item1.2" + END NODE + + NODE "Item2" + TREEITEM "Item2.1" + + NODE "Item2.2" + TREEITEM "Item2.2.1" + END NODE + + TREEITEM "Item2.3" + END NODE + END TREE + + END WINDOW ACTIVATE WINDOW oWindow1 @@ -44,10 +122,10 @@ /*.............................................................................. DropEvent ..............................................................................*/ -FUNCTION MyDropEvent( oEvent ) +FUNCTION MyDropEvent( oEvent, cControl ) LOCAL oMimeData, oUrlList, oURL, cFile, i - LOCAL cFileNames := "" + LOCAL cFileNames := cControl + " received" + HB_EOL() oMimeData := oEvent:mimeData() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-21 16:19:13
|
Revision: 866 http://hmg.svn.sourceforge.net/hmg/?rev=866&view=rev Author: l3wonsf Date: 2011-12-21 16:19:06 +0000 (Wed, 21 Dec 2011) Log Message: ----------- 2011-12-21 17:15 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/button/demo_1.prg - samples/button/demo_2.prg - samples/button/demo_3.prg - samples/button/demo_4.prg + samples/console/demo_1_oop.prg + samples/console/demo_1_cmd.prg * to show usage of BUTTON using: OOp style and CMD style. Modified Paths: -------------- Changelog Added Paths: ----------- samples/button/demo_1_cmd.prg samples/button/demo_1_oop.prg Removed Paths: ------------- samples/button/demo_1.prg samples/button/demo_2.prg samples/button/demo_3.prg samples/button/demo_4.prg Modified: Changelog =================================================================== --- Changelog 2011-12-21 14:49:42 UTC (rev 865) +++ Changelog 2011-12-21 16:19:06 UTC (rev 866) @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-21 17:15 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + - samples/button/demo_1.prg + - samples/button/demo_2.prg + - samples/button/demo_3.prg + - samples/button/demo_4.prg + + samples/console/demo_1_oop.prg + + samples/console/demo_1_cmd.prg + * to show usage of BUTTON using: OOp style and CMD style. + 2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + samples/drag_and_drop/demo_1_cmd.prg Deleted: samples/button/demo_1.prg =================================================================== --- samples/button/demo_1.prg 2011-12-21 14:49:42 UTC (rev 865) +++ samples/button/demo_1.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -1,103 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow - - HbQt_ErrorSys() - - WITH OBJECT oWindow := MAINWINDOW():New("oWindow") - :Row := 10 - :Col := 10 - :Width := 400 - :Height := 400 - :Title := 'Nice OOP Demo!!!' - :OnInit := { || oWindow:Center() } - - WITH OBJECT Button():New("oButton1") - :Row := 40 - :Col := 40 - :Width := 180 - :Caption := 'OOP Button!!!' - :OnClick := { || Button1Click( oWindow:oButton1, 1 ) } - END WITH - - WITH OBJECT Button():New("oButton2") - :Row := 70 - :Col := 40 - :Width := 180 - :Caption := 'Button WITH Left Image' - :Picture := 'save.png' - :PictAlignment := BTN_LEFT - :OnClick := { || Button1Click( oWindow:oButton1, 2 ) } - END WITH - - WITH OBJECT Button():New("oButton3") - :Row := 100 - :Col := 40 - :Width := 180 - :Caption := 'Button WITH Right Image' - :Picture := 'save.png' - :PictAlignment := BTN_RIGHT - :OnClick := { || Button1Click( oWindow:oButton1, 3 ) } - END WITH - - WITH OBJECT Button():New("oButton4") - :Row := 130 - :Col := 40 - :Width := 180 - :Caption := 'oButton1:Flat := .T.' - :OnClick := { || oWindow:oButton1:Flat := .T. } - END WITH - - WITH OBJECT Button():New("oButton5") - :Row := 160 - :Col := 40 - :Width := 180 - :Caption := 'oButton1:Flat := .F.' - :OnClick := { || oWindow:oButton1:Flat := .F. } - END WITH - - WITH OBJECT Button():New("oButton6") - :Row := 190 - :Col := 40 - :Width := 180 - :Caption := '' - :Picture := 'save.png' - :PictAlignment := BTN_LEFT - :OnClick := { || Button1Click( oWindow:oButton1, 4 ) } - :ToolTip := 'Image Only Button' - END WITH - - END WITH - - oWindow:Activate() - -RETURN NIL - -/*----------------------------------------------------------------------*/ - -PROCEDURE Button1Click ( oButton1, nI ) - - IF nI == 1 - oButton1:Caption := 'New Caption 1!' - ELSEIF nI == 2 - oButton1:Caption := 'New Caption 2!' - ELSEIF nI == 3 - oButton1:Caption := 'New Caption 3!' - ELSEIF nI == 4 - oButton1:Caption := 'New Caption 4!' - ENDIF - - MsgInfo( oButton1:Caption , 'Standard Send Operator' ) - -RETURN Added: samples/button/demo_1_cmd.prg =================================================================== --- samples/button/demo_1_cmd.prg (rev 0) +++ samples/button/demo_1_cmd.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -0,0 +1,146 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +#include "hmg.ch" + +MEMVAR oWindow +MEMVAR nCounter + +FUNCTION Main() + + PUBLIC nCounter := 1 + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow + ROW 10 + COL 10 + WIDTH 400 + HEIGHT 400 + TITLE "BUTTON demo - (cmd style)" + ONINIT OnInit() + + DEFINE BUTTON Button1 + ROW 40 + COL 40 + WIDTH 200 + CAPTION "click to change Caption" + ONCLICK Button1Click() + TOOLTIP "click to change Caption" + END BUTTON + + DEFINE BUTTON Button2 + ROW 70 + COL 40 + WIDTH 200 + CAPTION "Button WITH Left Image" + PICTURE "save.png" + PICTALIGNMENT LEFT + ONCLICK MsgInfo( "Click on Button2" ) + TOOLTIP "Button WITH Left Image" + END BUTTON + + DEFINE BUTTON oButton3 + ROW 100 + COL 40 + WIDTH 200 + CAPTION "Button WITH Right Image" + PICTURE "save.png" + PICTALIGNMENT RIGHT + ONCLICK MsgInfo( "Click on Button3" ) + TOOLTIP "Button WITH Right Image" + END BUTTON + + DEFINE BUTTON Button4 + ROW 130 + COL 40 + WIDTH 200 + CAPTION "Button1 Flat .T." + ONCLICK oWindow:Button1:Flat := .T. + TOOLTIP "Button1 Flat .T." + END BUTTON + + DEFINE BUTTON Button5 + ROW 160 + COL 40 + WIDTH 200 + CAPTION "Button1 Flat .F." + ONCLICK oWindow:Button1:Flat := .F. + TOOLTIP "Button1 Flat .F." + END BUTTON + + DEFINE BUTTON Button6 + ROW 190 + COL 40 + WIDTH 200 + PICTURE "save.png" + PICTALIGNMENT LEFT + ONCLICK MsgInfo( "Button with image only" ) + TOOLTIP "Button with image only" + END BUTTON + + DEFINE BUTTON Button7 + ROW 220 + COL 40 + WIDTH 200 + CAPTION "Defined image size 30x30" + PICTURE "exit.png" + PICTALIGNMENT RIGHT + IMAGESIZE 30,30 + ONCLICK MsgInfo( "Defined image size 30x30" ) + TOOLTIP "Defined image size 30x30" + END BUTTON + + DEFINE BUTTON Button8 + ROW 250 + COL 40 + WIDTH 200 + CAPTION "Defined image size 18x18" + PICTURE "exit.png" + PICTALIGNMENT RIGHT + IMAGESIZE 18,18 + ONCLICK MsgInfo( "Defined image size 18x18" ) + TOOLTIP "Defined image size 18x18" + END BUTTON + + DEFINE BUTTON Button9 + ROW 280 + COL 40 + WIDTH 200 + CAPTION "Button1 checked" + ONCLICK { || Checked() } + TOOLTIP "click to change Button1 checked" + END BUTTON + + END WINDOW + + ACTIVATE WINDOW oWindow + +RETURN NIL + +STATIC FUNCTION OnInit() + + oWindow:Center() + +RETURN NIL + +PROCEDURE Button1Click() + + nCounter := IIF( nCounter == 4, 1, nCounter + 1 ) + oWindow:Button1:Caption := "New caption" + hb_NtoS( nCounter ) + " click to change" + +RETURN + +PROCEDURE Checked() + + oWindow:Button1:Checked := IIF( oWindow:Button1:Checked, .F., .T. ) + oWindow:Button1:Caption := IIF( oWindow:Button1:Checked, "Button1 checked", "Button1 UNchecked" ) + oWindow:Button1:ToolTip := IIF( oWindow:Button1:Checked, "Button1 checked", "Button1 UNchecked" ) + +RETURN Property changes on: samples/button/demo_1_cmd.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/button/demo_1_oop.prg =================================================================== --- samples/button/demo_1_oop.prg (rev 0) +++ samples/button/demo_1_oop.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -0,0 +1,148 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +#include "hmg.ch" + +MEMVAR oWindow +MEMVAR nCounter + +FUNCTION Main() + + PUBLIC nCounter := 1 + + HbQt_ErrorSys() + + WITH OBJECT oWindow := MAINWINDOW():New() + :Row := 10 + :Col := 10 + :Width := 400 + :Height := 400 + :Title := "BUTTON demo - (oop style)" + :OnInit := {|| OnInit() } + + WITH OBJECT BUTTON():New( "Button1" ) + :Row := 40 + :Col := 40 + :Width := 200 + :Caption := "click to change Caption" + :OnClick := { || Button1Click() } + :ToolTip := "click to change Caption" + END WITH + + WITH OBJECT Button():New( "Button2" ) + :Row := 70 + :Col := 40 + :Width := 200 + :Caption := "Button WITH Left Image" + :Picture := "save.png" + :PictAlignment := BTN_LEFT + :OnClick := { || MsgInfo( "Click on Button2" ) } + :ToolTip := "Button WITH Left Image" + END WITH + + WITH OBJECT Button():New( "oButton3" ) + :Row := 100 + :Col := 40 + :Width := 200 + :Caption := "Button WITH Right Image" + :Picture := "save.png" + :PictAlignment := BTN_RIGHT + :OnClick := { || MsgInfo( "Click on Button3" ) } + :ToolTip := "Button WITH Right Image" + END WITH + + WITH OBJECT Button():New( "Button4" ) + :Row := 130 + :Col := 40 + :Width := 200 + :Caption := "Button1 Flat := .T." + :OnClick := { || oWindow:Button1:Flat := .T. } + :ToolTip := "Button1 Flat := .T." + END WITH + + WITH OBJECT Button():New( "Button5" ) + :Row := 160 + :Col := 40 + :Width := 200 + :Caption := "Button1 Flat := .F." + :OnClick := { || oWindow:Button1:Flat := .F. } + :ToolTip := "Button1 Flat := .F." + END WITH + + WITH OBJECT Button():New( "Button6" ) + :Row := 190 + :Col := 40 + :Width := 200 + :Picture := "save.png" + :PictAlignment := BTN_LEFT + :OnClick := { || MsgInfo( "Button with image only" ) } + :ToolTip := "Button with image only" + END WITH + + WITH OBJECT Button():New( "Button7" ) + :Row := 220 + :Col := 40 + :Width := 200 + :Caption := "Defined image size 30x30" + :Picture := "exit.png" + :PictAlignment := BTN_RIGHT + :ImageWidth := 30 + :ImageHeight := 30 + :OnClick := { || MsgInfo( "Defined image size 30x30" ) } + :ToolTip := "Defined image size 30x30" + END WITH + + WITH OBJECT Button():New( "Button8" ) + :Row := 250 + :Col := 40 + :Width := 200 + :Caption := "Defined image size 18x18" + :Picture := "exit.png" + :PictAlignment := BTN_RIGHT + :ImageWidth := 18 + :ImageHeight := 18 + :OnClick := { || MsgInfo( "Defined image size 18x18" ) } + :ToolTip := "Defined image size 18x18" + END WITH + + WITH OBJECT Button():New( "Button9" ) + :Row := 280 + :Col := 40 + :Width := 200 + :Caption := "Button1 checked" + :OnClick := { || Checked() } + :ToolTip := "click to change Button1 checked" + END WITH + + END WITH + + oWindow:Activate() + +RETURN NIL + +STATIC FUNCTION OnInit() + + oWindow:Center() + +RETURN NIL + +PROCEDURE Button1Click() + + nCounter := IIF( nCounter == 4, 1, nCounter + 1 ) + oWindow:Button1:Caption := "New caption" + hb_NtoS( nCounter ) + " click to change" + +RETURN + +PROCEDURE Checked() + + oWindow:Button1:Checked := IIF( oWindow:Button1:Checked, .F., .T. ) + oWindow:Button1:Caption := IIF( oWindow:Button1:Checked, "Button1 checked", "Button1 UNchecked" ) + oWindow:Button1:ToolTip := IIF( oWindow:Button1:Checked, "Button1 checked", "Button1 UNchecked" ) + +RETURN Property changes on: samples/button/demo_1_oop.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Deleted: samples/button/demo_2.prg =================================================================== --- samples/button/demo_2.prg 2011-12-21 14:49:42 UTC (rev 865) +++ samples/button/demo_2.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -1,50 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -MEMVAR oWindow1 - -FUNCTION Main - - PRIVATE oWindow1 - - HbQt_ErrorSys() - - DEFINE MAINWINDOW oWindow1 - Row 10 - Col 10 - Width 400 - Height 400 - Title 'Nice OOP Demo!!!' - OnInit oWindow1:Center() - - @ 40,40 Button oButton1 ; - Caption 'OOP Button!!!' ; - On Click ButtonClick() - - END WINDOW - - ACTIVATE WINDOW oWindow1 - -RETURN NIL - -/*----------------------------------------------------------------------*/ - -PROCEDURE ButtonClick() - - * SetProperty ( 'oWindow1' , 'oButton1' , 'Caption' , 'New!' ) - * Or oWindow1:oButton1:Caption := 'New!' - * Or oWindow1.oButton1.Caption := 'New!' - - MsgInfo( oWindow1:oButton1:Caption , 'Standard Send Operator' ) - MsgInfo( oWindow1.oButton1.Caption , 'Alternate Send Operator' ) - MsgInfo( GetProperty( 'oWindow1' , 'oButton1' , 'Caption' ) , 'GetProperty()' ) - -RETURN Deleted: samples/button/demo_3.prg =================================================================== --- samples/button/demo_3.prg 2011-12-21 14:49:42 UTC (rev 865) +++ samples/button/demo_3.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -1,53 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -MEMVAR oWindow1 - -FUNCTION Main - - PRIVATE oWindow1 - - HbQt_ErrorSys() - - DEFINE MAINWINDOW oWindow1 - Row 10 - Col 10 - Width 400 - Height 400 - Title 'Nice OOP Demo!!!' - OnInit oWindow1:Center() - - DEFINE BUTTON oButton1 - Row 40 - Col 40 - Caption 'OOP Button!!!' - OnClick ButtonClick() - END BUTTON - - END WINDOW - - ACTIVATE WINDOW oWindow1 - -RETURN NIL - -/*----------------------------------------------------------------------*/ - -PROCEDURE ButtonClick() - - * SetProperty ( 'oWindow1' , 'oButton1' , 'Caption' , 'New!' ) - * Or oWindow1:oButton1:Caption := 'New!' - * Or oWindow1.oButton1.Caption := 'New!' - - MsgInfo( oWindow1:oButton1:Caption , 'Standard Send Operator' ) - MsgInfo( oWindow1.oButton1.Caption , 'Alternate Send Operator' ) - MsgInfo( GetProperty( 'oWindow1' , 'oButton1' , 'Caption' ) , 'GetProperty()' ) - -RETURN Deleted: samples/button/demo_4.prg =================================================================== --- samples/button/demo_4.prg 2011-12-21 14:49:42 UTC (rev 865) +++ samples/button/demo_4.prg 2011-12-21 16:19:06 UTC (rev 866) @@ -1,75 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -/* - * PLEASE PAY ATTENTION about image/icon size dimensioned with QT command <setIconSize> (see http://doc.qt.nokia.com/4.7/qabstractitemview.html#iconSize-prop): - * Note that the icons ..... are only scaled down! Not Up - * i.e. save.png is 32x32px: you can use setIconSize( x, y ) but x (and y) must be less then or equal to 32px. - * - * MOST IMPORTANT: <IMAGESIZE> or <ImageWidth>and<ImageHeight> must be placed BEFORE Picture command -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow1 - - HbQt_ErrorSys() - - DEFINE MAINWINDOW oWindow1 - ROW 10 - COL 10 - WIDTH 400 - HEIGHT 400 - TITLE 'Nice OOP Demo!!!' - ONINIT oWindow1:Center() - - - WITH OBJECT Button():New() - :Row := 40 - :Col := 40 - :Width := 200 - :Height := 40 - :ImageWidth := 32 - :ImageHeight := 32 - :Picture := "save.png" - :PictAlignment := BTN_LEFT - :Caption := "HMG4 oop syntax" - :OnClick := { || MsgInfo( "Button1 clicked" ) } - END WITH - - DEFINE BUTTON oButton2 - ROW 140 - COL 40 - WIDTH 200 - HEIGHT 50 - CAPTION "HMG3 Syntax style" - IMAGESIZE 32,32 - PICTURE "exit.png" - ONCLICK MsgInfo( "Button2 clicked" ) - END BUTTON - - DEFINE BUTTON oButton3 - ROW 240 - COL 40 - WIDTH 200 - HEIGHT 50 - CAPTION "HMG3 Syntax style" - IMAGESIZE 18,18 - PICTURE "exit.png" - ONCLICK MsgInfo( "Button3 clicked" ) - END BUTTON - - END WINDOW - - ACTIVATE WINDOW oWindow1 - -RETURN NIL - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-21 14:49:53
|
Revision: 865 http://hmg.svn.sourceforge.net/hmg/?rev=865&view=rev Author: ricciz Date: 2011-12-21 14:49:42 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog Added Paths: ----------- samples/drag_and_drop/ samples/drag_and_drop/build.bat samples/drag_and_drop/demo_1_cmd.prg samples/drag_and_drop/hbmk.hbm samples/drag_and_drop/qt.conf Modified: Changelog =================================================================== --- Changelog 2011-12-21 14:20:27 UTC (rev 864) +++ Changelog 2011-12-21 14:49:42 UTC (rev 865) @@ -17,6 +17,9 @@ */ 2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + + samples/drag_and_drop/demo_1_cmd.prg + +2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/control.prg + METHOD OnDropDown SETGET + METHOD DragEvent Added: samples/drag_and_drop/build.bat =================================================================== --- samples/drag_and_drop/build.bat (rev 0) +++ samples/drag_and_drop/build.bat 2011-12-21 14:49:42 UTC (rev 865) @@ -0,0 +1,2 @@ +@echo off +..\..\buildapp.bat %1 %2 %3 %4 %5 %6 %7 %8 -run \ No newline at end of file Added: samples/drag_and_drop/demo_1_cmd.prg =================================================================== --- samples/drag_and_drop/demo_1_cmd.prg (rev 0) +++ samples/drag_and_drop/demo_1_cmd.prg 2011-12-21 14:49:42 UTC (rev 865) @@ -0,0 +1,72 @@ +/* + * $Id: demo_2.prg 760 2011-10-21 12:01:51Z l3wonsf $ +*/ + +/* + * HMG 4 demo + * Ricci Zepmeusel (ricci (at) conzoft.de) +*/ + +#include "hmg.ch" +#include "hbqtgui.ch" + + + +FUNCTION Main + + LOCAL oWindow1 + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow1 + ROW 10 + COL 10 + WIDTH 400 + HEIGHT 200 + TITLE 'Drag and Drop demo' + ONINIT oWindow1:Center() + + DEFINE LABEL oLabel1 + ROW 80; COL 50 + WIDTH 300; HEIGHT 40 + ALIGNMENT CENTER + BORDER .T. + VALUE "Drag one or more files from explorer here." + OnDropDown { |oEvent| MyDropEvent(oEvent, ) } + END LABEL + + END WINDOW + + ACTIVATE WINDOW oWindow1 + +RETURN NIL + +/*.............................................................................. + DropEvent +..............................................................................*/ +FUNCTION MyDropEvent( oEvent ) + + LOCAL oMimeData, oUrlList, oURL, cFile, i + LOCAL cFileNames := "" + + oMimeData := oEvent:mimeData() + + IF oMimeData:hasUrls() + oUrlList := oMimeData:urls() + + for i := 0 TO oUrlList:size() - 1 + oURL := oUrlList:at(i) + cFile := oURL:toLocalFile() + + cFileNames += cFile + HB_EOL() + NEXT + ELSE + msginfo("Wrong data type") + ENDIF + + oEvent:setDropAction( Qt_CopyAction ) + oEvent:accept() + + msginfo( cFileNames) + +RETURN .F. Added: samples/drag_and_drop/hbmk.hbm =================================================================== --- samples/drag_and_drop/hbmk.hbm (rev 0) +++ samples/drag_and_drop/hbmk.hbm 2011-12-21 14:49:42 UTC (rev 865) @@ -0,0 +1 @@ +../../hmg.hbc \ No newline at end of file Added: samples/drag_and_drop/qt.conf =================================================================== --- samples/drag_and_drop/qt.conf (rev 0) +++ samples/drag_and_drop/qt.conf 2011-12-21 14:49:42 UTC (rev 865) @@ -0,0 +1,2 @@ +[Paths] +plugins=../../../qt/plugins \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-21 14:20:33
|
Revision: 864 http://hmg.svn.sourceforge.net/hmg/?rev=864&view=rev Author: ricciz Date: 2011-12-21 14:20:27 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog source/control.prg Modified: Changelog =================================================================== --- Changelog 2011-12-21 14:05:06 UTC (rev 863) +++ Changelog 2011-12-21 14:20:27 UTC (rev 864) @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-21 15:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * source/control.prg + + METHOD OnDropDown SETGET + + METHOD DragEvent + 2011-12-21 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/animatebox/demo_3.prg + samples/console/demo_1_oop.prg Modified: source/control.prg =================================================================== --- source/control.prg 2011-12-21 14:05:06 UTC (rev 863) +++ source/control.prg 2011-12-21 14:20:27 UTC (rev 864) @@ -53,6 +53,8 @@ DATA cCaption INIT NIL PROTECTED // please see Caption method before restore to '' DATA aDisabledBackColor INIT NIL PROTECTED DATA aDisabledFontColor INIT NIL PROTECTED + DATA bDragEvent INIT NIL PROTECTED + DATA bDropEvent INIT NIL PROTECTED DATA cField INIT NIL PROTECTED DATA lFlat INIT NIL PROTECTED DATA nHelpId INIT NIL PROTECTED @@ -73,10 +75,11 @@ DATA nTabPage INIT NIL PROTECTED DATA lTransparent INIT NIL PROTECTED DATA cType INIT NIL PROTECTED - + // Methods: please preserve alphabetic order. Methods "New" and "Create" must be the first if present METHOD DeleteAllItems METHOD DeleteItem + METHOD DragEvent METHOD ProcessKeyPressed METHOD Refresh METHOD Save @@ -97,6 +100,7 @@ METHOD Items SETGET METHOD Multiline SETGET METHOD MultiSelect SETGET + METHOD OnDropDown SETGET METHOD OnChange SETGET METHOD OnDblClick SETGET METHOD OnEnter SETGET @@ -126,6 +130,20 @@ RETURN Self /*.............................................................................. + DragEvent +..............................................................................*/ +METHOD DragEvent( oEvent ) CLASS CONTROL + + IF oEvent:mimeData():hasUrls() + oEvent:setDropAction( Qt_CopyAction ) + oEvent:accept() + ELSE + oEvent:ignore() + ENDIF + +Return .F. + +/*.............................................................................. ProcessKeyPressed ..............................................................................*/ METHOD ProcessKeyPressed( oEvent ) CLASS CONTROL @@ -401,6 +419,35 @@ RETURN NIL /*.............................................................................. + OnDrop +..............................................................................*/ +METHOD OnDropDown( xValue ) CLASS CONTROL + + IF PCOUNT() == 1 + IF hb_IsNil( xValue ) // delete Drop futures + ::bDragEvent := NIL + ::bDropEvent := NIL + ::oQTObject:setAcceptDrops(.F.) + + ::oQTObject:disconnect( QEvent_DragEnter ) + ::oQTObject:disconnect( QEvent_DragEnter ) + ::oQTObject:disconnect( QEvent_Drop ) + ::oQTObject:disconnect( QEvent_DragLeave ) + + ELSEIF hb_IsBlock( xValue ) + ::bDropEvent := xValue + ::oQTObject:setAcceptDrops(.T.) + + ::oQTObject:connect( QEvent_DragEnter , IF( hb_IsNil( ::bDragEvent ), { |oEvent| ::DragEvent( oEvent ) }, ::bDragEvent ) ) + ::oQTObject:connect( QEvent_DragEnter , IF( hb_IsNil( ::bDragEvent ), { |oEvent| ::DragEvent( oEvent ) }, ::bDragEvent ) ) + ::oQTObject:connect( QEvent_Drop , ::bDropEvent ) + ::oQTObject:connect( QEvent_DragLeave , { |oEvent| oEvent:accept() } ) + ENDIF + ENDIF + + RETURN ::bDropEvent + +/*.............................................................................. OnEnter ..............................................................................*/ METHOD OnEnter( bValue ) CLASS CONTROL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-21 14:05:18
|
Revision: 863 http://hmg.svn.sourceforge.net/hmg/?rev=863&view=rev Author: l3wonsf Date: 2011-12-21 14:05:06 +0000 (Wed, 21 Dec 2011) Log Message: ----------- 2011-12-21 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/animatebox/demo_3.prg + samples/console/demo_1_oop.prg + samples/console/demo_1_cmd.prg * to show usage of ANIMATEBOX using: OOP style and CMD style. - samples/console/demo_1.PRG + samples/console/demo_1_oop.prg + samples/console/demo_1_cmd.prg * related with mainwindow.prg problem and to show OOP style and CMD style. ! source/mainwindow.prg ! ::s_oMainWindow was not reset when MainWindow is released. Thanks to Rossine for his notice. Modified Paths: -------------- Changelog source/mainwindow.prg Added Paths: ----------- samples/animatebox/demo_1_cmd.prg samples/animatebox/demo_1_oop.prg samples/console/demo_1_cmd.prg samples/console/demo_1_oop.prg Removed Paths: ------------- samples/animatebox/demo_3.prg samples/console/demo_1.PRG Modified: Changelog =================================================================== --- Changelog 2011-12-17 18:01:37 UTC (rev 862) +++ Changelog 2011-12-21 14:05:06 UTC (rev 863) @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-21 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + - samples/animatebox/demo_3.prg + + samples/console/demo_1_oop.prg + + samples/console/demo_1_cmd.prg + * to show usage of ANIMATEBOX using: OOP style and CMD style. + + - samples/console/demo_1.PRG + + samples/console/demo_1_oop.prg + + samples/console/demo_1_cmd.prg + * related with mainwindow.prg problem and to show OOP style and CMD style. + + ! source/mainwindow.prg + ! ::s_oMainWindow was not reset when MainWindow is released. + Thanks to Rossine for his notice. + 2011-12-17 19:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) * source/textbox.prg * BACKSPACE allowed while editing masquerade field but without selection. @@ -25,7 +40,6 @@ ! source/textbox.prg __HmgGridKeybEvent() renamed into GridKeybEvent() - 2011-12-17 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! source/textbox.prg Added: samples/animatebox/demo_1_cmd.prg =================================================================== --- samples/animatebox/demo_1_cmd.prg (rev 0) +++ samples/animatebox/demo_1_cmd.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -0,0 +1,96 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +#include "hmg.ch" + +MEMVAR oWindow + +FUNCTION Main() + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow + ROW 10 + COL 10 + WIDTH 410 + HEIGHT 480 + TITLE "ANIMATEBOX demo - (oop style)" + ONINIT OnInit() + + DEFINE ANIMATEBOX AnimateBox + ROW 10 + COL 10 + WIDTH 394 + HEIGHT 376 + FILE "bfly.gif" + END ANIMATEBOX + + DEFINE BUTTON Button1 + ROW 400 + COL 10 + CAPTION "Play" + ONCLICK oWindow:AnimateBox:Play() + END BUTTON + + DEFINE BUTTON Button2 + ROW 400 + COL 110 + CAPTION "Stop" + ONCLICK oWindow:AnimateBox:Stop() + END BUTTON + + DEFINE BUTTON Button3 + ROW 430 + COL 10 + CAPTION "Close" + ONCLICK oWindow:AnimateBox:Close() + END BUTTON + + DEFINE BUTTON Button4 + ROW 430 + COL 110 + CAPTION "Different file" + ONCLICK Different() + END BUTTON + + DEFINE BUTTON Button5 + ROW 430 + COL 210 + CAPTION "Original file" + ONCLICK Original() + END BUTTON + + END WINDOW + + ACTIVATE WINDOW oWindow + +RETURN NIL + +STATIC FUNCTION OnInit() + + CENTER WINDOW oWindow + oWindow:AnimateBox:Play() + +RETURN NIL + +STATIC FUNCTION Original() + + oWindow:AnimateBox:Stop() + oWindow:AnimateBox:File := "bfly.gif" + oWindow:AnimateBox:Play() + +RETURN NIL + +STATIC FUNCTION Different() + + oWindow:AnimateBox:Stop() + oWindow:AnimateBox:File := "sg4.gif" + oWindow:AnimateBox:Play() + +RETURN NIL \ No newline at end of file Property changes on: samples/animatebox/demo_1_cmd.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/animatebox/demo_1_oop.prg =================================================================== --- samples/animatebox/demo_1_oop.prg (rev 0) +++ samples/animatebox/demo_1_oop.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -0,0 +1,96 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +#include "hmg.ch" + +MEMVAR oWindow + +FUNCTION Main() + + HbQt_ErrorSys() + + WITH OBJECT oWindow := MAINWINDOW():New() + :Row := 10 + :Col := 10 + :Width := 410 + :Height := 480 + :Title := "ANIMATEBOX demo - (oop style)" + :OnInit := {|| OnInit() } + + WITH OBJECT ANIMATEBOX():New( "AnimateBox" ) + :Row := 10 + :Col := 10 + :Width := 394 + :Height := 376 + :File := "bfly.gif" + END WITH + + WITH OBJECT BUTTON():New( "Button1" ) + :Row := 400 + :Col := 10 + :Caption := "Play" + :OnClick := { || oWindow:AnimateBox:Play() } + END WITH + + WITH OBJECT BUTTON():New( "Button2" ) + :Row := 400 + :Col := 110 + :Caption := "Stop" + :OnClick := { || oWindow:AnimateBox:Stop() } + END WITH + + WITH OBJECT BUTTON():New( "Button3" ) + :Row := 430 + :Col := 10 + :Caption := "Close" + :OnClick := { || oWindow:AnimateBox:Close() } + END WITH + + WITH OBJECT BUTTON():New( "Button4" ) + :Row := 430 + :Col := 110 + :Caption := "Different file" + :OnClick := { || Different() } + END WITH + + WITH OBJECT BUTTON():New( "Button5" ) + :Row := 430 + :Col := 210 + :Caption := "Original file" + :OnClick := { || Original() } + END WITH + + END WITH + + oWindow:Activate() + +RETURN NIL + +STATIC FUNCTION OnInit() + + oWindow:Center() + oWindow:AnimateBox:Play() + +RETURN NIL + +STATIC FUNCTION Original() + + oWindow:AnimateBox:Stop() + oWindow:AnimateBox:File := "bfly.gif" + oWindow:AnimateBox:Play() + +RETURN NIL + +STATIC FUNCTION Different() + + oWindow:AnimateBox:Stop() + oWindow:AnimateBox:File := "sg4.gif" + oWindow:AnimateBox:Play() + +RETURN NIL \ No newline at end of file Property changes on: samples/animatebox/demo_1_oop.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Deleted: samples/animatebox/demo_3.prg =================================================================== --- samples/animatebox/demo_3.prg 2011-12-17 18:01:37 UTC (rev 862) +++ samples/animatebox/demo_3.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -1,72 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow - - HbQt_ErrorSys() - - DEFINE MAINWINDOW oWindow - At 10,10 - Width 410 - Height 480 - Title "Nice OOP Demo!!!" - OnInit (oWindow:Center(),oWindow.oAnimateBox.play() ) - - DEFINE ANIMATEBOX oAnimateBox - Row 10 - Col 10 - Width 394 - Height 376 - File 'bfly.gif' - END AnimateBox - - DEFINE BUTTON oButton1 - Row 400 - Col 10 - Caption "Play" - onClick oWindow.oAnimateBox.play() - END BUTTON - - DEFINE BUTTON oButton2 - Row 400 - Col 110 - Caption "Stop" - onClick oWindow.oAnimateBox.stop() - END BUTTON - - DEFINE BUTTON oButton3 - Row 430 - Col 10 - Caption "Close" - onClick oWindow.oAnimateBox.close() - END BUTTON - - DEFINE BUTTON oButton4 - Row 430 - Col 110 - Caption "Open File" - onClick oWindow.oAnimateBox.file := 'sg4.gif' - END BUTTON - - DEFINE BUTTON oButton5 - Row 430 - Col 210 - Caption "Original File" - onClick oWindow.oAnimateBox.open( 'bfly.gif' ) - END BUTTON - - END WINDOW - - oWindow:Activate() - - RETURN NIL Deleted: samples/console/demo_1.PRG =================================================================== --- samples/console/demo_1.PRG 2011-12-17 18:01:37 UTC (rev 862) +++ samples/console/demo_1.PRG 2011-12-21 14:05:06 UTC (rev 863) @@ -1,83 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -/* - This demo shows how to mix console and GUI in the same EXE. - In fact, the console part, WVG, is not a real console, is a "pseudo-console" emulated in a graphics environment. - But this work just as a pure console does. -*/ - -#include "hmg.ch" - -Function Main - - LOCAL nPrompt - - HbQt_ErrorSys() - - // Request WVG to be linked. - REQUEST HB_GT_WVG - // Must set WVG as the main interface. - // If not settled, no window will be shown. - REQUEST HB_GT_WVG_DEFAULT - - // Console code - SETMODE( 25, 80 ) - SET MESSAGE TO 24 - - DO WHILE .T. - CLEAR SCREEN - @ 3, 20 SAY "Select an option " COLOR "W+/R" - - @ 04, 19 TO 08,38 DOUBLE - @ 05, 20 PROMPT "Open QT GUI window" MESSAGE "Open a sample QT GUI window" - @ 06, 20 PROMPT "Text MemoEdit() " MESSAGE "Displays a text file" - @ 07, 20 PROMPT "Quit " MESSAGE "Ends demo" - - MENU TO nPrompt - - SWITCH nPrompt - CASE 1 - QtCallFromConsole() - EXIT - - CASE 2 - @ 00, 00 TO MAXROW(), MAXCOL() - MemoEdit( "This is text mode MemoEdit", 01, 01, MAXROW()-1, MAXCOL()-1 ) - EXIT - - CASE 3 - QUIT - END - ENDDO - - Return Nil - -/*----------------------------------------------------------------------*/ - -Static function QtCallFromConsole() - - // GUI code. - LOCAL oWindow - - DEFINE MAINWINDOW oWindow - Width 400 - Height 400 - Title 'Calling a QT window from pseudo-console WVG' - OnInit oWindow:Center() - - @ 40,40 Button oButton1 ; - Caption 'Click to close' ; - On Click oWindow:Release() - - END WINDOW - - oWindow:Activate() - - Return Nil Added: samples/console/demo_1_cmd.prg =================================================================== --- samples/console/demo_1_cmd.prg (rev 0) +++ samples/console/demo_1_cmd.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -0,0 +1,86 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + This demo shows how to mix console and GUI in the same EXE. + In fact, the console part, WVG, is not a real console, is a "pseudo-console" emulated in a graphics environment. + But this work just as a pure console does. +*/ + +#include "hmg.ch" + +Function Main + + LOCAL nPrompt + + // Request WVG to be linked. + REQUEST HB_GT_WVG + // Must set WVG as the main interface. + // If not settled, no window will be shown. + REQUEST HB_GT_WVG_DEFAULT + + // Console code + SETMODE( 25, 80 ) + SET MESSAGE TO 24 + + DO WHILE .T. + CLEAR SCREEN + @ 3, 20 SAY "Select an option " COLOR "W+/R" + + @ 04, 19 TO 08,38 DOUBLE + @ 05, 20 PROMPT "Open QT GUI window" MESSAGE "Open a sample QT GUI window" + @ 06, 20 PROMPT "Text MemoEdit() " MESSAGE "Displays a text file" + @ 07, 20 PROMPT "Quit " MESSAGE "Ends demo" + + MENU TO nPrompt + + SWITCH nPrompt + CASE 1 + QtCallFromConsole() + EXIT + + CASE 2 + @ 00, 00 TO MAXROW(), MAXCOL() + MemoEdit( "This is text mode MemoEdit", 01, 01, MAXROW()-1, MAXCOL()-1 ) + EXIT + + CASE 3 + QUIT + END + ENDDO + + Return Nil + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION QtCallFromConsole() + + // GUI code. + LOCAL oWindow + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow + WIDTH 400 + HEIGHT 400 + TITLE 'Calling a QT window from pseudo-console WVG' + ONINIT oWindow:Center() + + DEFINE BUTTON Button1 + Row 40 + Col 40 + Caption "Click to close" + OnClick oWindow:Release() + END BUTTON + + END WINDOW + + ACTIVATE WINDOW oWindow + +RETURN NIL Property changes on: samples/console/demo_1_cmd.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/console/demo_1_oop.prg =================================================================== --- samples/console/demo_1_oop.prg (rev 0) +++ samples/console/demo_1_oop.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -0,0 +1,86 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + This demo shows how to mix console and GUI in the same EXE. + In fact, the console part, WVG, is not a real console, is a "pseudo-console" emulated in a graphics environment. + But this work just as a pure console does. +*/ + +#include "hmg.ch" + +Function Main + + LOCAL nPrompt + + // Request WVG to be linked. + REQUEST HB_GT_WVG + // Must set WVG as the main interface. + // If not settled, no window will be shown. + REQUEST HB_GT_WVG_DEFAULT + + // Console code + SETMODE( 25, 80 ) + SET MESSAGE TO 24 + + DO WHILE .T. + CLEAR SCREEN + @ 3, 20 SAY "Select an option " COLOR "W+/R" + + @ 04, 19 TO 08,38 DOUBLE + @ 05, 20 PROMPT "Open QT GUI window" MESSAGE "Open a sample QT GUI window" + @ 06, 20 PROMPT "Text MemoEdit() " MESSAGE "Displays a text file" + @ 07, 20 PROMPT "Quit " MESSAGE "Ends demo" + + MENU TO nPrompt + + SWITCH nPrompt + CASE 1 + QtCallFromConsole() + EXIT + + CASE 2 + @ 00, 00 TO MAXROW(), MAXCOL() + MemoEdit( "This is text mode MemoEdit", 01, 01, MAXROW()-1, MAXCOL()-1 ) + EXIT + + CASE 3 + QUIT + END + ENDDO + + Return Nil + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION QtCallFromConsole() + + // GUI code. + LOCAL oWindow + + HbQt_ErrorSys() + + WITH OBJECT oWindow := MAINWINDOW():New() + :Width := 400 + :Height := 400 + :Title := 'Calling a QT window from pseudo-console WVG' + :OnInit := {|| oWindow:Center() } + + WITH OBJECT BUTTON():New( "Button1" ) + :Row := 40 + :Col := 40 + :Caption := "Click to close" + :OnClick := { || oWindow:Release() } + END WITH + + END WITH + + oWindow:Activate() + +RETURN NIL Property changes on: samples/console/demo_1_oop.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Modified: source/mainwindow.prg =================================================================== --- source/mainwindow.prg 2011-12-17 18:01:37 UTC (rev 862) +++ source/mainwindow.prg 2011-12-21 14:05:06 UTC (rev 863) @@ -150,6 +150,8 @@ ::oParent:ChildRemove( ::cName ) ENDIF + ::s_oMainWindow := NIL + // if required stop Qt IF HMGAPP():Property("WhoQuitQt") == 0 HMGAPP():quit() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-17 18:01:43
|
Revision: 862 http://hmg.svn.sourceforge.net/hmg/?rev=862&view=rev Author: l3wonsf Date: 2011-12-17 18:01:37 +0000 (Sat, 17 Dec 2011) Log Message: ----------- 2011-12-17 19:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) * source/textbox.prg * BACKSPACE allowed while editing masquerade field but without selection. Modified Paths: -------------- Changelog source/textbox.prg Modified: Changelog =================================================================== --- Changelog 2011-12-17 15:01:22 UTC (rev 861) +++ Changelog 2011-12-17 18:01:37 UTC (rev 862) @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-17 19:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + * source/textbox.prg + * BACKSPACE allowed while editing masquerade field but without selection. + 2011-12-17 16:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! source/textbox.prg Modified: source/textbox.prg =================================================================== --- source/textbox.prg 2011-12-17 15:01:22 UTC (rev 861) +++ source/textbox.prg 2011-12-17 18:01:37 UTC (rev 862) @@ -154,6 +154,7 @@ METHOD __HmgPicEdit PROTECTED METHOD __HmgPicEmpty PROTECTED METHOD __HmgPicEuVsUsa PROTECTED + METHOD __HmgPicIsFixedChar PROTECTED METHOD __HmgPicGetFocus PROTECTED METHOD __HmgPicInput PROTECTED METHOD __HmgPicIsEditable PROTECTED @@ -662,11 +663,31 @@ IF ! EMPTY( ::cPictEdit ) nCp := ::oQTObject:cursorPosition() IF nKey == Qt_Key_Backspace + // no selection allowed IF ::oQtObject:selectionStart() <> -1 ::oQtObject:deselect() nCp := ::oQtObject:selectionStart() + cBuffer := ::xItemEdit + ELSE + // 20111217 - l3wonsf: many people ask to use BACKSPACE + // this can be dangerous because change current character with SPACE(1). + // IF picture clause is "9" in a TXT_CHARCATER data type I think is wrong because you will have a returned value " " + // anyway.. many people ask this change + IF nCp <= LEN( cBuffer ) .AND. nCp > 0 + IF ::__HmgPicIsFixedChar( nCp ) + cBuffer := ::xItemEdit + ELSE + IF ::nDataType == TXT_CHARACTER + cBuffer := STUFF( cBuffer, nCp, 1, " " ) + ELSE + cBuffer := STUFF( cBuffer, nCp, 1, "0" ) + ENDIF + ENDIF + nCp -= 1 + ELSE + cBuffer := ::xItemEdit + ENDIF ENDIF - cBuffer := ::xItemEdit ELSE IF ::oQtObject:selectionStart() <> -1 nCp := ::oQtObject:selectionStart() @@ -1149,6 +1170,24 @@ RETURN cString /*.............................................................................. + __HmgPicIsFixedChar +..............................................................................*/ +METHOD __HmgPicIsFixedChar( nCp ) CLASS TEXTBOX + + LOCAL aPurged, lReturn := .F. + + IF ! EMPTY( ::cPictEdit ) + aPurged := ::__HmgPicPurged() + IF nCp > 0 .AND. nCp <= aPurged[1] + lReturn := IIF( SUBSTR( ::cPictEdit, nCp, 1 ) $ "!AXN9D", .F., .T. ) + ELSE + lReturn := .T. + ENDIF + ENDIF + +RETURN lReturn + +/*.............................................................................. __HmgPicGetFocus ..............................................................................*/ METHOD __HmgPicGetFocus() CLASS TEXTBOX @@ -1320,7 +1359,7 @@ /*.............................................................................. __HmgPicMaskVchar - for masquered field test if is entered a valid char in specific position + for masquerade field test if is entered a valid char in specific position ..............................................................................*/ METHOD __HmgPicMaskVchar( cChar, nCp ) CLASS TEXTBOX This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-17 15:01:28
|
Revision: 861 http://hmg.svn.sourceforge.net/hmg/?rev=861&view=rev Author: l3wonsf Date: 2011-12-17 15:01:22 +0000 (Sat, 17 Dec 2011) Log Message: ----------- 2011-12-17 16:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! source/textbox.prg __HmgGridKeybEvent() renamed into GridKeybEvent() Modified Paths: -------------- Changelog source/grid.prg source/textbox.prg Modified: Changelog =================================================================== --- Changelog 2011-12-17 14:55:35 UTC (rev 860) +++ Changelog 2011-12-17 15:01:22 UTC (rev 861) @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-17 16:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! source/grid.prg + ! source/textbox.prg + __HmgGridKeybEvent() renamed into GridKeybEvent() + + 2011-12-17 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! source/textbox.prg Modified: source/grid.prg =================================================================== --- source/grid.prg 2011-12-17 14:55:35 UTC (rev 860) +++ source/grid.prg 2011-12-17 15:01:22 UTC (rev 861) @@ -1775,7 +1775,7 @@ // when textbox object, its key process event must be used before IF ::oCurrentWidget:cClass == "TEXTBOX" - IF ::oCurrentWidget:__HmgGridKeybEvent( oKeyEvent ) + IF ::oCurrentWidget:GridKeybEvent( oKeyEvent ) RETURN .T. ENDIF ENDIF Modified: source/textbox.prg =================================================================== --- source/textbox.prg 2011-12-17 14:55:35 UTC (rev 860) +++ source/textbox.prg 2011-12-17 15:01:22 UTC (rev 861) @@ -125,6 +125,8 @@ METHOD DataType SETGET METHOD EchoMode SETGET METHOD Format SETGET +/* GridKeybEvent is a worker method to solve problem related with cell GRID editing. Avoid generalized use */ + METHOD GridKeybEvent METHOD InputMask SETGET METHOD MaxLength SETGET METHOD OnEnter SETGET @@ -136,8 +138,6 @@ // Connected events handling: please preserve alphabetic order. METHOD __HmgConnectEv PROTECTED METHOD __HmgDisconnectEv PROTECTED -/* __HmgGridKeybEvent is a worker method to solve problem related with cell GRID editing. Avoid generalized use */ - METHOD __HmgGridKeybEvent METHOD __HmgOnEnterExec PROTECTED METHOD __HmgOnGotFocusExec PROTECTED METHOD __HmgOnLostFocusExec PROTECTED @@ -356,6 +356,13 @@ RETURN ::cFormat /*.............................................................................. + GridKeybEvent + is a worker function to solve problem related with cell GRID editing. Avoid use +..............................................................................*/ +METHOD GridKeybEvent( oKeyEvent ) CLASS TEXTBOX +RETURN ::__HmgProcessKey( oKeyEvent ) + +/*.............................................................................. InputMask ..............................................................................*/ METHOD InputMask( cValue ) CLASS TEXTBOX @@ -498,13 +505,6 @@ RETURN Self /*.............................................................................. - __HmgGridKeybEvent -// this is a worker function to solve problem related with cell GRID editing. Avoid use -..............................................................................*/ -METHOD __HmgGridKeybEvent( oKeyEvent ) CLASS TEXTBOX -RETURN ::__HmgProcessKey( oKeyEvent ) - -/*.............................................................................. __HmgOnEnterExec ..............................................................................*/ METHOD __HmgOnEnterExec( oEvent ) CLASS TEXTBOX This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-17 14:55:41
|
Revision: 860 http://hmg.svn.sourceforge.net/hmg/?rev=860&view=rev Author: l3wonsf Date: 2011-12-17 14:55:35 +0000 (Sat, 17 Dec 2011) Log Message: ----------- 2011-12-17 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! source/textbox.prg ! create __HmgGridKeybEvent(). Is a worker method to solve problem related with cell GRID editing. Avoid general use. Must be considered internal Modified Paths: -------------- Changelog source/grid.prg source/textbox.prg Modified: Changelog =================================================================== --- Changelog 2011-12-16 17:36:43 UTC (rev 859) +++ Changelog 2011-12-17 14:55:35 UTC (rev 860) @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-17 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! source/grid.prg + ! source/textbox.prg + ! create __HmgGridKeybEvent(). Is a worker method to solve problem related + with cell GRID editing. Avoid general use. Must be considered internal + 2011-12-16 18:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/basic.prg ! a valid name must be always assigned to the objects. Problem caused by Modified: source/grid.prg =================================================================== --- source/grid.prg 2011-12-16 17:36:43 UTC (rev 859) +++ source/grid.prg 2011-12-17 14:55:35 UTC (rev 860) @@ -1773,6 +1773,13 @@ LOCAL nModifiers := oKeyEvent:modifiers() LOCAL xValue + // when textbox object, its key process event must be used before + IF ::oCurrentWidget:cClass == "TEXTBOX" + IF ::oCurrentWidget:__HmgGridKeybEvent( oKeyEvent ) + RETURN .T. + ENDIF + ENDIF + DO CASE CASE( nKey == Qt_Key_Return .and. nModifiers == Qt_NoModifier ) .or.( nKey == Qt_Key_Enter .and. nModifiers == Qt_KeypadModifier ) xValue := ::oCurrentWidget:Value Modified: source/textbox.prg =================================================================== --- source/textbox.prg 2011-12-16 17:36:43 UTC (rev 859) +++ source/textbox.prg 2011-12-17 14:55:35 UTC (rev 860) @@ -136,6 +136,8 @@ // Connected events handling: please preserve alphabetic order. METHOD __HmgConnectEv PROTECTED METHOD __HmgDisconnectEv PROTECTED +/* __HmgGridKeybEvent is a worker method to solve problem related with cell GRID editing. Avoid generalized use */ + METHOD __HmgGridKeybEvent METHOD __HmgOnEnterExec PROTECTED METHOD __HmgOnGotFocusExec PROTECTED METHOD __HmgOnLostFocusExec PROTECTED @@ -496,6 +498,13 @@ RETURN Self /*.............................................................................. + __HmgGridKeybEvent +// this is a worker function to solve problem related with cell GRID editing. Avoid use +..............................................................................*/ +METHOD __HmgGridKeybEvent( oKeyEvent ) CLASS TEXTBOX +RETURN ::__HmgProcessKey( oKeyEvent ) + +/*.............................................................................. __HmgOnEnterExec ..............................................................................*/ METHOD __HmgOnEnterExec( oEvent ) CLASS TEXTBOX This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-16 17:36:49
|
Revision: 859 http://hmg.svn.sourceforge.net/hmg/?rev=859&view=rev Author: l3wonsf Date: 2011-12-16 17:36:43 +0000 (Fri, 16 Dec 2011) Log Message: ----------- 2011-12-16 18:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/basic.prg ! a valid name must be always assigned to the objects. Problem caused by ::s_lGridCellFlag equal to .F. Modified Paths: -------------- Changelog source/basic.prg Modified: Changelog =================================================================== --- Changelog 2011-12-16 16:33:33 UTC (rev 858) +++ Changelog 2011-12-16 17:36:43 UTC (rev 859) @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-16 18:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! source/basic.prg + ! a valid name must be always assigned to the objects. Problem caused by + ::s_lGridCellFlag equal to .F. + 2011-12-16 17:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! bug related with GetNumFromText(), GetNumMask() and GetNumFromTextSP(). Modified: source/basic.prg =================================================================== --- source/basic.prg 2011-12-16 16:33:33 UTC (rev 858) +++ source/basic.prg 2011-12-16 17:36:43 UTC (rev 859) @@ -165,11 +165,14 @@ ::ChildStartHash() // called here since it's new method is called too late + // ALWAYS a valid name must be assigned + ::cName := ::HandleHmgName( cName ) + // If the object is a cell in a grid, returns an empty object, with no parent. IF ! ::s_lGridCellFlag // name check - ::cName := ::HandleHmgName( cName ) + //::cName := ::HandleHmgName( cName ) // In a nested WITH OBJECT structure the parent ( container ) of a control is the // previous object in the stack. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-16 16:33:39
|
Revision: 858 http://hmg.svn.sourceforge.net/hmg/?rev=858&view=rev Author: l3wonsf Date: 2011-12-16 16:33:33 +0000 (Fri, 16 Dec 2011) Log Message: ----------- 2011-12-16 17:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/grid.prg ! bug related with GetNumFromText(), GetNumMask() and GetNumFromTextSP(). Now they are method of this class with these names: __HmgGetNumFromText(), __HmgGetNumMask() and __HmgGetNumFromTextSP() Modified Paths: -------------- Changelog source/grid.prg Modified: Changelog =================================================================== --- Changelog 2011-12-16 14:54:39 UTC (rev 857) +++ Changelog 2011-12-16 16:33:33 UTC (rev 858) @@ -16,9 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-16 17:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! source/grid.prg + ! bug related with GetNumFromText(), GetNumMask() and GetNumFromTextSP(). + Now they are method of this class with these names: + __HmgGetNumFromText(), __HmgGetNumMask() and __HmgGetNumFromTextSP() + 2011-12-16 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/textbox.prg - ! bug when not set :DataType and there isn't a valid :Value. + ! bug when not set :DataType and there isn't a valid :Value. By default :DataType is TXT_CHARACTER and ::xValue is "" 2011-12-16 15:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) Modified: source/grid.prg =================================================================== --- source/grid.prg 2011-12-16 14:54:39 UTC (rev 857) +++ source/grid.prg 2011-12-16 16:33:33 UTC (rev 858) @@ -159,6 +159,10 @@ METHOD DoKeyBoardEvents METHOD __HmgOnHeadClickExec PROTECTED + METHOD __HmgGetNumFromText PROTECTED + METHOD __HmgGetNumFromTextSP PROTECTED + METHOD __HmgGetNumMask PROTECTED + ENDCLASS /*-----------------------------------Methods----------------------------------*/ @@ -512,22 +516,22 @@ IF "." $ cInputMask DO CASE CASE At( '.' , Ts ) > At( ',' , Ts ) - xReturnValue := GetNumFromText( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromText( cText, cInputMask ) CASE At( ',' , Ts ) > At( '.' , Ts ) - xReturnValue := GetNumFromTextSp( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromTextSp( cText, cInputMask ) ENDCASE ELSE DO CASE CASE At( '.' , Ts ) != 0 - xReturnValue := GetNumFromTextSp( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromTextSp( cText, cInputMask ) CASE At( ',' , Ts ) != 0 - xReturnValue := GetNumFromText( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromText( cText, cInputMask ) OTHERWISE - xReturnValue := GetNumFromText( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromText( cText, cInputMask ) ENDCASE ENDIF ELSE - xReturnValue := GetNumFromText( cText, cInputMask ) + xReturnValue := ::__HmgGetNumFromText( cText, cInputMask ) ENDIF ELSE xReturnValue := Int( Val( cText ) ) @@ -1866,3 +1870,78 @@ ENDIF RETURN lQtEventStop + +/*.............................................................................. + __HmgGetNumFromText +..............................................................................*/ +METHOD __HmgGetNumFromText( Text, cInputMask ) CLASS GRID + + LOCAL x , c , s + + s := '' + FOR x := 1 To Len( Text ) + + c := SubStr( Text,x,1 ) + + IF c='0' .or. c='1' .or. c='2' .or. c='3' .or. c='4' .or. c='5' .or. c='6' .or. c='7' .or. c='8' .or. c='9' .or. c='.' .or. c='-' + s := s + c + ENDIF + + NEXT x + + IF Left( AllTrim( Text ) , 1 ) == '( ' .OR. Right( AllTrim( Text ) , 2 ) == 'DB' + s := '-' + s + ENDIF + + s := Transform( Val( s ) , ::__HmgGetNumMask( cInputMask ) ) + + RETURN Val( s ) + +/*.............................................................................. + __HmgGetNumMask +..............................................................................*/ +METHOD __HmgGetNumMask( Text ) CLASS GRID + + LOCAL i , c , s + + s := '' + FOR i := 1 To Len( Text ) + c := SubStr( Text,i,1 ) + IF c='9' .or. c='.' + s := s + c + ENDIF + IF c = '$' .or. c = '*' + s := s+'9' + ENDIF + NEXT i + + RETURN s + +/*.............................................................................. + __HmgGetNumFromTextSP +..............................................................................*/ +METHOD __HmgGetNumFromTextSP( Text, cInputMask ) CLASS GRID + + LOCAL x , c , s + + s := '' + FOR x := 1 To Len( Text ) + c := SubStr( Text,x,1 ) + IF c='0' .or. c='1' .or. c='2' .or. c='3' .or. c='4' .or. c='5' .or. c='6' .or. c='7' .or. c='8' .or. c='9' .or. c=',' .or. c='-' .or. c = '.' + IF c == '.' + c :='' + ENDIF + IF C == ',' + C:= '.' + ENDIF + s := s + c + ENDIF + NEXT x + + IF Left( AllTrim( Text ) , 1 ) == '( ' .OR. Right( AllTrim( Text ) , 2 ) == 'DB' + s := '-' + s + ENDIF + + s := Transform( Val( s ) , ::__HmgGetNumMask( cInputMask ) ) + + RETURN Val( s ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-16 14:54:55
|
Revision: 857 http://hmg.svn.sourceforge.net/hmg/?rev=857&view=rev Author: l3wonsf Date: 2011-12-16 14:54:39 +0000 (Fri, 16 Dec 2011) Log Message: ----------- 2011-12-16 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/textbox.prg ! bug when not set :DataType and there isn't a valid :Value. By default :DataType is TXT_CHARACTER and ::xValue is "" Modified Paths: -------------- Changelog source/textbox.prg Modified: Changelog =================================================================== --- Changelog 2011-12-16 14:23:28 UTC (rev 856) +++ Changelog 2011-12-16 14:54:39 UTC (rev 857) @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-16 15:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! source/textbox.prg + ! bug when not set :DataType and there isn't a valid :Value. + By default :DataType is TXT_CHARACTER and ::xValue is "" + 2011-12-16 15:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/textbox/demo_1.prg - samples/textbox/demo_2.prg Modified: source/textbox.prg =================================================================== --- source/textbox.prg 2011-12-16 14:23:28 UTC (rev 856) +++ source/textbox.prg 2011-12-16 14:54:39 UTC (rev 857) @@ -42,6 +42,7 @@ TXT_NUMERIC : to handle numbers The DataType can be omitted but remember this behaviour: - if omitted, it will be set to the right value related with value valtype + - if omitted and there isn't a valid value, it will be set to TXT_CHARACTER - if set, the related value must have the same datatype (eg. DataType := TXT_NUMERIC, :Value := 9) else error occurs - the DataType can not be changed after creation. @@ -55,6 +56,10 @@ :Value := "abc" | :Value := "abc" :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC | + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :Value := 12 | :Row := 32 + :Row := 32 | in other words: no datatype and no value + | WITH OBJECT TEXTBOX(..... | :Value := "abc" | :Value := 123 @@ -200,6 +205,12 @@ // Create inner controls ::CreatePendingChildControls() + + // if not any settings, by default assume TXT_CHARACTER + IF hb_IsNil( ::nDataType ) .AND. hb_IsNil( ::xValue ) + ::nDataType := TXT_CHARACTER + ::xValue := "" + ENDIF // to prevent date without mask, always will be create ::__HmgPicCheck() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-16 14:23:40
|
Revision: 856 http://hmg.svn.sourceforge.net/hmg/?rev=856&view=rev Author: l3wonsf Date: 2011-12-16 14:23:28 +0000 (Fri, 16 Dec 2011) Log Message: ----------- 2011-12-16 15:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) - samples/textbox/demo_1.prg - samples/textbox/demo_2.prg - samples/textbox/demo_3.prg - samples/textbox/demo_4.prg - samples/textbox/demo_5.prg + samples/textbox/demo_date_cmd.prg + samples/textbox/demo_date_oop.prg + samples/textbox/demo_numb_cmd.prg + samples/textbox/demo_numb_oop.prg + samples/textbox/demo_text_cmd.prg + samples/textbox/demo_text_oop.prg ! source/textbox.prg ! totally rewrited. see explanantion at the top of source. Preseved harvalid functionally. Modified Paths: -------------- Changelog source/textbox.prg Added Paths: ----------- samples/textbox/demo_date_cmd.prg samples/textbox/demo_date_oop.prg samples/textbox/demo_numb_cmd.prg samples/textbox/demo_numb_oop.prg samples/textbox/demo_text_cmd.prg samples/textbox/demo_text_oop.prg Removed Paths: ------------- samples/textbox/demo_1.prg samples/textbox/demo_2.prg samples/textbox/demo_3.prg samples/textbox/demo_4.prg samples/textbox/demo_5.prg Modified: Changelog =================================================================== --- Changelog 2011-12-13 20:15:33 UTC (rev 855) +++ Changelog 2011-12-16 14:23:28 UTC (rev 856) @@ -16,6 +16,23 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-16 15:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + - samples/textbox/demo_1.prg + - samples/textbox/demo_2.prg + - samples/textbox/demo_3.prg + - samples/textbox/demo_4.prg + - samples/textbox/demo_5.prg + + samples/textbox/demo_date_cmd.prg + + samples/textbox/demo_date_oop.prg + + samples/textbox/demo_numb_cmd.prg + + samples/textbox/demo_numb_oop.prg + + samples/textbox/demo_text_cmd.prg + + samples/textbox/demo_text_oop.prg + + ! source/textbox.prg + ! totally rewrited. see explanantion at the top of source. + Preseved harvalid functionally. + 2011-12-13 21:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! include/i_keybd.ch ! all "ON KEY ...." commands in according with StoreKeyBoardEvent() method Deleted: samples/textbox/demo_1.prg =================================================================== --- samples/textbox/demo_1.prg 2011-12-13 20:15:33 UTC (rev 855) +++ samples/textbox/demo_1.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -1,165 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -/* -The mask format understands these mask characters: - - Character Meaning - - A ASCII alphabetic character required. A-Z, a-z. - a ASCII alphabetic character permitted but not required. - N ASCII alphanumeric character required. A-Z, a-z, 0-9. - n ASCII alphanumeric character permitted but not required. - X Any character required. - x Any character permitted but not required. - 9 ASCII digit required. 0-9. - 0 ASCII digit permitted but not required. - D ASCII digit required. 1-9. - d ASCII digit permitted but not required (1-9). - # ASCII digit or plus/minus sign permitted but not required. - H Hexadecimal character required. A-F, a-f, 0-9. - h Hexadecimal character permitted but not required. - B Binary character required. 0-1. - b Binary character permitted but not required. - > ALL following alphabetic characters are UPPERcased. - < ALL following alphabetic characters are lowercased. - ! Switch off case conversion. - \ USE \ TO escape the special characters listed above TO USE them as separators. -*/ - -#include "set.ch" -#include "hmg.ch" - -MEMVAR oWindow - -FUNCTION Main - - LOCAL oTextBox1 - LOCAL oTextBox2 - LOCAL oTextBox3 - - PUBLIC oWindow - - HbQt_ErrorSys() - - WITH OBJECT oWindow := MAINWINDOW():New( "oWindow" ) - :Row := 10 - :Col := 10 - :Width := 400 - :Height := 400 - :Title := "Nice OOP Demo!!! - InputMask '$ 999,999.99'" - :OnInit := { || ( oWindow:Center() ) } - - WITH OBJECT oTextBox1 := TextBox():New( "oTextBox1" ) - :Row := 10 - :Col := 40 - :Width := 210 - :Value := '123,456.78' - :OnChange := { ||MsgInfo( "TEXT Changed!" ) } - :InputMask := '$ 999,999.99' - :OnEnter := { || TxtBox1OnEnter() } - END WITH - - WITH OBJECT oTextBox2 := TextBox():New( "oTextBox2" ) - :Row := 40 - :Col := 40 - :Width := 210 - :DataType := TXT_DATE - :Value := DATE() - :OnEnter := { || TxtBox2OnEnter() } - END WITH - - WITH OBJECT oTextBox3 := TextBox():New( "oTextBox3" ) - :Row := 70 - :Col := 40 - :Width := 210 - :DataType := TXT_NUMERIC - :Value := 123456.78 - :Alignment := TXT_RIGHT - :OnEnter := { || TxtBox3OnEnter() } - END WITH - - WITH OBJECT TextBox():New( "oTextBox4" ) - :Row := 70 - :Col := 260 - :Width := 100 - :Password := .T. - :OnEnter := { || TxtBox4OnEnter() } - END WITH - - - WITH OBJECT Button():New( "Button1" ) - :Row := 110 - :Col := 40 - :Width := 230 - :Height := 28 - :Caption := 'oTextBox1:Value' - :OnClick := { || MsgInfo( oTextBox1:Value ) } - :OnEnter := { || MsgInfo( oTextBox1:Value ) } - END WITH - - WITH OBJECT Button():New( "Button2" ) - :Row := 140 - :Col := 40 - :Width := 230 - :Height := 28 - :Caption := "oTextBox1:Value := '$ 999,999.99'" - :OnClick := { || ( MsgInfo( "Take a look TextBox1"), oTextBox1:Value := '$ 999,999.99' ) } - :OnEnter := { || ( MsgInfo( "Take a look TextBox1"), oTextBox1:Value := '$ 999,999.99' ) } - END WITH - - WITH OBJECT Button():New( "Button3" ) - :Row := 170 - :Col := 40 - :Width := 230 - :Height := 28 - :Caption := "DTOC(oTextBox2:Value )" - :OnClick := { || MsgInfo(DTOC( oTextBox2:Value ) ) } - :OnEnter := { || MsgInfo(DTOC( oTextBox2:Value ) ) } - END WITH - - WITH OBJECT Button():New( "Button4" ) - :Row := 200 - :Col := 40 - :Width := 230 - :Height := 28 - :Caption := "STR(oTextBox3:Value )" - :OnClick := { || MsgInfo( STR( oTextBox3:Value ) ) } - :OnEnter := { || MsgInfo( STR( oTextBox3:Value ) ) } - END WITH - - END WITH - - oWindow:Activate() - -RETURN NIL - -STATIC FUNCTION TxtBox1OnEnter() - - MsgInfo( VALTYPE( oWindow:oTextBox1:Value ) + " :: " + hb_ValToExp( oWindow:oTextBox1:Value ) ) - -RETURN NIL - -STATIC FUNCTION TxtBox2OnEnter() - - MsgInfo( VALTYPE( oWindow:oTextBox2:Value ) + " :: " + hb_ValToExp( oWindow:oTextBox2:Value ) ) - -RETURN NIL - -STATIC FUNCTION TxtBox3OnEnter() - - MsgInfo( VALTYPE( oWindow:oTextBox3:Value ) + " :: " + hb_ValToExp( oWindow:oTextBox3:Value ) ) - -RETURN NIL - -STATIC FUNCTION TxtBox4OnEnter() - - MsgInfo( VALTYPE( THISWINDOW:oTextBox4:Value ) + " :: " + hb_ValToExp( THISWINDOW:oTextBox4:Value ) ) - -RETURN NIL Deleted: samples/textbox/demo_2.prg =================================================================== --- samples/textbox/demo_2.prg 2011-12-13 20:15:33 UTC (rev 855) +++ samples/textbox/demo_2.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -1,70 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow1 - - HbQt_ErrorSys() - - DEFINE MAINWINDOW oWindow1 - ROW 10 - COL 10 - WIDTH 400 - HEIGHT 400 - TITLE 'Nice OOP Demo!!!' - ONINIT FrmOnInit( oWindow1 ) -// ONINIT oWindow1:Center() - - @ 10 , 40 TEXTBOX Text1 ; - WIDTH 200 ; - VALUE 'OOP TextBox 1 !!!' ; - ON ENTER TbOnEnter( oWindow1 ) - - @ 70 , 40 BUTTON Button1 ; - WIDTH 180 ; - HEIGHT 28 ; - CAPTION 'oWindow1:Text1:Value' ; - ON CLICK MsgInfo( oWindow1:Text1:Value ) - - @ 100 , 40 BUTTON Button2 ; - WIDTH 180 ; - HEIGHT 28 ; - CAPTION 'Win1:Text1:Value := "New!"' ; - ON CLICK Bt2OnClick( oWindow1 ) - - END WINDOW - - ACTIVATE WINDOW oWindow1 - -RETURN NIL - -STATIC FUNCTION FrmOnInit( oWindow1 ) - - oWindow1:Center() - -RETURN NIL - -STATIC FUNCTION Bt2OnClick( oWindow1 ) - - MsgInfo( "Take a look to Text1" ) - - oWindow1:Text1:Value := "New!" - -RETURN NIL - -STATIC FUNCTION TbOnEnter( oWindow1 ) - - MsgInfo( "Take a look to Text1" ) - - oWindow1:Text1:Value := "Another value!" - -RETURN NIL Deleted: samples/textbox/demo_3.prg =================================================================== --- samples/textbox/demo_3.prg 2011-12-13 20:15:33 UTC (rev 855) +++ samples/textbox/demo_3.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -1,86 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow1 - - HbQt_ErrorSys() - - SET century on - SET date ital - - DEFINE MAINWINDOW oWindow1 - Row 10 - Col 10 - Width 400 - Height 400 - Title 'Nice OOP Demo!!!' - OnInit oWindow1:Center() - - DEFINE MAIN MENU - DEFINE POPUP "Properties" - POPUP "CaretPos" - MenuItem "Get Value" ACTION MsgInfo( STR( oWindow1.oText1.CaretPos ) ) - MenuItem "SET Value" ACTION oWindow1.oText1.CaretPos := 8 - END POPUP - END POPUP - END MENU - - DEFINE TEXTBOX oText1 - Row 40 - Col 40 - Width 200 - Value 'OOP TextBox 1 !!!' - END TEXTBOX - - DEFINE TEXTBOX oText2 - Row 70 - Col 40 - Width 100 - Numeric .T. - RightAlign .T. - inputmask "999999.99" - Value 0.0 - END TEXTBOX - - DEFINE TEXTBOX oText3 - Row 100 - Col 40 - Width 100 - Date .T. - Value DATE() - END TEXTBOX - - - DEFINE BUTTON oButton1 - Row 130 - Col 40 - Width 180 - Height 28 - Caption 'Win1:oText1:Value' - OnClick MsgInfo( oWindow1:oText1:Value ) - END BUTTON - - DEFINE BUTTON oButton2 - Row 160 - Col 40 - Width 180 - Height 28 - Caption 'Win1:oText1:Value := "New!"' - OnClick oWindow1:oText1:Value := "New!" - END BUTTON - - END WINDOW - - ACTIVATE WINDOW oWindow1 - - RETURN NIL Deleted: samples/textbox/demo_4.prg =================================================================== --- samples/textbox/demo_4.prg 2011-12-13 20:15:33 UTC (rev 855) +++ samples/textbox/demo_4.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -1,180 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow1 - - HbQt_ErrorSys() - - SET century on - SET date ital - - DEFINE MAINWINDOW oWindow1 - Row 10 - Col 10 - Width 400 - Height 400 - Title 'Nice OOP Demo!!!' - OnInit oWindow1:Center() - - DEFINE MAIN MENU - DEFINE POPUP "Properties" - POPUP "CaretPos" - MenuItem "Get Value" ACTION MsgInfo( STR( oWindow1.oText1.CaretPos ) ) - MenuItem "SET Value" ACTION oWindow1.oText1.CaretPos := 8 - END POPUP - END POPUP - END MENU - - @ 40,10 LABEL oLabel1 ; - VALUE 'Simple Code:' ; - Width 100 - - @ 40,120 TEXTBOX oText1 ; - VALUE 'ZFA-17529/Z' ; - INPUTMASK 'AAA-99999/A' - - @ 40,290 LABEL oLabel1b ; - VALUE 'AAA-99999/A' ; - Width 100 - - @ 70,10 LABEL oLabel2 ; - VALUE 'Brazil ID:' ; - Width 100 - - @ 70,120 TEXTBOX oText2 ; - VALUE '123.456.789-12' ; - INPUTMASK '999.999.999-99' - - @ 70,290 LABEL oLabel2b ; - VALUE '999.999.999-99' - - @ 100,10 LABEL oLabel3 ; - VALUE 'Argentina ID:' ; - Width 100 - - @ 100,120 TEXTBOX oText3 ; - VALUE '12.123.123' ; - INPUTMASK '99.999.999' - - - @ 100,290 LABEL oLabel3b ; - VALUE '99.999.999' - - @ 130,10 LABEL oLabel4 ; - VALUE 'Credit Card:' ; - Width 100 - - @ 130,120 TEXTBOX oText4 ; - Width 150 ; - VALUE '1234-1234-1234-1234' ; - INPUTMASK '9999-9999-9999-9999' ; - - @ 130,290 LABEL oLabel4b ; - VALUE '9999-9999-9999-9999' Width 160 - - @ 160,10 LABEL oLabel5 ; - VALUE 'Complex Code:' ; - Width 100 - - @ 160,120 TEXTBOX oText5 ; - Width 130 ; - VALUE 'JZ-123/4(X-DKS)' ; - INPUTMASK 'AA-999/9(A-AAA)' - - @ 160,290 LABEL oLabel5b ; - VALUE 'AA-999/9(A-AAA)' - - @ 190,10 LABEL oLabel6 ; - VALUE 'Phone Number:' ; - Width 100 - - @ 190,120 TEXTBOX oText6 ; - Width 130 ; - VALUE '(651) 384 - 8372' ; - INPUTMASK '(999) 999 - 9999' - - @ 190,290 LABEL oLabel6b ; - VALUE '(999) 999 - 9999' - - @ 220, 10 LABEL oLabel7; - Width 100; - Value 'Numeric TextBox' - - DEFINE TEXTBOX oText7 - Row 220 - Col 120 - Width 130 - Numeric .T. - RightAlign .T. - InputMask "$99,9*,***.99" - END TEXTBOX - -/* - @ 220,120 TEXTBOX oText7 ; - Width 130 ; - Numeric ; - InputMask "$99,9*,***.99"; - RightAlign -*/ - @ 220,290 LABEL oLabel7b ; - VALUE "$99,9*,***.99" - - @ 250, 10 LABEL oLabel8; - Width 100; - Value 'Date' - - DEFINE TEXTBOX oText8 - Row 250 - Col 120 - Width 130 - Value DATE() - Date .T. - END TEXTBOX -/* - @ 250,120 TEXTBOX oText8 ; - Width 130 ; - Value DATE() ; - Date -*/ - @ 280, 10 LABEL oLabel9; - Width 100; - Value 'Formatted TextBox' - - DEFINE TEXTBOX oText9 - Row 280 - Col 120 - Width 130 - Numeric .T. - InputMask "$99,9*,***.99" - Format "CX" - RightAlign .T. - END TEXTBOX - - -/* - @ 280,120 TEXTBOX oText9; - Width 130; - Numeric; - InputMask "$99,9*,***.99"; - Format "CX"; - RightAlign -*/ - - @ 280,290 LABEL oLabel9b ; - VALUE "$99,9*,***.99"+ " CX" - - END WINDOW - - ACTIVATE WINDOW oWindow1 - - RETURN NIL Deleted: samples/textbox/demo_5.prg =================================================================== --- samples/textbox/demo_5.prg 2011-12-13 20:15:33 UTC (rev 855) +++ samples/textbox/demo_5.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -1,149 +0,0 @@ -/* - * $Id$ -*/ - -/* - * HMG 4 demo - * (c) 2010 Roberto Lopez <mai...@gm...> -*/ - -#include "hmg.ch" - -FUNCTION Main - - LOCAL oWindow1 - - HbQt_ErrorSys() - - SET century on - SET date ital - - DEFINE MAINWINDOW oWindow1 - Row 10 - Col 10 - Width 400 - Height 400 - Title 'Nice OOP Demo!!!' - OnInit oWindow1:Center() - - DEFINE MAIN MENU - DEFINE POPUP "Properties" - POPUP "CaretPos" - MenuItem "Get Value" ACTION MsgInfo( STR( oWindow1.oText1.CaretPos ) ) - MenuItem "SET Value" ACTION oWindow1.oText1.CaretPos := 8 - END POPUP - END POPUP - END MENU - - @ 40,10 LABEL oLabel1 ; - VALUE 'Simple Code:' ; - Width 100 - - - @ 40,120 TEXTBOX oText1 ; - VALUE 'ZFA-17529/Z' ; - INPUTMASK 'AAA-99999/A' - - @ 40,290 LABEL oLabel1b ; - VALUE 'AAA-99999/A' ; - Width 100 - - @ 70,10 LABEL oLabel2 ; - VALUE 'Brazil ID:' ; - Width 100 - - @ 70,120 TEXTBOX oText2 ; - VALUE '123.456.789-12' ; - INPUTMASK '999.999.999-99' - - @ 70,290 LABEL oLabel2b ; - VALUE '999.999.999-99' - - @ 100,10 LABEL oLabel3 ; - VALUE 'Argentina ID:' ; - Width 100 - - @ 100,120 TEXTBOX oText3 ; - VALUE '12.123.123' ; - INPUTMASK '99.999.999' - - @ 100,290 LABEL oLabel3b ; - VALUE '99.999.999' - - @ 130,10 LABEL oLabel4 ; - VALUE 'Credit Card:' ; - Width 100 - - @ 130,120 TEXTBOX oText4 ; - Width 150 ; - VALUE '1234-1234-1234-1234' ; - INPUTMASK '9999-9999-9999-9999' ; - - @ 130,290 LABEL oLabel4b ; - VALUE '9999-9999-9999-9999' Width 160 - - @ 160,10 LABEL oLabel5 ; - VALUE 'Complex Code:' ; - Width 100 - - @ 160,120 TEXTBOX oText5 ; - Width 130 ; - VALUE 'JZ-123/4(X-DKS)' ; - INPUTMASK 'AA-999/9(A-AAA)' - - @ 160,290 LABEL oLabel5b ; - VALUE 'AA-999/9(A-AAA)' - - @ 190,10 LABEL oLabel6 ; - VALUE 'Phone Number:' ; - Width 100 - - @ 190,120 TEXTBOX oText6 ; - Width 130 ; - VALUE '(651) 384 - 8372' ; - INPUTMASK '(999) 999 - 9999' - - @ 190,290 LABEL oLabel6b ; - VALUE '(999) 999 - 9999' - - @ 220, 10 LABEL oLabel7; - Width 100; - Value 'Numeric TextBox' - - @ 220,120 TEXTBOX oText7 ; - Width 130 ; - Numeric ; - InputMask "$99,9*,***.99"; - RightAlign - - @ 220,290 LABEL oLabel7b ; - VALUE "$99,9*,***.99" - - @ 250, 10 LABEL oLabel8; - Width 100; - Value 'Date' - - @ 250,120 TEXTBOX oText8 ; - Width 130 ; - Value DATE() ; - Date - - @ 280, 10 LABEL oLabel9; - Width 100; - Value 'Formatted TextBox' - - @ 280,120 TEXTBOX oText9; - Width 130; - Numeric; - InputMask "$99,9*,***.99"; - Format "CX"; - RightAlign - - @ 280,290 LABEL oLabel9b ; - VALUE "$99,9*,***.99"+ " CX" - - END WINDOW - - ACTIVATE WINDOW oWindow1 - - RETURN NIL Added: samples/textbox/demo_date_cmd.prg =================================================================== --- samples/textbox/demo_date_cmd.prg (rev 0) +++ samples/textbox/demo_date_cmd.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -0,0 +1,429 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + + 2011.12.16 little brief of the author Luigi Ferraris ( <luigi at l3w.it> ) + + DATATYPE + TXT_CHARACTER : to handle strings + TXT_DATE : to handle dates + TXT_NUMERIC : to handle numbers + The DataType can be omitted but remember this behaviour: + - if omitted, it will be set to the right value related with value valtype + - if set, the related value must have the same datatype (eg. DataType := TXT_NUMERIC, :Value := 9) else error occurs + - the DataType can not be changed after creation. + + RIGHT + ERROR + ---------------------------------------+--------------------------------------- + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + :Value := "abc" | :Value := "abc" + | + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :Value := "abc" | :Value := "abc" + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + | + WITH OBJECT TEXTBOX(..... | + :Value := "abc" | :Value := 123 + + + INPUTMASK code + "!" : valid chars: [A-Z]-[a-z] and will be converted to uppercase + "A" : valid chars: [A-Z]-[a-z] + "9" : valid chars: [1-0] + "N" : valid chars: [A-Z]-[a-z]-[1-0] + "X" : valid chars: any + "." : about data type TXT_NUMERIC means decimal point position + "," : about data type TXT_NUMERIC means thousands separator + + FORMAT code + "C" : Displays CR after positive numbers + "X" : Displays DB after negative numbers + "(" : Encloses negative numbers in parentheses + "E" : Displays numbers in European style (eg 1.987.234,321). Default English-speaking style (eg. 1,987,234.321) + "S" : displays always signs: "+" for positive numbers, "-" for negative numbers. By default only for negative. + +*/ + +#include "set.ch" +#include "hmg.ch" + +MEMVAR oWindow + +FUNCTION Main + + LOCAL nRow + + SET CENTURY ON + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow + ROW 10 + COL 10 + WIDTH 700 + HEIGHT 600 + VIRTUALWIDTH 900 + VIRTUALHEIGHT 1024 + TITLE "TEXTBOX - CMD demo" + ONINIT Udf_OnInit() + + nRow := 10 + DEFINE LABEL LabDataType + ROW nRow + COL 10 + WIDTH 500 + HEIGHT 30 + FONTBOLD .T. + FONTSIZE 14 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "data type DATE" + TABSTOP .F. + END LABEL + + nRow += 40 + DEFINE LABEL LabInfo + ROW nRow + COL 10 + WIDTH 500 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + CAPTION "Press ENTER on field to show info" + TABSTOP .F. + END LABEL + + nRow += 40 + DEFINE LABEL LabInfo2 + ROW nRow + COL 10 + WIDTH 500 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + FONTBOLD .T. + CAPTION "current (default) date setting/format " + SET( _SET_DATEFORMAT ) + " epoch is " + hb_NtoS( SET( _SET_EPOCH ) ) + TABSTOP .F. + END LABEL + + nRow += 40 + DEFINE LABEL LabLeft + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "LEFT ALIGN (default)" + TABSTOP .F. + END LABEL + DEFINE LABEL LabRight + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "RIGHT ALIGN" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label01 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "default" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL01 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + ONENTER Udf_OnEnter( THISWINDOW:FieldL01 ) + END TEXTBOX + DEFINE TEXTBOX FieldR01 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + RIGHTALIGN .T. + ONENTER Udf_OnEnter( THISWINDOW:FieldR01 ) + END TEXTBOX + DEFINE LABEL BkDel01 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "OVERWRITE mode; DEL allowed when ALL selected" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label02 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "dd-mm-yyyy" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL02 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + INPUTMASK "dd-mm-yyyy" + ONENTER Udf_OnEnter( THISWINDOW:FieldL02 ) + END TEXTBOX + DEFINE TEXTBOX FieldR02 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE DATE() + INPUTMASK "dd-mm-yyyy" + ONENTER Udf_OnEnter( THISWINDOW:FieldR02 ) + END TEXTBOX + DEFINE LABEL BkDel02 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label03 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "yyyy.mm.dd" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL03 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + INPUTMASK "yyyy.mm.dd" + ONENTER Udf_OnEnter( THISWINDOW:FieldL03 ) + END TEXTBOX + DEFINE TEXTBOX FieldR03 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE DATE() + INPUTMASK "yyyy.mm.dd" + ONENTER Udf_OnEnter( THISWINDOW:FieldR03 ) + END TEXTBOX + DEFINE LABEL BkDel03 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label04 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "null date" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL04 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE CTOD("") + ONENTER Udf_OnEnter( THISWINDOW:FieldL04 ) + END TEXTBOX + DEFINE TEXTBOX FieldR04 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE CTOD("") + ONENTER Udf_OnEnter( THISWINDOW:FieldR04 ) + END TEXTBOX + DEFINE LABEL BkDel04 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label05 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "null date dd-mm-yyyy" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL05 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE CTOD("") + INPUTMASK "dd-mm-yyyy" + ONENTER Udf_OnEnter( THISWINDOW:FieldL05 ) + END TEXTBOX + DEFINE TEXTBOX FieldR05 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE CTOD("") + INPUTMASK "dd-mm-yyyy" + ONENTER Udf_OnEnter( THISWINDOW:FieldR05 ) + END TEXTBOX + DEFINE LABEL BkDel05 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "OVERWRITE mode; DEL allowed when ALL selected" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label06 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "mm/dd/yy" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL06 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + INPUTMASK "mm/dd/yy" + ONENTER Udf_OnEnter( THISWINDOW:FieldL06 ) + END TEXTBOX + DEFINE TEXTBOX FieldR06 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE DATE() + INPUTMASK "mm/dd/yy" + ONENTER Udf_OnEnter( THISWINDOW:FieldR06 ) + END TEXTBOX + DEFINE LABEL BkDel06 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "OVERWRITE mode; DEL allowed when ALL selected" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label07 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "dd/mm/yy" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL07 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE DATE() + INPUTMASK "dd/mm/yy" + ONENTER Udf_OnEnter( THISWINDOW:FieldL07 ) + END TEXTBOX + DEFINE TEXTBOX FieldR07 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE DATE() + INPUTMASK "dd/mm/yy" + ONENTER Udf_OnEnter( THISWINDOW:FieldR07 ) + END TEXTBOX + DEFINE LABEL BkDel07 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "OVERWRITE mode; DEL allowed when ALL selected" + TABSTOP .F. + END LABEL + + END WINDOW + + ACTIVATE WINDOW oWindow + +RETURN NIL + +STATIC FUNCTION Udf_OnInit + + CENTER WINDOW THISWINDOW + THISWINDOW:FieldL01:SetFocus() + +RETURN NIL + +STATIC FUNCTION Udf_OnChange( oTextBoxObject ) + + MsgInfo( "Current value is " + DTOC( oTextBoxObject:Value ) ) + +RETURN NIL + +STATIC FUNCTION Udf_OnEnter( oTextBoxObject ) + + MsgInfo( "Current value (default format) is " + DTOC( oTextBoxObject:Value ) + " VALTYPE returned is " + VALTYPE( oTextBoxObject:Value ) ) + +RETURN NIL Property changes on: samples/textbox/demo_date_cmd.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/textbox/demo_date_oop.prg =================================================================== --- samples/textbox/demo_date_oop.prg (rev 0) +++ samples/textbox/demo_date_oop.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -0,0 +1,429 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + + 2011.12.16 little brief of the author Luigi Ferraris ( <luigi at l3w.it> ) + + DATATYPE + TXT_CHARACTER : to handle strings + TXT_DATE : to handle dates + TXT_NUMERIC : to handle numbers + The DataType can be omitted but remember this behaviour: + - if omitted, it will be set to the right value related with value valtype + - if set, the related value must have the same datatype (eg. DataType := TXT_NUMERIC, :Value := 9) else error occurs + - the DataType can not be changed after creation. + + RIGHT + ERROR + ---------------------------------------+--------------------------------------- + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + :Value := "abc" | :Value := "abc" + | + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :Value := "abc" | :Value := "abc" + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + | + WITH OBJECT TEXTBOX(..... | + :Value := "abc" | :Value := 123 + + + INPUTMASK code + "!" : valid chars: [A-Z]-[a-z] and will be converted to uppercase + "A" : valid chars: [A-Z]-[a-z] + "9" : valid chars: [1-0] + "N" : valid chars: [A-Z]-[a-z]-[1-0] + "X" : valid chars: any + "." : about data type TXT_NUMERIC means decimal point position + "," : about data type TXT_NUMERIC means thousands separator + + FORMAT code + "C" : Displays CR after positive numbers + "X" : Displays DB after negative numbers + "(" : Encloses negative numbers in parentheses + "E" : Displays numbers in European style (eg 1.987.234,321). Default English-speaking style (eg. 1,987,234.321) + "S" : displays always signs: "+" for positive numbers, "-" for negative numbers. By default only for negative. + +*/ + +#include "set.ch" +#include "hmg.ch" + +MEMVAR oWindow + +FUNCTION Main + + LOCAL nRow + + SET CENTURY ON + + HbQt_ErrorSys() + + WITH OBJECT oWindow := MAINWINDOW():New() + :Row := 10 + :Col := 10 + :Width := 700 + :Height := 600 + :VirtualWidth := 900 + :VirtualHeight := 1024 + :Title := "TEXTBOX - OOP demo" + :OnInit := { || Udf_OnInit() } + + nRow := 10 + WITH OBJECT LABEL():New( "LabDataType" ) + :Row := nRow + :Col := 10 + :Width := 500 + :Height := 30 + :FontBold := .T. + :FontSize := 14 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "data type DATE" + :TabStop := .F. + END WITH + + nRow += 40 + WITH OBJECT LABEL():New( "LabInfo" ) + :Row := nRow + :Col := 10 + :Width := 500 + :Height := 20 + :BackColor := { 196, 196, 196 } + :Caption := "Press ENTER on field to show info" + :TabStop := .F. + END WITH + + nRow += 40 + WITH OBJECT LABEL():New( "LabInfo2" ) + :Row := nRow + :Col := 10 + :Width := 500 + :Height := 20 + :BackColor := { 196, 196, 196 } + :FontBold := .T. + :Caption := "current (default) date setting/format " + SET( _SET_DATEFORMAT ) + " epoch is " + hb_NtoS( SET( _SET_EPOCH ) ) + :TabStop := .F. + END WITH + + nRow += 40 + WITH OBJECT LABEL():New( "LabLeft" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "LEFT ALIGN (default)" + :TabStop := .F. + END WITH + WITH OBJECT LABEL():New( "LabRight" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "RIGHT ALIGN" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label01" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "default" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL01" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := DATE() + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL01 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR01" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Value := DATE() + :Alignment := TXT_RIGHT + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR01 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel01" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label02" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "dd-mm-yyyy" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL02" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := DATE() + :InputMask := "dd-mm-yyyy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL02 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR02" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := DATE() + :InputMask := "dd-mm-yyyy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR02 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel02" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label03" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "yyyy.mm.dd" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL03" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := DATE() + :InputMask := "yyyy.mm.dd" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL03 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR03" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := DATE() + :InputMask := "yyyy.mm.dd" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR03 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel03" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label04" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "null date" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL04" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := CTOD("") + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL04 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR04" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := CTOD("") + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR04 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel04" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label05" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "null date dd-mm-yyyy" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL05" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := CTOD("") + :InputMask := "dd-mm-yyyy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL05 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR05" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := CTOD("") + :InputMask := "dd-mm-yyyy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR05 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel05" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label06" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "mm/dd/yy" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL06" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := DATE() + :InputMask := "mm/dd/yy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL06 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR06" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := DATE() + :InputMask := "mm/dd/yy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR06 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel06" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + nRow += 30 + WITH OBJECT LABEL():New( "Label07" ) + :Row := nRow + :Col := 10 + :Width := 150 + :Height := 20 + :Caption := "dd/mm/yy" + :TabStop := .F. + END WITH + WITH OBJECT TEXTBOX():New( "FieldL07" ) + :Row := nRow + :Col := 170 + :Width := 150 + :Height := 20 + :Value := DATE() + :InputMask := "dd/mm/yy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldL07 ) } + END WITH + WITH OBJECT TEXTBOX():New( "FieldR07" ) + :Row := nRow + :Col := 330 + :Width := 150 + :Height := 20 + :Alignment := TXT_RIGHT + :Value := DATE() + :InputMask := "dd/mm/yy" + :OnEnter := { || Udf_OnEnter( THISWINDOW:FieldR07 ) } + END WITH + WITH OBJECT LABEL():New( "BkDel07" ) + :Row := nRow + :Col := 490 + :Width := 250 + :Height := 20 + :BackColor := { 196, 196, 196 } + :AlignMent := LBL_CENTER + :Caption := "OVERWRITE mode; DEL allowed when ALL selected" + :TabStop := .F. + END WITH + + END WITH + + oWindow:Activate() + +RETURN NIL + +STATIC FUNCTION Udf_OnInit + + THISWINDOW:Center() + THISWINDOW:FieldL01:SetFocus() + +RETURN NIL + +STATIC FUNCTION Udf_OnChange( oTextBoxObject ) + + MsgInfo( "Current value is " + DTOC( oTextBoxObject:Value ) ) + +RETURN NIL + +STATIC FUNCTION Udf_OnEnter( oTextBoxObject ) + + MsgInfo( "Current value (default format) is " + DTOC( oTextBoxObject:Value ) + " VALTYPE returned is " + VALTYPE( oTextBoxObject:Value ) ) + +RETURN NIL Property changes on: samples/textbox/demo_date_oop.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/textbox/demo_numb_cmd.prg =================================================================== --- samples/textbox/demo_numb_cmd.prg (rev 0) +++ samples/textbox/demo_numb_cmd.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -0,0 +1,392 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + + 2011.12.16 little brief of the author Luigi Ferraris ( <luigi at l3w.it> ) + + DATATYPE + TXT_CHARACTER : to handle strings + TXT_DATE : to handle dates + TXT_NUMERIC : to handle numbers + The DataType can be omitted but remember this behaviour: + - if omitted, it will be set to the right value related with value valtype + - if set, the related value must have the same datatype (eg. DataType := TXT_NUMERIC, :Value := 9) else error occurs + - the DataType can not be changed after creation. + + RIGHT + ERROR + ---------------------------------------+--------------------------------------- + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + :Value := "abc" | :Value := "abc" + | + WITH OBJECT TEXTBOX(..... | WITH OBJECT TEXTBOX(..... + :Value := "abc" | :Value := "abc" + :DataType := TXT_CHARACTER | :DataType := TXT_NUMERIC + | + WITH OBJECT TEXTBOX(..... | + :Value := "abc" | :Value := 123 + + + INPUTMASK code + "!" : valid chars: [A-Z]-[a-z] and will be converted to uppercase + "A" : valid chars: [A-Z]-[a-z] + "9" : valid chars: [1-0] + "N" : valid chars: [A-Z]-[a-z]-[1-0] + "X" : valid chars: any + "." : about data type TXT_NUMERIC means decimal point position + "," : about data type TXT_NUMERIC means thousands separator + + FORMAT code + "C" : Displays CR after positive numbers + "X" : Displays DB after negative numbers + "(" : Encloses negative numbers in parentheses + "E" : Displays numbers in European style (eg 1.987.234,321). Default English-speaking style (eg. 1,987,234.321) + "S" : displays always signs: "+" for positive numbers, "-" for negative numbers. By default only for negative. + +*/ + +#include "set.ch" +#include "hmg.ch" + +MEMVAR oWindow +MEMVAR cNumFormat + +FUNCTION Main + + LOCAL nRow + + PUBLIC cNumFormat := "" + + HbQt_ErrorSys() + + DEFINE MAINWINDOW oWindow + ROW 10 + COL 10 + WIDTH 700 + HEIGHT 600 + VIRTUALWIDTH 900 + VIRTUALHEIGHT 1024 + TITLE "TEXTBOX - CMD demo" + ONINIT Udf_OnInit() + + nRow := 10 + DEFINE LABEL LabDataType + ROW nRow + COL 10 + WIDTH 500 + HEIGHT 30 + FONTBOLD .T. + FONTSIZE 14 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "data type NUMBERS" + TABSTOP .F. + END LABEL + + nRow += 40 + DEFINE LABEL LabInfo + ROW nRow + COL 10 + WIDTH 500 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + CAPTION "Press ENTER on field to show info" + TABSTOP .F. + END LABEL + + nRow += 40 + DEFINE CHECKBOX CrCheck + ROW nRow + COL 10 + WIDTH 40 + CAPTION "CR" + ONCHANGE Udf_ChangeFormat() + END CHECKBOX + DEFINE CHECKBOX DbCheck + ROW nRow + COL 60 + WIDTH 40 + CAPTION "DB" + ONCHANGE Udf_ChangeFormat() + END CHECKBOX + DEFINE CHECKBOX NeCheck + ROW nRow + COL 110 + WIDTH 40 + CAPTION "(" + ONCHANGE Udf_ChangeFormat() + END CHECKBOX + DEFINE CHECKBOX EuCheck + ROW nRow + COL 160 + WIDTH 80 + CAPTION "European" + ONCHANGE Udf_ChangeFormat() + END CHECKBOX + DEFINE CHECKBOX SgCheck + ROW nRow + COL 250 + WIDTH 80 + CAPTION "S (new)" + ONCHANGE Udf_ChangeFormat() + END CHECKBOX + + nRow += 40 + DEFINE LABEL LabLeft + ROW nRow + COL 170 + WIDTH 310 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "LEFT ALIGN while editing else RIGHT ALIGN" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label01 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "Free" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL01 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE 12.45 + ONENTER Udf_OnEnter( THISWINDOW:FieldL01 ) + END TEXTBOX + DEFINE TEXTBOX FieldR01 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + VALUE 0 + ONENTER Udf_OnEnter( THISWINDOW:FieldR01 ) + END TEXTBOX + DEFINE LABEL BkDel01 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label02 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "9,999.99" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL02 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE 1234.56 + INPUTMASK "9,999.99" + ONENTER Udf_OnEnter( THISWINDOW:FieldL02 ) + END TEXTBOX + DEFINE TEXTBOX FieldR02 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + VALUE 0 + INPUTMASK "9,999.99" + ONENTER Udf_OnEnter( THISWINDOW:FieldR02 ) + END TEXTBOX + DEFINE LABEL BkDel02 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label03 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "9,999" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL03 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE 1234 + INPUTMASK "9,999" + ONENTER Udf_OnEnter( THISWINDOW:FieldL03 ) + END TEXTBOX + DEFINE TEXTBOX FieldR03 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + VALUE 0 + INPUTMASK "9,999" + ONENTER Udf_OnEnter( THISWINDOW:FieldR03 ) + END TEXTBOX + DEFINE LABEL BkDel03 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label04 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "9.999" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL04 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE 9.876 + INPUTMASK "9.999" + ONENTER Udf_OnEnter( THISWINDOW:FieldL04 ) + END TEXTBOX + DEFINE TEXTBOX FieldR04 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + VALUE 0 + INPUTMASK "9.999" + ONENTER Udf_OnEnter( THISWINDOW:FieldR04 ) + END TEXTBOX + DEFINE LABEL BkDel04 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + nRow += 30 + DEFINE LABEL Label05 + ROW nRow + COL 10 + WIDTH 150 + HEIGHT 20 + CAPTION "999.99 (wrong starting)" + TABSTOP .F. + END LABEL + DEFINE TEXTBOX FieldL05 + ROW nRow + COL 170 + WIDTH 150 + HEIGHT 20 + VALUE 12345.423 + INPUTMASK "999.99" + ONENTER Udf_OnEnter( THISWINDOW:FieldL05 ) + END TEXTBOX + DEFINE TEXTBOX FieldR05 + ROW nRow + COL 330 + WIDTH 150 + HEIGHT 20 + RIGHTALIGN .T. + VALUE 0 + INPUTMASK "999.99" + ONENTER Udf_OnEnter( THISWINDOW:FieldR05 ) + END TEXTBOX + DEFINE LABEL BkDel05 + ROW nRow + COL 490 + WIDTH 250 + HEIGHT 20 + BACKCOLOR { 196, 196, 196 } + ALIGNMENT CENTER + CAPTION "BACKSPACE , DEL allowed; SELECTION allowed" + TABSTOP .F. + END LABEL + + END WINDOW + + ACTIVATE WINDOW oWindow + +RETURN NIL + +STATIC FUNCTION Udf_OnInit + + CENTER WINDOW THISWINDOW + THISWINDOW:FieldL01:SetFocus() + +RETURN NIL + +STATIC FUNCTION Udf_OnChange( oTextBoxObject ) + + MsgInfo( "Current value is " + hb_NtoS( oTextBoxObject:Value ) ) + +RETURN NIL + +STATIC FUNCTION Udf_OnEnter( oTextBoxObject ) + + MsgInfo( "Current value is " + hb_NtoS( oTextBoxObject:Value ) + " VALTYPE returned is " + VALTYPE( oTextBoxObject:Value ) ) + +RETURN NIL + +/*.............................................................................. + Udf_ChangeFormat +..............................................................................*/ +STATIC FUNCTION Udf_ChangeFormat() + + cNumFormat := "" + + cNumFormat += IIF( THISWINDOW:EuCheck:Value == .T., "E", "" ) + cNumFormat += IIF( THISWINDOW:CrCheck:Value == .T., "C", "" ) + cNumFormat += IIF( THISWINDOW:DbCheck:Value == .T., "X", "" ) + cNumFormat += IIF( THISWINDOW:NeCheck:Value == .T., "(", "" ) + cNumFormat += IIF( THISWINDOW:SgCheck:Value == .T., "S", "" ) + + THISWINDOW:FieldL01:Format := cNumFormat + THISWINDOW:FieldL02:Format := cNumFormat + THISWINDOW:FieldL03:Format := cNumFormat + THISWINDOW:FieldL04:Format := cNumFormat + THISWINDOW:FieldL05:Format := cNumFormat + + THISWINDOW:FieldR01:Format := cNumFormat + THISWINDOW:FieldR02:Format := cNumFormat + THISWINDOW:FieldR03:Format := cNumFormat + THISWINDOW:FieldR04:Format := cNumFormat + THISWINDOW:FieldR05:Format := cNumFormat + +RETURN NIL Property changes on: samples/textbox/demo_numb_cmd.prg ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Added: samples/textbox/demo_numb_oop.prg =================================================================== --- samples/textbox/demo_numb_oop.prg (rev 0) +++ samples/textbox/demo_numb_oop.prg 2011-12-16 14:23:28 UTC (rev 856) @@ -0,0 +1,392 @@ +/* + * $Id$ +*/ + +/* + * HMG 4 demo + * (c) 2010 Roberto Lopez <mai...@gm...> +*/ + +/* + + 2011.12.16 little brief of the author Luigi Ferraris ( <luigi at l3w.it> ) + + DATATYPE + TXT_CHARACTER : to handle strings + TXT_DATE : to handle dates + TXT_NUMERIC : to handle numbers + The DataType can be omitted but remember this behaviour: + - if omitted, it will be set to the right value related with value valtype + - if set, the related value must have the same datatype (eg. DataType := TXT_NUMERIC, :Value := 9) else error occurs + - the DataType can not be changed after ... [truncated message content] |
From: <l3...@us...> - 2011-12-13 20:15:41
|
Revision: 855 http://hmg.svn.sourceforge.net/hmg/?rev=855&view=rev Author: l3wonsf Date: 2011-12-13 20:15:33 +0000 (Tue, 13 Dec 2011) Log Message: ----------- 2011-12-13 21:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! include/i_keybd.ch ! all "ON KEY ...." commands in according with StoreKeyBoardEvent() method * restyle ! source/virtualwindow.prg ! fixed StoreKeyBoardEvent(). Added third parameter (action) to store action related to the KEY. Only one action can be stored for a key. If already exists the action will be overwrite. ! ::aKeyBoardEvents now it's PROTECTED Modified Paths: -------------- Changelog include/i_keybd.ch source/virtualwindow.prg Modified: Changelog =================================================================== --- Changelog 2011-12-13 15:29:07 UTC (rev 854) +++ Changelog 2011-12-13 20:15:33 UTC (rev 855) @@ -16,7 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-13 21:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + ! include/i_keybd.ch + ! all "ON KEY ...." commands in according with StoreKeyBoardEvent() method + * restyle + ! source/virtualwindow.prg + ! fixed StoreKeyBoardEvent(). Added third parameter (action) to store + action related to the KEY. Only one action can be stored for a key. + If already exists the action will be overwrite. + ! ::aKeyBoardEvents now it's PROTECTED + 2011-12-13 13:30 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) * samples/VirtualGrid/browse_demo_4.prg ! Fixed compiling warning messages. Modified: include/i_keybd.ch =================================================================== --- include/i_keybd.ch 2011-12-13 15:29:07 UTC (rev 854) +++ include/i_keybd.ch 2011-12-13 20:15:33 UTC (rev 855) @@ -344,1537 +344,1537 @@ -#xcommand ON KEY ADD [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Plus,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY ADD ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Plus,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY ADD [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Plus, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY ADD ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Plus, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY SUBTRACT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Minus,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY SUBTRACT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Minus,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY SUBTRACT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Minus, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY SUBTRACT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Minus, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY MULTIPLY [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Asterisk,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY MULTIPLY ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Asterisk,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY MULTIPLY [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Asterisk, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY MULTIPLY ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Asterisk, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F1 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F1,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F1 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F1,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F1 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F1, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F1 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F1, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F2 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F2,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F2 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F2,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F2 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F2, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F2 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F2, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F3 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F3,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F3 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F3,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F3 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F3, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F3 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F3, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F4 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F4,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F4 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F4,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F4 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F4, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F4 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F4, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F5 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F5,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F5 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F5,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F5 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F5, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F5 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F5, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F6 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F6,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F6 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F6,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F6 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F6, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F6 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F6, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F7 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F7,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F7 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F7,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F7 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F7, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F7 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F7, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F8 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F8,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F8 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F8,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F8 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F8, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F8 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F8, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F9 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F9,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F9 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F9,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F9 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F9, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F9 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F9, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F10 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F10,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F10 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F10,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F10 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F10, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F10 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F10, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F11 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F11,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F11 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F11,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F11 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F11, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F11 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F11, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY F12 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F12,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY F12 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F12,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY F12 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F12, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY F12 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F12, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY BACK [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Backspace,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY BACK ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Backspace,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY BACK [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Backspace, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY BACK ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Backspace, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY TAB [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Tab,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY TAB ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Tab,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY TAB [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Tab, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY TAB ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Tab, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY RETURN [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Return,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY RETURN ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Return,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY RETURN [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Return, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY RETURN ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Return, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY ESCAPE [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Escape,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY ESCAPE ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Escape,Qt_NoModifier,<{bAction}> } ) - -#xcommand ON KEY END [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_End,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY END ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_End,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY ESCAPE [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Escape, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY ESCAPE ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Escape, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY HOME [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Home,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY HOME ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Home,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY END [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_End, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY END ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_End, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY LEFT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Left,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY LEFT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Left,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY HOME [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Home, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY HOME ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Home, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY UP [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Up,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY UP ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Up,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY LEFT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Left, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY LEFT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Left, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY RIGHT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Right,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY RIGHT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Right,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY UP [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Up, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY UP ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Up, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY DOWN [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Down,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY DOWN ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Down,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY RIGHT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Right, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY RIGHT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Right, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY INSERT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Insert,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY INSERT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Insert,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY DOWN [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Down, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY DOWN ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Down, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY DELETE [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Delete,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY DELETE ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Delete,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY INSERT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Insert, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY INSERT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Insert, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY PRIOR [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_PageUp,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY PRIOR ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_PageUp,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY DELETE [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Delete, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY DELETE ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Delete, Qt_NoModifier, <{bAction}> ) -#xcommand ON KEY NEXT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_PageDown,Qt_NoModifier,<{bAction}> } ) -#xcommand ON KEY NEXT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_PageDown,Qt_NoModifier,<{bAction}> } ) +#xcommand ON KEY PRIOR [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_PageUp, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY PRIOR ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_PageUp, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY NEXT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_PageDown, Qt_NoModifier, <{bAction}> ) +#xcommand ON KEY NEXT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_PageDown, Qt_NoModifier, <{bAction}> ) + // Alt Mod Keys -#xcommand ON KEY ALT+A [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_A,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+A ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_A,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+A [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_A, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+A ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_A, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+B [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_B,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+B ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_B,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+B [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_B, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+B ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_B, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+C [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_C,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+C ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_C,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+C [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_C, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+C ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_C, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+D [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_D,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+D ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_D,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+D [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_D, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+D ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_D, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+E [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_E,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+E ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_E,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+E [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_E, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+E ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_E, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+G [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_G,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+G ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_G,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+G [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_G, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+G ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_G, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+H [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_H,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+H ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_H,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+H [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_H, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+H ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_H, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+I [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_I,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+I ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_I,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+I [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_I, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+I ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_I, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+J [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_J,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+J ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_J,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+J [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_J, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+J ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_J, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+K [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_K,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+K ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_K,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+K [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_K, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+K ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_K, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+L [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_L,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+L ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_L,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+L [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_L, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+L ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_L, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+M [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_M,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+M ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_M,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+M [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_M, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+M ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_M, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+N [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_N,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+N ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_N,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+N [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_N, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+N ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_N, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+O [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_O,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+O ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_O,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+O [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_O, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+O ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_O, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+P [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_P,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+P ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_P,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+P [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_P, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+P ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_P, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+Q [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Q,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+Q ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Q,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+Q [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Q, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+Q ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Q, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+R [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_R,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+R ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_R,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+R [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_R, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+R ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_R, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+S [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_S,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+S ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_S,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+S [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_S, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+S ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_S, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+T [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_T,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+T ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_T,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+T [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_T, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+T ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_T, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+U [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_U,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+U ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_U,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+U [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_U, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+U ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_U, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+V [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_V,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+V ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_V,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+V [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_V, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+V ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_V, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+W [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_W,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+W ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_W,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+W [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_W, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+W ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_W, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+X [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_X,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+X ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_X,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+X [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_X, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+X ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_X, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+Y [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Y,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+Y ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Y,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+Y [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Y, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+Y ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Y, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+Z [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Z,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+Z ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Z,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+Z [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Z, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+Z ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Z, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+0 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_0,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+0 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_0,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+0 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_0, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+0 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_0, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+1 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_1,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+1 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_1,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+1 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_1, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+1 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_1, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+2 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_2,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+2 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_2,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+2 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_2, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+2 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_2, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+3 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_3,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+3 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_3,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+3 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_3, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+3 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_3, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+4 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_4,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+4 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_4,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+4 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_4, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+4 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_4, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+5 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_5,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+5 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_5,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+5 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_5, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+5 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_5, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+6 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_6,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+6 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_6,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+6 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_6, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+6 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_6, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+7 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_7,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+7 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_7,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+7 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_7, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+7 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_7, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+8 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_8,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+8 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_8,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+8 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_8, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+8 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_8, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+9 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_9,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+9 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_9,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+9 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_9, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+9 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_9, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F1 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F1,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F1 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F1,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F1 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F1, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F1 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F1, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F2 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F2,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F2 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F2,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F2 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F2, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F2 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F2, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F3 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F3,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F3 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F3,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F3 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F3, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F3 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F3, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F4 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F4,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F4 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F4,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F4 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F4, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F4 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F4, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F5 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F5,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F5 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F5,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F5 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F5, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F5 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F5, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F6 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F6,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F6 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F6,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F6 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F6, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F6 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F6, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F7 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F7,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F7 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F7,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F7 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F7, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F7 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F7, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F8 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F8,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F8 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F8,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F8 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F8, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F8 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F8, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F9 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F9,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F9 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F9,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F9 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F9, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F9 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F9, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F10 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F10,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F10 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F10,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F10 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F10, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F10 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F10, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F11 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F11,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F11 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F11,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F11 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F11, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F11 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F11, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+F12 [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F12,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+F12 ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F12,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+F12 [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F12, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+F12 ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F12, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+BACK [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Backspace,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+BACK ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Backspace,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+BACK [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Backspace, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+BACK ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Backspace, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+TAB [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Tab,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+TAB ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Tab,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+TAB [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Tab, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+TAB ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Tab, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+RETURN [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Return,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+RETURN ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Return,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+RETURN [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Return, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+RETURN ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Return, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+ESCAPE [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Escape,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+ESCAPE ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Escape,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+ESCAPE [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Escape, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+ESCAPE ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Escape, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+END [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_End,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+END ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_End,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+END [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_End, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+END ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_End, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+HOME [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Home,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+HOME ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Home,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+HOME [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Home, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+HOME ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Home, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+LEFT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Left,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+LEFT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Left,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+LEFT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Left, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+LEFT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Left, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+UP [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Up,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+UP ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Up,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+UP [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Up, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+UP ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Up, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+RIGHT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Right,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+RIGHT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Right,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+RIGHT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Right, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+RIGHT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Right, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+DOWN [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Down,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+DOWN ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Down,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+DOWN [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Down, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+DOWN ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Down, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+INSERT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Insert,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+INSERT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Insert,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+INSERT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Insert, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+INSERT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Insert, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+DELETE [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_Delete,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+DELETE ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_Delete,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+DELETE [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_Delete, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+DELETE ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_Delete, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+PRIOR [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_PageUp,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+PRIOR ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_PageUp,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+PRIOR [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_PageUp, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+PRIOR ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_PageUp, Qt_AltModifier, <{bAction}> ) -#xcommand ON KEY ALT+NEXT [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_PageDown,Qt_AltModifier,<{bAction}> } ) -#xcommand ON KEY ALT+NEXT ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_PageDown,Qt_AltModifier,<{bAction}> } ) +#xcommand ON KEY ALT+NEXT [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_PageDown, Qt_AltModifier, <{bAction}> ) +#xcommand ON KEY ALT+NEXT ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_PageDown, Qt_AltModifier, <{bAction}> ) // Shift Mod Keys -#xcommand ON KEY SHIFT+A [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_A,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+A ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_A,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+A [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_A, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+A ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_A, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+B [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_B,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+B ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_B,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+B [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_B, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+B ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_B, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+C [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_C,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+C ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_C,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+C [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_C, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+C ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_C, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+D [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_D,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+D ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_D,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+D [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_D, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+D ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_D, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+E [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_E,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+E ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_E,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+E [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_E, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+E ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_E, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+F [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_F,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+F ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_F,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+F [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_F, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+F ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_F, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+G [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_G,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+G ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_G,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+G [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_G, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+G ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_G, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+H [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_H,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+H ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_H,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+H [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_H, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+H ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_H, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+I [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_I,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+I ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_I,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+I [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_I, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+I ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_I, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+J [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_J,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+J ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_J,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+J [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_J, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+J ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_J, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+K [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_K,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+K ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_K,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+K [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_K, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+K ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_K, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+L [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_L,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+L ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt_Key_L,Qt_ShiftModifier,<{bAction}> } ) +#xcommand ON KEY SHIFT+L [ OF <oParent> ] ACTION <bAction> => <oParent>:StoreKeyBoardEvent( Qt_Key_L, Qt_ShiftModifier, <{bAction}> ) +#xcommand ON KEY SHIFT+L ACTION <bAction> => :StoreKeyBoardEvent( Qt_Key_L, Qt_ShiftModifier, <{bAction}> ) -#xcommand ON KEY SHIFT+M [ OF <oParent> ] ACTION <bAction> => aAdd ( <oParent>:aKeyBoardEvents, {Qt_Key_M,Qt_ShiftModifier,<{bAction}> } ) -#xcommand ON KEY SHIFT+M ACTION <bAction> => aAdd ( :aKeyBoardEvents, {Qt... [truncated message content] |
From: <con...@us...> - 2011-12-13 15:29:18
|
Revision: 854 http://hmg.svn.sourceforge.net/hmg/?rev=854&view=rev Author: concentra Date: 2011-12-13 15:29:07 +0000 (Tue, 13 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/VirtualGrid/browse_demo_4.prg Modified: Changelog =================================================================== --- Changelog 2011-12-12 17:57:02 UTC (rev 853) +++ Changelog 2011-12-13 15:29:07 UTC (rev 854) @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ + +2011-12-13 13:30 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + * samples/VirtualGrid/browse_demo_4.prg + ! Fixed compiling warning messages. + 2011-12-12 15:58 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) * include/hmg.ch + Added [ TOVAR <varname> ] => [ <varname> := ] compliant syntax to printer objects. Modified: samples/VirtualGrid/browse_demo_4.prg =================================================================== --- samples/VirtualGrid/browse_demo_4.prg 2011-12-12 17:57:02 UTC (rev 853) +++ samples/VirtualGrid/browse_demo_4.prg 2011-12-13 15:29:07 UTC (rev 854) @@ -13,10 +13,6 @@ LOCAL oWindow LOCAL oBrowse - LOCAL oMainMenu - LOCAL oPopupTest - LOCAL oGetValue - LOCAL oSetValue LOCAL bColor := { || IF ( ordkeyno()/2 == INT(ordkeyno()/2) , { 222,222,222 } , { 255,255,255 } ) } LOCAL fColor := { || IF ( ordkeyno()/2 == INT(ordkeyno()/2) , { 255,0,0 } , { 0,0,255 } ) } @@ -33,12 +29,10 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oMainMenu := MainMenu():New('oMainMenu') - WITH OBJECT oPopupTest := MenuPopup():New( 'oPopupTest',, 'Test' ) - oGetValue := MenuItem():New( 'oGetValue',, 'Get Value' , { || MsgInfo( STR( oBrowse:Value ) ) } ) - oSetValue := MenuItem():New( 'oSetValue',, 'SET Value' , { || oBrowse:Value := 10 } ) - - + WITH OBJECT MainMenu():New() + WITH OBJECT MenuPopup():New( ,, 'Test' ) + With Object MenuItem():New( 'oGetValue',, 'Get Value' , { || MsgInfo( STR( oBrowse:Value ) ) } ); end + With Object MenuItem():New( 'oSetValue',, 'SET Value' , { || oBrowse:Value := 10 } ); end END WITH END WITH This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-12 17:57:09
|
Revision: 853 http://hmg.svn.sourceforge.net/hmg/?rev=853&view=rev Author: concentra Date: 2011-12-12 17:57:02 +0000 (Mon, 12 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog include/hmg.ch samples/print/demo_1.prg samples/print/demo_2.prg samples/print/demo_3.prg samples/print/demo_4.prg samples/print/demo_5.prg samples/print/demo_6.prg samples/print/demo_7.prg samples/print/demo_8.prg samples/print/demo_HMG.prg samples/print/demo_OOP.prg Modified: Changelog =================================================================== --- Changelog 2011-12-12 09:21:48 UTC (rev 852) +++ Changelog 2011-12-12 17:57:02 UTC (rev 853) @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-12 15:58 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + * include/hmg.ch + + Added [ TOVAR <varname> ] => [ <varname> := ] compliant syntax to printer objects. + * samples/print/demo_1.prg + * samples/print/demo_2.prg + * samples/print/demo_3.prg + * samples/print/demo_4.prg + * samples/print/demo_5.prg + * samples/print/demo_6.prg + * samples/print/demo_7.prg + * samples/print/demo_8.prg + * samples/print/demo_HMG.prg + * samples/print/demo_OOP.prg + ! Fixed compiling warning messages. + 2011-12-12 07:21 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) * samples/agoodstart/demo_2.prg * samples/listbox/demo_2.prg Modified: include/hmg.ch =================================================================== --- include/hmg.ch 2011-12-12 09:21:48 UTC (rev 852) +++ include/hmg.ch 2011-12-12 17:57:02 UTC (rev 853) @@ -373,6 +373,7 @@ /*----------------------------------------------------------------------*/ #xcommand SELECT PRINTER <cPrinter> [ TO <lSuccess> ] ; + [ TOVAR <varname> ] ; [ ORIENTATION <nOrientation> ] ; [ PAPERSIZE <nPaperSize> ] ; [ PAPERLENGTH <nPaperLength> ] ; @@ -391,7 +392,7 @@ __MVPUT ('_HMG_CURRENTPAPERSIZE', <nPaperSize> ) ;; __MVPUBLIC('_HMG_CURRENTORIENTATION') ;; __MVPUT ('_HMG_CURRENTORIENTATION', <nOrientation> ) ;; - With Object oPrinter := Printer():New() ;; + With Object [<varname> :=] Printer():New() ;; [<lSuccess> := ] :SelectPrinterByName(<cPrinter>,<.lPreview.>) ;; [:Orientation := <nOrientation> ] ;; [:PaperSize := <nPaperSize> ] ;; @@ -405,6 +406,7 @@ [:Collate := <nCollate> ] #xcommand SELECT PRINTER DEFAULT [ TO <lSuccess> ] ; + [ TOVAR <varname> ] ; [ ORIENTATION <nOrientation> ] ; [ PAPERSIZE <nPaperSize> ] ; [ PAPERLENGTH <nPaperLength> ] ; @@ -417,7 +419,7 @@ [ COLLATE <nCollate> ] ; [ <lPreview : PREVIEW> ] ; => ; - With Object oPrinter := Printer():New() ;; + With Object [<varname> :=] Printer():New() ;; __MVPUBLIC('_HMG_CURRENTPRINTERNAME') ;; __MVPUT ('_HMG_CURRENTPRINTERNAME', '_DEFAULT_' ) ;; __MVPUBLIC('_HMG_CURRENTPAPERSIZE') ;; @@ -438,9 +440,10 @@ #xcommand SELECT PRINTER DIALOG [ TO <lSuccess> ] ; + [ TOVAR <varname> ] ; [ <lPreview : PREVIEW> ] ; => ; - With Object oPrinter := Printer():New() ;; + With Object [<varname> :=] Printer():New() ;; [<lSuccess> := ] :SelectPrinterDialog(<.lPreview.>) #xcommand START PRINTDOC [ NAME <name> ] => :StartPrintDoc() @@ -3741,7 +3744,7 @@ #xtranslate WAITISCANC => HmgWaitWinCanceled() /*----------------------------------------------------------------------*/ - // SET COMPATIBLE ON | OFF + // SET COMPATIBLE ON | OFF /*----------------------------------------------------------------------*/ #xcommand SET COMPATIBLE ON => HMG3_Compatibility(.T.) Modified: samples/print/demo_1.prg =================================================================== --- samples/print/demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_1.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,7 +11,7 @@ FUNCTION Main - LOCAL oWindow , oButton1 + LOCAL oWindow HbQt_ErrorSys() @@ -23,7 +23,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oButton1 := Button():New() + WITH OBJECT Button():New() :Row := 40 :Col := 40 :Width := 180 @@ -35,12 +35,11 @@ oWindow:Activate() - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter LOCAL lPreview /* @@ -70,7 +69,7 @@ lPreview := .T. - WITH OBJECT oPrinter := Printer():New() + WITH OBJECT Printer():New() :SelectPrinterDefault( lPreview ) Modified: samples/print/demo_2.prg =================================================================== --- samples/print/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_2.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 @@ -21,7 +23,7 @@ Title 'Nice OOP Demo!!!' OnInit oWindow1.Center() - @ 40 , 40 Button Button1 ; + @ 40 , 40 Button Button1 ; Caption 'Print!' ; On Click Button1Click() @@ -29,12 +31,11 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter SELECT PRINTER DEFAULT PREVIEW Modified: samples/print/demo_3.prg =================================================================== --- samples/print/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_3.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 @@ -21,7 +23,7 @@ Title 'Nice OOP Demo!!!' OnInit oWindow1.Center() - @ 40 , 40 Button Button1 ; + @ 40 , 40 Button Button1 ; Caption 'Print!' ; On Click Button1Click() @@ -29,12 +31,12 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter , lResult + LOCAL lResult SELECT PRINTER DIALOG TO lResult Modified: samples/print/demo_4.prg =================================================================== --- samples/print/demo_4.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_4.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 @@ -29,12 +31,11 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter SELECT PRINTER DEFAULT Modified: samples/print/demo_5.prg =================================================================== --- samples/print/demo_5.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_5.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 @@ -29,12 +31,12 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter , lResult + LOCAL lResult SELECT PRINTER DIALOG PREVIEW TO lResult Modified: samples/print/demo_6.prg =================================================================== --- samples/print/demo_6.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_6.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 @@ -29,12 +31,11 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter SELECT PRINTER 'test.pdf' Modified: samples/print/demo_7.prg =================================================================== --- samples/print/demo_7.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_7.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + hbqt_errorsys() DEFINE MAINWINDOW oWindow1 @@ -29,7 +31,7 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ Modified: samples/print/demo_8.prg =================================================================== --- samples/print/demo_8.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_8.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -11,6 +11,8 @@ FUNCTION Main + Local oWindow1 + hbqt_errorsys() DEFINE MAINWINDOW oWindow1 @@ -21,7 +23,7 @@ Title 'Nice OOP Demo!!!' OnInit oWindow1.Center() - @ 40 , 40 Button Button1 ; + @ 40 , 40 Button oButton ; Caption 'Print!' ; On Click Button1Click() @@ -29,14 +31,13 @@ ACTIVATE WINDOW oWindow1 - RETURN + RETURN NIL /*----------------------------------------------------------------------*/ PROCEDURE Button1Click() - LOCAL oPrinter - cPrinter := GetPrinter() + Local cPrinter := GetPrinter() IF EMPTY(cPrinter) RETURN Modified: samples/print/demo_HMG.prg =================================================================== --- samples/print/demo_HMG.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_HMG.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -10,8 +10,8 @@ FUNCTION Main() - LOCAL oWindow - + LOCAL oWindow + HbQt_ErrorSys() DEFINE MAINWINDOW oWindow @@ -36,13 +36,13 @@ FUNCTION Button1Click() - LOCAL oPrinter , lResult + LOCAL lResult -// SELECT PRINTER DEFAULT TO lResult - SELECT PRINTER DEFAULT TO lResult PREVIEW -// SELECT PRINTER DIALOG TO lResult -// SELECT PRINTER DIALOG TO lResult PREVIEW -// SELECT PRINTER "test.pdf" TO lResult // the PDF print of Qt is ugly ! +// SELECT PRINTER DEFAULT TO lResult + SELECT PRINTER DEFAULT TO lResult PREVIEW +// SELECT PRINTER DIALOG TO lResult +// SELECT PRINTER DIALOG TO lResult PREVIEW +// SELECT PRINTER "test.pdf" TO lResult // the PDF print of Qt is ugly ! IF !lResult MsgStop( 'Print cancelled by the User' ) @@ -79,9 +79,9 @@ @ 30, 15 PRINT 'Another Page!' Font 'Arial' Size 72 COLOR { 0, 0, 255 } - @ 130, 15 PRINT 'Another Page!' Font 'Arial' Size 72 + @ 130, 15 PRINT 'Another Page!' Font 'Arial' Size 72 - @ 150, 10 PRINT LINE TO 150, 200 + @ 150, 10 PRINT LINE TO 150, 200 @ 200,200 PRINT 'Another Page!' Font 'Arial' Size 20 RIGHT Modified: samples/print/demo_OOP.prg =================================================================== --- samples/print/demo_OOP.prg 2011-12-12 09:21:48 UTC (rev 852) +++ samples/print/demo_OOP.prg 2011-12-12 17:57:02 UTC (rev 853) @@ -10,27 +10,27 @@ FUNCTION Main() - LOCAL oWindow + LOCAL oWindow HbQt_ErrorSys() - With Object oWindow := MAINWINDOW():New( "oWindow" ) - :Row := 10 - :Col := 10 - :Width := 200 - :Height := 200 - :Title := "HMG4 printing demo" - :OnInit := {|| oWindow:Center()} + With Object oWindow := MAINWINDOW():New( "oWindow" ) + :Row := 10 + :Col := 10 + :Width := 200 + :Height := 200 + :Title := "HMG4 printing demo" + :OnInit := {|| oWindow:Center()} With Object BUTTON():New("Button1") - :Row := 80 - :Col := 60 - :Caption := "Print!" - :OnClick := {|| Button1Click()} - end + :Row := 80 + :Col := 60 + :Caption := "Print!" + :OnClick := {|| Button1Click()} + end - :EndWindow() - end + :EndWindow() + end oWindow:Activate() @@ -40,56 +40,54 @@ FUNCTION Button1Click() - LOCAL oPrinter + With Object Printer():New() - With Object oPrinter := Printer():New() + IF ! :SelectPrinterDefault( .T. ) + MsgStop( "Print cancelled by the User" ) + RETURN NIL + ENDIF - IF ! :SelectPrinterDefault( .T. ) - MsgStop( "Print cancelled by the User" ) - RETURN NIL - ENDIF - - :StartPrintDoc() - - :StartPrintPage() - - :PrintData( 20 , 20 , "Hello HMG.4!" , "Courier New" , 36 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) + :StartPrintDoc() - :PrintLine( 50 , 10 , 50 , 200 , { 0 , 255 , 0 } , ) + :StartPrintPage() - :PrintRectangle( 70 , 10 , 100 , 200 , { 0 , 0 , 255 } , , .F. , .F. ) + :PrintData( 20 , 20 , "Hello HMG.4!" , "Courier New" , 36 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) - :PrintImage( 120 , 10 , "hmg.bmp" , 80 , 40 , .T. ) + :PrintLine( 50 , 10 , 50 , 200 , { 0 , 255 , 0 } , ) - :PrintImage( 120 , 120 , "hmg.bmp" , 80 , 40 , .F. ) + :PrintRectangle( 70 , 10 , 100 , 200 , { 0 , 0 , 255 } , , .F. , .F. ) - :PrintRectangle( 170 , 50 , 200 , 180 , { 255 , 0 , 0 } , 2 , .F. , .T. ) + :PrintImage( 120 , 10 , "hmg.bmp" , 80 , 40 , .T. ) - :PrintData( 205 , 10 , "This is a long long text TO test multiline print.." , "Arial" , 11 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , 235 , 30 , if ( .F. , 4 , if( .F. , 2 , 1 ) ) ) + :PrintImage( 120 , 120 , "hmg.bmp" , 80 , 40 , .F. ) - :PrintData( 240 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 255 , 0 , 0 } , 250 , 200 , if ( .F. , 4 , if( .F. , 2 , 1 ) ) ) + :PrintRectangle( 170 , 50 , 200 , 180 , { 255 , 0 , 0 } , 2 , .F. , .T. ) - :PrintData( 250 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 0 , 255 , 0 } , 260 , 200 , if ( .T. , 4 , if( .F. , 2 , 1 ) ) ) + :PrintData( 205 , 10 , "This is a long long text TO test multiline print.." , "Arial" , 11 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , 235 , 30 , if ( .F. , 4 , if( .F. , 2 , 1 ) ) ) - :PrintData( 260 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , 270 , 200 , if ( .F. , 4 , if( .T. , 2 , 1 ) ) ) - - :EndPrintPage() - - :StartPrintPage() + :PrintData( 240 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 255 , 0 , 0 } , 250 , 200 , if ( .F. , 4 , if( .F. , 2 , 1 ) ) ) - :PrintData( 30 , 15 , "Another Page!" , "Arial" , 72 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) - - :PrintData( 130 , 15 , "Another Page!" , "Arial" , 72 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) - - :PrintLine( 150 , 10 , 150 , 200 , , ) - - :PrintData( 200 , 200 , "Another Page!" , "Arial" , 20 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .T. , 2 , nil ) ) ) - - :PrintData( 210 , 100 , "Another Page!" , "Arial" , 20 , .F. , .F. , .F. , .F. , , nil , nil , if ( .T. , 4 , if( .F. , 2 , nil ) ) ) - - :EndPrintPage() - - :EndPrintDoc() - end + :PrintData( 250 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 0 , 255 , 0 } , 260 , 200 , if ( .T. , 4 , if( .F. , 2 , 1 ) ) ) + :PrintData( 260 , 10 , "Alignment Test" , "Arial" , 12 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , 270 , 200 , if ( .F. , 4 , if( .T. , 2 , 1 ) ) ) + + :EndPrintPage() + + :StartPrintPage() + + :PrintData( 30 , 15 , "Another Page!" , "Arial" , 72 , .F. , .F. , .F. , .F. , { 0 , 0 , 255 } , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) + + :PrintData( 130 , 15 , "Another Page!" , "Arial" , 72 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .F. , 2 , nil ) ) ) + + :PrintLine( 150 , 10 , 150 , 200 , , ) + + :PrintData( 200 , 200 , "Another Page!" , "Arial" , 20 , .F. , .F. , .F. , .F. , , nil , nil , if ( .F. , 4 , if( .T. , 2 , nil ) ) ) + + :PrintData( 210 , 100 , "Another Page!" , "Arial" , 20 , .F. , .F. , .F. , .F. , , nil , nil , if ( .T. , 4 , if( .F. , 2 , nil ) ) ) + + :EndPrintPage() + + :EndPrintDoc() + end + RETURN NIL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-12 09:21:59
|
Revision: 852 http://hmg.svn.sourceforge.net/hmg/?rev=852&view=rev Author: concentra Date: 2011-12-12 09:21:48 +0000 (Mon, 12 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/VirtualGrid/browse_demo_1.prg samples/VirtualGrid/browse_demo_2.prg samples/VirtualGrid/browse_demo_3.prg samples/VirtualGrid/browse_demo_5.prg samples/agoodstart/demo_2.prg samples/listbox/demo_2.prg samples/listbox/demo_3.prg samples/monthcalendar/demo_2.prg samples/monthcalendar/demo_3.prg samples/msgbox/demo_1.prg samples/msgbox/demo_2.prg samples/notifymenu/demo_2.prg samples/progressbar/demo_2.prg samples/radiogroup/demo_3.prg samples/region/demo_1.prg samples/resource/demo_1.prg samples/slider/demo_2.prg samples/spinner/demo_2.prg samples/spinner/demo_3.prg samples/splitbox/demo_2.prg samples/splitbox/demo_3.prg samples/styles/demo_3.prg samples/textbox/demo_2.prg samples/textbox/demo_3.prg samples/textbox/demo_4.prg samples/textbox/demo_5.prg samples/timer/demo_3.prg samples/timer/demo_4.prg samples/validator/demo_1.prg samples/validator/validator.prg Modified: Changelog =================================================================== --- Changelog 2011-12-09 18:24:19 UTC (rev 851) +++ Changelog 2011-12-12 09:21:48 UTC (rev 852) @@ -16,6 +16,39 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-12 07:21 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + * samples/agoodstart/demo_2.prg + * samples/listbox/demo_2.prg + * samples/listbox/demo_3.prg + * samples/monthcalendar/demo_2.prg + * samples/monthcalendar/demo_3.prg + * samples/msgbox/demo_1.prg + * samples/msgbox/demo_2.prg + * samples/notifymenu/demo_2.prg + * samples/progressbar/demo_2.prg + * samples/radiogroup/demo_3.prg + * samples/region/demo_1.prg + * samples/resource/demo_1.prg + * samples/slider/demo_2.prg + * samples/spinner/demo_2.prg + * samples/spinner/demo_3.prg + * samples/splitbox/demo_2.prg + * samples/splitbox/demo_3.prg + * samples/styles/demo_3.prg + * samples/textbox/demo_2.prg + * samples/textbox/demo_3.prg + * samples/textbox/demo_4.prg + * samples/textbox/demo_5.prg + * samples/timer/demo_3.prg + * samples/timer/demo_4.prg + * samples/validator/demo_1.prg + * samples/validator/validator.prg + * samples/VirtualGrid/browse_demo_1.prg + * samples/VirtualGrid/browse_demo_2.prg + * samples/VirtualGrid/browse_demo_3.prg + * samples/VirtualGrid/browse_demo_5.prg + ! Fixed compiling warning messages. + 2011-12-09 19:25 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/dropdownmenu.prg ! method ParentButton() reactivated @@ -24,7 +57,7 @@ + include/hmg_qtlocale.ch * samples/agoodstart/demo_1.prg * I have rewrite QLocale definitions about language. This definitions are - not included within hbqtcore.ch + not included within hbqtcore.ch 2011-12-09 12:34 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) * samples/checkbutton/demo_2.prg Modified: samples/VirtualGrid/browse_demo_1.prg =================================================================== --- samples/VirtualGrid/browse_demo_1.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/VirtualGrid/browse_demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -10,8 +10,8 @@ #include "hmg.ch" FUNCTION Main + LOCAL oWindow - LOCAL oBrowse HbQt_ErrorSys() @@ -27,7 +27,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oBrowse := VirtualGrid():New("oBrowse") + WITH OBJECT VirtualGrid():New("oBrowse") :Row := 10 :Col := 10 :Width := 750 Modified: samples/VirtualGrid/browse_demo_2.prg =================================================================== --- samples/VirtualGrid/browse_demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/VirtualGrid/browse_demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,7 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oBrowse HbQt_ErrorSys() @@ -29,7 +28,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oBrowse := VirtualGrid():New("oBrowse") + WITH OBJECT VirtualGrid():New("oBrowse") :Row := 10 :Col := 10 :Width := 750 Modified: samples/VirtualGrid/browse_demo_3.prg =================================================================== --- samples/VirtualGrid/browse_demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/VirtualGrid/browse_demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,7 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oBrowse HbQt_ErrorSys() @@ -32,7 +31,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oBrowse := VirtualGrid():New("oBrowse") + WITH OBJECT VirtualGrid():New() :Row := 10 :Col := 10 :Width := 750 Modified: samples/VirtualGrid/browse_demo_5.prg =================================================================== --- samples/VirtualGrid/browse_demo_5.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/VirtualGrid/browse_demo_5.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,7 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oBrowse HbQt_ErrorSys() @@ -33,7 +32,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oBrowse := VirtualGrid():New("oBrowse") + WITH OBJECT VirtualGrid():New() :Row := 10 :Col := 10 :Width := 750 Modified: samples/agoodstart/demo_2.prg =================================================================== --- samples/agoodstart/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/agoodstart/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -8,14 +8,12 @@ */ #include "hmg.ch" +#include "hbqtcore.ch" #include "hmg_qtlocale.ch" FUNCTION Main LOCAL MainForm - LOCAL BtnLang - LOCAL BtnCount - LOCAL BtnExit HbQt_ErrorSys() Modified: samples/listbox/demo_2.prg =================================================================== --- samples/listbox/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/listbox/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,18 +13,6 @@ FUNCTION Main - LOCAL oLabel1 - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - LOCAL oButton5 - LOCAL oButton6 - LOCAL oButton7 - LOCAL oButton8 - LOCAL oButton9 - LOCAL oList1 - PRIVATE oWindow1 HbQt_ErrorSys() Modified: samples/listbox/demo_3.prg =================================================================== --- samples/listbox/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/listbox/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,18 +13,6 @@ FUNCTION Main - LOCAL oLabel1 - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - LOCAL oButton5 - LOCAL oButton6 - LOCAL oButton7 - LOCAL oButton8 - LOCAL oButton9 - LOCAL oList1 - PRIVATE oWindow1 HbQt_ErrorSys() Modified: samples/monthcalendar/demo_2.prg =================================================================== --- samples/monthcalendar/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/monthcalendar/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -14,20 +14,6 @@ FUNCTION Main LOCAL oForm_1 - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - LOCAL oButton5 - LOCAL oButton6 - LOCAL oButton7 - LOCAL oButton8 - LOCAL oButton9 - LOCAL oButton10 - LOCAL oButton11 - LOCAL oButton12 - LOCAL oButton13 - LOCAL oButton14 PRIVATE oMonth_1 Modified: samples/monthcalendar/demo_3.prg =================================================================== --- samples/monthcalendar/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/monthcalendar/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -14,20 +14,6 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - LOCAL oButton5 - LOCAL oButton6 - LOCAL oButton7 - LOCAL oButton8 - LOCAL oButton9 - LOCAL oButton10 - LOCAL oButton11 - LOCAL oButton12 - LOCAL oButton13 - LOCAL oButton14 HbQt_ErrorSys() Modified: samples/msgbox/demo_1.prg =================================================================== --- samples/msgbox/demo_1.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/msgbox/demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,9 +13,6 @@ FUNCTION Main - LOCAL oButton1 - LOCAL oLabel1 - PRIVATE oWindow1 HbQt_ErrorSys() Modified: samples/msgbox/demo_2.prg =================================================================== --- samples/msgbox/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/msgbox/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -18,8 +18,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oButton1 - LOCAL oButton2 HbQt_ErrorSys() @@ -31,7 +29,7 @@ :Title := 'MessageBox WITH Icon TitleBar' :OnInit := { || oWindow:Center() } - WITH OBJECT oButton1 := Button():New() + WITH OBJECT Button():New() :Row := 40 :Col := 40 :Width := 250 @@ -39,7 +37,7 @@ :OnClick := { || Button1Click() } END WITH - WITH OBJECT oButton2 := Button():New() + WITH OBJECT Button():New() :Row := 80 :Col := 40 :Width := 250 Modified: samples/notifymenu/demo_2.prg =================================================================== --- samples/notifymenu/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/notifymenu/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,9 +12,6 @@ FUNCTION Main - LOCAL oNotify - LOCAL oButton1 - LOCAL oButton2 LOCAL oWindow HbQt_ErrorSys() Modified: samples/progressbar/demo_2.prg =================================================================== --- samples/progressbar/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/progressbar/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,13 +13,6 @@ FUNCTION Main - LOCAL oProgressbar1 - LOCAL oProgressbar2 - LOCAL oProgressbar3 - LOCAL oProgressbar4 - LOCAL oProgressbar5 - LOCAL oButton1 - PRIVATE oWindow HbQt_ErrorSys() Modified: samples/radiogroup/demo_3.prg =================================================================== --- samples/radiogroup/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/radiogroup/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,8 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oRadioGroup1 - LOCAL oRadioGroup2 HbQt_ErrorSys() Modified: samples/region/demo_1.prg =================================================================== --- samples/region/demo_1.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/region/demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,11 +13,6 @@ FUNCTION Main - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - PRIVATE oWindow HbQt_ErrorSys() @@ -30,7 +25,7 @@ :Title := 'Nice OOP Demo!!!' :OnInit := { || oWindow:Center() } - WITH OBJECT oButton1 := Button():New() + WITH OBJECT Button():New() :Row := 100 :Col := 100 :Width := 180 @@ -38,7 +33,7 @@ :OnClick := { || SetRectRegion() } END WITH - WITH OBJECT oButton2 := Button():New() + WITH OBJECT Button():New() :Row := 130 :Col := 100 :Width := 180 @@ -46,7 +41,7 @@ :OnClick := { || SetEllipticRegion() } END WITH - WITH OBJECT oButton3 := Button():New() + WITH OBJECT Button():New() :Row := 160 :Col := 100 :Width := 180 @@ -54,12 +49,12 @@ :OnClick := { || SetPolygonalRegion() } END WITH - WITH OBJECT oButton4 := Button():New() - :Row := 190 - :Col := 100 - :Width := 180 - :Caption := 'ReSET Region!!!' - :OnClick := { || ResetRegion() } + WITH OBJECT Button():New() + :Row := 190 + :Col := 100 + :Width := 180 + :Caption := 'ReSET Region!!!' + :OnClick := { || ResetRegion() } END WITH END WITH Modified: samples/resource/demo_1.prg =================================================================== --- samples/resource/demo_1.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/resource/demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,13 +11,8 @@ FUNCTION Main - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oButton4 - LOCAL oButton5 - LOCAL oButton6 LOCAL oWindow + LOCAL oButton1 HbQt_ErrorSys() @@ -37,7 +32,7 @@ :OnClick := { || Button1Click( oButton1 ) } END WITH - WITH OBJECT oButton2 := Button():New() + WITH OBJECT Button():New() :Row := 70 :Col := 40 :Width := 180 @@ -47,7 +42,7 @@ :OnClick := { || Button1Click( oButton1 ) } END WITH - WITH OBJECT oButton3 := Button():New() + WITH OBJECT Button():New() :Row := 100 :Col := 40 :Width := 180 @@ -57,7 +52,7 @@ :OnClick := { || Button1Click( oButton1 ) } END WITH - WITH OBJECT oButton4 := Button():New() + WITH OBJECT Button():New() :Row := 130 :Col := 40 :Width := 180 @@ -65,7 +60,7 @@ :OnClick := { || oButton1:Flat := .T. } END WITH - WITH OBJECT oButton5 := Button():New() + WITH OBJECT Button():New() :Row := 160 :Col := 40 :Width := 180 @@ -73,7 +68,7 @@ :OnClick := { || oButton1:Flat := .F. } END WITH - WITH OBJECT oButton6 := Button():New() + WITH OBJECT Button():New() :Row := 190 :Col := 40 :Width := 180 Modified: samples/slider/demo_2.prg =================================================================== --- samples/slider/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/slider/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -13,23 +13,6 @@ FUNCTION Main - LOCAL oSlider1 - LOCAL oSlider2 - LOCAL oSlider3 - LOCAL oSlider4 - LOCAL oSlider5 - LOCAL oSlider6 - LOCAL oSlider7 - LOCAL oSlider8 - LOCAL oTextBox1 - LOCAL oTextBox2 - LOCAL oTextBox3 - LOCAL oTextBox4 - LOCAL oTextBox5 - LOCAL oTextBox6 - LOCAL oTextBox7 - LOCAL oTextBox8 - PRIVATE oForm_1 HbQt_ErrorSys() @@ -125,14 +108,14 @@ END WINDOW - oTextBox1.Enabled := .F. - oTextBox2.Enabled := .F. - oTextBox3.Enabled := .F. - oTextBox4.Enabled := .F. - oTextBox5.Enabled := .F. - oTextBox6.Enabled := .F. - oTextBox7.Enabled := .F. - oTextBox8.Enabled := .F. + oForm_1.oTextBox1.Enabled := .F. + oForm_1.oTextBox2.Enabled := .F. + oForm_1.oTextBox3.Enabled := .F. + oForm_1.oTextBox4.Enabled := .F. + oForm_1.oTextBox5.Enabled := .F. + oForm_1.oTextBox6.Enabled := .F. + oForm_1.oTextBox7.Enabled := .F. + oForm_1.oTextBox8.Enabled := .F. ACTIVATE WINDOW oForm_1 Modified: samples/spinner/demo_2.prg =================================================================== --- samples/spinner/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/spinner/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,7 +11,7 @@ FUNCTION Main - LOCAL oWindow , oSpinner, oButton1, oButton2, oButton3 + LOCAL oWindow HbQt_ErrorSys() @@ -33,18 +33,18 @@ @ 50 , 40 Button oButton1 ; Width 200 ; - Caption 'oSpinner:Value' ; - ACTION MsgInfo( Str ( oSpinner:Value ) ) + Caption 'oWindow.oSpinner:Value' ; + ACTION MsgInfo( Str ( oWindow.oSpinner:Value ) ) @ 80, 40 Button oButton2 ; Width 200 ; Caption 'SET Font Size' ; - On Click { || oSpinner:FontSize := 8 } + On Click { || oWindow.oSpinner:FontSize := 8 } @ 110, 40 Button oButton3 ; Width 200 ; Caption 'SET Readonly' ; - On Click { || oSpinner:ReadOnly := .T.} + On Click { || oWindow.oSpinner:ReadOnly := .T.} END WINDOW Modified: samples/spinner/demo_3.prg =================================================================== --- samples/spinner/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/spinner/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,7 +11,7 @@ FUNCTION Main - LOCAL oWindow , oSpinner, oButton1, oButton2, oButton3 + LOCAL oWindow HbQt_ErrorSys() @@ -39,8 +39,8 @@ Row 50 Col 40 Width 200 - Caption 'oSpinner:Value' - OnClick MsgInfo( Str ( oSpinner:Value ) ) + Caption 'oWindow.oSpinner:Value' + OnClick MsgInfo( Str ( oWindow.oSpinner:Value ) ) END BUTTON DEFINE BUTTON oButton2 @@ -48,7 +48,7 @@ Col 40 Width 200 Caption 'SET Font Size' - OnClick { || oSpinner:FontSize := 8 } + OnClick { || oWindow.oSpinner:FontSize := 8 } END BUTTON DEFINE BUTTON oButton3 @@ -56,7 +56,7 @@ Col 40 Width 200 Caption 'SET ReadOnly' - OnClick { || oSpinner:ReadOnly := .T.} + OnClick { || oWindow.oSpinner:ReadOnly := .T.} END BUTTON END WINDOW Modified: samples/splitbox/demo_2.prg =================================================================== --- samples/splitbox/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/splitbox/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,9 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oSplitBox - LOCAL oListBox - LOCAL oGrid HbQt_ErrorSys() Modified: samples/splitbox/demo_3.prg =================================================================== --- samples/splitbox/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/splitbox/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,9 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oSplitBox - LOCAL oListBox - LOCAL oGrid HbQt_ErrorSys() Modified: samples/styles/demo_3.prg =================================================================== --- samples/styles/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/styles/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,32 +11,9 @@ FUNCTION Main - LOCAL aRows [10] [3] - LOCAL oFrame - LOCAL oFrame1 - LOCAL oFrame2 - LOCAL oButton1 - LOCAL oButton2 - LOCAL oButton3 - LOCAL oTab - LOCAL oPage1 - LOCAL oPage2 - LOCAL oEditBox1 - LOCAL oProgressbar1 - LOCAL oRadioGroup1 - LOCAL oCheckBox - LOCAL oCheckBox1 - LOCAL oCombo1 - LOCAL oTextBox - LOCAL oSpinner - LOCAL oDatePicker - LOCAL oSlider - LOCAL oDial - LOCAL oScrollBar + Local aRows [10] [3] + Local oWindow - PRIVATE oWindow - PRIVATE oGrid - HbQt_ErrorSys() aRows [1] := {'Simpson' ,'Homer' ,'555-5555'} @@ -60,7 +37,7 @@ :Title := 'Widget Styles' :OnInit := { || oWindow:Center() } - WITH OBJECT oFrame := Frame():New() + WITH OBJECT Frame():New() :Row := 10 :Col := 10 :Width := 240 @@ -68,7 +45,7 @@ :Caption := 'Group 1' END WITH - WITH OBJECT oRadioGroup1 := RadioGroup():New() + WITH OBJECT RadioGroup():New() :Row := 30 :Col := 20 :Width := 200 @@ -77,7 +54,7 @@ :Value := 2 END WITH - WITH OBJECT oCheckBox := CheckBox():New() + WITH OBJECT CheckBox():New() :Row := 140 :Col := 20 :Width := 100 @@ -85,7 +62,7 @@ :Caption := 'CheckBox 1' END WITH - WITH OBJECT oCheckBox1 := CheckBox():New() + WITH OBJECT CheckBox():New() :Row := 140 :Col := 120 :Width := 100 @@ -93,7 +70,7 @@ :Caption := 'CheckBox 2' END WITH - WITH OBJECT oFrame1 := Frame():New() + WITH OBJECT Frame():New() :Row := 10 :Col := 257 :Width := 240 @@ -101,14 +78,14 @@ :Caption := 'Group 2' END WITH - WITH OBJECT oButton2 := Button():New() + WITH OBJECT Button():New() :Row := 30 :Col := 270 :Width := 215 :Caption := 'Button Sample' END WITH - WITH OBJECT oButton3 := Button():New() + WITH OBJECT Button():New() :Row := 70 :Col := 270 :Width := 215 @@ -117,7 +94,7 @@ :PictAlignment := BTN_LEFT END WITH - WITH OBJECT oCombo1 := ComboBox():New() + WITH OBJECT ComboBox():New() :Row := 110 :Col := 270 :Width := 150 @@ -125,7 +102,7 @@ :Value := 3 END WITH - WITH OBJECT oFrame2 := Frame():New() + WITH OBJECT Frame():New() :Row := 180 :Col := 257 :Width := 240 @@ -133,7 +110,7 @@ :Caption := 'Group 3' END WITH - WITH OBJECT oTextBox := TextBox():New() + WITH OBJECT TextBox():New() :Row := 200 :Col := 270 :Width := 215 @@ -142,7 +119,7 @@ :Value := 'toledo' END WITH - WITH OBJECT oSpinner := Spinner():New() + WITH OBJECT Spinner():New() :Row := 230 :Col := 270 :Value := 5 @@ -153,7 +130,7 @@ :Wrap := .T. END WITH - WITH OBJECT oDatePicker := DatePicker():New() + WITH OBJECT DatePicker():New() :Row := 260 :Col := 270 :Width := 215 @@ -161,7 +138,7 @@ :Value := DATE() END WITH - WITH OBJECT oSlider := Slider():New() + WITH OBJECT Slider():New() :Row := 290 :Col := 270 :Width := 120 @@ -172,7 +149,7 @@ :Orientation := SLD_HORIZONTAL END WITH - WITH OBJECT oScrollBar := ScrollBar():New() + WITH OBJECT ScrollBar():New() :Row := 320 :Col := 270 :Width := 120 @@ -183,7 +160,7 @@ :Orientation := SLD_HORIZONTAL END WITH - WITH OBJECT oDial := Dial():New() + WITH OBJECT Dial():New() :Row := 290 :Col := 410 :Width := 60 @@ -195,17 +172,17 @@ :Notch := .T. END WITH - WITH OBJECT oTab := Tab():New() + WITH OBJECT Tab():New() :Row := 180 :Col := 10 :Width := 240 :Height := 175 :Position := 0 - WITH OBJECT oPage1 := TabPage():New() + WITH OBJECT TabPage():New() :Caption := 'Grid' - WITH OBJECT oGrid := VirtualGrid():New() + WITH OBJECT VirtualGrid():New() :Row := 5 :Col := 5 :Width := 225 @@ -220,10 +197,10 @@ END WITH - WITH OBJECT oPage2 := TabPage():New() + WITH OBJECT TabPage():New() :Caption := 'EditBox' - WITH OBJECT oEditBox1 := EditBox():New() + WITH OBJECT EditBox():New() :Row := 10 :Col := 10 :Width := 220 @@ -237,7 +214,7 @@ END WITH - WITH OBJECT oProgressbar1 := Progressbar():New("oProgressbar1") + WITH OBJECT Progressbar():New("oProgressbar1") :Row := 367 :Col := 120 :Width := 380 @@ -249,11 +226,11 @@ :Tooltip := "ProgressBar Horizontal Normal" END WITH - WITH OBJECT oButton1 := Button():New() + WITH OBJECT Button():New() :Row := 365 :Col := 10 :Caption := 'Start' - :OnClick := { || ButtonClick() } + :OnClick := { || ButtonClick( oWindow ) } END WITH @@ -265,7 +242,7 @@ /*----------------------------------------------------------------------*/ -FUNCTION ButtonClick +FUNCTION ButtonClick( oWindow ) LOCAL n FOR n := oWindow:oProgressbar1:Rangemin TO oWindow:oProgressbar1:Rangemax Modified: samples/textbox/demo_2.prg =================================================================== --- samples/textbox/demo_2.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/textbox/demo_2.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -9,11 +9,9 @@ #include "hmg.ch" -MEMVAR oWindow1 - FUNCTION Main - LOCAL Text1, Button1, Button2 + LOCAL oWindow1 HbQt_ErrorSys() @@ -23,13 +21,13 @@ WIDTH 400 HEIGHT 400 TITLE 'Nice OOP Demo!!!' - ONINIT FrmOnInit() + ONINIT FrmOnInit( oWindow1 ) // ONINIT oWindow1:Center() @ 10 , 40 TEXTBOX Text1 ; WIDTH 200 ; VALUE 'OOP TextBox 1 !!!' ; - ON ENTER TbOnEnter() + ON ENTER TbOnEnter( oWindow1 ) @ 70 , 40 BUTTON Button1 ; WIDTH 180 ; @@ -41,25 +39,21 @@ WIDTH 180 ; HEIGHT 28 ; CAPTION 'Win1:Text1:Value := "New!"' ; - ON CLICK Bt2OnClick() + ON CLICK Bt2OnClick( oWindow1 ) END WINDOW ACTIVATE WINDOW oWindow1 - HB_SYMBOL_UNUSED( Text1 ) - HB_SYMBOL_UNUSED( Button1 ) - HB_SYMBOL_UNUSED( Button2 ) - RETURN NIL -STATIC FUNCTION FrmOnInit() +STATIC FUNCTION FrmOnInit( oWindow1 ) oWindow1:Center() RETURN NIL -STATIC FUNCTION Bt2OnClick() +STATIC FUNCTION Bt2OnClick( oWindow1 ) MsgInfo( "Take a look to Text1" ) @@ -67,7 +61,7 @@ RETURN NIL -STATIC FUNCTION TbOnEnter() +STATIC FUNCTION TbOnEnter( oWindow1 ) MsgInfo( "Take a look to Text1" ) Modified: samples/textbox/demo_3.prg =================================================================== --- samples/textbox/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/textbox/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,11 +11,6 @@ FUNCTION Main - LOCAL oText1 - LOCAL oText2 - LOCAL oText3 - LOCAL oButton1 - LOCAL oButton2 LOCAL oWindow1 HbQt_ErrorSys() Modified: samples/textbox/demo_4.prg =================================================================== --- samples/textbox/demo_4.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/textbox/demo_4.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,32 +11,6 @@ FUNCTION Main - LOCAL oLabel1 - LOCAL oLabel2 - LOCAL oLabel3 - LOCAL oLabel4 - LOCAL oLabel5 - LOCAL oLabel6 - LOCAL oLabel7 - LOCAL oLabel8 - LOCAL oLabel9 - LOCAL oLabel1b - LOCAL oLabel2b - LOCAL oLabel3b - LOCAL oLabel4b - LOCAL oLabel5b - LOCAL oLabel6b - LOCAL oLabel7b - LOCAL oLabel9b - LOCAL oText1 - LOCAL oText2 - LOCAL oText3 - LOCAL oText4 - LOCAL oText5 - LOCAL oText6 - LOCAL oText7 - LOCAL oText8 - LOCAL oText9 LOCAL oWindow1 HbQt_ErrorSys() Modified: samples/textbox/demo_5.prg =================================================================== --- samples/textbox/demo_5.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/textbox/demo_5.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -11,32 +11,6 @@ FUNCTION Main - LOCAL oLabel1 - LOCAL oLabel2 - LOCAL oLabel3 - LOCAL oLabel4 - LOCAL oLabel5 - LOCAL oLabel6 - LOCAL oLabel7 - LOCAL oLabel8 - LOCAL oLabel9 - LOCAL oLabel1b - LOCAL oLabel2b - LOCAL oLabel3b - LOCAL oLabel4b - LOCAL oLabel5b - LOCAL oLabel6b - LOCAL oLabel7b - LOCAL oLabel9b - LOCAL oText1 - LOCAL oText2 - LOCAL oText3 - LOCAL oText4 - LOCAL oText5 - LOCAL oText6 - LOCAL oText7 - LOCAL oText8 - LOCAL oText9 LOCAL oWindow1 HbQt_ErrorSys() Modified: samples/timer/demo_3.prg =================================================================== --- samples/timer/demo_3.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/timer/demo_3.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,7 +12,6 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oLabel1 HbQt_ErrorSys() Modified: samples/timer/demo_4.prg =================================================================== --- samples/timer/demo_4.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/timer/demo_4.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -15,7 +15,7 @@ HbQt_ErrorSys() oMainForm:MyActivate() - + oMainForm := NIL hb_gcAll() @@ -85,4 +85,4 @@ ::oForm:Release() - RETURN NIL + RETURN Modified: samples/validator/demo_1.prg =================================================================== --- samples/validator/demo_1.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/validator/demo_1.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,7 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oTextBox LOCAL cValidator := "\d{0,3}:\d{0,3}:\d{0,3}:\d{0,3}" HbQt_ErrorSys() @@ -25,14 +24,14 @@ :Title := "Nice OOP Demo!!!" :OnInit := { || ( oWindow:Center() ) } - WITH OBJECT oLabel := Label():New() + WITH OBJECT Label():New() :Row := 20 :Col := 40 :Width := 210 :Caption := cValidator END WITH - WITH OBJECT oTextbox := TextBox():New() + WITH OBJECT TextBox():New() :Row := 70 :Col := 40 :Width := 210 Modified: samples/validator/validator.prg =================================================================== --- samples/validator/validator.prg 2011-12-09 18:24:19 UTC (rev 851) +++ samples/validator/validator.prg 2011-12-12 09:21:48 UTC (rev 852) @@ -12,9 +12,7 @@ FUNCTION Main LOCAL oWindow - LOCAL oTextBox - LOCAL oButton - LOCAL cValidator := "\d{0,3}:\d{0,3}:\d{0,3}:\d{0,3}" +// LOCAL cValidator := "\d{0,3}:\d{0,3}:\d{0,3}:\d{0,3}" HbQt_ErrorSys() @@ -27,7 +25,7 @@ :OnInit := { || ( oWindow:Center() ) } - WITH OBJECT oCombo1 := ComboBox():New() + WITH OBJECT ComboBox():New( "oCombo1" ) :row := 20 :Col := 20 @@ -35,27 +33,27 @@ :Items := { "positive integer 5 digits (99999)", "positive integer 5 digits (99999) force first digit != 0", "position in a archive (999:999:999:999)", "positive decimal (99999.99)", "A - Item 5" } :RelatedValues := { "(\d{0,5})", "([1-9]\d{0,4})", "\d{1,3}:\d{1,3}:\d{1,3}:\d{1,3}" , "\d{1,5}(\.\d{1,2})?" , "item 5" } :Value := 1 - :OnChange := { || oTextbox:Value := oCombo1:itemVal(oCombo1:Value) } + :OnChange := { || oWindow.oTextbox:Value := oWindow.oCombo1:itemVal(oWindow.oCombo1:Value) } END COMBOBOX - WITH OBJECT oLabel := Label():New() + WITH OBJECT Label():New() :Row := 70 :Col := 20 :Width := 210 END WITH - WITH OBJECT oTextbox := TextBox():New() + WITH OBJECT TextBox():New( "oTextbox" ) :Row := 100 :Col := 20 :Width := 510 :Value := "" END WITH - - WITH OBJECT oButton := Button():New() - :Row := 100; :Col := 570 + + WITH OBJECT Button():New() + :Row := 100; :Col := 570 :Caption := "Test !" - :onClick := {|| testRegExp( oTextbox:value ) } - END + :onClick := {|| testRegExp( oWindow.oTextbox:value ) } + END END WINDOW @@ -65,14 +63,14 @@ FUNCTION TestRegExp( cValue ) - LOCAL oWindow, oLabel, oTextbox + LOCAL oWindow WITH OBJECT oWindow := WINDOW():New() :Width := 200 :Height := 400 :Title := " Testing RegExp " - WITH OBJECT oLabel := LABEL():New() + WITH OBJECT LABEL():New() :row := 20 :col := 20 :width := 160 @@ -80,7 +78,7 @@ :caption := cValue END - WITH OBJECT oTextbox := TextBox():New() + WITH OBJECT TextBox():New() :Row := 200 :Col := 20 :Width := 160 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-09 18:24:25
|
Revision: 851 http://hmg.svn.sourceforge.net/hmg/?rev=851&view=rev Author: ricciz Date: 2011-12-09 18:24:19 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog source/dropdownmenu.prg Modified: Changelog =================================================================== --- Changelog 2011-12-09 14:51:19 UTC (rev 850) +++ Changelog 2011-12-09 18:24:19 UTC (rev 851) @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-09 19:25 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * source/dropdownmenu.prg + ! method ParentButton() reactivated + 2011-12-09 15:45 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + include/hmg_qtlocale.ch * samples/agoodstart/demo_1.prg @@ -39,6 +43,7 @@ * samples/lcd/demo_1.prg ! Fixed compiling warning messages. +>>>>>>> .r850 2011-12-09 15:30 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/hmgapp.prg + method :DecimalPoint() ( read only ) Modified: source/dropdownmenu.prg =================================================================== --- source/dropdownmenu.prg 2011-12-09 14:51:19 UTC (rev 850) +++ source/dropdownmenu.prg 2011-12-09 18:24:19 UTC (rev 851) @@ -44,7 +44,7 @@ // data: please preserve alphabetic order. DATA aItems INIT {} PROTECTED -// DATA oParentButton INIT NIL PROTECTED + DATA oParentButton INIT NIL PROTECTED // Methods: please preserve alphabetic order. Methods "New" and "Create" must be the first if present METHOD New @@ -84,7 +84,7 @@ /*.............................................................................. ParentButton ..............................................................................*/ -/*METHOD ParentButton( oValue ) CLASS DROPDOWNMENU +METHOD ParentButton( oValue ) CLASS DROPDOWNMENU IF Pcount() == 0 RETURN ::oParentButton @@ -93,4 +93,4 @@ ENDIF RETURN NIL -*/ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <l3...@us...> - 2011-12-09 14:51:31
|
Revision: 850 http://hmg.svn.sourceforge.net/hmg/?rev=850&view=rev Author: l3wonsf Date: 2011-12-09 14:51:19 +0000 (Fri, 09 Dec 2011) Log Message: ----------- 2011-12-09 15:45 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + include/hmg_qtlocale.ch * samples/agoodstart/demo_1.prg * I have rewrite QLocale definitions about language. This definitions are not included within hbqtcore.ch Modified Paths: -------------- Changelog samples/agoodstart/demo_1.prg Added Paths: ----------- include/hmg_qtlocale.ch Modified: Changelog =================================================================== --- Changelog 2011-12-09 14:40:16 UTC (rev 849) +++ Changelog 2011-12-09 14:51:19 UTC (rev 850) @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-09 15:45 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) + + include/hmg_qtlocale.ch + * samples/agoodstart/demo_1.prg + * I have rewrite QLocale definitions about language. This definitions are + not included within hbqtcore.ch + 2011-12-09 12:34 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) * samples/checkbutton/demo_2.prg * samples/checkbutton/demo_3.prg Added: include/hmg_qtlocale.ch =================================================================== --- include/hmg_qtlocale.ch (rev 0) +++ include/hmg_qtlocale.ch 2011-12-09 14:51:19 UTC (rev 850) @@ -0,0 +1,230 @@ +/* + * $Id$ + */ + +/* + language definition from http://doc.qt.nokia.com/latest/qlocale.html + note: this include file can be removed from hmg when and if HbQt hbqtcore.ch will be update + Today, 2011-12-09, hbqtcore.ch it contains only country code, not these languages definition. + */ + +#define QLocale_C 1 // The "C" locale is identical in behavior to English/UnitedStates. +#define QLocale_Abkhaziant 2 +#define QLocale_Afan 3 +#define QLocale_Afar 4 +#define QLocale_Afrikaans 5 +#define QLocale_Albanian 6 +#define QLocale_Amharic 7 +#define QLocale_Arabic 8 +#define QLocale_Armenian 9 +#define QLocale_Assamese 10 +#define QLocale_Aymara 11 +#define QLocale_Azerbaijani 12 +#define QLocale_Bashkir 13 +#define QLocale_Basque 14 +#define QLocale_Bengali 15 +#define QLocale_Bhutani 16 +#define QLocale_Bihari 17 +#define QLocale_Bislama 18 +// #define QLocale_Bosnian 142 see below +#define QLocale_Breton 19 +#define QLocale_Bulgarian 20 +#define QLocale_Burmese 21 +#define QLocale_Byelorussian 22 +#define QLocale_Cambodian 23 +#define QLocale_Catalan 24 +#define QLocale_Chinese 25 +// #define QLocale_Cornish 145 see below +#define QLocale_Corsican 26 +#define QLocale_Croatian 27 +#define QLocale_Czech 28 +#define QLocale_Danish 29 +// #define QLocale_Divehi 143 see below +#define QLocale_Dutch 30 +#define QLocale_English 31 +#define QLocale_Esperanto 32 +#define QLocale_Estonian 33 +#define QLocale_Faroese 34 +#define QLocale_FijiLanguage 35 +#define QLocale_Finnish 36 +#define QLocale_French 37 +#define QLocale_Frisian 38 +#define QLocale_Gaelic 39 +#define QLocale_Galician 40 +#define QLocale_Georgian 41 +#define QLocale_German 42 +#define QLocale_Greek 43 +#define QLocale_Greenlandic 44 +#define QLocale_Guarani 45 +#define QLocale_Gujarati 46 +#define QLocale_Hausa 47 +#define QLocale_Hebrew 48 +#define QLocale_Hindi 49 +#define QLocale_Hungarian 50 +#define QLocale_Icelandic 51 +#define QLocale_Indonesian 52 +#define QLocale_Interlingua 53 +#define QLocale_Interlingue 54 +#define QLocale_Inuktitut 55 +#define QLocale_Inupiak 56 +#define QLocale_Irish 57 +#define QLocale_Italian 58 +#define QLocale_Japanese 59 +#define QLocale_Javanese 60 +#define QLocale_Kannada 61 +#define QLocale_Kashmiri 62 +#define QLocale_Kazakh 63 +#define QLocale_Kinyarwanda 64 +#define QLocale_Kirghiz 65 +#define QLocale_Korean 66 +#define QLocale_Kurdish 67 +#define QLocale_Kurundi 68 +#define QLocale_Laothian 69 +#define QLocale_Latin 70 +#define QLocale_Latvian 71 +#define QLocale_Lingala 72 +#define QLocale_Lithuanian 73 +#define QLocale_Macedonian 74 +#define QLocale_Malagasy 75 +#define QLocale_Malay 76 +#define QLocale_Malayalam 77 +#define QLocale_Maltese 78 +// #define QLocale_Manx 144 see below +#define QLocale_Maori 79 +#define QLocale_Marathi 80 +#define QLocale_Moldavian 81 +#define QLocale_Mongolian 82 +#define QLocale_NauruLanguage 83 +#define QLocale_Nepali 84 +#define QLocale_Norwegian 85 +#define QLocale_NorwegianBokmal Norwegian +#define QLocale_Nynorsk NorwegianNynorsk // Obsolete, please use NorwegianNynorsk +#define QLocale_NorwegianNynorsk 141 +#define QLocale_Occitan 86 +#define QLocale_Oriya 87 +#define QLocale_Pashto 88 +#define QLocale_Persian 89 +#define QLocale_Polish 90 +#define QLocale_Portuguese 91 +#define QLocale_Punjabi 92 +#define QLocale_Quechua 93 +#define QLocale_RhaetoRomance 94 +#define QLocale_Romanian 95 +#define QLocale_Russian 96 +#define QLocale_Samoan 97 +#define QLocale_Sangho 98 +#define QLocale_Sanskrit 99 +#define QLocale_Serbian 100 +#define QLocale_SerboCroatian 101 +#define QLocale_Sesotho 102 +#define QLocale_Setswana 103 +#define QLocale_Shona 104 +#define QLocale_Sindhi 105 +#define QLocale_Singhalese 106 +#define QLocale_Siswati 107 +#define QLocale_Slovak 108 +#define QLocale_Slovenian 109 +#define QLocale_Somali 110 +#define QLocale_Spanish 111 +#define QLocale_Sundanese 112 +#define QLocale_Swahili 113 +#define QLocale_Swedish 114 +#define QLocale_Tagalog 115 +#define QLocale_Tajik 116 +#define QLocale_Tamil 117 +#define QLocale_Tatar 118 +#define QLocale_Telugu 119 +#define QLocale_Thai 120 +#define QLocale_Tibetan 121 +#define QLocale_Tigrinya 122 +#define QLocale_TongaLanguage 123 +#define QLocale_Tsonga 124 +#define QLocale_Turkish 125 +#define QLocale_Turkmen 126 +#define QLocale_Twi 127 +#define QLocale_Uigur 128 +#define QLocale_Ukrainian 129 +#define QLocale_Urdu 130 +#define QLocale_Uzbek 131 +#define QLocale_Vietnamese 132 +#define QLocale_Volapuk 133 +#define QLocale_Welsh 134 +#define QLocale_Wolof 135 +#define QLocale_Xhosa 136 +#define QLocale_Yiddish 137 +#define QLocale_Yoruba 138 +#define QLocale_Zhuang 139 +#define QLocale_Zulu 140 +#define QLocale_Bosnian 142 +#define QLocale_Divehi 143 +#define QLocale_Manx 144 +#define QLocale_Cornish 145 +#define QLocale_Akan 146 +#define QLocale_Konkani 147 +#define QLocale_Ga 148 +#define QLocale_Igbo 149 +#define QLocale_Kamba 150 +#define QLocale_Syriac 151 +#define QLocale_Blin 152 +#define QLocale_Geez 153 +#define QLocale_Koro 154 +#define QLocale_Sidamo 155 +#define QLocale_Atsam 156 +#define QLocale_Tigre 157 +#define QLocale_Jju 158 +#define QLocale_Friulian 159 +#define QLocale_Venda 160 +#define QLocale_Ewe 161 +#define QLocale_Walamo 162 +#define QLocale_Hawaiian 163 +#define QLocale_Tyap 164 +#define QLocale_Chewa 165 +#define QLocale_Filipino 166 +#define QLocale_SwissGerman 167 +#define QLocale_SichuanYi 168 +#define QLocale_Kpelle 169 +#define QLocale_LowGerman 170 +#define QLocale_SouthNdebele 171 +#define QLocale_NorthernSotho 172 +#define QLocale_NorthernSami 173 +#define QLocale_Taroko 174 +#define QLocale_Gusii 175 +#define QLocale_Taita 176 +#define QLocale_Fulah 177 +#define QLocale_Kikuyu 178 +#define QLocale_Samburu 179 +#define QLocale_Sena 180 +#define QLocale_NorthNdebele 181 +#define QLocale_Rombo 182 +#define QLocale_Tachelhit 183 +#define QLocale_Kabyle 184 +#define QLocale_Nyankole 185 +#define QLocale_Bena 186 +#define QLocale_Vunjo 187 +#define QLocale_Bambara 188 +#define QLocale_Embu 189 +#define QLocale_Cherokee 190 +#define QLocale_Morisyen 191 +#define QLocale_Makonde 192 +#define QLocale_Langi 193 +#define QLocale_Ganda 194 +#define QLocale_Bemba 195 +#define QLocale_Kabuverdianu 196 +#define QLocale_Meru 197 +#define QLocale_Kalenjin 198 +#define QLocale_Nama 199 +#define QLocale_Machame 200 +#define QLocale_Colognian 201 +#define QLocale_Masai 202 +#define QLocale_Soga 203 +#define QLocale_Luyia 204 +#define QLocale_Asu 205 +#define QLocale_Teso 206 +#define QLocale_Saho 207 +#define QLocale_KoyraChiini 108 +#define QLocale_Rwa 209 +#define QLocale_Luo 210 +#define QLocale_Chiga 211 +#define QLocale_CentralMoroccoTamazight 212 +#define QLocale_KoyraboroSenni 213 +#define QLocale_Shambala 214 Property changes on: include/hmg_qtlocale.ch ___________________________________________________________________ Added: svn:keywords + Author Id Date Revision Added: svn:eol-style + native Modified: samples/agoodstart/demo_1.prg =================================================================== --- samples/agoodstart/demo_1.prg 2011-12-09 14:40:16 UTC (rev 849) +++ samples/agoodstart/demo_1.prg 2011-12-09 14:51:19 UTC (rev 850) @@ -8,6 +8,7 @@ */ #include "hmg.ch" +#include "hbqtcore.ch" #include "hmg_qtlocale.ch" FUNCTION Main This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-09 14:40:22
|
Revision: 849 http://hmg.svn.sourceforge.net/hmg/?rev=849&view=rev Author: concentra Date: 2011-12-09 14:40:16 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog Modified: Changelog =================================================================== --- Changelog 2011-12-09 14:37:59 UTC (rev 848) +++ Changelog 2011-12-09 14:40:16 UTC (rev 849) @@ -17,9 +17,6 @@ */ 2011-12-09 12:34 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) - * samples/agoodstart/demo_1.prg - * samples/agoodstart/demo_2.prg - * samples/agoodstart/demo_3.prg * samples/checkbutton/demo_2.prg * samples/checkbutton/demo_3.prg * samples/datepick/demo_2.prg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-09 14:38:10
|
Revision: 848 http://hmg.svn.sourceforge.net/hmg/?rev=848&view=rev Author: concentra Date: 2011-12-09 14:37:59 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/checkbutton/demo_2.prg samples/checkbutton/demo_3.prg samples/datepick/demo_2.prg samples/datepick/demo_3.prg samples/dialogs/demo_1.prg samples/editbox/demo_2.prg samples/editbox/demo_3.prg samples/frame/demo_2.prg samples/graph/demo_4.prg samples/grid/demo_2.prg samples/grid/demo_3.prg samples/grid/demo_4.prg samples/hardvalid/demo_1.prg samples/lcd/demo_1.prg Modified: Changelog =================================================================== --- Changelog 2011-12-09 14:28:12 UTC (rev 847) +++ Changelog 2011-12-09 14:37:59 UTC (rev 848) @@ -16,6 +16,26 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-09 12:34 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + * samples/agoodstart/demo_1.prg + * samples/agoodstart/demo_2.prg + * samples/agoodstart/demo_3.prg + * samples/checkbutton/demo_2.prg + * samples/checkbutton/demo_3.prg + * samples/datepick/demo_2.prg + * samples/datepick/demo_3.prg + * samples/dialogs/demo_1.prg + * samples/editbox/demo_2.prg + * samples/editbox/demo_3.prg + * samples/frame/demo_2.prg + * samples/graph/demo_4.prg + * samples/grid/demo_2.prg + * samples/grid/demo_3.prg + * samples/grid/demo_4.prg + * samples/hardvalid/demo_1.prg + * samples/lcd/demo_1.prg + ! Fixed compiling warning messages. + 2011-12-09 15:30 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/hmgapp.prg + method :DecimalPoint() ( read only ) Modified: samples/checkbutton/demo_2.prg =================================================================== --- samples/checkbutton/demo_2.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/checkbutton/demo_2.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -13,9 +13,6 @@ FUNCTION Main - LOCAL checkbutton1 - LOCAL checkbutton2 - PRIVATE oWindow1 HbQt_ErrorSys() Modified: samples/checkbutton/demo_3.prg =================================================================== --- samples/checkbutton/demo_3.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/checkbutton/demo_3.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -13,9 +13,6 @@ FUNCTION Main - LOCAL checkbutton1 - LOCAL checkbutton2 - PRIVATE oWindow1 HbQt_ErrorSys() Modified: samples/datepick/demo_2.prg =================================================================== --- samples/datepick/demo_2.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/datepick/demo_2.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,15 +12,12 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oLabel1 - LOCAL oDatePicker1 - LOCAL oDatePicker2 HbQt_ErrorSys() - DEFINE MAINWINDOW oWindow1; - At 10,10; - Width 400; + DEFINE MAINWINDOW oWindow1 + At 10,10 + Width 400 Height 400 Title "Nice OOP Demo!!!" OnInit oWindow1:Center() Modified: samples/datepick/demo_3.prg =================================================================== --- samples/datepick/demo_3.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/datepick/demo_3.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,16 +12,12 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oLabel1 - LOCAL oDatePicker1 - LOCAL oDatePicker2 - LOCAL oButton1 HbQt_ErrorSys() - DEFINE MAINWINDOW oWindow1; - At 10,10; - Width 400; + DEFINE MAINWINDOW oWindow1 + At 10,10 + Width 400 Height 400 Title "Nice OOP Demo!!!" OnInit oWindow1:Center() Modified: samples/dialogs/demo_1.prg =================================================================== --- samples/dialogs/demo_1.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/dialogs/demo_1.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -14,8 +14,6 @@ FUNCTION Main - LOCAL oEdit1 - HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 Modified: samples/editbox/demo_2.prg =================================================================== --- samples/editbox/demo_2.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/editbox/demo_2.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,9 +12,6 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oEditBox1 - LOCAL oButton1 - LOCAL oButton2 HbQt_ErrorSys() Modified: samples/editbox/demo_3.prg =================================================================== --- samples/editbox/demo_3.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/editbox/demo_3.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,9 +12,6 @@ FUNCTION Main LOCAL oWindow1 - LOCAL oEditBox1 - LOCAL oButton1 - LOCAL oButton2 HbQt_ErrorSys() Modified: samples/frame/demo_2.prg =================================================================== --- samples/frame/demo_2.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/frame/demo_2.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,11 +12,6 @@ FUNCTION Main LOCAL oWindow - LOCAL oFrame - LOCAL oFrame1 - LOCAL oFrame2 - LOCAL oFrame3 - LOCAL oButton1 HbQt_ErrorSys() Modified: samples/graph/demo_4.prg =================================================================== --- samples/graph/demo_4.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/graph/demo_4.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -13,8 +13,6 @@ FUNCTION Main - LOCAL oButton1 - PRIVATE oWindow HbQt_ErrorSys() Modified: samples/grid/demo_2.prg =================================================================== --- samples/grid/demo_2.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/grid/demo_2.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -14,7 +14,6 @@ FUNCTION Main LOCAL aRows [10] [3] - LOCAL oGrid PRIVATE oWindow Modified: samples/grid/demo_3.prg =================================================================== --- samples/grid/demo_3.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/grid/demo_3.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -17,8 +17,6 @@ LOCAL bColor := { || IF ( oWindow.oGrid.CellRowIndex/2 == INT( oWindow.oGrid.CellRowIndex/2 ) , { 222,222,222 } , { 255,255,255 } ) } LOCAL fColor := { || IF ( oWindow.oGrid.CellRowIndex/2 == INT( oWindow.oGrid.CellRowIndex/2 ) , { 255,0,0 } , { 0,0,255 } ) } - LOCAL oGrid - PRIVATE oWindow HbQt_ErrorSys() Modified: samples/grid/demo_4.prg =================================================================== --- samples/grid/demo_4.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/grid/demo_4.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -78,21 +78,21 @@ END WITH OBJECT oCopy1 := Button():New() - :Row := 290 - :Col := 250 - :Width := 100 - :Caption := 'Copy left' - :OnClick := { || copytomoney( oMoney:Value, oGrid1 ) } + oCopy1:Row := 290 + oCopy1:Col := 250 + oCopy1:Width := 100 + oCopy1:Caption := 'Copy left' + oCopy1:OnClick := { || copytomoney( oMoney:Value, oGrid1 ) } END WITH @ 350,250 TEXTBOX oMoney INPUTMASK "999.99" NUMERIC WITH OBJECT oCopy2 := Button():New() - :Row := 410 - :Col := 250 - :Width := 100 - :Caption := 'Copy right' - :OnClick := { || copytomoney( oMoney:Value, oGrid2 ) } + oCopy2:Row := 410 + oCopy2:Col := 250 + oCopy2:Width := 100 + oCopy2:Caption := 'Copy right' + oCopy2:OnClick := { || copytomoney( oMoney:Value, oGrid2 ) } END WITH oMoney:Value( 0 ) Modified: samples/hardvalid/demo_1.prg =================================================================== --- samples/hardvalid/demo_1.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/hardvalid/demo_1.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -12,57 +12,65 @@ FUNCTION Main + Local cMessage := "You have to type <b>PIPPO</b> in the <i>First Name</i> field<br>to go ahead. PIPPO is italian name for Goofy<br>(Mickey Mouse friend) and it is the<br><i>standard name</i> for a variable when<br>you start learning a new computer language :-)<br><br>" + Local oWindow + Local oTextBox1 + Local oTextBox2 + Local oTextBox3 + Local oTextBox4 + Local oTextBox5 + Local oQtWidget + Local oQtLayout + hbqt_errorsys() - m := "You have to type <b>PIPPO</b> in the <i>First Name</i> field<br>to go ahead. PIPPO is italian name for Goofy<br>(Mickey Mouse friend) and it is the<br><i>standard name</i> for a variable when<br>you start learning a new computer language :-)<br><br>" + msgInfo( "This is a demo of HARD VALID Textbox.<br>HARD VALIDs are the porting of Clipper VALIDs,<br>you can't leave the field until VALID codeblock returns TRUE.<br><br>I think this is against GUI workings but I was asked<br>for this feature to ease porting<br>of current harbour text-mode applications.<br><br>" + cMessage + "Enjoy!" ) - msgInfo( "This is a demo of HARD VALID Textbox.<br>HARD VALIDs are the porting of Clipper VALIDs,<br>you can't leave the field until VALID codeblock returns TRUE.<br><br>I think this is against GUI workings but I was asked<br>for this feature to ease porting<br>of current harbour text-mode applications.<br><br>" + m + "Enjoy!" ) - Define Window oWindow ; At 20, 10 ; Width 400 ; Height 550 ; Title 'HARD VALID test'; Main ; - On Init { || oWindow:center() } - - qW := Widget():New() + On Init { || oWindow:center() } - With Object o1 := textbox():New() + oQtWidget := Widget():New() + + With Object oTextBox1 := textbox():New() :Value := 'this is a textbox' End With - With Object o2 := textbox():New() + With Object oTextBox2 := textbox():New() :Value := 'must be PIPPO' - :onValid := {|| o2:value == "PIPPO" } + :onValid := {|| oTextBox2:value == "PIPPO" } :tooltip := "You must enter <b>PIPPO</b> to move from this textbox" End With - With Object o3 := textbox():New() + With Object oTextBox3 := textbox():New() :value := "ciao/hello" End With - - With Object o4 := TEXTBOX():New() - :Value := " " + + With Object oTextBox4 := TEXTBOX():New() + :Value := " " end - With Object o5 := TEXTBOX():New() - :Value := " " + With Object oTextBox5 := TEXTBOX():New() + :Value := " " end - qL := QFormLayout() - qL:addRow( "Last Name:", o1:QTObject ) - qL:addRow( "First Name:", o2:QTObject ) - qL:addRow( "Birth Day:", o3:QTObject ) - qL:addRow( "Text 1:", o4:QTObject ) - qL:addRow( "Text 2:", o5:QTObject ) + oQtLayout := QFormLayout() + oQtLayout:addRow( "Last Name:", oTextBox1:QTObject ) + oQtLayout:addRow( "First Name:", oTextBox2:QTObject ) + oQtLayout:addRow( "Birth Day:", oTextBox3:QTObject ) + oQtLayout:addRow( "Text 1:", oTextBox4:QTObject ) + oQtLayout:addRow( "Text 2:", oTextBox5:QTObject ) - qW:QTObject:setLayout( qL ) - qW:CentralWidgetOf( oWindow ) + oQtWidget:QTObject:setLayout( oQtLayout ) + oQtWidget:CentralWidgetOf( oWindow ) End Window Activate Window oWindow - Return + Return nil Modified: samples/lcd/demo_1.prg =================================================================== --- samples/lcd/demo_1.prg 2011-12-09 14:28:12 UTC (rev 847) +++ samples/lcd/demo_1.prg 2011-12-09 14:37:59 UTC (rev 848) @@ -56,7 +56,7 @@ Height 20 Value .T. Caption 'Visible' - OnChange { || Win_1:Lcd_1:Visible := !Win_1:Lcd_1:Visible ) } + OnChange { || Win_1:Lcd_1:Visible := !Win_1:Lcd_1:Visible } End CheckBox This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-09 14:28:18
|
Revision: 847 http://hmg.svn.sourceforge.net/hmg/?rev=847&view=rev Author: ricciz Date: 2011-12-09 14:28:12 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog source/hmgapp.prg Modified: Changelog =================================================================== --- Changelog 2011-12-09 10:48:18 UTC (rev 846) +++ Changelog 2011-12-09 14:28:12 UTC (rev 847) @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-09 15:30 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * source/hmgapp.prg + + method :DecimalPoint() ( read only ) + 2011-12-09 08:48 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) ! samples/checkbox/demo_2.prg ! samples/checkbox/demo_3.prg Modified: source/hmgapp.prg =================================================================== --- source/hmgapp.prg 2011-12-09 10:48:18 UTC (rev 846) +++ source/hmgapp.prg 2011-12-09 14:28:12 UTC (rev 847) @@ -79,6 +79,7 @@ METHOD New METHOD Country SETGET METHOD CurrQtWin + METHOD DecimalPoint METHOD DefaultFont SETGET METHOD DefaultFontName SETGET METHOD DefaultFontSize SETGET @@ -155,9 +156,17 @@ CurrQtWin ..............................................................................*/ METHOD CurrQtWin() CLASS HMG_HMGAPP + RETURN ::s_oQtApp:activeWindow() /*.............................................................................. + DecimalPoint +..............................................................................*/ +METHOD DecimalPoint() + +RETURN IF( ::s_lQtStarted, CHR( ::oQtLocale:decimalPoint():ToLatin1() ), "" ) + +/*.............................................................................. DefaultFont ..............................................................................*/ METHOD DefaultFont( oQtFont ) CLASS HMG_HMGAPP @@ -545,7 +554,7 @@ ::oQtLocale := QLocale( ::nLanguage, ::nCountry ) ::oQtLocale:setDefault( QLocale( ::nLanguage, ::nCountry ) ) ENDIF - + // translator ::oQtTranslator := QTranslator() // from http://doc.qt.nokia.com/latest/qlocale.html#name This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-09 10:48:28
|
Revision: 846 http://hmg.svn.sourceforge.net/hmg/?rev=846&view=rev Author: concentra Date: 2011-12-09 10:48:18 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/checkbox/demo_2.prg samples/checkbox/demo_3.prg Modified: Changelog =================================================================== --- Changelog 2011-12-08 18:18:03 UTC (rev 845) +++ Changelog 2011-12-09 10:48:18 UTC (rev 846) @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-09 08:48 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + ! samples/checkbox/demo_2.prg + ! samples/checkbox/demo_3.prg + ! Fixed compiling warning messages. + 2011-12-08 19:15 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/editbox.prg ! now value() accept memo data again Modified: samples/checkbox/demo_2.prg =================================================================== --- samples/checkbox/demo_2.prg 2011-12-08 18:18:03 UTC (rev 845) +++ samples/checkbox/demo_2.prg 2011-12-09 10:48:18 UTC (rev 846) @@ -13,12 +13,6 @@ FUNCTION Main - LOCAL Label1 - LOCAL CheckBox1 - LOCAL CheckBox2 - LOCAL CheckBox3 - LOCAL Button1 - HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 Modified: samples/checkbox/demo_3.prg =================================================================== --- samples/checkbox/demo_3.prg 2011-12-08 18:18:03 UTC (rev 845) +++ samples/checkbox/demo_3.prg 2011-12-09 10:48:18 UTC (rev 846) @@ -13,12 +13,6 @@ FUNCTION Main - LOCAL Label1 - LOCAL Check1 - LOCAL Check2 - LOCAL Check3 - LOCAL Button1 - HbQt_ErrorSys() DEFINE MAINWINDOW oWindow1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-08 18:18:12
|
Revision: 845 http://hmg.svn.sourceforge.net/hmg/?rev=845&view=rev Author: ricciz Date: 2011-12-08 18:18:03 +0000 (Thu, 08 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog source/editbox.prg Modified: Changelog =================================================================== --- Changelog 2011-12-08 18:01:03 UTC (rev 844) +++ Changelog 2011-12-08 18:18:03 UTC (rev 845) @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-08 19:15 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * source/editbox.prg + ! now value() accept memo data again + 2011-12-08 19:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/printer.prg ! some minor changes Modified: source/editbox.prg =================================================================== --- source/editbox.prg 2011-12-08 18:01:03 UTC (rev 844) +++ source/editbox.prg 2011-12-08 18:18:03 UTC (rev 845) @@ -100,7 +100,7 @@ IF Pcount() == 0 RETURN ::oQTObject:toPlainText() - ELSEIF Pcount() == 1 .AND. hb_IsChar( cValue ) + ELSEIF Pcount() == 1 .AND. ( hb_IsChar( cValue ) .OR. hb_IsMemo( cValue ) ) ::oQTObject:setPlainText( cValue ) ::cValue := cValue ENDIF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ri...@us...> - 2011-12-08 18:01:12
|
Revision: 844 http://hmg.svn.sourceforge.net/hmg/?rev=844&view=rev Author: ricciz Date: 2011-12-08 18:01:03 +0000 (Thu, 08 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog source/printer.prg Added Paths: ----------- samples/print/demo_9.prg Modified: Changelog =================================================================== --- Changelog 2011-12-07 19:05:29 UTC (rev 843) +++ Changelog 2011-12-08 18:01:03 UTC (rev 844) @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-08 19:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) + * source/printer.prg + ! some minor changes + + samples/print/demo_9.prg + ! direct HTML printing demo + 2011-12-07 17:02 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) ! samples/agenda/agenda.prg ! Translated to english. Fixed compiling messages. Added: samples/print/demo_9.prg =================================================================== --- samples/print/demo_9.prg (rev 0) +++ samples/print/demo_9.prg 2011-12-08 18:01:03 UTC (rev 844) @@ -0,0 +1,59 @@ +/* + * $Id: demo_3.prg 760 2011-10-21 12:01:51Z l3wonsf $ +*/ + +/* + * HMG 4 demo +*/ + +#include "hmg.ch" +#include "hbqtgui.ch" + +FUNCTION Main() + + LOCAL oWindow + + HbQt_ErrorSys() + + With Object oWindow := MAINWINDOW():New( "oWindow" ) + :Row := 10 + :Col := 10 + :Width := 200 + :Height := 200 + :Title := "HMG4 HTML printing demo" + :OnInit := {|| oWindow:Center()} + + With Object BUTTON():New("Button1") + :Row := 80 + :Col := 60 + :Caption := "Print!" + :OnClick := {|| Button1Click()} + end + + :EndWindow() + end + + oWindow:Activate() + + RETURN NIL + +/*----------------------------------------------------------------------*/ + +FUNCTION Button1Click() + + LOCAL oPrinter := QPrinter() + LOCAL oPrintDialog + LOCAL odocument := QTextDocument() + + oPrintDialog := QPrintDialog( oPrinter ) + + IF oPrintDialog:exec() == QDialog_Accepted + oDocument:setHtml( "This is standard text.<br />" + ; + "<b>This is bold text.</b><br />" + ; + "<span style='font : 14px/18px Arial, Helvetica, sans-serif;'>This Text is in Arial 14 point.</span><br />" + ; + "<span style='font : 20px/25px " + '"' + "Times New Roman" + '"' + ", Times, serif;'>This Text is in Times 20 point.</span><br />" ) + + oDocument:print( oPrinter ) + ENDIF + +RETURN NIL Modified: source/printer.prg =================================================================== --- source/printer.prg 2011-12-07 19:05:29 UTC (rev 843) +++ source/printer.prg 2011-12-08 18:01:03 UTC (rev 844) @@ -232,8 +232,8 @@ METHOD PaintRequested( ) CLASS PRINTER LOCAL nLogicalWidth, nLogicalHeight, nPhysicalWidth, nPhysicalHeight - LOCAL nFontSize, nToRow, nToCol, nAlignment, qRectF, qTextOption - LOCAL qPen, nPenWidth, lFilled, lRounded + LOCAL nFontSize, nToRow, nToCol, nAlignment, oRectF, oTextOption + LOCAL oPen, nPenWidth, lFilled, lRounded LOCAL cImage, nWidth, nHeight, lStretch LOCAL i LOCAL nRow @@ -247,14 +247,11 @@ LOCAL aColor LOCAL lFirst LOCAL oImg - LOCAL oPen LOCAL oSize LOCAL oPainter, oQtFont lFirst := .T. -// ::SetQPrinterProperties() - // Create oSizeF to retrieve dimensions in milimeters oSize := ::oPrinter:PaperSize( 0 ) // can be regression nLogicalWidth := oSize:width() @@ -319,16 +316,16 @@ oPainter:SetFont( oQtFont ) IF hb_IsNumeric( nToRow ) .AND. hb_IsNumeric( nToCol ) - QRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) - QTextOption := QTextOption() + oRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) + oTextOption := QTextOption() IF hb_IsNumeric( nAlignment ) - QTextOption:setAlignment( nAlignment ) + oTextOption:setAlignment( nAlignment ) ELSE - QTextOption:setAlignment( 0 ) + oTextOption:setAlignment( 0 ) ENDIF - oPainter:drawText( QRectF , cData , QTextOption ) + oPainter:drawText( oRectF , cData , oTextOption ) ELSEIF VALTYPE( nToRow ) = 'U' .AND. VALTYPE( nToCol ) = 'U' IF VALTYPE( nAlignment ) = 'U' @@ -341,10 +338,10 @@ nRow := nToRow - nFontSize nCol := nToCol - nLogicalWidth - QRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) - QTextOption := QTextOption() - QTextOption:setAlignment( 2 ) - oPainter:drawText( QRectF , cData , QTextOption ) + oRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) + oTextOption := QTextOption() + oTextOption:setAlignment( 2 ) + oPainter:drawText( oRectF , cData , oTextOption ) ELSEIF nAlignment == 4 // center nToRow := nRow + nFontSize @@ -353,10 +350,10 @@ nRow := nToRow - nFontSize nCol := nCol - nLogicalWidth - QRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) - QTextOption := QTextOption() - QTextOption:setAlignment( 4 ) - oPainter:drawText( QRectF , cData , QTextOption ) + oRectF := QRectF( nCol , nRow , nToCol - nCol , nToRow - nRow ) + oTextOption := QTextOption() + oTextOption:setAlignment( 4 ) + oPainter:drawText( oRectF , cData , oTextOption ) ENDIF ENDIF ENDIF @@ -371,16 +368,16 @@ // Process Pen IF VALTYPE( aColor ) != 'U' .or. VALTYPE( nPenWidth ) != 'U' - qPen := QPen() + oPen := QPen() ENDIF IF hb_IsArray( aColor ) - qPen:SetColor( QColor( aColor [1] , aColor [2] , aColor [3] ) ) + oPen:SetColor( QColor( aColor [1] , aColor [2] , aColor [3] ) ) ENDIF IF hb_IsNumeric( nPenWidth ) - qPen:SetWidth( nPenWidth ) + oPen:SetWidth( nPenWidth ) ENDIF IF VALTYPE( aColor ) != 'U' .or. VALTYPE( nPenWidth ) != 'U' - oPainter:setPen( qPen ) + oPainter:setPen( oPen ) ENDIF oPainter:drawLine( nCol , nRow , nToCol , nToRow ) @@ -397,16 +394,16 @@ // Process Pen IF VALTYPE( aColor ) != 'U' .or. VALTYPE( nPenWidth ) != 'U' - qPen := QPen() + oPen := QPen() ENDIF IF hb_IsArray( aColor ) - qPen:SetColor( QColor( aColor [1] , aColor [2] , aColor [3] ) ) + oPen:SetColor( QColor( aColor [1] , aColor [2] , aColor [3] ) ) ENDIF IF hb_IsNumeric( nPenWidth ) - qPen:SetWidth( nPenWidth ) + oPen:SetWidth( nPenWidth ) ENDIF IF VALTYPE( aColor ) != 'U' .or. VALTYPE( nPenWidth ) != 'U' - oPainter:setPen( qPen ) + oPainter:setPen( oPen ) ENDIF // Process rounded @@ -560,24 +557,10 @@ RETURN .F. ENDIF - oPrintDialog := QPrintDialog( ::oPrinter ) // ::oPrintDialog has to be a Class DATA !!! + oPrintDialog := QPrintDialog( ::oPrinter ) IF oPrintDialog:exec() == QDialog_Accepted - /* would be nice to get the properties from printer itself - but Qt didn\xB4t support it - // set the default printer properties from printer object - ::Collate( ::oPrinter:collateCopies() ) - ::Color( ::oPrinter:colorMode() ) // 1 = color, 0 = greyscale - //::Copies( ::oPrinter:copyCount() ) // not supported by Harbour ? - ::DefaultSource( ::oPrinter:paperSource() ) - ::Duplex( ::oPrinter:duplex() ) - ::Orientation( ::oPrinter:orientation() ) - ::PaperSize( ::oPrinter:paperSize () ) // set Paperlength and -width too */ - - * FOR HMG backwards compatibility - * A dirty job... but someone has to DO it ; ) - __MVPUBLIC( '_HMG_CURRENTPRINTERNAME' ) __MVPUT( '_HMG_CURRENTPRINTERNAME', '_DIALOG_' ) __MVPUBLIC( '_HMG_CURRENTPAPERSIZE' ) @@ -904,52 +887,52 @@ ..............................................................................*/ FUNCTION GetPrintableAreaWidth() - LOCAL oQRectf , oQPrinter + LOCAL oRectF , oQPrinter oQPrinter := CreatePrinter() - oQRectf := oQPrinter:pageRect( 0 ) + oRectF := oQPrinter:pageRect( 0 ) - RETURN oQRectf:width() + RETURN oRectF:width() /*.............................................................................. GetPrintableAreaHeight ..............................................................................*/ FUNCTION GetPrintableAreaHeight() - LOCAL oQRectf , oQPrinter + LOCAL oRectF , oQPrinter oQPrinter := CreatePrinter() - oQRectf := oQPrinter:pagerect( 0 ) + oRectF := oQPrinter:pagerect( 0 ) - RETURN oQRectf:height() + RETURN oRectF:height() /*.............................................................................. GetPaperWidth ..............................................................................*/ FUNCTION GetPaperWidth() - LOCAL oQRectf , oQPrinter + LOCAL oRectF , oQPrinter oQPrinter := CreatePrinter() - oQRectf := oQPrinter:paperRect( 0 ) + oRectF := oQPrinter:paperRect( 0 ) - RETURN oQRectf:width() + RETURN oRectF:width() /*.............................................................................. GetPaperHeight ..............................................................................*/ FUNCTION GetPaperHeight() - LOCAL oQRectf , oQPrinter + LOCAL oRectF , oQPrinter oQPrinter := CreatePrinter() - oQRectf := oQPrinter:paperRect( 0 ) + oRectF := oQPrinter:paperRect( 0 ) - RETURN oQRectf:height() + RETURN oRectF:height() /*.............................................................................. GetPrintableAreaHorizontalOffset This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <con...@us...> - 2011-12-07 19:05:37
|
Revision: 843 http://hmg.svn.sourceforge.net/hmg/?rev=843&view=rev Author: concentra Date: 2011-12-07 19:05:29 +0000 (Wed, 07 Dec 2011) Log Message: ----------- Modified Paths: -------------- Changelog samples/agenda/agenda.prg samples/agenda/agenda.qrc samples/agenda/agenda.rc samples/agenda/build.bat Added Paths: ----------- samples/agenda/ABook.dbf samples/agenda/images/hmg4.gif Removed Paths: ------------- samples/agenda/agenda.dbf Modified: Changelog =================================================================== --- Changelog 2011-12-07 10:51:41 UTC (rev 842) +++ Changelog 2011-12-07 19:05:29 UTC (rev 843) @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-12-07 17:02 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>) + ! samples/agenda/agenda.prg + ! Translated to english. Fixed compiling messages. + 2011-12-07 11:50 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/printer.prg ! printer class rebuild for getting it working correct @@ -29,7 +33,7 @@ 2011-12-05 01:28 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) + samples/validator/validator.prg - + it's a basic program to test and compare different Validator + + it's a basic program to test and compare different Validator expression. In the combobox select the RegExp you want to test and modify them to experiment. Press button to open a non-modal window that will permit to actively compare multiple RegExp. @@ -60,11 +64,11 @@ + Implemented HARD VALID (clones of harbour GET VALID) Please read the message on the developers forum + samples/hardvalid/demo_1.prg - * first OOP sample + * first OOP sample 2011-11-30 22:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/abstractbutton.prg - - method Flat() + - method Flat() ! already defined in his parent * source/button.prg * source/toolbutton.prg @@ -74,7 +78,7 @@ 2011-11-30 17:05 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/animatebox.prg - - deleted method Center + - deleted method Center * include/hmg.ch ! [:Alignment := if ( <.lCenter.> , LBL_CENTER, LBL_LEFT ) ];; in #command ANIMATEBOX for HMG3 compatibility. @@ -82,8 +86,8 @@ 2011-11-30 11:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) * source/bitmap.prg + EmptyColor( aArg1 ) method where aArg1 is an array of RGB colors or an - empty array (by default empty array). When bitmap fails to load the - image, if EmptyColor has a valid array of RGB colors, a colored image + empty array (by default empty array). When bitmap fails to load the + image, if EmptyColor has a valid array of RGB colors, a colored image will be created. 2011-11-29 08:40 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) @@ -127,15 +131,15 @@ + added methods Rangemin() and Rangemax() ! now the control is working is it should, see samples/progressbar/demo_x -2011-11-28 12:30 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-28 12:30 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * include/hmg3.ch * in stric HMG3 compatibility mode FORMAT and INPUTMASK are now - converted to null. It may have side-effects on TEXTBOXes, + converted to null. It may have side-effects on TEXTBOXes, probably the best would be to add an empty method to abstractgrid. * source/abstractgrid.prg * added allowDelete and allowAppend, but their values are not used ! -2011-11-28 01:30 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-28 01:30 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * include/hmg.ch * include/hmg3.ch * Added some defines by Roberto message. THEY HAVE NO CODE BEHIND, @@ -143,22 +147,22 @@ * source/abstractgrid.prg * Added allowAppend method, but with no code behind ! -2011-11-27 23:46 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-27 23:46 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/textbox.prg * There were some very long methods in class Textbox and to make them shorter and eventually easier to subclass I created 3 new. They are - used only once in the code but it was not reuse in the class the + used only once in the code but it was not reuse in the class the reason of the change but clearly state what a piece of code did and subclassing -2011-11-27 23:06 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-27 23:06 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * hmgide/ide.prg * I updated the code about to HMG4 about a month ago to test windowgroup. I decided to commit the code since it needed the changes but with the last commits it doesn't run anymore. - A couple of references to ::Parent should be moved into the New() + A couple of references to ::Parent should be moved into the New() -2011-11-27 22:46 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-27 22:46 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/dialogs.prg * source/misc.prg * source/tabpage.prg @@ -169,11 +173,11 @@ * added setLayout method. Every QWidget may have its own layout. In method setCentralWindow added window:childAdd( self ). It is to have the objects inside the layout correctly created at Activate() - they - were out of hmgapp() objects tree. + were out of hmgapp() objects tree. TODO: to be expanded for nested layouts * source/windowgroup.prg * updated to work with current code. It may be useful if well documented! - + 2011-11-26 20:40 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de ) * source/notifymenu.prg * source/radiogroup.prg @@ -219,7 +223,7 @@ 2011-11-24 09:15 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/textbox.prg - ! piece of code wrong. + ! piece of code wrong. ; TODO This object must be revised it has problems. 2011-11-23 18:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) @@ -311,35 +315,35 @@ * source/hyperlink.prg Movel border method from hyperlink to label so it is available for both -2011-11-22 15:06 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-22 15:06 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * buildapp.bat * now supports /3 as first parameter to enable full hmg3 compatibility Change by Roberto * Changelog * typo in date -2011-11-22 13:12 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-22 13:12 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/*.prg * Third and last part of source code changes provided by Ricci -2011-11-22 12:52 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-22 12:52 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/*.prg * Second part of source code changes provided by Ricci -2011-11-22 12:28 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-22 12:28 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/*.prg * First part of source code changes provided by Ricci actually they are parameter checking and cosmetic changes -2011-11-22 00:18 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-22 00:18 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * include/hmg.ch * Added nullified oneliner: READONLYFIELDS and BUFFERED * source/combobox.prg - * ignored value in full hmg3 compatibility (it means different + * ignored value in full hmg3 compatibility (it means different thing in Qt) * source/radiogroup.prg - * added Create method. INCOMPATIBLE: now options cannot be set - after the object is displayed ! + * added Create method. INCOMPATIBLE: now options cannot be set + after the object is displayed ! * :spacing value has been disabled 2011-11-21 22:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) @@ -347,29 +351,29 @@ ! source/childwindow.prg ! inverted the source code to keep HMG3 compatibility and use -2011-11-20 16:31 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-20 16:31 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/basic.prg * check parameter type in :icon() * include/hmg.ch - * re-added some definitions that someone deleted + * re-added some definitions that someone deleted -2011-11-19 23:48 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-19 23:48 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * corrected wrong hour on previous commit * source/toolbutton.prg * source/combobox.prg * typos -2011-11-19 23:40 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-19 23:40 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * include/hmg.prg * added one-liner defintions * source/control.prg * repaint() for hmg4 release() NOTE: patches provided by Ricci -2011-11-19 08:54 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-11-19 08:54 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/layout.prg * methods Release and Visible moved to Layouts class - * methods Close, Show and Visible added to Layouts class. They are + * methods Close, Show and Visible added to Layouts class. They are empty methods to comply with overloading * source/basic.prg * in method Create changed oQtObject:Show() to ::Show so that it @@ -449,7 +453,7 @@ + include/qtqvariant.ch * source/misc.prg + HmgQv2Clp( oQtVariant ) public function. It converts from QVariant - object to a CLIPPER var. It's a very simple interface: must be checked + object to a CLIPPER var. It's a very simple interface: must be checked very well. 2011-11-12 15:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) @@ -530,7 +534,7 @@ way (ie QTimer) ! source/hmgapp.prg - ! __WindowsCloser() method it was renamed into __ObjectsCloser() and + ! __WindowsCloser() method it was renamed into __ObjectsCloser() and fixed source to close every children. Some Qt object need special treatment. @@ -587,7 +591,7 @@ It returns a numeric value ONLY if QApplication is started. It's designed with SETGET option, but only to use method without "()" not to set. - + * source/control.prg + __HmgOnGotFocusExec() to align event handling + __HmgOnLostFocusExec() to align event handling @@ -596,7 +600,7 @@ 2011-11-06 17:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! Chanlog update ! lost update - + * samples/alldemo/demo_1p007.prg * properties @@ -698,7 +702,7 @@ ! include/hmg.ch + Qt defined vars about SpinBox. When HbQt will be update we can remove - + #xcommand SYMBOLS command to change arrows on Spinner. At this moment + + #xcommand SYMBOLS command to change arrows on Spinner. At this moment work fine on DATEPICKER. ! source/datepicker.prg @@ -728,7 +732,7 @@ 2011-11-02 22:45 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> ) ! source/label.prg ! about Caption() and Value() (HMG3 method to assign caption). - Now, the Value() method calls overwrited Caption() method. In this way, + Now, the Value() method calls overwrited Caption() method. In this way, we can use Caption() or Value() method to assign caption to label object. Always handled Autosize setting. @@ -803,7 +807,7 @@ nVirtualWidth and nVirtualHeight must be numeric values AND nVirtualWidth must be greater then window Width OR nVirtualHeight must be greater then window Height. - To setup or know these values you must use VirtualWidht() and + To setup or know these values you must use VirtualWidht() and VirtualHeight() methods. ! source/animatebox.prg @@ -851,7 +855,7 @@ ! source/widget.prg * usage of QtParent when created Qt object * many times add setFocusPolicy( Qt_StrongFocus ) - * many times add setAutoFillBackground( .T. ) line but always commented + * many times add setAutoFillBackground( .T. ) line but always commented because problem with overlapping. See basic.prg related change in this changelog. ; TODO fix code source/layout.prg @@ -866,8 +870,8 @@ ! source/winbase.prg - oCentralWidget data removed - - CentralWidget() method. instead must be preferred usage of - SetCentralWidget(). If central widget must be changed or setted, + - CentralWidget() method. instead must be preferred usage of + SetCentralWidget(). If central widget must be changed or setted, QtCentral() method must be used or precede. * source/hmgparent.prg @@ -882,7 +886,7 @@ Qt_object_type_name(::oParent:QtObject) must be changed with Qt_object_type_name(::oParent:QtParent). ATTENTION: not all Qt objects handle or need as parent a central widget. - + SetCentralWidget( oArg1 ) method to setup a central widget. + + SetCentralWidget( oArg1 ) method to setup a central widget. If oArg1 is passed and is valid becomes central widget and ::oQtCentral will be changed to this value. IF oArg1 is not passed "::oQtCentral" becomes central widget @@ -926,7 +930,7 @@ ! samples/splitbox/demo_1.prg ! about unused local var -2011-10-28 15:05 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) +2011-10-28 15:05 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) * source/basic.prg * adapted to changes in window class names * include/hmg.ch @@ -947,7 +951,7 @@ is loaded: when the object is created or when Picture() method is used. By default Stretch is .T. to keep HMG3 compatibility. This means image is scaled to the canvas (QLabel container) size and keep aspectratio. - + AspectRatio() to keep (default Qt_KeepAspectRatio) or + + AspectRatio() to keep (default Qt_KeepAspectRatio) or not (Qt_IgnoreAspectRatio) + Smoothing() to manage transformation fast (default Qt_FastTransformation) or smoothing (Qt_SmoothTransformation) @@ -1282,7 +1286,7 @@ * onEnter now works for un-editable cells (patch by Ricci) * source/label.prg * reverting a recent change: made background color transparent again - by default + by default 2011-10-18 00:30 UTC+0100 Francesco Perillo ( fperillo at gmail.com ) Changes created by Ricci, I just did a couple of changes and committed Added: samples/agenda/ABook.dbf =================================================================== (Binary files differ) Property changes on: samples/agenda/ABook.dbf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: samples/agenda/agenda.dbf =================================================================== (Binary files differ) Modified: samples/agenda/agenda.prg =================================================================== --- samples/agenda/agenda.prg 2011-12-07 10:51:41 UTC (rev 842) +++ samples/agenda/agenda.prg 2011-12-07 19:05:29 UTC (rev 843) @@ -1,5 +1,5 @@ /* -* Agenda de Contatos (2) +* ABook de Contatos (2) * Humberto Fornazier - Mar\xE7o/2003 * hfo...@br... * @@ -16,210 +16,171 @@ #define BLUE { 0, 0, 128 } #define WHITE { 255, 255, 255 } -MEMVAR lNovo -MEMVAR Form_1 -MEMVAR Form_2 -MEMVAR Form_3 -MEMVAR Edit_1 +MEMVAR lNew +MEMVAR oForm_1 +MEMVAR oForm_2 +MEMVAR oForm_3 MEMVAR nFont -MEMVAR cArquivo -MEMVAR GIndice -MEMVAR Grid_Agenda -MEMVAR Btn_Novo -MEMVAR Btn_Imprimir -MEMVAR Btn_Sair +MEMVAR cFile -/* -*/ + FUNCTION Main() - LOCAL i := 0 - LOCAL Mensagem + LOCAL I hbqt_errorsys() SET DELETED ON SET CENTURY ON - PRIVATE lNovo := .F. - PRIVATE GIndice - PRIVATE Grid_Agenda - PRIVATE Btn_Novo - PRIVATE Btn_Imprimir - PRIVATE Btn_Sair + PRIVATE lNew := .F. - AgendaOpen() + ABookOpen() - // NOMAXIMIZE ; - // NOSIZE ; - DEFINE WINDOW Form_1 ; + DEFINE WINDOW oForm_1 ; AT 0,0 ; WIDTH 440 ; HEIGHT 470 ; TITLE "Address Book"; MAIN ; - ICON ":AGENDA" ; - ON RELEASE Finaliza_Sistema() + ICON ":ABOOK" ; + ON RELEASE Exit_System() ; + ON INIT Seach_ABook() + BACKCOLOR BLUE - @ 010,415 Grid GIndice Of Form_1 ; + @ 010,415 Grid oGrid_Index Of oForm_1 ; WIDTH 60 HEIGHT 360 HEADERS {""} WIDTHS { 16 } ; FONT "Arial" SIZE 07.5 ; TOOLTIP "Click on the Letter" ; - ON CHANGE Pesquisa_Agenda() + ON CHANGE Seach_ABook() // FONT "Arial" SIZE 09 ; - @ 010,010 GRID Grid_Agenda ; + @ 010,010 GRID oGrid_ABook ; WIDTH 398 ; HEIGHT 360 ; HEADERS {"Code","Name"} ; WIDTHS {53,324} ; - ON DBLCLICK Novo_Registro(.F.) + ON DBLCLICK Edit_Record(.F.) - @ 385,010 BUTTON Btn_Novo Of Form_1 ; + @ 385,010 BUTTON oBtn_New Of oForm_1 ; CAPTION '&New' ; - ACTION Novo_Registro(.T.) ; + ACTION Edit_Record(.T.) ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "New Record" ; - @ 385,161 BUTTON Btn_Imprimir Of Form_1 ; + @ 385,161 BUTTON oBtn_Print Of oForm_1 ; CAPTION '&Print' ; - ACTION Imprimir() ; + ACTION ABookPrint() ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "Print Contacts" ; - @ 385,310 BUTTON Btn_Sair Of Form_1 ; + @ 385,310 BUTTON oBtn_Exit Of oForm_1 ; CAPTION '&Exit' ; - ACTION Form_1.Release ; + ACTION oForm_1.Release ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "Closes Address Book" ; - @ 415,18 ANIMATEBOX Mensagem ; + @ 415,18 ANIMATEBOX oMessage ; WIDTH 360 ; HEIGHT 20 ; FILE ':MSG02' AUTOPLAY END WINDOW - For i := 1 To 26 - ADD ITEM { CHR(i+64) } TO GIndice OF Form_1 + For I := 1 To 26 + ADD ITEM { CHR(I+64) } TO oGrid_Index OF oForm_1 Next - MODIFY CONTROL GIndice OF Form_1 VALUE 1 + MODIFY CONTROL oGrid_Index OF oForm_1 VALUE 1 - Pesquisa_Agenda() + CENTER WINDOW oForm_1 - CENTER WINDOW Form_1 + ACTIVATE WINDOW oForm_1 - ACTIVATE WINDOW Form_1 - RETURN Nil -/* -*/ -FUNCTION Pesquisa_Agenda() +/*----------------------------------------------------------------------*/ + +FUNCTION Seach_ABook() LOCAL v - LOCAL cPesq + LOCAL cSearchKey - v := Form_1:GIndice:Value - cPesq := form_1:GIndice:cell( 1,v ) + v := oForm_1:oGrid_Index:Value + cSearchKey := oForm_1:oGrid_Index:cell( 1,v ) - cPesq := IIf( Empty(cPesq), "A" , cPesq ) + cSearchKey := IIf( Empty(cSearchKey), "A" , cSearchKey ) - Agenda->(DBSetOrder(2)) - Agenda->(DBSeek(cPesq,.T.)) - DELETE ITEM ALL FROM Grid_Agenda OF Form_1 - Do While ! Agenda->(Eof()) - If Substr(Agenda->Nome,1,1) == cPesq - ADD ITEM {Agenda->Codigo,Agenda->Nome} TO Grid_Agenda OF Form_1 + ABook->(DBSetOrder(2)) + ABook->(DBSeek(cSearchKey,.T.)) + DELETE ITEM ALL FROM oGrid_ABook OF oForm_1 + Do While ! ABook->(Eof()) + If Substr(ABook->Nome,1,1) == cSearchKey + ADD ITEM {ABook->Codigo,ABook->Nome} TO oGrid_ABook OF oForm_1 Else EXIT Endif - Agenda->(DBSkip()) + ABook->(DBSkip()) EndDo Return .F. -/* -*/ -FUNCTION Novo_Registro( lNovo_Registro ) - Local cCodigo := "" - Local cNome := "" - Local cEndereco:= "" - Local cBairro := "" - Local cCep := "" - Local cCidade := "" - Local cEstado := "" - Local cFone1 := "" - Local cFone2 := "" - Local cEmail := "" - Local Label_Codigo - Local Label_Nome - Local Label_Endereco - Local Label_Bairro - Local Label_Cep - Local Label_Cidade - Local Label_Estado - Local Label_Fone1 - Local Label_Fone2 - Local Label_Email +/*----------------------------------------------------------------------*/ - Local T_Codigo - Local T_Nome - Local T_Endereco - Local T_Bairro - Local T_Cep - Local T_Cidade - Local T_Estado - Local T_Fone1 - Local T_Fone2 - Local T_Email +FUNCTION Edit_Record( lNew_Record ) - Local Btn_Salvar - Local Btn_Excluir - Local Btn_Cancelar + Local cCode := "" + Local cName := "" + Local cAddress := "" + Local cDistrict := "" + Local cZIP := "" + Local cCity := "" + Local cState := "" + Local cPhone1 := "" + Local cPhone2 := "" + Local cEmail := "" + oForm_1.oBtn_New.Enabled := .F. + oForm_1.oBtn_Print.Enabled := .F. + oForm_1.oBtn_Exit.Enabled := .F. - Form_1.Btn_Novo.Enabled := .F. - Form_1.Btn_Imprimir.Enabled := .F. - Form_1.Btn_Sair.Enabled := .F. + lNew := lNew_Record - lNovo := lNovo_Registro - - If ! lNovo - cCodigo := form_1:grid_agenda:cell(form_1:grid_agenda:value,1) - Agenda->(DBSetOrder(1)) - If ! Agenda->(DBSeek( cCodigo )) - MsgSTOP("Record "+cCodigo+" not found!!","Address Book") - Release Window ALL + If ! lNew + cCode := oForm_1:oGrid_ABook:cell(oForm_1:oGrid_ABook:value,1) + ABook->(DBSetOrder(1)) + If ! ABook->(DBSeek( cCode )) + MsgSTOP("Record "+cCode+" not found!!","Address Book") + //Release Window ALL + Return NIL EndIf - cNome := AllTrim( Agenda->Nome ) - cEndereco:= AllTrim( Agenda->Endereco) - cBairro := AllTrim( Agenda->Bairro ) - cCep := AllTrim( Agenda->Cep ) - cCidade := AllTrim( Agenda->Cidade ) - cEstado := AllTrim( Agenda->Estado ) - cFone1 := AllTrim( Agenda->Fone1 ) - cFone2 := AllTrim( Agenda->Fone2 ) - cEmail := AllTrim( Agenda->EMail ) + cName := AllTrim( ABook->Nome ) + cAddress := AllTrim( ABook->Endereco) + cDistrict := AllTrim( ABook->Bairro ) + cZIP := AllTrim( ABook->Cep ) + cCity := AllTrim( ABook->Cidade ) + cState := AllTrim( ABook->Estado ) + cPhone1 := AllTrim( ABook->Fone1 ) + cPhone2 := AllTrim( ABook->Fone2 ) + cEmail := AllTrim( ABook->EMail ) EndIf // NOSIZE ; - DEFINE WINDOW Form_2 ; + DEFINE WINDOW oForm_2 ; AT 0,0 ; WIDTH 490 ; HEIGHT 300 ; - TITLE "Address Book - "+Iif( lNovo , "New Record" , "Edit Record"); - ICON ":AGENDA" ; + TITLE "Address Book - "+Iif( lNew , "New Record" , "Edit Record"); + ICON ":ABook" ; MODAL ; - ON RELEASE {|| Form_1.Btn_Novo.Enabled := .T. ,; - Form_1.Btn_Sair.Enabled := .T. ,; - Form_1.Btn_Imprimir.enabled := .T. ,; - Agenda->(DBSetOrder(2)) ,; - Pesquisa_Agenda() ,; - Form_1.Grid_Agenda.SetFocus() } ; + ON RELEASE {|| oForm_1.oBtn_New.Enabled := .T. ,; + oForm_1.oBtn_Exit.Enabled := .T. ,; + oForm_1.oBtn_Print.enabled := .T. ,; + ABook->(DBSetOrder(2)) ,; + Seach_ABook() ,; + oForm_1.oGrid_ABook.SetFocus() } ; BACKCOLOR WHITE @ 10,10 LABEL Label_Codigo ; @@ -247,7 +208,7 @@ FONTCOLOR BLUE BOLD @ 100,10 LABEL Label_Bairro ; - VALUE 'Address' ; + VALUE 'District' ; WIDTH 140 ; HEIGHT 30 ; FONT 'Arial' SIZE 09 ; @@ -302,112 +263,112 @@ BACKCOLOR WHITE ; FONTCOLOR BLUE BOLD - @ 13,70 TEXTBOX T_Codigo ; + @ 13,70 TEXTBOX T_Code ; WIDTH 40 ; - VALUE cCodigo ; + VALUE cCode ; TOOLTIP 'Contact Code' - @ 43,70 TEXTBOX T_Nome ; - OF Form_2 ; + @ 43,70 TEXTBOX T_Name ; + OF oForm_2 ; WIDTH 400 ; - VALUE cNome ; + VALUE cName ; TOOLTIP 'Contact Name' ; MAXLENGTH 40 ; UPPERCASE ; - ON ENTER Iif( ! Empty( Form_2.T_Nome.Value ) , Form_2.T_Endereco.SetFocus , Form_2.T_Nome.SetFocus ) + ON ENTER Iif( ! Empty( oForm_2.T_Name.Value ) , oForm_2.T_Address.SetFocus , oForm_2.T_Name.SetFocus ) - @ 73,70 TEXTBOX T_Endereco ; - OF Form_2 ; + @ 73,70 TEXTBOX T_Address ; + OF oForm_2 ; WIDTH 400 ; - VALUE cEndereco ; + VALUE cAddress ; TOOLTIP 'Contact Address'; MAXLENGTH 40 ; UPPERCASE ; - ON GOTFOCUS Form_2.Btn_Salvar.Enabled := .T. ; - ON ENTER Form_2.T_Bairro.SetFocus + ON GOTFOCUS oForm_2.Btn_Save.Enabled := .T. ; + ON ENTER oForm_2.T_District.SetFocus - @103,70 TEXTBOX T_Bairro ; - OF Form_2 ; + @103,70 TEXTBOX T_District ; + OF oForm_2 ; WIDTH 250 ; - VALUE cBairro ; - TOOLTIP 'Contact Address' ; + VALUE cDistrict ; + TOOLTIP 'Contact District' ; MAXLENGTH 25 ; UPPERCASE ; - ON ENTER Form_2.T_Cep.SetFocus + ON ENTER oForm_2.T_ZIP.SetFocus - @103,390 TEXTBOX T_Cep ; - OF Form_2 ; + @103,390 TEXTBOX T_ZIP ; + OF oForm_2 ; WIDTH 80 ; - VALUE cCep ; + VALUE cZIP ; TOOLTIP 'Contact Zip Code' ; MAXLENGTH 08 ; UPPERCASE ; - ON ENTER Form_2.T_Cidade.SetFocus + ON ENTER oForm_2.T_City.SetFocus - @133,70 TEXTBOX T_Cidade ; - OF Form_2 ; + @133,70 TEXTBOX T_City ; + OF oForm_2 ; WIDTH 250 ; - VALUE cCidade ; + VALUE cCity ; TOOLTIP 'Contact City' ; MAXLENGTH 25 ; UPPERCASE ; - ON ENTER Form_2.T_Estado.SetFocus + ON ENTER oForm_2.T_State.SetFocus - @133,390 TEXTBOX T_Estado ; - OF Form_2 ; + @133,390 TEXTBOX T_State ; + OF oForm_2 ; WIDTH 30 ; - VALUE cEstado ; + VALUE cState ; TOOLTIP 'Contact State'; MAXLENGTH 02 ; UPPERCASE ; - ON ENTER Form_2.T_Fone1.SetFocus + ON ENTER oForm_2.T_Phone1.SetFocus - @163,70 TEXTBOX T_Fone1 ; - OF Form_2 ; + @163,70 TEXTBOX T_Phone1 ; + OF oForm_2 ; WIDTH 110 ; - VALUE cFone1 ; + VALUE cPhone1 ; TOOLTIP 'Contact Phone 1'; MAXLENGTH 10 ; UPPERCASE ; - ON ENTER Form_2.T_Fone2.SetFocus + ON ENTER oForm_2.T_Phone2.SetFocus - @163,390 TEXTBOX T_Fone2 ; - OF Form_2 ; + @163,390 TEXTBOX T_Phone2 ; + OF oForm_2 ; WIDTH 80 ; - VALUE cFone2 ; + VALUE cPhone2 ; TOOLTIP 'Contact Phone 2'; MAXLENGTH 10 ; UPPERCASE ; - ON ENTER Form_2.T_Email.SetFocus + ON ENTER oForm_2.T_Email.SetFocus @193,70 TEXTBOX T_Email ; - OF Form_2 ; + OF oForm_2 ; WIDTH 400 ; VALUE cEmail ; TOOLTIP 'Contact E-mail' ; MAXLENGTH 40 ; LOWERCASE ; - ON ENTER Form_2.Btn_Salvar.SetFocus + ON ENTER oForm_2.Btn_Save.SetFocus - @ 232,70 BUTTON Btn_Salvar Of Form_2 ; + @ 232,70 BUTTON Btn_Save Of oForm_2 ; CAPTION '&Save' ; - ACTION Salvar_Registro() ; + ACTION Record_Save() ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "Save Record" ; //FLAT - @ 232,210 BUTTON Btn_Excluir Of Form_2 ; + @ 232,210 BUTTON Btn_Delete Of oForm_2 ; CAPTION '&Delete' ; - ACTION Excluir_Registro() ; + ACTION Record_Delete() ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "Delete Record" ; //FLAT - @ 232,346 BUTTON Btn_Cancelar Of Form_2 ; + @ 232,346 BUTTON Btn_Cancel Of oForm_2 ; CAPTION '&Cancel' ; - ACTION Sair_do_Form2() ; + ACTION Form2_Exit() ; WIDTH 120 HEIGHT 27 ; FONT "Arial" SIZE 09 ; TOOLTIP "Cancel" ; @@ -415,112 +376,124 @@ END WINDOW - Form_2.T_Codigo.Enabled := .F. + oForm_2.T_Code.Enabled := .F. - If lNovo - Form_2.Btn_Salvar.Enabled := .F. - Form_2.Btn_Excluir.Enabled := .F. + If lNew + oForm_2.Btn_Save.Enabled := .F. + oForm_2.Btn_Delete.Enabled := .F. EndIf - CENTER WINDOW Form_2 - ACTIVATE WINDOW Form_2 + CENTER WINDOW oForm_2 + ACTIVATE WINDOW oForm_2 Return Nil -/* -*/ -FUNCTION Salvar_Registro() - LOCAL ProximoCodigo := "" - LOCAL cCodigo := "" +/*----------------------------------------------------------------------*/ - If Empty( Form_2.T_Nome.Value ) +FUNCTION Record_Save() + + LOCAL cNextCode + LOCAL cCode + + If Empty( oForm_2.T_Name.Value ) MsgINFO( "Empty Name !!!" , "Address Book" ) - Form_2.T_Nome.SetFocus + oForm_2.T_Name.SetFocus Return Nil EndIf - If lNovo - Agenda->(DBSetOrder(1)) - Agenda->(DBGoBottom()) - ProximoCodigo := StrZero( Val( Agenda->Codigo ) + 1 , 4 ) - Agenda->(DBAppend()) - Agenda->Codigo := ProximoCodigo - Agenda->Nome := Form_2.T_Nome.Value - Agenda->Endereco := Form_2.T_Endereco.Value - Agenda->Bairro := Form_2.T_Bairro.Value - Agenda->Cep := Form_2.T_Cep.Value - Agenda->Cidade := Form_2.T_Cidade.Value - Agenda->Estado := Form_2.T_Estado.Value - Agenda->Fone1 := Form_2.T_Fone1.Value - Agenda->Fone2 := Form_2.T_Fone2.Value - Agenda->EMail := Form_2.T_Email .Value + If lNew + ABook->(DBSetOrder(1)) + ABook->(DBGoBottom()) + cNextCode := StrZero( Val( ABook->Codigo ) + 1 , 4 ) + ABook->(DBAppend()) + ABook->Codigo := cNextCode + ABook->Nome := oForm_2.T_Name.Value + ABook->Endereco := oForm_2.T_Address.Value + ABook->Bairro := oForm_2.T_District.Value + ABook->Cep := oForm_2.T_ZIP.Value + ABook->Cidade := oForm_2.T_City.Value + ABook->Estado := oForm_2.T_State.Value + ABook->Fone1 := oForm_2.T_Phone1.Value + ABook->Fone2 := oForm_2.T_Phone2.Value + ABook->EMail := oForm_2.T_Email .Value Else - cCodigo := Form_2.T_Codigo.Value - Agenda->(DBSetOrder(1)) - If ! Agenda->(DBSeek( cCodigo )) - MsgSTOP("Record "+cCodigo+" not found!!","Address Book") - Release Window ALL + cCode := oForm_2.T_Code.Value + ABook->(DBSetOrder(1)) + If ! ABook->(DBSeek( cCode )) + MsgSTOP("Record "+cCode+" not found!!","Address Book") + //Release Window ALL + Return NIL EndIf - If BloqueiaRegistroNaRede( "Agenda" ) - Agenda->Nome := Form_2.T_Nome.Value - Agenda->Endereco := Form_2.T_Endereco.Value - Agenda->Bairro := Form_2.T_Bairro.Value - Agenda->Cep := Form_2.T_Cep.Value - Agenda->Cidade := Form_2.T_Cidade.Value - Agenda->Estado := Form_2.T_Estado.Value - Agenda->Fone1 := Form_2.T_Fone1.Value - Agenda->Fone2 := Form_2.T_Fone2.Value - Agenda->EMail := Form_2.T_Email.Value - Agenda->(DBUnlock()) + If NetRecordLock( "ABook" ) + ABook->Nome := oForm_2.T_Name.Value + ABook->Endereco := oForm_2.T_Address.Value + ABook->Bairro := oForm_2.T_District.Value + ABook->Cep := oForm_2.T_ZIP.Value + ABook->Cidade := oForm_2.T_City.Value + ABook->Estado := oForm_2.T_State.Value + ABook->Fone1 := oForm_2.T_Phone1.Value + ABook->Fone2 := oForm_2.T_Phone2.Value + ABook->EMail := oForm_2.T_Email.Value + ABook->(DBUnlock()) EndIf EndIf - MsgInfo( "Record "+Iif( lNovo , "Added" ,"Edited!!" ) ) + MsgInfo( "Record "+Iif( lNew , "Added" ,"Edited!!" ) ) - PosicionaIndice( Left( Agenda->Nome , 1 ) ) - Pesquisa_Agenda() - Form_2.Release + IndexPosition( Left( ABook->Nome , 1 ) ) + Seach_ABook() + oForm_2.Release Return Nil -/* -*/ -FUNCTION Sair_do_Form2() - Form_1.Btn_Novo.Enabled := .T. - Form_1.Btn_Sair.Enabled := .T. - Form_2.Btn_Excluir.Enabled := .T. - Form_2.Release() - Agenda->(DBSetOrder(2)) - Pesquisa_Agenda() - Form_1.Grid_Agenda.SetFocus() +/*----------------------------------------------------------------------*/ + +FUNCTION Form2_Exit() + + oForm_1.oBtn_New.Enabled := .T. + oForm_1.oBtn_Exit.Enabled := .T. + oForm_2.Btn_Delete.Enabled := .T. + oForm_2.Release() + ABook->(DBSetOrder(2)) + Seach_ABook() + oForm_1.oGrid_ABook.SetFocus() + Return Nil -/* -*/ -FUNCTION Excluir_Registro() - If MsgOkCancel ("Confirm Record Deletion ?", "Delete "+AllTrim(Agenda->Nome)) - If BloqueiaRegistroNaRede( "Agenda" ) - Agenda->(DBDelete()) - Agenda->(DBUnlock()) - MsgINFO("Record Deleted !","Agenda") - Sair_do_Form2() + +/*----------------------------------------------------------------------*/ + +FUNCTION Record_Delete() + + If MsgOkCancel ("Confirm Record Deletion ?", "Delete "+AllTrim(ABook->Nome)) + If NetRecordLock( "ABook" ) + ABook->(DBDelete()) + ABook->(DBUnlock()) + MsgINFO("Record Deleted !","ABook") + Form2_Exit() EndIf EndIf - Form_1.Grid_Agenda.SetFocus + + oForm_1.oGrid_ABook.SetFocus + Return Nil -/* -*/ -FUNCTION Finaliza_Sistema() - Agenda->(DBCloseArea()) + +/*----------------------------------------------------------------------*/ + +FUNCTION Exit_System() + + ABook->(DBCloseArea()) + Return Nil -/* -*/ -FUNCTION AgendaOpen() - LOCAL nArea := Select( 'agenda' ) +/*----------------------------------------------------------------------*/ + +FUNCTION ABookOpen() + + LOCAL nArea := Select( 'ABook' ) LOCAL aArq := {} If nArea == 0 - If ! FILE( "agenda.dbf" ) + If ! FILE( "ABook.dbf" ) Aadd( aArq , { 'CODIGO' , 'C' , 04 , 0 } ) Aadd( aArq , { 'NOME ' , 'C' , 40 , 0 } ) Aadd( aArq , { 'ENDERECO' , 'C' , 40 , 0 } ) @@ -531,110 +504,112 @@ Aadd( aArq , { 'FONE1' , 'C' , 10 , 0 } ) Aadd( aArq , { 'FONE2' , 'C' , 10 , 0 } ) Aadd( aArq , { 'EMAIL' , 'C' , 40 , 0 } ) - DBCreate( "agenda.dbf" , aArq ) + DBCreate( "ABook.dbf" , aArq ) EndIf - Use agenda Alias agenda new shared - If ! File( 'agenda1.ntx' ) - Index on Field->Codigo to agenda1 + Use ABook Alias ABook new shared + If ! File( 'ABook1.ntx' ) + Index on Field->Codigo to ABook1 Endif - If ! File( 'agenda2.ntx' ) - Index on Field->Nome to agenda2 + If ! File( 'ABook2.ntx' ) + Index on Field->Nome to ABook2 Endif - Agenda->(DBCLearIndex()) - Agenda->(DBSetIndex( 'agenda1')) - Agenda->(DBSetIndex( 'agenda2')) + ABook->(DBCLearIndex()) + ABook->(DBSetIndex( 'ABook1')) + ABook->(DBSetIndex( 'ABook2')) Endif Return Nil -/* -*/ -FUNCTION BloqueiaRegistroNaRede( cArea ) + +/*----------------------------------------------------------------------*/ + +FUNCTION NetRecordLock( cArea ) + Do While ! (cArea)->(RLock()) If ! MSGRetryCancel("Record in use. Retry ?","Address Book") Return .F. EndIf EndDo + Return .T. -/* -*/ -FUNCTION PosicionaIndice(cLetra) - LOCAL i := 0 - For i := 1 To 26 - If CHR(i+64) == cLetra - MODIFY CONTROL GIndice OF Form_1 VALUE i + +/*----------------------------------------------------------------------*/ + +FUNCTION IndexPosition(cChar) + + LOCAL I + For I := 1 To 26 + If CHR(I+64) == cChar + MODIFY CONTROL oGrid_Index OF oForm_1 VALUE I EndIf Next - Form_1.GIndice.SetFocus + oForm_1.oGrid_Index.SetFocus + Return Nil -/* -*/ -FUNCTION Imprimir() +/*----------------------------------------------------------------------*/ - LOCAL nLinha := 0 - LOCAL cLetra := "" - LOCAL nReg := 0 +FUNCTION ABookPrint() + + LOCAL nLine := 0 + LOCAL cChar + LOCAL nRecs := 0 LOCAL v - LOCAL Bt_Zoom_menos - LOCAL Bt_Zoom_mais - LOCAL Bt_Sair Private nFont := 11 - Private cArquivo := "" - Private Form_3 - Private Edit_1 + Private cFile := "" + Private oForm_3 Set Printer TO ("REL.TMP") Set Printer ON Set Console OFF - v := Form_1:GIndice:Value + v := oForm_1:oGrid_Index:Value - cLetra := form_1:GIndice:cell( 1,v ) + cChar := oForm_1:oGrid_Index:cell( 1,v ) - Agenda->(DBSetOrder(2)) - Agenda->(DBSeek(cLetra,.T.)) - Do While ! Agenda->(Eof()) - If Substr(Agenda->Nome,1,1) == cLetra - If nLinha == 0 + ABook->(DBSetOrder(2)) + ABook->(DBSeek(cChar,.T.)) + Do While ! ABook->(Eof()) + If Substr(ABook->Nome,1,1) == cChar + If nLine == 0 ? PadC(" Address Book",78) - ? PadC("Contacts beginning with letter "+cLetra,78) + ? PadC("Contacts beginning with letter "+cChar,78) ? "Code Name" ? Replicate("-",78) EndIf - nLinha += 1 - nReg += 1 - ? " "+Agenda->Codigo + " " - ?? Agenda->Nome + nLine += 1 + nRecs += 1 + ? " "+ABook->Codigo + " " + ?? ABook->Nome Else EXIT Endif - Agenda->(DBSkip()) + ABook->(DBSkip()) EndDo ? Replicate("-",78) - ? "Printed Records: "+StrZero(nReg,4) + ? "Printed Records: "+StrZero(nRecs,4) Set Printer TO Set Printer OFF Set Console ON - cArquivo := memoRead("REL.TMP") + cFile := memoRead("REL.TMP") // NOSIZE ; // CHILD ; // NOSYSMENU; - Define Window Form_3; + Define Window oForm_3; At 0,0 ; Width 450 ; Height 500 ; - Title "Contacts beginning with letter " + cLetra; - ICON ":AGENDA"; + Title "Contacts beginning with letter " + cChar; + ICON ":ABook"; BACKCOLOR WHITE - @20,-1 EDITBOX Edit_1 ; + @20,-1 EDITBOX oEdit_1 ; WIDTH 460 ; HEIGHT 510 ; - VALUE cArquivo ; - TOOLTIP "Contacts beginning with letter " + cLetra ; + VALUE cFile ; + TOOLTIP "Contacts beginning with letter " + cChar ; MAXLENGTH 255 @ 01,01 BUTTON Bt_Zoom_Mais ; @@ -652,18 +627,19 @@ @ 01,321 BUTTON Bt_Sair ; CAPTION '&Exit' ; WIDTH 120 HEIGHT 17 ; - ACTION Form_3.Release() ; + ACTION oForm_3.Release() ; FONT "MS Sans Serif" SIZE 09 End window - MODIFY CONTROL Edit_1 OF Form_3 FONTSIZE nFont + MODIFY CONTROL oEdit_1 OF oForm_3 FONTSIZE nFont - Center Window Form_3 - Activate Window Form_3 + Center Window oForm_3 + Activate Window oForm_3 Return Nil -/* -*/ + +/*----------------------------------------------------------------------*/ + FUNCTION ZoomLabel(nmm) If nmm == 1 @@ -671,6 +647,7 @@ Else nFont-- Endif - MODIFY CONTROL Edit_1 OF Form_3 FONTSIZE nFont + MODIFY CONTROL oEdit_1 OF oForm_3 FONTSIZE nFont + Return Nil Modified: samples/agenda/agenda.qrc =================================================================== --- samples/agenda/agenda.qrc 2011-12-07 10:51:41 UTC (rev 842) +++ samples/agenda/agenda.qrc 2011-12-07 19:05:29 UTC (rev 843) @@ -1,6 +1,6 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource> - <file alias="AGENDA">images/agenda.ico</file> - <file alias="MSG02">images/mensagem02.avi</file> + <file alias="ABOOK">images/agenda.ico</file> + <file alias="MSG02">images/hmg4.gif</file> </qresource> </RCC> Modified: samples/agenda/agenda.rc =================================================================== --- samples/agenda/agenda.rc 2011-12-07 10:51:41 UTC (rev 842) +++ samples/agenda/agenda.rc 2011-12-07 19:05:29 UTC (rev 843) @@ -1,2 +1,2 @@ -AGENDA ICON IMAGES\AGENDA.ICO -MSG02 AVI IMAGES\MENSAGEM02.AVI +ABook ICON IMAGES\AGENDA.ICO +MSG02 AVI IMAGES\MENSAGEM02.AVI Modified: samples/agenda/build.bat =================================================================== --- samples/agenda/build.bat 2011-12-07 10:51:41 UTC (rev 842) +++ samples/agenda/build.bat 2011-12-07 19:05:29 UTC (rev 843) @@ -1,2 +1,2 @@ @echo off -..\..\buildapp.bat %1 %2 %3 %4 %5 %6 %7 %8 -run \ No newline at end of file +..\..\buildapp.bat agenda.prg agenda.qrc -run \ No newline at end of file Added: samples/agenda/images/hmg4.gif =================================================================== (Binary files differ) Property changes on: samples/agenda/images/hmg4.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |