From 5d0b22d9cffbe208cdfe395c9a7d740ef4e9fe67 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 3 Mar 2011 01:22:51 +0000 Subject: [PATCH] 2011-03-02 17:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/qth/QCoreApplication.qth ! Reversed previous commit. * contrib/hbqt/qtgui/hbqt_init.cpp - Deleted: hbqtgui_eventpush() function, not needed anymore. * contrib/hbqt/qtgui/qth/QContextMenuEvent.qth * contrib/hbqt/qtgui/qth/QDragEnterEvent.qth * contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth * contrib/hbqt/qtgui/qth/QDragMoveEvent.qth * contrib/hbqt/qtgui/qth/QDropEvent.qth * contrib/hbqt/qtgui/qth/QFocusEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth * contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth * contrib/hbqt/qtgui/qth/QHelpEvent.qth * contrib/hbqt/qtgui/qth/QHideEvent.qth * contrib/hbqt/qtgui/qth/QInputMethodEvent.qth * contrib/hbqt/qtgui/qth/QKeyEvent.qth * contrib/hbqt/qtgui/qth/QMouseEvent.qth * contrib/hbqt/qtgui/qth/QMoveEvent.qth * contrib/hbqt/qtgui/qth/QPaintEvent.qth * contrib/hbqt/qtgui/qth/QResizeEvent.qth * contrib/hbqt/qtgui/qth/QShowEvent.qth * contrib/hbqt/qtgui/qth/QWheelEvent.qth + Added: constructors for all events with due parameters. I do not know why it elluded me so far. And I cannot recollect what wrong I was doing. May be due to some problems at initial stages kept unattended with ongoing development. --- harbour/ChangeLog | 38 +++++++++++++++ .../hbqt/qtcore/qth/QCoreApplication.qth | 6 +-- harbour/contrib/hbqt/qtgui/hbqt_init.cpp | 47 ------------------- .../hbqt/qtgui/qth/QContextMenuEvent.qth | 13 ++++- .../hbqt/qtgui/qth/QDragEnterEvent.qth | 5 +- .../hbqt/qtgui/qth/QDragLeaveEvent.qth | 2 +- .../contrib/hbqt/qtgui/qth/QDragMoveEvent.qth | 5 +- harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth | 5 +- .../contrib/hbqt/qtgui/qth/QFocusEvent.qth | 7 ++- .../qth/QGraphicsSceneContextMenuEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneDragDropEvent.qth | 4 +- .../hbqt/qtgui/qth/QGraphicsSceneEvent.qth | 11 ++++- .../qtgui/qth/QGraphicsSceneHelpEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneHoverEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneMouseEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneMoveEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneResizeEvent.qth | 4 +- .../qtgui/qth/QGraphicsSceneWheelEvent.qth | 4 +- harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth | 8 ++-- harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth | 2 +- .../hbqt/qtgui/qth/QInputMethodEvent.qth | 9 +++- harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth | 9 +++- .../contrib/hbqt/qtgui/qth/QMouseEvent.qth | 4 ++ harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth | 9 +++- .../contrib/hbqt/qtgui/qth/QPaintEvent.qth | 14 +++--- .../contrib/hbqt/qtgui/qth/QResizeEvent.qth | 7 ++- harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth | 4 +- .../contrib/hbqt/qtgui/qth/QWheelEvent.qth | 15 +++++- 28 files changed, 156 insertions(+), 96 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c34c7520a4..d202ddeff6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,44 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-02 17:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/qth/QCoreApplication.qth + ! Reversed previous commit. + + * contrib/hbqt/qtgui/hbqt_init.cpp + - Deleted: hbqtgui_eventpush() function, not needed anymore. + + * contrib/hbqt/qtgui/qth/QContextMenuEvent.qth + * contrib/hbqt/qtgui/qth/QDragEnterEvent.qth + * contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth + * contrib/hbqt/qtgui/qth/QDragMoveEvent.qth + * contrib/hbqt/qtgui/qth/QDropEvent.qth + * contrib/hbqt/qtgui/qth/QFocusEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth + * contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth + * contrib/hbqt/qtgui/qth/QHelpEvent.qth + * contrib/hbqt/qtgui/qth/QHideEvent.qth + * contrib/hbqt/qtgui/qth/QInputMethodEvent.qth + * contrib/hbqt/qtgui/qth/QKeyEvent.qth + * contrib/hbqt/qtgui/qth/QMouseEvent.qth + * contrib/hbqt/qtgui/qth/QMoveEvent.qth + * contrib/hbqt/qtgui/qth/QPaintEvent.qth + * contrib/hbqt/qtgui/qth/QResizeEvent.qth + * contrib/hbqt/qtgui/qth/QShowEvent.qth + * contrib/hbqt/qtgui/qth/QWheelEvent.qth + + Added: constructors for all events with due parameters. + I do not know why it elluded me so far. And I cannot + recollect what wrong I was doing. May be due to some + problems at initial stages kept unattended with + ongoing development. + 2011-03-02 15:29 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/qth/QCoreApplication.qth ! Commented out: sendEvent() and postEvent() methods until diff --git a/harbour/contrib/hbqt/qtcore/qth/QCoreApplication.qth b/harbour/contrib/hbqt/qtcore/qth/QCoreApplication.qth index 500609e5f1..7e0212fa76 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QCoreApplication.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QCoreApplication.qth @@ -60,15 +60,15 @@ QCoreApplication * instance () QStringList libraryPaths () QString organizationDomain () QString organizationName () -// void postEvent ( QObject * receiver, QEvent * event ) -// void postEvent ( QObject * receiver, QEvent * event, int priority ) +void postEvent ( QObject * receiver, QEvent * event ) +void postEvent ( QObject * receiver, QEvent * event, int priority ) void processEvents ( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents ) void processEvents ( QEventLoop::ProcessEventsFlags flags, int maxtime ) void removeLibraryPath ( const QString & path ) void removePostedEvents ( QObject * receiver ) void removePostedEvents ( QObject * receiver, int eventType ) void removeTranslator ( QTranslator * translationFile ) -// bool sendEvent ( QObject * receiver, QEvent * event ) +bool sendEvent ( QObject * receiver, QEvent * event ) void sendPostedEvents ( QObject * receiver, int event_type ) void sendPostedEvents () void setApplicationName ( const QString & application ) diff --git a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp index 824c357f50..c473b6efcf 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp @@ -588,53 +588,6 @@ static void hbqt_lib_exit( void * cargo ) HB_SYMBOL_UNUSED( cargo ); } -#if 0 -/* TOFIX: Accept .prg level object already created instead of duplicating - logic present in QKeyEvent.qth and QMouseEvent.qth. - Check its type here. - Another pending TOFIX is why this doesn't work, and why does it - GPF even: - QApplication():sendEvent( oWnd, QKeyEvent( QEvent_KeyPress, Qt_Key_X, Qt_NoModifier, "X", 0 ) ) - */ -HB_FUNC( HBQTGUI_EVENTPUSH ) -{ - switch( hb_parni( 2 ) ) - { - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::ShortcutOverride: - { - QKeyEvent pKeyEvent = QKeyEvent( ( QEvent::Type ) hb_parni( 2 ), - hb_parni( 3 ), - ( Qt::KeyboardModifiers ) hb_parni( 4 ), - ( HB_ISCHAR( 5 ) ? hbqt_par_QString( 5 ) : QString() ), - ( HB_ISLOG( 6 ) ? hb_parl( 6 ) : false ), - ( HB_ISNUM( 7 ) ? hb_parni( 7 ) : 1 ) ); - - QObject * pObj = ( QObject * ) hbqt_gcpointer( 1 ); - s_app->sendEvent( pObj, &pKeyEvent ); - break; - } - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - case QEvent::MouseButtonDblClick: - case QEvent::MouseMove: - { - #if 0 /* QPoint is in qrcore so how to handle ? qtcore is always required anyway for any Qt appln */ - QKeyEvent pMouseEvent = QMouseEvent( ( QEvent::Type ) hb_parni( 2 ), - hbqt_par_QPoint( 3 ), - ( Qt::MouseButton ) hb_parni( 4 ), - ( Qt::MouseButtons ) hb_parni( 5 ), - ( Qt::KeyboardModifiers ) hb_parni( 6 ) ); - - QObject * pObj = ( QObject * ) hbqt_gcpointer( 1 ); - s_app->sendEvent( pObj, &pMouseEvent ); - #endif - break; - } - } -} -#endif HB_CALL_ON_STARTUP_BEGIN( _hbqtgui_init_ ) hb_vmAtInit( hbqt_lib_init, NULL ); diff --git a/harbour/contrib/hbqt/qtgui/qth/QContextMenuEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QContextMenuEvent.qth index 770f201a81..8d74e0eb08 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QContextMenuEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QContextMenuEvent.qth @@ -28,7 +28,18 @@ New = */ HB_FUNC( QT_QCONTEXTMENUEVENT ) { - __HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ) ) ); + if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) ) + { + __HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ) ) ); + } + else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) && HB_ISPOINTER( 3 ) ) + { + __HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) ); + } + else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) && HB_ISPOINTER( 3 ) && HB_ISNUM( 4 ) ) + { + __HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ), ( Qt::KeyboardModifiers ) hb_parni( 4 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth index d69051670c..d6ad84205c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragEnterEvent.qth @@ -28,7 +28,10 @@ Constructor = no */ HB_FUNC( QT_QDRAGENTEREVENT ) { - + if( hb_pcount() == 5 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) && HB_ISPOINTER( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + { + __HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth index 74813b7bcb..2a80e6a23c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth @@ -28,7 +28,7 @@ Constructor = no */ HB_FUNC( QT_QDRAGLEAVEEVENT ) { - // __HB_RETPTRGC__( new QDragLeaveEvent() ); + __HB_RETPTRGC__( new QDragLeaveEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth index 922b7867d9..3c306d54c2 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDragMoveEvent.qth @@ -29,7 +29,10 @@ Constructor = no */ HB_FUNC( QT_QDRAGMOVEEVENT ) { - // __HB_RETPTRGC__( new QDragMoveEvent() ); + if( hb_pcount() >= 5 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) && HB_ISPOINTER( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + { + __HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::DragMove ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth index 9a4135ee21..0c97296b24 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QDropEvent.qth @@ -28,7 +28,10 @@ Constructor = no */ HB_FUNC( QT_QDROPEVENT ) { - // __HB_RETPTRGC__( new QDropEvent() ); + if( hb_pcount() >= 5 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) && HB_ISPOINTER( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) ) + { + __HB_RETPTRGC__( new QDropEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::Drop ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth index df92d625c6..db93b08015 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QFocusEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherits = QEvent Type = Core New = -Constructor = no +Constructor = @@ -28,7 +28,10 @@ Constructor = no */ HB_FUNC( QT_QFOCUSEVENT ) { - // __HB_RETPTRGC__( new QFocusEvent() ); + if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QFocusEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::FocusReason ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : Qt::OtherFocusReason ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth index 5101648e68..3b0aee4643 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneContextMenuEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -31,7 +31,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENECONTEXTMENUEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneContextMenuEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneContextMenuEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth index ceff30458b..270af1ed7d 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -33,7 +33,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEDRAGDROPEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneDragDropEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneDragDropEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth index 206ae793cc..769d79b542 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QEvent Type = New = -Constructor = no +Constructor = @@ -29,7 +29,14 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneEvent() ); + if( hb_pcount() == 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QGraphicsSceneEvent( ( QEvent::Type ) hb_parni( 1 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + __HB_RETPTRGC__( new QGraphicsSceneEvent( *hbqt_par_QGraphicsSceneEvent( 1 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth index b1f8c09286..6ea44c0624 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHelpEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -31,7 +31,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEHELPEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneHelpEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneHelpEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth index 45c8fc3d89..aa234915ec 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneHoverEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -31,7 +31,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEHOVEREVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneHoverEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneHoverEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth index 7598817413..885942c0fa 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMouseEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -31,7 +31,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEMOUSEEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneMouseEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneMouseEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth index d68b5640a1..2f31f4ffb9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneMoveEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -31,7 +31,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEMOVEEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneMoveEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneMoveEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth index 46d83eec9f..a0bcc4434a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneResizeEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -30,7 +30,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENERESIZEEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneResizeEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneResizeEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth index 3034b89379..0df30cf51e 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSceneWheelEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherit = QGraphicsSceneEvent Type = New = -Constructor = no +Constructor = @@ -30,7 +30,7 @@ Constructor = no */ HB_FUNC( QT_QGRAPHICSSCENEWHEELEVENT ) { - //__HB_RETPTRGC__( new QGraphicsSceneWheelEvent() ); + __HB_RETPTRGC__( new QGraphicsSceneWheelEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth index 51402b6ceb..c144115e9c 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QHelpEvent.qth @@ -13,11 +13,10 @@ QObject = no -Inherits = +Inherits = QEvent Type = Core New = Destructor = -Constructor = no @@ -29,7 +28,10 @@ Constructor = no */ HB_FUNC( QT_QHELPEVENT ) { - // __HB_RETPTRGC__( new QHelpEvent() ); + if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) && HB_ISPOINTER( 3 ) ) + { + __HB_RETPTRGC__( new QHelpEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth index d859b03bf6..35a0a382d9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QHideEvent.qth @@ -28,7 +28,7 @@ Constructor = no */ HB_FUNC( QT_QHIDEEVENT ) { - // __HB_RETPTRGC__( new QHideEvent() ); + __HB_RETPTRGC__( new QHideEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth index e301903cd6..0b116a23d9 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QInputMethodEvent.qth @@ -29,7 +29,14 @@ Destructor = */ HB_FUNC( QT_QINPUTMETHODEVENT ) { - __HB_RETPTRGC__( new QInputMethodEvent() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + __HB_RETPTRGC__( new QInputMethodEvent( *hbqt_par_QInputMethodEvent( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QInputMethodEvent() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth index 5b73b5522c..733dd5f929 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QKeyEvent.qth @@ -29,7 +29,14 @@ Constructor = no */ HB_FUNC( QT_QKEYEVENT ) { - //__HB_RETPTRGC__( new QKeyEvent( *hbqt_par_QKeyEvent( 1 ) ) ); + if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + { + __HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), HB_ISCHAR( 4 ) ? hbqt_par_QString( 4 ) : QString(), HB_ISLOG( 5 ) ? hb_parl( 5 ) : false, HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) ); + } + else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + __HB_RETPTRGC__( new QKeyEvent( *hbqt_par_QKeyEvent( 1 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth index 8be696e762..a55b0ed63a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMouseEvent.qth @@ -37,6 +37,10 @@ HB_FUNC( QT_QMOUSEEVENT ) { __HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), ( Qt::MouseButton ) hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) ); } + else if( hb_pcount() == 6 ) + { + __HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ), ( Qt::MouseButton ) hb_parni( 4 ), ( Qt::MouseButtons ) hb_parni( 5 ), ( Qt::KeyboardModifiers ) hb_parni( 6 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth index 68cf62832c..521ea03aeb 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMoveEvent.qth @@ -29,7 +29,14 @@ Constructor = no */ HB_FUNC( QT_QMOVEEVENT ) { - // __HB_RETPTRGC__( new QMoveEvent() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + __HB_RETPTRGC__( new QMoveEvent( *hbqt_par_QMoveEvent( 1 ) ) ); + } + else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) ) + { + __HB_RETPTRGC__( new QMoveEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth index 9cb8a9eb88..48aad23f00 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPaintEvent.qth @@ -28,18 +28,16 @@ New = */ HB_FUNC( QT_QPAINTEVENT ) { - if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISPOINTER( 2 ) ) + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) { - QString objName = ( QString ) hbqt_par_QString( 1 ); - - if( objName == ( QString ) "QRect" ) - { - __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) ); - } - else if( objName == ( QString ) "QRegion" ) + if( hbqt_IsObjectType( 1, HBQT_TYPE_QRegion ) ) { __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) ); } + else if( hbqt_IsObjectType( 1, HBQT_TYPE_QRect ) ) + { + __HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) ); + } } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth index c2b39447b3..1bb8a58412 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QResizeEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherits = QEvent Type = Core New = -Constructor = no +Constructor = @@ -28,7 +28,10 @@ Constructor = no */ HB_FUNC( QT_QRESIZEEVENT ) { - // __HB_RETPTRGC__( new QResizeEvent() ); + if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) ) + { + __HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QSize( 1 ), *hbqt_par_QSize( 2 ) ) ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth index 0ad0309b46..eac654e60f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QShowEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherits = QEvent Type = Core New = -Constructor = no +Constructor = @@ -28,7 +28,7 @@ Constructor = no */ HB_FUNC( QT_QSHOWEVENT ) { - // __HB_RETPTRGC__( new QShowEvent() ); + __HB_RETPTRGC__( new QShowEvent() ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth b/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth index 77de976d0d..18aa358069 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QWheelEvent.qth @@ -16,7 +16,7 @@ QObject = no Inherits = QInputEvent Type = Core New = -Constructor = no +Constructor = @@ -29,7 +29,18 @@ Constructor = no */ HB_FUNC( QT_QWHEELEVENT ) { - // __HB_RETPTRGC__( new QWheelEvent() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QWheelEvent( 1 ) ) ); + } + else if( hb_pcount() >= 4 ) + { + __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), hb_parni( 2 ), ( Qt::MouseButtons ) hb_parni( 3 ), ( Qt::KeyboardModifiers ) hb_parni( 4 ), ( Qt::Orientation ) ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : Qt::Vertical ) ) ); + } + else if( hb_pcount() >= 5 ) + { + __HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ), hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( Qt::Orientation ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : Qt::Vertical ) ) ); + } }