hbQT - Post queries in this thread only

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5125
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 112 times
Been thanked: 114 times
Contact:

Re: hbQT - Post queries in this thread only

Post by Rathinagiri » Sun Sep 19, 2010 12:54 am

Thanks a lot Pritpal. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Post by bedipritpal » Mon Sep 20, 2010 2:02 am

Hello Everybody

Latest version of hbIDE is uploaded there at http://hbide.vouch.info/

ChangeLog since previous upload.

2010-09-19 17:48 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ contrib/hbqt/qtcore/g/THBQEvents.prg
+ contrib/hbqt/qtcore/g/THBQSlots.prg
+ Missings from prev commit of Viktor.

* contrib/hbqt/qtgui/doc/en/class_qpainter.txt
* contrib/hbqt/qtgui/g/QPainter.cpp
* contrib/hbqt/qtgui/g/TQPainter.prg
* contrib/hbqt/qtgui/qth/QPainter.qth
+ More streamlined many-to-one function calls.
Still a work in progress.

* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idemain.prg
* contrib/hbide/idesaveload.prg
+ Implemented: Harbour level codepage protocol.
Please make experiments.

WARNING: you may need to re-select appropriate
codepage from <MainMenu><Setup><Codepages> menu option
before saving any source. Better would be - select
codepage as above and exit hbIDE, reenter.

2010-09-19 11:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_hbslots.h
- Deleted: references to QSessionManager().

* contrib/hbqt/qtgui/g/QApplication.cpp
* contrib/hbqt/qtgui/qth/QApplication.qth
! QTextCodec::codecForLocale() => QTextCodec::codecForName( "UTF8" )

This synchronizes the codepage used by hbQT for its translation
operations. It is not needed in QCoreApplication() because
for all types of hbQT based applications QApplication() is
ever to be called as first line.

TODO: needed an option for users to set Harbour's recognized codepages.

2010-09-18 13:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_hbslots.cpp
* contrib/hbqt/qtcore/hbqt_hbslots.h
+ Added: signals for QApplication().

2010-09-17 19:37 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QPainter.qth
! Prepared: drawText() for single call protocol as :hbDrawText().

2010-09-17 18:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/doc/en/class_qpainter.txt
* contrib/hbqt/qtgui/g/QPainter.cpp
* contrib/hbqt/qtgui/g/TQPainter.prg
* Re-generated.

* contrib/hbqt/qtgui/qth/QPainter.qth
+ Implemented: single call :drawLine() method.

* contrib/hbqt/utils/hbqtgen.prg
+ Implemented: "..." parameter as method argument.
Needed to streamline in single call of Qt's
overloaded by argument type methods.

* contrib/hbide/hbqreportsmanager.prg
! Demonstrated the use of QPainter():drawLine( ... )
with variable type of argument types.

NOTE: this mechanism holds good if arguments are
constructed via Q*Class( ... ) call only.
Also this mechanism seems to be working best
for only those classes of Qt which are neither
inherited nor inheriting other class. The
classes in this bracket are like - QBrush,
QColor, QPixmap, QRect, QPoint, etc.

2010-09-17 15:49 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* src/rtl/ttopbar.prg
! Changed: Instance variable <cargo> to SETGET METHOD cargo( xCargo ).
Request received on SF's bug tracker.

2010-09-17 15:31 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/g/QComboBox.cpp
* Re-generated.

* contrib/hbqt/qtgui/qth/QComboBox.qth
! Detached one child from GC cycle - :setView()

* contrib/hbxbp/xbpcombobox.prg
! Fixed to support inheritance.

Thanks Shum for real-time Xbase++ code example.
Now it can be compiled with Harbour + hbQT without any line change.

2010-09-17 08:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QIcon.qth
! An important change in constructor.

TO-REMEMBER: whenever any parameter has to be tested with
HB_ISCHAR() and HB_ISPOINTER(), HB_ISCHAR() must ever be
checked first then HB_ISPOINTER(), at least for hbQT.

* contrib/hbqt/utils/hbqtgen.prg
! Fixed: how a QIcon() is passed to another methods.

* contrib/hbqt/qt*/g/*.prg
* contrib/hbqt/qt*/doc/en/*.txt
* Auto generated.

2010-09-16 16:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideshortcuts.prg
! Demonstrated: how a QLabel can be intercepted for key events.

2010-09-16 13:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideactions.prg
* contrib/hbide/ideobject.prg
! Minor.

* contrib/hbqt/hbqt_hbmk2_plugin.hbs
+ Added: required :pPtr initialization.

* contrib/hbqt/qtcore/hbqt_misc.prg
! Changed the way hbqt_ptr( oQtOROtherObject ) was returning :pPtr.
Now it checks <:pPtr> instance variable's presence if it
is a member of the class or not.

WARNING: Now onwards any class derived from hbQT class must contain
:pPtr instance variable to work properly.

* contrib/hbqt/qtgui/THbQtUI.prg
+ Added: :pPtr instance vaiable.

2010-09-15 19:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idemain.prg
! A last minute miss.

2010-09-15 18:53 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideactions.prg
* contrib/hbide/idesaveload.prg
+ Implemented: UTF-8 codepage strictly.
We need to explore how Harbour defined codepages can be implemented.

* contrib/hbqt/qtcore/hbqt.h
+ #include "hbapistr.h"

* contrib/hbqt/utils/hbqtgen.prg
+ Implemented: QString to respect Harbour Str API to respect UTF-8.

* contrib/hbide/qt*libs/*.cpp
* Re-generated.

This implementation overcomes a long standing glich in hbIDE at least.

2010-09-15 15:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/xbp.ch
+ Added XBP_*_GROUP constants.

* contrib/hbxbp/xbpwindow.prg
! :group instance variable now returns XBP_NO_GROUP instead of 0.

2010-09-15 14:35 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbqt_hbmk2_plugin.hbs

* contrib/hbqt/qtgui/g/QGraphicsEllipseItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsLineItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsPathItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsPixmapItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsPolygonItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsRectItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsScene.cpp
* contrib/hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp
* contrib/hbqt/qtgui/g/QGraphicsTextItem.cpp
* contrib/hbqt/qtgui/g/QWidget.cpp
* Regenerated.

* contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsScene.qth
* contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth
* contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth
* contrib/hbqt/qtgui/qth/QWidget.qth
* contrib/hbqt/qtwebkit/g/hbqtwebkit.h
! Corrected constructors which were wrongly based
on p->HBQT_TYPE_Q*Class for certain situations.

CAUTION: HBQT_TYPE_Q*Class member of hbQT structure
is only usable for objects which neither _INHERIT_ nor
_INHERITED_ by any other class. Also it may pose
problems if direct pointer obtained from some
method call is supplied to the constructor.

- contrib/hbqt/qtgui/hbqt_hbqgraphicsrectitem.cpp
- contrib/hbqt/qtgui/hbqt_hbqgraphicsrectitem.h
- Deleted sub-classes no longer required.

2010-09-14 15:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/testbrow.prg
* contrib/hbqt/tests/testqaim.prg
* contrib/hbqt/tests/testres.prg
! Adopted to new hbQT syntax.
Q*Class():new( ... ) => Q*Class( ... )

Regression is highly possible, so please verify.

2010-09-14 15:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/hbqtoolbar.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idebrowse.prg
* contrib/hbide/idedict.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideharbourhelp.prg
* contrib/hbide/idehome.prg
* contrib/hbide/idemain.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/ideskeletons.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idetools.prg
* contrib/hbide/idewizard.prg
! Adopted to new hbQT class syntax.
Q*Class():new( ... ) => Q*Class( ... )

Regression is highly possible, so please report errors.

2010-09-14 15:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/hbpprocess.prg
* contrib/hbxbp/xbp3state.prg
* contrib/hbxbp/xbpbitmap.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpcheckbox.prg
* contrib/hbxbp/xbpclipboard.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/xbpfontdialog.prg
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbphtmlviewer.prg
* contrib/hbxbp/xbplistbox.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpmle.prg
* contrib/hbxbp/xbpprintdialog.prg
* contrib/hbxbp/xbpprinter.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbpradiobutton.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbpscrollbar.prg
* contrib/hbxbp/xbpsle.prg
* contrib/hbxbp/xbpspinbutton.prg
* contrib/hbxbp/xbpstatic.prg
* contrib/hbxbp/xbpstatusbar.prg
* contrib/hbxbp/xbptabpage.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbptreeview.prg
* contrib/hbxbp/xbpwindow.prg
! Adopted to new hbQT syntax.
Q*Class():new( ... ) => Q*Class( ... )

2010-09-14 14:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/demoqt.prg
! Adopted to new syntax.

* contrib/hbqt/utils/hbqtgen.prg
+ Implemented: Q*Class( ... ) syntax over Q*Class():new( ... ).
The tips extended by Viktor, thanks.

* contrib/hbqt/qtgui/THbQtUI.prg
! Adopted to new syntax.

* contrib/hbqt/qtcore/g/*.prg
* contrib/hbqt/qtgui/g/*.prg
* contrib/hbqt/qtnetwork/g/*.prg
* contrib/hbqt/qtwebkit/g/*.prg
* contrib/hbqt/qtdesigner/g/*.prg
* Regenerated.

2010-09-13 14:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/g/QTableWidget.cpp
* Regenerated.
* contrib/hbqt/qtgui/qth/QTableWidget.qth
* Transferred ownership of <qWidget> in :setCellWidget( nRow, nCol, qWidget )
to its parent object.

2010-09-13 12:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/hbqt_hbqabstractitemmodel.cpp
! Reverted back last commit, was generating GPF.
This is subject to further investigation as I was trying
to locate the cause of always increasing memory consumption.

2010-09-12 00:42 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbqt.ch
+ A couple of more constants.

+ contrib/hbide/resources/rp_arc.png
+ contrib/hbide/resources/rp_chord.png
+ contrib/hbide/resources/rp_diamond.png
+ contrib/hbide/resources/rp_ellipse.png
+ contrib/hbide/resources/rp_linediagleft.png
+ contrib/hbide/resources/rp_linediagright.png
+ contrib/hbide/resources/rp_linehorz.png
+ contrib/hbide/resources/rp_linevert.png
+ contrib/hbide/resources/rp_rectangle.png
+ contrib/hbide/resources/rp_roundrectangle.png
+ contrib/hbide/resources/rp_shapes.png
+ contrib/hbide/resources/rp_triangle.png

* contrib/hbide/hbide.qrc
+ Added: above images.

* contrib/hbide/hbqtoolbar.prg
+ Added: METHOD getItem().

* contrib/hbide/hbqreportsmanager.prg
+ Implemented: different shapes.
Rectangle, Rounded Rectangle, Ellipse, Arc, Chord,
Line - Horizontal, vertical, diagonal forward, diagobal backward.
Diamond, Triangle.
Graphics shapes implementation supports drag-drop features.

2010-09-10 19:10 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/ideedit.prg
! Alt+PageUp/Down now position the cursor to next line after
function ..() declaration line.
* contrib/hbide/ideshortcuts.prg
+ Added: Alt+PageDown, Alt+PageUp macros.
User now can tune it according to his editing habits.

2010-09-10 07:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/g/QPrinter.cpp
* Regenerated.
* contrib/hbqt/qtgui/qth/QPrinter.qth
! Fixed: constructor, now it accepts QPrinterInfo also as a parameter.

* contrib/hbide/ideedit.prg
+ Implemented: Alt+PageDown/PageUp keys to navigate to next/previous function.
A request received at FWH forums.

2010-09-09 09:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
! Few more steps gained on printing front.

2010-09-09 09:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ contrib/hbqt/qtcore/g/HBQString.cpp
+ Added: missing file from prev commit.
Damm it, I am getting less attentive since few days last, sorry.

2010-09-08 18:41 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/utils/hbqtgen.prg
! Code cleanup.

* contrib/hbqt/utils/qtcore.qtp
+ Added: two more classes.

+ contrib/hbqt/qtcore/qth/HBQString.qth
! It is exactly QString() class wrapper.
+ contrib/hbqt/qtcore/qth/QStringRef.qth
+ Added: two more classes.

* contrib/hbqt/qtcore/qth/QObject.qth
- Commented out two methods.

* contrib/hbqt/qtcore/g/filelist.hbm
* contrib/hbqt/qtcore/g/hbqtcore.h

+ contrib/hbqt/qtcore/g/QObject.cpp
+ contrib/hbqt/qtcore/g/QStringRef.cpp
+ contrib/hbqt/qtcore/g/THBQString.prg
+ contrib/hbqt/qtcore/g/TQStringRef.prg
+ Auto-generated.

+ contrib/hbqt/qtcore/hbqt_hbqstring.cpp
+ contrib/hbqt/qtcore/hbqt_hbqstring.h
* contrib/hbqt/qtcore/hbqtcore.hbm
+ Added: hbqt_hbqstring.cpp

* contrib/hbide/hbqreportsmanager.prg
! Some experiments.

2010-09-08 14:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idemisc.prg
* contrib/hbide/idetools.prg
* contrib/hbide/ideprojmanager.prg
+ Implemented: hbIDE specific macros available in Project's Environments
batch. The usage is like :
[ MinGW 4.4.1 ]
{content} SET project_name=${project_name}
{content} SET project_path=${project_path}
All macros available in Tools & Utilities can be used here also.

+ Project Tree: context-menu - Any project building action sets
the current project to the one which is invoked. Here we have
nothing to loose, rather gain. Thanks Maurizio for pointing.

2010-09-07 21:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ contrib/hbqt/qtgui/qth/QPrinterInfo.qth
+ Added: new class.

+ contrib/hbqt/qtgui/doc/en/class_qprinterinfo.txt
+ contrib/hbqt/qtgui/g/QPrinterInfo.cpp
+ contrib/hbqt/qtgui/g/TQPrinterInfo.prg
+ Auto-generated.

* contrib/hbqt/qtgui/g/filelist.hbm
* contrib/hbqt/qtgui/g/hbqtgui.h
* contrib/hbqt/utils/qtgui.qtp
+ Added: QPrinterInfo() class.

2010-09-07 19:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
+ Print Preview synchronized. Now many facts are under control.
% A lot other small artifacts covered.

2010-09-07 16:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idemisc.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idetools.prg
+ Added: Tools & Utilities - new macros:
"source_name_less_ext"
Current editing instance's source file's name part only.
hb_fNameSplit( cSource, , @cName ) => cName
"project_title"
Last compiled project's title. If no project is yet compiled
in current session of hbIDE, then project title of current
set project is used. If no current project is set, empty
string is substituted.
"project_path"
Last compiled project's path. Rest per "project_title" above.
"project_output_path"
Last compiled project's output path. If no project has been
compiled under current session, null string is substituted.
Here no assumption is taken from current set project.

Macros added per requested by Maurizio.

2010-09-07 09:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_hbslots.cpp
! Minor typo.
enjoy hbIDEing... Pritpal Bedi

User avatar
Rathinagiri
Posts: 5125
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 112 times
Been thanked: 114 times
Contact:

Post by Rathinagiri » Mon Sep 20, 2010 2:32 am

Thanks Pritpal. I am downloading...
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Post by bedipritpal » Mon Sep 20, 2010 6:41 pm

Hello

This commit may affect your printing system:

2010-09-20 01:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/idemisc.prg

* contrib/hbqt/qtgui/doc/en/class_qpainter.txt
* contrib/hbqt/qtgui/g/QPainter.cpp
* contrib/hbqt/qtgui/g/TQPainter.prg
* contrib/hbqt/qtgui/qth/QPainter.qth
+ Implemented: all multiple entry functions of QPainter() class
under single function call. Only exception is :fillRect()
which accepts similar parameters for different overloadings.

NOTE: all qPainter:draw*() functions have only single call now.
Before: :drawLine_6( ... )
Now: :drawLine( ... )
But be sure to pass arguments as Harbour objects created with Q*Class( ... ) only if it is an object.
You cannot pass direct pointers obtained as a result of some method call.
For in-depth knowledge you can explore harbour/contrib/hbide/idereportsmanager.prg.
enjoy hbIDEing... Pritpal Bedi

User avatar
Roberto Lopez
HMG Founder
Posts: 3889
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 126 times

Post by Roberto Lopez » Tue Sep 21, 2010 3:05 am

bedipritpal wrote:Hello

This commit may affect your printing system:
<...>
Thanks for the info.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5125
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 112 times
Been thanked: 114 times
Contact:

Post by Rathinagiri » Tue Sep 21, 2010 7:47 am

Hi Pritpal,

I want to enable/disable sysmenu and titlebar of a window:

I used the following code. It didn't work. However, minimize button and maximize button are working fine.

Code: Select all

....
            IF hb_bitAnd( nFlags, Qt_WindowSystemMenuHint ) == Qt_WindowSystemMenuHint // system menu is inplace
               IF !lValue
                  nFlags -= Qt_WindowSystemMenuHint
                  ::oQTObject:setWindowFlags( nFlags )
                  ::oQTObject:show()
               ENDIF
            ELSE
               IF lValue
                  nFlags += Qt_WindowSystemMenuHint
                  ::oQTObject:setWindowFlags( nFlags )
                  ::oQTObject:show()
               ENDIF
            ENDIF
...
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Post by bedipritpal » Tue Sep 21, 2010 3:14 pm

rathinagiri wrote:Hi Pritpal,

I want to enable/disable sysmenu and titlebar of a window:

I used the following code. It didn't work. However, minimize button and maximize button are working fine.

Code: Select all

....
            IF hb_bitAnd( nFlags, Qt_WindowSystemMenuHint ) == Qt_WindowSystemMenuHint // system menu is inplace
               IF !lValue
                  nFlags -= Qt_WindowSystemMenuHint
                  ::oQTObject:setWindowFlags( nFlags )
                  ::oQTObject:show()
               ENDIF
            ELSE
               IF lValue
                  nFlags += Qt_WindowSystemMenuHint
                  ::oQTObject:setWindowFlags( nFlags )
                  ::oQTObject:show()
               ENDIF
            ENDIF
...
Code is absolutely ok.
I never tried it before so cannot comment.
Please look into some c++ example on the net and adopt.
enjoy hbIDEing... Pritpal Bedi

User avatar
Rathinagiri
Posts: 5125
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 112 times
Been thanked: 114 times
Contact:

Post by Rathinagiri » Fri Sep 24, 2010 4:35 am

Hi Pritpal,

I have solved the above SystemMenu problem by the following code. This is for your kind information.

Code: Select all

....
      nFlags := ::oQTObject:windowFlags()
      If Pcount() == 0
         IF hb_bitAnd( nFlags, Qt_WindowSystemMenuHint ) == Qt_WindowSystemMenuHint
            RETURN .t.
         ELSE
            RETURN .f.
         ENDIF
      ElseIf Pcount() == 1
         IF hb_bitAnd( nFlags, Qt_WindowSystemMenuHint ) == Qt_WindowSystemMenuHint // system menu is inplace
            IF !lValue
               nFlags += Qt_FramelessWindowHint
               nFlags -= Qt_WindowSystemMenuHint
               ::oQTObject:setWindowFlags( nFlags )
               ::oQTObject:show()
            ENDIF
         ELSE
            IF lValue
               nFlags -= Qt_FramelessWindowHint
               nFlags += Qt_WindowSystemMenuHint
               ::oQTObject:setWindowFlags( nFlags )
               ::oQTObject:show()
            ENDIF
         ENDIF
      EndIf
...
And for Titlebar disable/enable:

Code: Select all

...
      nFlags := ::oQTObject:windowFlags()
      If Pcount() == 0
         IF hb_bitAnd( nFlags, Qt_FramelessWindowHint ) == Qt_FramelessWindowHint
            RETURN .F.
         ELSE
            RETURN .T.
         ENDIF
      ElseIf Pcount() == 1
         IF hb_bitAnd( nFlags, Qt_FramelessWindowHint ) == Qt_FramelessWindowHint // titlebar is not inplace
            IF lValue
               nFlags -= Qt_FramelessWindowHint
               nFlags += Qt_WindowCloseButtonHint
               nFlags += Qt_WindowTitleHint
               ::oQTObject:setWindowFlags( nFlags )
               ::oQTObject:show()
            ENDIF
         ELSE
            IF !lValue
               If hb_bitAnd(nFlags, Qt_WindowCloseButtonHint) == Qt_WindowCloseButtonHint // close button is also there!
                  nFlags -= Qt_WindowCloseButtonHint
               Endif
               If hb_bitAnd(nFlags, Qt_WindowTitleHint) == Qt_WindowTitleHint // title bar should be removed
                  nFlags -= Qt_WindowTitleHint
               Endif
               nFlags += Qt_FramelessWindowHint  // frameless window flag is enabled
               ::oQTObject:setWindowFlags( nFlags )
               ::oQTObject:show()
            ENDIF
         ENDIF
      EndIf
...
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Rathinagiri
Posts: 5125
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 112 times
Been thanked: 114 times
Contact:

Post by Rathinagiri » Mon Sep 27, 2010 2:06 pm

Hi Pritpal,

Can you please tell me if you have a proposal to implement QDesktopServices class?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bedipritpal
Posts: 122
Joined: Thu Sep 02, 2010 10:47 pm

Post by bedipritpal » Mon Sep 27, 2010 7:47 pm

rathinagiri wrote:Hi Pritpal,
This is for your kind information.
Thanks, information was really "kind" to me.
enjoy hbIDEing... Pritpal Bedi

Post Reply