From 22f35559b766e29efcde0f77e31f91c78cd21d45 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 10 Jun 2010 05:45:55 +0000 Subject: [PATCH] 2010-06-09 22:25 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbqt/qth/QHideEvent.qth + contrib/hbqt/qth/QShowEvent.qth + contrib/hbqt/qth/QWindowStateChangeEvent.qth + Added new classes. + contrib/hbqt/qtgui/QHideEvent.cpp + contrib/hbqt/qtgui/QShowEvent.cpp + contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp + contrib/hbqt/qtgui/TQHideEvent.prg + contrib/hbqt/qtgui/TQShowEvent.prg + contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg + Auto generated. * contrib/hbqt/qtgui/filelist.mk + Classes auto added. * contrib/hbide/resources/fullscreen.png + Added image for trayicon context menu. * contrib/hbqt/generator/qt45.qtp + Added new classes. * contrib/hbqt/hbqt.ch + Added QSystemTrayIcon_* constants. * contrib/hbqt/hbqt.h + Constants for new classes. * contrib/hbqt/hbqt_base.cpp + HBQT_ISQTSTATICLINKED() function provided by CarozoDeQuilmes. * contrib/hbqt/hbqt_garbage.h * Auto generated. * contrib/hbqt/hbqt_hbslots.cpp * contrib/hbqt/hbqt_hbslots.h + Signal/Slots for QSystemTrayIcon():activated(...). * contrib/hbide/hbide.prg * contrib/hbide/ideactions.prg * contrib/hbide/idedocks.prg * contrib/hbide/ideobject.prg + Implemented: minimize action on hbIDE window landing in system tray instead of statusbar. For now this is the default but provision is in place to base it on user request. Once minimized in system tray, left-click will restore the window and icon in tray will disappear. Right-click on tray icon will bring forward a menu with "Show" and "Exit" options. Exit is equivalant to toolbar's exit icon. This feature will be available only on those OSes which support system tray area. Please test on all aupported systems. I am also interested to know which other actions can make-up in the icon's context menu. --- harbour/ChangeLog | 54 ++++ harbour/contrib/hbide/hbide.prg | 4 + harbour/contrib/hbide/ideactions.prg | 2 +- harbour/contrib/hbide/idedocks.prg | 231 ++++++++++++++---- harbour/contrib/hbide/ideobject.prg | 2 + .../contrib/hbide/resources/fullscreen.png | Bin 0 -> 650 bytes harbour/contrib/hbqt/generator/qt45.qtp | 3 + harbour/contrib/hbqt/hbqt.ch | 6 + harbour/contrib/hbqt/hbqt.h | 3 + harbour/contrib/hbqt/hbqt_base.cpp | 9 + harbour/contrib/hbqt/hbqt_garbage.h | 6 + harbour/contrib/hbqt/hbqt_hbslots.cpp | 6 + harbour/contrib/hbqt/hbqt_hbslots.h | 3 + harbour/contrib/hbqt/qtgui/QHideEvent.cpp | 122 +++++++++ harbour/contrib/hbqt/qtgui/QShowEvent.cpp | 122 +++++++++ .../hbqt/qtgui/QWindowStateChangeEvent.cpp | 136 +++++++++++ harbour/contrib/hbqt/qtgui/TQHideEvent.prg | 81 ++++++ harbour/contrib/hbqt/qtgui/TQShowEvent.prg | 81 ++++++ .../hbqt/qtgui/TQWindowStateChangeEvent.prg | 86 +++++++ harbour/contrib/hbqt/qtgui/filelist.mk | 6 + harbour/contrib/hbqt/qth/QHideEvent.qth | 93 +++++++ harbour/contrib/hbqt/qth/QShowEvent.qth | 93 +++++++ .../hbqt/qth/QWindowStateChangeEvent.qth | 94 +++++++ 23 files changed, 1188 insertions(+), 55 deletions(-) create mode 100644 harbour/contrib/hbide/resources/fullscreen.png create mode 100644 harbour/contrib/hbqt/qtgui/QHideEvent.cpp create mode 100644 harbour/contrib/hbqt/qtgui/QShowEvent.cpp create mode 100644 harbour/contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp create mode 100644 harbour/contrib/hbqt/qtgui/TQHideEvent.prg create mode 100644 harbour/contrib/hbqt/qtgui/TQShowEvent.prg create mode 100644 harbour/contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg create mode 100644 harbour/contrib/hbqt/qth/QHideEvent.qth create mode 100644 harbour/contrib/hbqt/qth/QShowEvent.qth create mode 100644 harbour/contrib/hbqt/qth/QWindowStateChangeEvent.qth diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9ec3b8a952..ff03678f3f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,60 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-09 22:25 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + + contrib/hbqt/qth/QHideEvent.qth + + contrib/hbqt/qth/QShowEvent.qth + + contrib/hbqt/qth/QWindowStateChangeEvent.qth + + Added new classes. + + contrib/hbqt/qtgui/QHideEvent.cpp + + contrib/hbqt/qtgui/QShowEvent.cpp + + contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp + + contrib/hbqt/qtgui/TQHideEvent.prg + + contrib/hbqt/qtgui/TQShowEvent.prg + + contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg + + Auto generated. + + * contrib/hbqt/qtgui/filelist.mk + + Classes auto added. + + * contrib/hbide/resources/fullscreen.png + + Added image for trayicon context menu. + + * contrib/hbqt/generator/qt45.qtp + + Added new classes. + + * contrib/hbqt/hbqt.ch + + Added QSystemTrayIcon_* constants. + + * contrib/hbqt/hbqt.h + + Constants for new classes. + + * contrib/hbqt/hbqt_base.cpp + + HBQT_ISQTSTATICLINKED() function provided by CarozoDeQuilmes. + + * contrib/hbqt/hbqt_garbage.h + * Auto generated. + + * contrib/hbqt/hbqt_hbslots.cpp + * contrib/hbqt/hbqt_hbslots.h + + Signal/Slots for QSystemTrayIcon():activated(...). + + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/idedocks.prg + * contrib/hbide/ideobject.prg + + Implemented: minimize action on hbIDE window landing in system tray + instead of statusbar. For now this is the default but provision is + in place to base it on user request. Once minimized in system tray, + left-click will restore the window and icon in tray will disappear. + Right-click on tray icon will bring forward a menu with "Show" and + "Exit" options. Exit is equivalant to toolbar's exit icon. + + This feature will be available only on those OSes which support + system tray area. Please test on all aupported systems. I am also + interested to know which other actions can make-up in the + icon's context menu. + 2010-06-10 02:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/wce/poccarm.mk * config/win/xcc.mk diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 0f64cd295f..1aadbf9266 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -289,6 +289,9 @@ CLASS HbIde DATA lClosing INIT .f. DATA lStatusBarVisible INIT .t. + DATA oSys + DATA oSysMenu + METHOD new( aParams ) METHOD create( aParams ) METHOD destroy() @@ -1408,3 +1411,4 @@ METHOD HbIde:testPainter( qPainter ) RETURN NIL /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 54d58dbaf2..8096e007fd 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -145,7 +145,7 @@ METHOD IdeActions:buildActions() qAction:setCheckable( iif( empty( a_[ ACT_CHECKABLE ] ), .F., upper( a_[ ACT_CHECKABLE ] ) == "YES" ) ) qAction:setText( strtran( a_[ ACT_TEXT ], "~", "&" ) ) IF !empty( a_[ ACT_IMAGE ] ) - qAction:setIcon( ::resPath + a_[ ACT_IMAGE ] + ".png" ) + qAction:setIcon( hbide_image( a_[ ACT_IMAGE ] ) ) ENDIF #if 0 IF !empty( a_[ ACT_SHORTCUT ] ) diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index cb9e89ba6d..fe874ab8e6 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -68,6 +68,7 @@ #include "common.ch" #include "hbclass.ch" #include "xbp.ch" +#include "appevent.ch" #include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -86,6 +87,11 @@ #define dockSourceThumbnail_visibilityChanged 312 #define dockQScintilla_visibilityChanged 313 +#define qTimer_timeOut 401 +#define qSystemTrayIcon_show 402 +#define qSystemTrayIcon_close 403 +#define qSystemTrayIcon_activated 404 + /*----------------------------------------------------------------------*/ CLASS IdeDocks INHERIT IdeObject @@ -98,6 +104,15 @@ CLASS IdeDocks INHERIT IdeObject DATA qTBtnClose + DATA lChanging INIT .f. + + DATA qTimer + DATA nPrevWindowState + DATA lSystemTrayAvailable INIT .f. + DATA lMinimizeInSystemTray INIT .t. // .f. + DATA qAct1 + DATA qAct2 + METHOD new( oIde ) METHOD create( oIde ) METHOD destroy() @@ -138,6 +153,8 @@ CLASS IdeDocks INHERIT IdeObject METHOD buildSourceThumbnail() METHOD buildQScintilla() METHOD buildUpDownWidget() + METHOD buildSystemTray() + METHOD showDlgBySystemTrayIconCommand() ENDCLASS @@ -152,6 +169,7 @@ METHOD IdeDocks:new( oIde ) METHOD IdeDocks:create( oIde ) DEFAULT oIde TO ::oIde ::oIde := oIde + RETURN Self /*----------------------------------------------------------------------*/ @@ -184,6 +202,12 @@ METHOD IdeDocks:destroy() ::disconnect( ::oDockB2:oWidget , "visibilityChanged(bool)" ) #endif + IF !empty( ::oSys ) + ::disconnect( ::oSys , "activated(QSystemTrayIcon::ActivationReason)" ) + ::disconnect( ::qAct1 , "triggered(bool)" ) + ::disconnect( ::qAct2 , "triggered(bool)" ) + ENDIF + FOR EACH qTBtn IN ::aPanels ::disconnect( qTBtn, "clicked()" ) qTBtn := NIL @@ -258,6 +282,158 @@ METHOD IdeDocks:buildDialog() ::setView( "Stats" ) /* Always call with name */ + ::oDlg:connectEvent( ::oDlg:oWidget, QEvent_WindowStateChange, {|e| ::execEvent( QEvent_WindowStateChange, e ) } ) + ::oDlg:connectEvent( ::oDlg:oWidget, QEvent_Hide , {|e| ::execEvent( QEvent_Hide, e ) } ) + + #if 1 + ::buildSystemTray() + #endif + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeDocks:buildSystemTray() + + IF empty( ::oSys ) + ::oIde:oSys := QSystemTrayIcon():new( ::oDlg:oWidget ) + IF ( ::lSystemTrayAvailable := ::oSys:isSystemTrayAvailable() ) .AND. ::lMinimizeInSystemTray + ::oSys:setIcon( hbide_image( "hbide" ) ) + ::connect( ::oSys, "activated(QSystemTrayIcon::ActivationReason)", {|p| ::execEvent( qSystemTrayIcon_activated, p ) } ) + + ::oIde:oSysMenu := QMenu():new( ::oDlg:oWidget ) + ::qAct1 := ::oSysMenu:addAction_1( hbide_image( "fullscreen" ), "&Show" ) + ::oSysMenu:addSeparator() + ::qAct2 := ::oSysMenu:addAction_1( hbide_image( "exit" ), "&Exit" ) + + ::connect( ::qAct1, "triggered(bool)", {|| ::execEvent( qSystemTrayIcon_show ) } ) + ::connect( ::qAct2, "triggered(bool)", {|| ::execEvent( qSystemTrayIcon_close ) } ) + + ::oSys:setContextMenu( ::oSysMenu ) + ::oSys:hide() + ::oSys:setToolTip( "Harbour's Integrated Development Environment (v1.0)" ) + ENDIF + ENDIF + + RETURN nil + +/*----------------------------------------------------------------------*/ + +METHOD IdeDocks:execEvent( nMode, p ) + LOCAL qEvent + + DO CASE + + CASE nMode == 2 /* HelpWidget:contextMenuRequested(qPoint) */ + hbide_popupBrwContextMenu( ::qHelpBrw, p ) + + CASE nMode == dockQScintilla_visibilityChanged + IF p; ::oEM:qscintilla(); ENDIF + + CASE nMode == dockSourceThumbnail_visibilityChanged + IF p; ::oEM:showThumbnail(); ENDIF + + /* Left Panel Docks */ + CASE nMode == dockSkltnsTree_visibilityChanged + IF p; ::oSK:showTree(); ENDIF + + /* Right Panel Docks */ + CASE nMode == dockHelpDock_visibilityChanged + IF p; ::oHelpDock:oWidget:raise(); ENDIF + + CASE nMode == dockDocViewer_visibilityChanged + IF p; ::oHL:show(); ::oDocViewDock:oWidget:raise(); ENDIF + + CASE nMode == dockDocWriter_visibilityChanged + IF p; ::oDW:show(); ::oDocWriteDock:oWidget:raise(); ENDIF + + CASE nMode == oFuncDock_visibilityChanged + IF p; ::oFuncDock:oWidget:raise(); ENDIF + + CASE nMode == docFunctions_visibilityChanged + IF p; ::oFN:show(); ::oFunctionsDock:oWidget:raise(); ENDIF + + CASE nMode == dockProperties_visibilityChanged + IF p; ::oPM:fetchProperties(); ::oPropertiesDock:oWidget:raise(); ENDIF + + CASE nMode == docEnvironments_visibilityChanged + IF p; ::oEV:show(); ::oEnvironDock:oWidget:raise(); ENDIF + + CASE nMode == docSkeletons_visibilityChanged + IF p; ::oSK:show(); ::oSkeltnDock:oWidget:raise(); ENDIF + + CASE nMode == dockThemes_visibilityChanged + IF p; ::oTH:show(); ::oThemesDock:oWidget:raise(); ENDIF + + CASE nMode == dockFindInFiles_visibilityChanged + IF p; ::oFF:show(); ::oFindDock:oWidget:raise(); ENDIF + + CASE nMode == QEvent_WindowStateChange + qEvent := QWindowStateChangeEvent():from( p ) + ::nPrevWindowState := qEvent:oldState() + + CASE nMode == QEvent_Hide + IF ::lSystemTrayAvailable .AND. ::lMinimizeInSystemTray + qEvent := QHideEvent():from( p ) + IF ! ::lChanging + ::lChanging := .t. + IF qEvent:spontaneous() + IF empty( ::qTimer ) + ::qTimer := QTimer():New() + ::qTimer:setSingleShot( .t. ) + ::qTimer:setInterval( 250 ) + ::connect( ::qTimer, "timeout()", {|| ::execEvent( qTimer_timeOut ) } ) + ENDIF + ::qTimer:start() + qEvent:ignore() + ENDIF + ::lChanging := .f. + ENDIF + ENDIF + + CASE nMode == qTimer_timeOut + ::oDlg:hide() + ::oSys:setToolTip( ::oDlg:oWidget:windowTitle() ) + ::oSys:show() + + CASE nMode == qSystemTrayIcon_close + PostAppEvent( xbeP_Close, NIL, NIL, ::oDlg ) + + CASE nMode == qSystemTrayIcon_show + ::showDlgBySystemTrayIconCommand() + + CASE nMode == qSystemTrayIcon_activated + IF p == QSystemTrayIcon_Trigger + ::showDlgBySystemTrayIconCommand() + + ELSEIF p == QSystemTrayIcon_DoubleClick + + ELSEIF p == QSystemTrayIcon_Context + + ELSEIF p == QSystemTrayIcon_MiddleClick + + ENDIF + + ENDCASE + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeDocks:showDlgBySystemTrayIconCommand()() + + ::oSys:hide() + + IF hb_bitAnd( ::nPrevWindowState, Qt_WindowMaximized ) == Qt_WindowMaximized + ::oDlg:oWidget:showMaximized() + ELSEIF hb_bitAnd( ::nPrevWindowState, Qt_WindowFullScreen ) == Qt_WindowFullScreen + ::oDlg:oWidget:showFullScreen() + ELSE + ::oDlg:oWidget:showNormal() + ENDIF + + ::oDlg:oWidget:raise() + ::oDlg:oWidget:activateWindow() + RETURN Self /*----------------------------------------------------------------------*/ @@ -332,60 +508,6 @@ METHOD IdeDocks:getADockWidget( nAreas, cObjectName, cWindowTitle, nFlags ) /*----------------------------------------------------------------------*/ -METHOD IdeDocks:execEvent( nMode, p ) - - DO CASE - - CASE nMode == 2 /* HelpWidget:contextMenuRequested(qPoint) */ - hbide_popupBrwContextMenu( ::qHelpBrw, p ) - - CASE nMode == dockQScintilla_visibilityChanged - IF p; ::oEM:qscintilla(); ENDIF - - CASE nMode == dockSourceThumbnail_visibilityChanged - IF p; ::oEM:showThumbnail(); ENDIF - - /* Left Panel Docks */ - CASE nMode == dockSkltnsTree_visibilityChanged - IF p; ::oSK:showTree(); ENDIF - - /* Right Panel Docks */ - CASE nMode == dockHelpDock_visibilityChanged - IF p; ::oHelpDock:oWidget:raise(); ENDIF - - CASE nMode == dockDocViewer_visibilityChanged - IF p; ::oHL:show(); ::oDocViewDock:oWidget:raise(); ENDIF - - CASE nMode == dockDocWriter_visibilityChanged - IF p; ::oDW:show(); ::oDocWriteDock:oWidget:raise(); ENDIF - - CASE nMode == oFuncDock_visibilityChanged - IF p; ::oFuncDock:oWidget:raise(); ENDIF - - CASE nMode == docFunctions_visibilityChanged - IF p; ::oFN:show(); ::oFunctionsDock:oWidget:raise(); ENDIF - - CASE nMode == dockProperties_visibilityChanged - IF p; ::oPM:fetchProperties(); ::oPropertiesDock:oWidget:raise(); ENDIF - - CASE nMode == docEnvironments_visibilityChanged - IF p; ::oEV:show(); ::oEnvironDock:oWidget:raise(); ENDIF - - CASE nMode == docSkeletons_visibilityChanged - IF p; ::oSK:show(); ::oSkeltnDock:oWidget:raise(); ENDIF - - CASE nMode == dockThemes_visibilityChanged - IF p; ::oTH:show(); ::oThemesDock:oWidget:raise(); ENDIF - - CASE nMode == dockFindInFiles_visibilityChanged - IF p; ::oFF:show(); ::oFindDock:oWidget:raise(); ENDIF - - ENDCASE - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD IdeDocks:setView( cView ) LOCAL n, nIndex @@ -1160,3 +1282,4 @@ METHOD IdeDocks:animateComponents( nMode ) RETURN Self /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 4cb494dc58..9b1ea013c6 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -194,6 +194,8 @@ CLASS IdeObject ACCESS oQScintillaDock INLINE ::oIde:oQScintillaDock ACCESS oMainToolbar INLINE ::oIde:oMainToolbar ACCESS oUpDn INLINE ::oIde:oUpDn + ACCESS oSys INLINE ::oIde:oSys + ACCESS oSysMenu INLINE ::oIde:oSysMenu ACCESS lProjTreeVisible INLINE ::oIde:lProjTreeVisible ACCESS lDockRVisible INLINE ::oIde:lDockRVisible diff --git a/harbour/contrib/hbide/resources/fullscreen.png b/harbour/contrib/hbide/resources/fullscreen.png new file mode 100644 index 0000000000000000000000000000000000000000..ffdabd4e97cf7b4d3286ea169c5a71b2f889b052 GIT binary patch literal 650 zcmV;50(Jd~P)Mh53JODVWnpw>WFU8GbZ8({Xk{Qr zNlj3Y*^6%g00GuXL_t(I%bk-uXp>PC$AABu8#NVa(wI$T<{@WGkC&Rq}NCt4}x%j9e{w{GG08_2W z82w8IB#^|@_+o3% z62b*n^?G2CgpncfV1l`YKTLhjGCTK^?5{i{FQ&+~TjD@QIr1YpnEWG%pTp?h$I%#R%DFN>Tzx)VuA;$%;RRC=Co+23>x zBpc7cvJ1JtOWb!3dz~l(Brz86V`= 0x040500 diff --git a/harbour/contrib/hbqt/hbqt_garbage.h b/harbour/contrib/hbqt/hbqt_garbage.h index 843d77f54a..c68c933acb 100644 --- a/harbour/contrib/hbqt/hbqt_garbage.h +++ b/harbour/contrib/hbqt/hbqt_garbage.h @@ -94,6 +94,7 @@ extern QT_G_FUNC( hbqt_gcRelease_QGroupBox ); extern QT_G_FUNC( hbqt_gcRelease_QHBoxLayout ); extern QT_G_FUNC( hbqt_gcRelease_QHeaderView ); extern QT_G_FUNC( hbqt_gcRelease_QHelpEvent ); +extern QT_G_FUNC( hbqt_gcRelease_QHideEvent ); extern QT_G_FUNC( hbqt_gcRelease_QHttp ); extern QT_G_FUNC( hbqt_gcRelease_QHttpHeader ); extern QT_G_FUNC( hbqt_gcRelease_QHttpRequestHeader ); @@ -175,6 +176,7 @@ extern QT_G_FUNC( hbqt_gcRelease_QScrollArea ); extern QT_G_FUNC( hbqt_gcRelease_QScrollBar ); extern QT_G_FUNC( hbqt_gcRelease_QSessionManager ); extern QT_G_FUNC( hbqt_gcRelease_QSettings ); +extern QT_G_FUNC( hbqt_gcRelease_QShowEvent ); extern QT_G_FUNC( hbqt_gcRelease_QSignalMapper ); extern QT_G_FUNC( hbqt_gcRelease_QSize ); extern QT_G_FUNC( hbqt_gcRelease_QSizeF ); @@ -291,6 +293,7 @@ extern QT_G_FUNC( hbqt_gcRelease_QWidget ); extern QT_G_FUNC( hbqt_gcRelease_QWidgetAction ); extern QT_G_FUNC( hbqt_gcRelease_QWidgetItem ); extern QT_G_FUNC( hbqt_gcRelease_QWindowsStyle ); +extern QT_G_FUNC( hbqt_gcRelease_QWindowStateChangeEvent ); extern QT_G_FUNC( hbqt_gcRelease_QWizard ); extern QT_G_FUNC( hbqt_gcRelease_QWizardPage ); @@ -380,6 +383,7 @@ extern void * hbqt_gcAllocate_QGroupBox( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHBoxLayout( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHeaderView( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHelpEvent( void * pObj, bool bNew ); +extern void * hbqt_gcAllocate_QHideEvent( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHttp( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHttpHeader( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QHttpRequestHeader( void * pObj, bool bNew ); @@ -461,6 +465,7 @@ extern void * hbqt_gcAllocate_QScrollArea( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QScrollBar( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSessionManager( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSettings( void * pObj, bool bNew ); +extern void * hbqt_gcAllocate_QShowEvent( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSignalMapper( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSize( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QSizeF( void * pObj, bool bNew ); @@ -577,6 +582,7 @@ extern void * hbqt_gcAllocate_QWidget( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QWidgetAction( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QWidgetItem( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QWindowsStyle( void * pObj, bool bNew ); +extern void * hbqt_gcAllocate_QWindowStateChangeEvent( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QWizard( void * pObj, bool bNew ); extern void * hbqt_gcAllocate_QWizardPage( void * pObj, bool bNew ); diff --git a/harbour/contrib/hbqt/hbqt_hbslots.cpp b/harbour/contrib/hbqt/hbqt_hbslots.cpp index 58bea8cccc..751dfc1cdf 100644 --- a/harbour/contrib/hbqt/hbqt_hbslots.cpp +++ b/harbour/contrib/hbqt/hbqt_hbslots.cpp @@ -232,6 +232,8 @@ static bool connect_signal( QString signal, QObject * object, HBSlots * t_slots if( signal == ( QString ) "highlighted(QModelIndex)" ) return object->connect( object, SIGNAL( highlighted( const QModelIndex & ) ), t_slots, SLOT( highlighted( const QModelIndex & ) ), Qt::AutoConnection ); /* QAbstractButton */ if( signal == ( QString ) "toggled(bool)" ) return object->connect( object, SIGNAL( toggled( bool ) ), t_slots, SLOT( toggled( bool ) ), Qt::AutoConnection ); + /* QSystemTrayIcon */ + if( signal == ( QString ) "activated(QSystemTrayIcon::ActivationReason)" ) return object->connect( object, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), t_slots, SLOT( activated( QSystemTrayIcon::ActivationReason ) ), Qt::AutoConnection ); /* New */ return false; } @@ -401,6 +403,8 @@ static bool disconnect_signal( QObject * object, const char * signal ) if( signal == ( QString ) "highlighted(QModelIndex)" ) return object->disconnect( SIGNAL( highlighted( const QModelIndex & ) ) ); /* QAbstractButton */ if( signal == ( QString ) "toggled(bool)" ) return object->disconnect( SIGNAL( toggled( bool ) ) ); + /* QSystemTrayIcon */ + if( signal == ( QString ) "activated(QSystemTrayIcon::ActivationReason)" ) return object->disconnect( SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ) ); /* new */ return false; @@ -1024,6 +1028,8 @@ void HBSlots::activated( const QModelIndex & index ) void HBSlots::highlighted( const QModelIndex & index ) { hbqt_SlotsExecModel( this, qobject_cast( sender() ), "highlighted(QModelIndex)", index ); } /* QAbstractButton */ void HBSlots::toggled( bool checked ) { hbqt_SlotsExecBool( this, qobject_cast( sender() ), "toggled(bool)", checked ); } +/* QSystemTrayIcon */ +void HBSlots::activated( QSystemTrayIcon::ActivationReason reason ) { hbqt_SlotsExecInt( this, qobject_cast( sender() ), "activated(QSystemTrayIcon::ActivationReason)", reason ); } /* Latest */ /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/hbqt_hbslots.h b/harbour/contrib/hbqt/hbqt_hbslots.h index 494f9e3992..81fa502283 100644 --- a/harbour/contrib/hbqt/hbqt_hbslots.h +++ b/harbour/contrib/hbqt/hbqt_hbslots.h @@ -66,6 +66,7 @@ #include #include #include +#include /*----------------------------------------------------------------------*/ @@ -282,6 +283,8 @@ public slots: void highlighted( const QModelIndex & index ); /* QAbstractButton */ void toggled( bool checked ); + /* QSystemTrayIcon */ + void activated( QSystemTrayIcon::ActivationReason reason ); /* Latest */ }; diff --git a/harbour/contrib/hbqt/qtgui/QHideEvent.cpp b/harbour/contrib/hbqt/qtgui/QHideEvent.cpp new file mode 100644 index 0000000000..2046c62b42 --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/QHideEvent.cpp @@ -0,0 +1,122 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "../hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +#include + +#include + + +/* + * QHideEvent () + */ + +typedef struct +{ + QHideEvent * ph; + bool bNew; + QT_G_FUNC_PTR func; +} QGC_POINTER_QHideEvent; + +QT_G_FUNC( hbqt_gcRelease_QHideEvent ) +{ + HB_SYMBOL_UNUSED( Cargo ); + QGC_POINTER * p = ( QGC_POINTER * ) Cargo; + + if( p && p->bNew ) + { + p->ph = NULL; + } +} + +void * hbqt_gcAllocate_QHideEvent( void * pObj, bool bNew ) +{ + QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() ); + + p->ph = ( QHideEvent * ) pObj; + p->bNew = bNew; + p->func = hbqt_gcRelease_QHideEvent; + + if( bNew ) + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QHideEvent", pObj ) ); + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QHideEvent", pObj ) ); + } + return p; +} + +HB_FUNC( QT_QHIDEEVENT ) +{ + // hb_retptr( new QHideEvent() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtgui/QShowEvent.cpp b/harbour/contrib/hbqt/qtgui/QShowEvent.cpp new file mode 100644 index 0000000000..83cd40223c --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/QShowEvent.cpp @@ -0,0 +1,122 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "../hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +#include + +#include + + +/* + * QShowEvent () + */ + +typedef struct +{ + QShowEvent * ph; + bool bNew; + QT_G_FUNC_PTR func; +} QGC_POINTER_QShowEvent; + +QT_G_FUNC( hbqt_gcRelease_QShowEvent ) +{ + HB_SYMBOL_UNUSED( Cargo ); + QGC_POINTER * p = ( QGC_POINTER * ) Cargo; + + if( p && p->bNew ) + { + p->ph = NULL; + } +} + +void * hbqt_gcAllocate_QShowEvent( void * pObj, bool bNew ) +{ + QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() ); + + p->ph = ( QShowEvent * ) pObj; + p->bNew = bNew; + p->func = hbqt_gcRelease_QShowEvent; + + if( bNew ) + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QShowEvent", pObj ) ); + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QShowEvent", pObj ) ); + } + return p; +} + +HB_FUNC( QT_QSHOWEVENT ) +{ + // hb_retptr( new QShowEvent() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp b/harbour/contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp new file mode 100644 index 0000000000..d36eabf0e3 --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/QWindowStateChangeEvent.cpp @@ -0,0 +1,136 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + +#include "../hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +#include + +#include + + +/* + * QWindowStateChangeEvent () + */ + +typedef struct +{ + QWindowStateChangeEvent * ph; + bool bNew; + QT_G_FUNC_PTR func; +} QGC_POINTER_QWindowStateChangeEvent; + +QT_G_FUNC( hbqt_gcRelease_QWindowStateChangeEvent ) +{ + HB_SYMBOL_UNUSED( Cargo ); + QGC_POINTER * p = ( QGC_POINTER * ) Cargo; + + if( p && p->bNew ) + { + p->ph = NULL; + } +} + +void * hbqt_gcAllocate_QWindowStateChangeEvent( void * pObj, bool bNew ) +{ + QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() ); + + p->ph = ( QWindowStateChangeEvent * ) pObj; + p->bNew = bNew; + p->func = hbqt_gcRelease_QWindowStateChangeEvent; + + if( bNew ) + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QWindowStateChangeEvent", pObj ) ); + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QWindowStateChangeEvent", pObj ) ); + } + return p; +} + +HB_FUNC( QT_QWINDOWSTATECHANGEEVENT ) +{ + // hb_retptr( ( QWindowStateChangeEvent* ) new QWindowStateChangeEvent() ); +} + +/* + * Qt::WindowStates oldState () const + */ +HB_FUNC( QT_QWINDOWSTATECHANGEEVENT_OLDSTATE ) +{ + QWindowStateChangeEvent * p = hbqt_par_QWindowStateChangeEvent( 1 ); + if( p ) + hb_retni( ( Qt::WindowStates ) ( p )->oldState() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QWINDOWSTATECHANGEEVENT_OLDSTATE FP=hb_retni( ( Qt::WindowStates ) ( p )->oldState() ); p is NULL" ) ); + } +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtgui/TQHideEvent.prg b/harbour/contrib/hbqt/qtgui/TQHideEvent.prg new file mode 100644 index 0000000000..42cc1b45b1 --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/TQHideEvent.prg @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QHideEvent INHERIT HbQtObjectHandler, QEvent + + METHOD new( ... ) + + + ENDCLASS + + +METHOD QHideEvent:new( ... ) + LOCAL p + FOR EACH p IN { ... } + hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) ) + NEXT + ::pPtr := Qt_QHideEvent( ... ) + RETURN Self + diff --git a/harbour/contrib/hbqt/qtgui/TQShowEvent.prg b/harbour/contrib/hbqt/qtgui/TQShowEvent.prg new file mode 100644 index 0000000000..a94c5c8f78 --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/TQShowEvent.prg @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QShowEvent INHERIT HbQtObjectHandler, QEvent + + METHOD new( ... ) + + + ENDCLASS + + +METHOD QShowEvent:new( ... ) + LOCAL p + FOR EACH p IN { ... } + hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) ) + NEXT + ::pPtr := Qt_QShowEvent( ... ) + RETURN Self + diff --git a/harbour/contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg b/harbour/contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg new file mode 100644 index 0000000000..6351ecaa90 --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/TQWindowStateChangeEvent.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009-2010 Pritpal Bedi + * + * Copyright 2009 Marcos Antonio Gambeta + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QWindowStateChangeEvent INHERIT HbQtObjectHandler, QEvent + + METHOD new( ... ) + + METHOD oldState() + + ENDCLASS + + +METHOD QWindowStateChangeEvent:new( ... ) + LOCAL p + FOR EACH p IN { ... } + hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) ) + NEXT + ::pPtr := Qt_QWindowStateChangeEvent( ... ) + RETURN Self + + +METHOD QWindowStateChangeEvent:oldState() + RETURN Qt_QWindowStateChangeEvent_oldState( ::pPtr ) + diff --git a/harbour/contrib/hbqt/qtgui/filelist.mk b/harbour/contrib/hbqt/qtgui/filelist.mk index 531554bd57..e014213052 100644 --- a/harbour/contrib/hbqt/qtgui/filelist.mk +++ b/harbour/contrib/hbqt/qtgui/filelist.mk @@ -75,6 +75,7 @@ CPP_SOURCES := \ QHBoxLayout.cpp \ QHeaderView.cpp \ QHelpEvent.cpp \ + QHideEvent.cpp \ QIcon.cpp \ QInputMethodEvent.cpp \ QImage.cpp \ @@ -133,6 +134,7 @@ CPP_SOURCES := \ QScrollArea.cpp \ QScrollBar.cpp \ QSessionManager.cpp \ + QShowEvent.cpp \ QSizeGrip.cpp \ QSizePolicy.cpp \ QSlider.cpp \ @@ -223,6 +225,7 @@ CPP_SOURCES := \ QWidgetAction.cpp \ QWidgetItem.cpp \ QWindowsStyle.cpp \ + QWindowStateChangeEvent.cpp \ QWizard.cpp \ QWizardPage.cpp \ @@ -295,6 +298,7 @@ PRG_SOURCES := \ TQHBoxLayout.prg \ TQHeaderView.prg \ TQHelpEvent.prg \ + TQHideEvent.prg \ TQIcon.prg \ TQInputMethodEvent.prg \ TQImage.prg \ @@ -353,6 +357,7 @@ PRG_SOURCES := \ TQScrollArea.prg \ TQScrollBar.prg \ TQSessionManager.prg \ + TQShowEvent.prg \ TQSizeGrip.prg \ TQSizePolicy.prg \ TQSlider.prg \ @@ -443,6 +448,7 @@ PRG_SOURCES := \ TQWidgetAction.prg \ TQWidgetItem.prg \ TQWindowsStyle.prg \ + TQWindowStateChangeEvent.prg \ TQWizard.prg \ TQWizardPage.prg \ diff --git a/harbour/contrib/hbqt/qth/QHideEvent.qth b/harbour/contrib/hbqt/qth/QHideEvent.qth new file mode 100644 index 0000000000..adcc1b28cc --- /dev/null +++ b/harbour/contrib/hbqt/qth/QHideEvent.qth @@ -0,0 +1,93 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherits = QEvent +Type = Core +New = + + + +#include + + +/* + * QHideEvent () + */ +HB_FUNC( QT_QHIDEEVENT ) +{ + // hb_retptr( new QHideEvent() ); +} + + + + + + + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QShowEvent.qth b/harbour/contrib/hbqt/qth/QShowEvent.qth new file mode 100644 index 0000000000..5926b4e506 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QShowEvent.qth @@ -0,0 +1,93 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherits = QEvent +Type = Core +New = + + + +#include + + +/* + * QShowEvent () + */ +HB_FUNC( QT_QSHOWEVENT ) +{ + // hb_retptr( new QShowEvent() ); +} + + + + + + + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qth/QWindowStateChangeEvent.qth b/harbour/contrib/hbqt/qth/QWindowStateChangeEvent.qth new file mode 100644 index 0000000000..f5426e42d6 --- /dev/null +++ b/harbour/contrib/hbqt/qth/QWindowStateChangeEvent.qth @@ -0,0 +1,94 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherits = QEvent +Type = Core +New = + + + +#include + + +/* + * QWindowStateChangeEvent () + */ +HB_FUNC( QT_QWINDOWSTATECHANGEEVENT ) +{ + // hb_retptr( ( QWindowStateChangeEvent* ) new QWindowStateChangeEvent() ); +} + + + + + + +Qt::WindowStates oldState () const + + + + + + + + + + + + +