From b204061c7220da8a7a87ba340d7606ee101b60e7 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 12 Aug 2010 22:13:42 +0000 Subject: [PATCH] 2010-08-12 14:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth * contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth * contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth * contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth * contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.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/QGraphicsProxyWidget.qth * contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth * contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth * contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth * contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth * contrib/hbqt/qtgui/qth/QGraphicsWidget.qth + Set right the constructors. * contrib/hbqt/qtgui/g/Q*.cpp * Regenerated. --- harbour/ChangeLog | 21 ++++++++++++++ .../hbqt/qtgui/g/QGraphicsEllipseItem.cpp | 25 ++++++++++++++++- .../hbqt/qtgui/g/QGraphicsGridLayout.cpp | 9 +++++- .../hbqt/qtgui/g/QGraphicsItemAnimation.cpp | 9 +++++- .../hbqt/qtgui/g/QGraphicsItemGroup.cpp | 9 +++++- .../hbqt/qtgui/g/QGraphicsLineItem.cpp | 25 ++++++++++++++++- .../hbqt/qtgui/g/QGraphicsLinearLayout.cpp | 20 ++++++++++++- .../hbqt/qtgui/g/QGraphicsPathItem.cpp | 21 +++++++++++++- .../hbqt/qtgui/g/QGraphicsPixmapItem.cpp | 21 +++++++++++++- .../hbqt/qtgui/g/QGraphicsPolygonItem.cpp | 21 +++++++++++++- .../hbqt/qtgui/g/QGraphicsProxyWidget.cpp | 9 +++++- .../hbqt/qtgui/g/QGraphicsRectItem.cpp | 25 ++++++++++++++++- .../hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp | 28 ++++++++++++++++++- .../hbqt/qtgui/g/QGraphicsTextItem.cpp | 28 ++++++++++++++++++- .../contrib/hbqt/qtgui/g/QGraphicsWidget.cpp | 9 +++++- .../hbqt/qtgui/qth/QGraphicsEllipseItem.qth | 25 ++++++++++++++++- .../hbqt/qtgui/qth/QGraphicsGridLayout.qth | 9 +++++- .../hbqt/qtgui/qth/QGraphicsItemAnimation.qth | 9 +++++- .../hbqt/qtgui/qth/QGraphicsItemGroup.qth | 9 +++++- .../hbqt/qtgui/qth/QGraphicsLineItem.qth | 25 ++++++++++++++++- .../hbqt/qtgui/qth/QGraphicsLinearLayout.qth | 20 ++++++++++++- .../hbqt/qtgui/qth/QGraphicsPathItem.qth | 21 +++++++++++++- .../hbqt/qtgui/qth/QGraphicsPixmapItem.qth | 21 +++++++++++++- .../hbqt/qtgui/qth/QGraphicsPolygonItem.qth | 21 +++++++++++++- .../hbqt/qtgui/qth/QGraphicsProxyWidget.qth | 9 +++++- .../hbqt/qtgui/qth/QGraphicsRectItem.qth | 25 ++++++++++++++++- .../qtgui/qth/QGraphicsSimpleTextItem.qth | 28 ++++++++++++++++++- .../hbqt/qtgui/qth/QGraphicsSvgItem.qth | 28 ++++++++++++++++++- .../hbqt/qtgui/qth/QGraphicsTextItem.qth | 28 ++++++++++++++++++- .../hbqt/qtgui/qth/QGraphicsWidget.qth | 9 +++++- 30 files changed, 538 insertions(+), 29 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fab237f7a4..60adb9dee4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,27 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-12 14:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth + * contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth + * contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth + * contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.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/QGraphicsProxyWidget.qth + * contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth + * contrib/hbqt/qtgui/qth/QGraphicsWidget.qth + + Set right the constructors. + + * contrib/hbqt/qtgui/g/Q*.cpp + * Regenerated. + 2010-08-11 23:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbptreeview.prg ! Changed: context-menu implementation protocol. diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsEllipseItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsEllipseItem.cpp index cf461c9100..85d75cbc21 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsEllipseItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsEllipseItem.cpp @@ -136,7 +136,30 @@ HB_FUNC( QT_QGRAPHICSELLIPSEITEM ) { QGraphicsEllipseItem * pObj = NULL; - pObj = new QGraphicsEllipseItem() ; + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + pObj = new QGraphicsEllipseItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ; + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsEllipseItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QRectF ) + { + pObj = new QGraphicsEllipseItem( *hbqt_par_QRectF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsEllipseItem() ; + } + } + else + { + pObj = new QGraphicsEllipseItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsEllipseItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsGridLayout.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsGridLayout.cpp index bc4eba1dee..b517738f4c 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsGridLayout.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsGridLayout.cpp @@ -134,7 +134,14 @@ HB_FUNC( QT_QGRAPHICSGRIDLAYOUT ) { QGraphicsGridLayout * pObj = NULL; - pObj = new QGraphicsGridLayout() ; + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsGridLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ; + } + else + { + pObj = new QGraphicsGridLayout() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsGridLayout( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsItemAnimation.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsItemAnimation.cpp index 45e0dc0223..2f0beb9992 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsItemAnimation.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsItemAnimation.cpp @@ -160,7 +160,14 @@ HB_FUNC( QT_QGRAPHICSITEMANIMATION ) { QGraphicsItemAnimation * pObj = NULL; - pObj = new QGraphicsItemAnimation() ; + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsItemAnimation( hbqt_par_QObject( 1 ) ) ; + } + else + { + pObj = new QGraphicsItemAnimation() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsItemAnimation( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsItemGroup.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsItemGroup.cpp index f932eb001f..50bdd83d33 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsItemGroup.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsItemGroup.cpp @@ -134,7 +134,14 @@ HB_FUNC( QT_QGRAPHICSITEMGROUP ) { QGraphicsItemGroup * pObj = NULL; - pObj = new QGraphicsItemGroup() ; + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsItemGroup( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else + { + pObj = new QGraphicsItemGroup() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsItemGroup( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsLineItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsLineItem.cpp index a51e96a6d1..bb4260afb5 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsLineItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsLineItem.cpp @@ -137,7 +137,30 @@ HB_FUNC( QT_QGRAPHICSLINEITEM ) { QGraphicsLineItem * pObj = NULL; - pObj = new QGraphicsLineItem() ; + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + pObj = new QGraphicsLineItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ; + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsLineItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QLineF ) + { + pObj = new QGraphicsLineItem( *hbqt_par_QLineF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsLineItem() ; + } + } + else + { + pObj = new QGraphicsLineItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsLineItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsLinearLayout.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsLinearLayout.cpp index 556ddd96c0..e2fce4bdc2 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsLinearLayout.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsLinearLayout.cpp @@ -135,7 +135,25 @@ HB_FUNC( QT_QGRAPHICSLINEARLAYOUT ) { QGraphicsLinearLayout * pObj = NULL; - pObj = new QGraphicsLinearLayout() ; + if( hb_pcount() >= 1 ) + { + if( HB_ISNUM( 1 ) ) + { + pObj = new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsLayoutItem( 2 ) : 0 ) ) ; + } + else if( HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsLinearLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ; + } + else + { + pObj = new QGraphicsLinearLayout() ; + } + } + else + { + pObj = new QGraphicsLinearLayout() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsLinearLayout( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsPathItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsPathItem.cpp index 4746efabc1..76c7df596e 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsPathItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsPathItem.cpp @@ -135,7 +135,26 @@ HB_FUNC( QT_QGRAPHICSPATHITEM ) { QGraphicsPathItem * pObj = NULL; - pObj = new QGraphicsPathItem() ; + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsPathItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QPainterPath ) + { + pObj = new QGraphicsPathItem( *hbqt_par_QPainterPath( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsPathItem() ; + } + } + else + { + pObj = new QGraphicsPathItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsPathItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsPixmapItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsPixmapItem.cpp index ef70805f97..cca81265a0 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsPixmapItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsPixmapItem.cpp @@ -139,7 +139,26 @@ HB_FUNC( QT_QGRAPHICSPIXMAPITEM ) { QGraphicsPixmapItem * pObj = NULL; - pObj = new QGraphicsPixmapItem() ; + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsPixmapItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QPixmap ) + { + pObj = new QGraphicsPixmapItem( *hbqt_par_QPixmap( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsPixmapItem() ; + } + } + else + { + pObj = new QGraphicsPixmapItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsPixmapItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsPolygonItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsPolygonItem.cpp index 295d13844f..341ca33969 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsPolygonItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsPolygonItem.cpp @@ -135,7 +135,26 @@ HB_FUNC( QT_QGRAPHICSPOLYGONITEM ) { QGraphicsPolygonItem * pObj = NULL; - pObj = new QGraphicsPolygonItem() ; + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsPolygonItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QPolygonF ) + { + pObj = new QGraphicsPolygonItem( *hbqt_par_QPolygonF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsPolygonItem() ; + } + } + else + { + pObj = new QGraphicsPolygonItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsPolygonItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsProxyWidget.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsProxyWidget.cpp index 825d699f7c..e5811a5470 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsProxyWidget.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsProxyWidget.cpp @@ -145,7 +145,14 @@ HB_FUNC( QT_QGRAPHICSPROXYWIDGET ) { QGraphicsProxyWidget * pObj = NULL; - pObj = new QGraphicsProxyWidget() ; + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsProxyWidget() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsProxyWidget( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsRectItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsRectItem.cpp index aee71836a2..cea7be513a 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsRectItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsRectItem.cpp @@ -136,7 +136,30 @@ HB_FUNC( QT_QGRAPHICSRECTITEM ) { QGraphicsRectItem * pObj = NULL; - pObj = new QGraphicsRectItem() ; + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + pObj = new QGraphicsRectItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ; + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsRectItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else if( p->type == HBQT_TYPE_QRectF ) + { + pObj = new QGraphicsRectItem( *hbqt_par_QRectF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsRectItem() ; + } + } + else + { + pObj = new QGraphicsRectItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsRectItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp index 6fe7c554e2..e10bfff267 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsSimpleTextItem.cpp @@ -136,7 +136,33 @@ HB_FUNC( QT_QGRAPHICSSIMPLETEXTITEM ) { QGraphicsSimpleTextItem * pObj = NULL; - pObj = new QGraphicsSimpleTextItem() ; + if( hb_pcount() >= 1 ) + { + if( HB_ISCHAR( 1 ) ) + { + pObj = new QGraphicsSimpleTextItem( hbqt_par_QString( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ; + } + else if( HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else + { + pObj = new QGraphicsSimpleTextItem() ; + } + } + else + { + pObj = new QGraphicsSimpleTextItem() ; + } + } + else + { + pObj = new QGraphicsSimpleTextItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsSimpleTextItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsTextItem.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsTextItem.cpp index 9075828956..e5f9c169ce 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsTextItem.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsTextItem.cpp @@ -149,7 +149,33 @@ HB_FUNC( QT_QGRAPHICSTEXTITEM ) { QGraphicsTextItem * pObj = NULL; - pObj = new QGraphicsTextItem() ; + if( hb_pcount() >= 1 ) + { + if( HB_ISCHAR( 1 ) ) + { + pObj = new QGraphicsTextItem( hbqt_par_QString( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ; + } + else if( HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + pObj = new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) ; + } + else + { + pObj = new QGraphicsTextItem() ; + } + } + else + { + pObj = new QGraphicsTextItem() ; + } + } + else + { + pObj = new QGraphicsTextItem() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsTextItem( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/g/QGraphicsWidget.cpp b/harbour/contrib/hbqt/qtgui/g/QGraphicsWidget.cpp index 70a9296492..22188ca95a 100644 --- a/harbour/contrib/hbqt/qtgui/g/QGraphicsWidget.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QGraphicsWidget.cpp @@ -160,7 +160,14 @@ HB_FUNC( QT_QGRAPHICSWIDGET ) { QGraphicsWidget * pObj = NULL; - pObj = new QGraphicsWidget() ; + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QGraphicsWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ; + } + else + { + pObj = new QGraphicsWidget() ; + } hb_retptrGC( hbqt_gcAllocate_QGraphicsWidget( ( void * ) pObj, true ) ); } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth index 80fb4309c5..ee4567e617 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsEllipseItem.qth @@ -73,7 +73,30 @@ New = */ HB_FUNC( QT_QGRAPHICSELLIPSEITEM ) { - hb_retptr( new QGraphicsEllipseItem() ); + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + hb_retptr( new QGraphicsEllipseItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ); + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsEllipseItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QRectF ) + { + hb_retptr( new QGraphicsEllipseItem( *hbqt_par_QRectF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsEllipseItem() ); + } + } + else + { + hb_retptr( new QGraphicsEllipseItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth index 27d415a841..d14794c20a 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsGridLayout.qth @@ -71,7 +71,14 @@ New = */ HB_FUNC( QT_QGRAPHICSGRIDLAYOUT ) { - hb_retptr( new QGraphicsGridLayout() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsGridLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsGridLayout() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth index 7c8d3065d9..381810de15 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemAnimation.qth @@ -73,7 +73,14 @@ New = */ HB_FUNC( QT_QGRAPHICSITEMANIMATION ) { - hb_retptr( new QGraphicsItemAnimation() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsItemAnimation( hbqt_par_QObject( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsItemAnimation() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth index ef512488d9..870632c1f2 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsItemGroup.qth @@ -71,7 +71,14 @@ New = */ HB_FUNC( QT_QGRAPHICSITEMGROUP ) { - hb_retptr( new QGraphicsItemGroup() ); + if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsItemGroup( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsItemGroup() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth index 0b778124c0..4ca414e512 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLineItem.qth @@ -74,7 +74,30 @@ New = */ HB_FUNC( QT_QGRAPHICSLINEITEM ) { - hb_retptr( new QGraphicsLineItem() ); + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + hb_retptr( new QGraphicsLineItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ); + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsLineItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QLineF ) + { + hb_retptr( new QGraphicsLineItem( *hbqt_par_QLineF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsLineItem() ); + } + } + else + { + hb_retptr( new QGraphicsLineItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth index 75f6e76de8..7466d4e275 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsLinearLayout.qth @@ -72,7 +72,25 @@ New = */ HB_FUNC( QT_QGRAPHICSLINEARLAYOUT ) { - hb_retptr( new QGraphicsLinearLayout() ); + if( hb_pcount() >= 1 ) + { + if( HB_ISNUM( 1 ) ) + { + hb_retptr( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsLayoutItem( 2 ) : 0 ) ) ); + } + else if( HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsLinearLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsLinearLayout() ); + } + } + else + { + hb_retptr( new QGraphicsLinearLayout() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth index a05f4d69cd..f288a6f40b 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPathItem.qth @@ -72,7 +72,26 @@ New = */ HB_FUNC( QT_QGRAPHICSPATHITEM ) { - hb_retptr( new QGraphicsPathItem() ); + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsPathItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QPainterPath ) + { + hb_retptr( new QGraphicsPathItem( *hbqt_par_QPainterPath( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsPathItem() ); + } + } + else + { + hb_retptr( new QGraphicsPathItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth index ddaac4ecec..d940742b4f 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPixmapItem.qth @@ -72,7 +72,26 @@ New = */ HB_FUNC( QT_QGRAPHICSPIXMAPITEM ) { - hb_retptr( new QGraphicsPixmapItem() ); + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsPixmapItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QPixmap ) + { + hb_retptr( new QGraphicsPixmapItem( *hbqt_par_QPixmap( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsPixmapItem() ); + } + } + else + { + hb_retptr( new QGraphicsPixmapItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth index 719143b9ed..77b5eb7f67 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsPolygonItem.qth @@ -72,7 +72,26 @@ New = */ HB_FUNC( QT_QGRAPHICSPOLYGONITEM ) { - hb_retptr( new QGraphicsPolygonItem() ); + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsPolygonItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QPolygonF ) + { + hb_retptr( new QGraphicsPolygonItem( *hbqt_par_QPolygonF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsPolygonItem() ); + } + } + else + { + hb_retptr( new QGraphicsPolygonItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth index 087de6a88b..ebfc6cbd3e 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsProxyWidget.qth @@ -71,7 +71,14 @@ New = */ HB_FUNC( QT_QGRAPHICSPROXYWIDGET ) { - hb_retptr( new QGraphicsProxyWidget() ); + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsProxyWidget() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth index e8cee175de..77ce249885 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsRectItem.qth @@ -73,7 +73,30 @@ New = */ HB_FUNC( QT_QGRAPHICSRECTITEM ) { - hb_retptr( new QGraphicsRectItem() ); + if( hb_pcount() >= 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) ) + { + hb_retptr( new QGraphicsRectItem( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISPOINTER( 5 ) ? hbqt_par_QGraphicsItem( 5 ) : 0 ) ) ); + } + else if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsRectItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else if( p->type == HBQT_TYPE_QRectF ) + { + hb_retptr( new QGraphicsRectItem( *hbqt_par_QRectF( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsRectItem() ); + } + } + else + { + hb_retptr( new QGraphicsRectItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth index 86a6c2fdb2..06795bbc10 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSimpleTextItem.qth @@ -73,7 +73,33 @@ New = */ HB_FUNC( QT_QGRAPHICSSIMPLETEXTITEM ) { - hb_retptr( new QGraphicsSimpleTextItem() ); + if( hb_pcount() >= 1 ) + { + if( HB_ISCHAR( 1 ) ) + { + hb_retptr( new QGraphicsSimpleTextItem( hbqt_par_QString( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); + } + else if( HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsSimpleTextItem() ); + } + } + else + { + hb_retptr( new QGraphicsSimpleTextItem() ); + } + } + else + { + hb_retptr( new QGraphicsSimpleTextItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth index f98ff1ccf1..8e86487f08 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsSvgItem.qth @@ -71,7 +71,33 @@ New = */ HB_FUNC( QT_QGRAPHICSSVGITEM ) { - hb_retptr( new QGraphicsSvgItem() ); + if( hb_pcount() >= 1 ) + { + if( HB_ISCHAR( 1 ) ) + { + hb_retptr( new QGraphicsSvgItem( hbqt_par_QString( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); + } + else if( HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsSvgItem() ); + } + } + else + { + hb_retptr( new QGraphicsSvgItem() ); + } + } + else + { + hb_retptr( new QGraphicsSvgItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth index 9dbfae6b66..5950af0b28 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsTextItem.qth @@ -75,7 +75,33 @@ New = */ HB_FUNC( QT_QGRAPHICSTEXTITEM ) { - hb_retptr( new QGraphicsTextItem() ); + if( hb_pcount() >= 1 ) + { + if( HB_ISCHAR( 1 ) ) + { + hb_retptr( new QGraphicsTextItem( hbqt_par_QString( 1 ), ( HB_ISPOINTER( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) ); + } + else if( HB_ISPOINTER( 1 ) ) + { + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); + if( p->type == HBQT_TYPE_QGraphicsItem ) + { + hb_retptr( new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) ); + } + else + { + hb_retptr( new QGraphicsTextItem() ); + } + } + else + { + hb_retptr( new QGraphicsTextItem() ); + } + } + else + { + hb_retptr( new QGraphicsTextItem() ); + } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth b/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth index df163c1b1d..801d3f13bc 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QGraphicsWidget.qth @@ -71,7 +71,14 @@ New = */ HB_FUNC( QT_QGRAPHICSWIDGET ) { - hb_retptr( new QGraphicsWidget() ); + if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QGraphicsWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) ); + } + else + { + hb_retptr( new QGraphicsWidget() ); + } }