hmg-4 Changelog

Moderator: Rathinagiri

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi

Code: Select all

2011-11-03 16:54 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/grid.prg
     ! a bug introduced with pevious commit
Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

l3whmg wrote:Ricci: please do a little check about this changes.
Still missing the changes on Method Item ....

Code: Select all

/*..............................................................................
   Item
..............................................................................*/
METHOD Item( nRow , xValue ) CLASS GRID

   LOCAL aItems := {}
   LOCAL i

   IF ::lCreated
      IF Pcount() == 1
         FOR i := 1 to ::oQTObject:ColumnCount()
            aAdd( aItems, Self:Cell( nRow,i ) )
         NEXT i
         RETURN aItems
      ELSEIF Pcount() == 2
         IF hb_IsArray( xValue ) == .T.
            FOR i := 1 to ::oQTObject:ColumnCount()
               Self:Cell( nRow,i,xValue[i] )
            NEXT i
         ELSE
            Self:Cell( nRow, 1, xValue )
         ENDIF
      ENDIF
   ENDIF

   RETURN NIL

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi friends.
I start to rewrite the great program "everything/demo_1.prg". In this way I can check some problems and ASAP update source code. As I write in Changelog: PLEASE DON'T COMMIT ANYTHING TILL I HAVE FINISHED.
If you have suggestions OR if you find bugs OR if you want give a contribution, send me a message with Personal Message on HmgForum OR open/follow a Topic on HmgForum. All images are freeware, no license required: I have downloaded from http://www.iconfinder.com.

Known problem: On MsWinXp system, the default Qt style doesn't handle all options of some widgets. One of these is the Spinner (and inherited): arrows can be changed with minus and plus (you can see with DatePicker object in new demo), but using the default Windows style, arrows are always showed.
This is the reason because I have used "plastique" style (see code and try removing setting).

About DatePicker.
I rewrite the source code and I found a way to handle ShowNone property.
As you can see in Fig.1, this is a DatePicker with ShowNone options activated. The end user see "Null". In this condition, you get this value CTOD("//").
Fig.1
fig.1
fig.1
ScreenShot001.jpg (1.93 KiB) Viewed 3581 times
When the user uses the down arrow, the Shownone option will be reset and the current date becomes current value.
Another way to reset Shownone is to edit the field pressing Enter button. You can see what happen with both systems.
Fig.2
fig.2
fig.2
ScreenShot002.jpg (30.9 KiB) Viewed 3581 times
This is what I found. If anyone have suggestions, plese tell me.
At the same time, I have introduced a way to change the arrows with signs (plus/minus).
You can use Symbols() method or SYMBOLS command, but only with Datepicker object at this moment.

Code: Select all

2011-11-05 18:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   + samples/alldemo
   + samples/alldemo/animatebox
   + samples/alldemo/animatebox/ant.gif
   + samples/alldemo/animatebox/bang.gif
   + samples/alldemo/icons
   + samples/alldemo/icons/align_bottom.png
   + samples/alldemo/icons/align_horcenter.png
   + samples/alldemo/icons/align_left.png
   + samples/alldemo/icons/align_right.png
   + samples/alldemo/icons/align_top.png
   + samples/alldemo/icons/align_vercenter.png
   + samples/alldemo/icons/blue_eject.png
   + samples/alldemo/icons/blue_play.png
   + samples/alldemo/icons/blue_stop.png
   + samples/alldemo/icons/clear.png
   + samples/alldemo/icons/enlarge.png
   + samples/alldemo/icons/exchange.png
   + samples/alldemo/icons/exit.png
   + samples/alldemo/icons/font_bold.png
   + samples/alldemo/icons/font_italic.png
   + samples/alldemo/icons/font_strike.png
   + samples/alldemo/icons/font_underline.png
   + samples/alldemo/icons/graph_bars.png
   + samples/alldemo/icons/graph_lines.png
   + samples/alldemo/icons/graph_pies.png
   + samples/alldemo/icons/graph_points.png
   + samples/alldemo/icons/hmg.ico
   + samples/alldemo/icons/hmg16x16.ico
   + samples/alldemo/icons/picture.png
   + samples/alldemo/icons/reduce.png
   + samples/alldemo/icons/size.png
   + samples/alldemo/icons/size_aspect_ratio.png
   + samples/alldemo/icons/size_both.png
   + samples/alldemo/icons/size_height.png
   + samples/alldemo/icons/size_smoothing.png
   + samples/alldemo/icons/size_width.png
   + samples/alldemo/images
   + samples/alldemo/images/fantasy.jpg
   + samples/alldemo/images/hmg.png
   + samples/alldemo/images/mermaid.jpg
   + samples/alldemo/images/moon.jpg
   + samples/alldemo/images/under_construction.png
   + samples/alldemo/build.bat
   + samples/alldemo/demo_1.ch
   + samples/alldemo/demo_1.hbp
   + samples/alldemo/demo_1.prg
   + samples/alldemo/demo_1.qrc
   + samples/alldemo/demo_1p000.prg
   + samples/alldemo/demo_1p001.prg
   + samples/alldemo/demo_1p002.prg
   + samples/alldemo/demo_1p003.prg
   + samples/alldemo/demo_1p004.prg
   + samples/alldemo/demo_1p005.prg
   + samples/alldemo/demo_1p006.prg
   + samples/alldemo/hbmk.hbm
   + samples/alldemo/qt.conf
     * I started to write an "all in one" demo program. At this moment, with a
       OOP style; then, when finished, I will rewrite with XBase commands.
       PLEASE DON'T COMMIT ANYTHING TILL I HAVE FINISHED.
       If you have suggestions or if you find bugs or if you want give a
       contribution, send me a message with Personal Message on HmgForum or
       open a Topic on HmgForum.

   ! source/hyperlink.prg
     ! inherits from label. Removed duplicated source code.

   * source/label.prg
     * update note: inherited by....

   ! 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 
       work fine on DATEPICKER.

   ! source/datepicker.prg
     ! Alignment() method: now can handle DTP_LEFT and DTP_RIGHT
     ! OnChange() method: aligned to __Hmg* handling system
     ! ShowNone() method: now can be used but in different way from HMG3.
       When ShowNone is activated, user see Null. To deactivate only press
       enter on field or select a date. It's little different from HMG3.
     ! UpDown() method: by default is .F. like HMG3
     + Symbols() method: by default up and down rows are show.

   ! source/basic.prg
     ! FocusedControl() method
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: hmg-4 Changelog

Post by Rathinagiri »

ShowNone property is really good Luigi. Thanks for the same.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hy. Many thanks Rathi. It's not like HMG3, I know, but....

Code: Select all

2011-11-06 17:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   + samples/alldemo/icons/minus.png
   + samples/alldemo/icons/plus.png
   * samples/alldemo/demo_1.hbp
   * samples/alldemo/demo_1.prg
   * samples/alldemo/demo_1.qrc
   + samples/alldemo/demo_1p007.prg
     * p007 to show usage of Lcd object

   ! samples/timer/demo_2.prg
     * in according with Timer object changes: Start and Stop methods

   ! source/timer.prg
     + Start() method: it return .T. or .F. if timer is on
     + Stop() method: it return .T. or .F. if timer is on
     - lEnabled data and Enabled() method
     ; by default, timer was started when lCreate is .t. Start() and Stop()
       methods  check this value
     ; Was used Enabled() method to start and stop the timer. Very dangerous
       on the other hand, from HMG3 manual, when a timer was created no start
       and stop are possible.

   * source/lcd.prg
     - internal xValue unusefull
     * commented cutomization about Height and Width. Why there were?
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi to everyone

Code: Select all

2011-11-07 23:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   * Changelog
     * formatted last entry

   * samples/alldemo/demo_1.hbp
   * samples/alldemo/demo_1.prg
   * samples/alldemo/demo_1.qrc
   * samples/alldemo/demo_1p003.prg
   * samples/alldemo/demo_1p006.prg
   + samples/alldemo/icons/font_size.png
   + samples/alldemo/icons/font_name.png
   + samples/alldemo/demo_1p008.prg
     * p008 to show usage of Checkbox object
     * demo_1.prg, demo_1p003.prg, demo_1p006.prg  adjust code

   * source/hmgapp.prg
     + DefaultFont() method to know the default QApplication font. It returns
       a Qt object (QFont) ONLY if QApplication is started. It's designed with
       SETGET option, but only to use method without "()" not to set.
     + DefaultFontName() method to know the default QApplication font name.
       It returns a character value ONLY if QApplication is started. It's
       designed with SETGET option, but only to use method without "()"
       not to set.
     + DefaultFontSize() method to know the default QApplication font size.
       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
     ! OnGotFocus() and OnLostFocus() methods
Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi friends

Code: Select all

2011-11-08 11:20 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   * samples/alldemo/demo_1.hbp
   * samples/alldemo/demo_1.prg
   * samples/alldemo/demo_1p001.prg
   * samples/alldemo/demo_1p002.prg
   * samples/alldemo/demo_1p003.prg
   * samples/alldemo/demo_1p004.prg
   + samples/alldemo/demo_1p009.prg
     * p008 to show usage of CheckButton object
     * other sources adjusted/improved code

   + source/abstractbutton.prg
   * source/button.prg
   * source/checkbutton.prg
   * source/toolbutton.prg
   * hmg.hbp
     * to unify some common methods

   * source/grid.prg
     ! Item( nRow , xValue ) method; now check if xValue is array or single
       value. Many thanks to Ricci for his notice.
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi

Code: Select all

2011-11-08 11:50 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   * hmg.hbp
     * my TortoiseSvn Crashed and it doesn't sent. Sorry
Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi friends
Playing with new demo I found a problem related to closing objects and related connected events

This it's a basis change, please report bug and update your SVN.

With new __ObjectsCloser() before close a window all childrens are closed
Some Qt objects doesn't handle the close() method, but many times we need to disconnect related events; for this reason I create __HmgClose() layer to handle differences (many thanks to MrDuck for suggestions). Normally, the Release() method is the same and only __HmgClose() must be overwrited; in some case, both or one of them must be overwrited..
About LAYOUT: is there someone who wants check and fix these objects, please?

Code: Select all

2011-11-09 12:55 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   * source/layout.prg
     * revised Release() method
     + __HmgClose() method (overwrite related Basic __HmgClose() method )
     ; IS there someone who wants check and fix these objects, please?

   ! source/waitwin.prg
     ! revised Release() method
     + __HmgClose() method (overwrite related Basic __HmgClose() method )

   ! source/statusbar.prg
   ! source/virtualwindow.prg
     ! revised Release() method

   ! source/tree.prg
     ! removed Release() method: it seems unusefull

   ! source/media.prg
   ! source/menuitem.prg
   ! source/timer.prg
     + __HmgClose() method (overwrite related Basic __HmgClose() method )
     ! removed Release() method: unusefull

   ! source/control.prg
     - removed Release() method. Unusefull

   ! source/basic.prg
     ! Release() method: usage of __HmgClose() method. Now, this can be alive
       for all objects. A HMG object, related to a Qt object without close()
       method, simply overwrite the __HmgClose(). Some times also Release.
     ! __HmgOnCloseExec() method
     + __HmgClose() this is a layer for QT Close method. Some object doesn't
       has the Qt Close() method, but we must call __HmgDisconnectEv in some
       way (ie QTimer)

   ! source/hmgapp.prg
     ! __WindowsCloser() method it was renamed into __ObjectsCloser() and 
       fixed source to close every children. Some Qt object need special
       treatment.
Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

l3whmg wrote:This it's a basis change, please report bug and update your SVN.
Everything works well here. :D
Post Reply