From bbd8a26d9f401a44d16650b42815391abfcb342e Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 29 Aug 2011 20:42:47 +0000 Subject: [PATCH] 2011-08-29 13:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/QPrintDialog.qth ! Fixed: constructor. It was very limiting before. TODO: need to review constructors on all the .qth's. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbqt/qtgui/qth/QPrintDialog.qth | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7bacb032dc..e0ac1f5857 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-08-29 13:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/qth/QPrintDialog.qth + ! Fixed: constructor. It was very limiting before. + TODO: need to review constructors on all the .qth's. + 2011-08-29 17:00 UTC+0100 Jean Lefebvre mafact (jfl@mafact.com) * contrib/rddads/ads1.c + Enhanced: growning ahIndex from 50 to 512 to allows virtually unlimited TAG diff --git a/harbour/contrib/hbqt/qtgui/qth/QPrintDialog.qth b/harbour/contrib/hbqt/qtgui/qth/QPrintDialog.qth index 50df21e732..d197720283 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPrintDialog.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPrintDialog.qth @@ -27,7 +27,22 @@ New = pParent */ HB_FUNC( QT_QPRINTDIALOG ) { - __HB_RETPTRGC__( new QPrintDialog ( hbqt_par_QWidget( 1 ) ) ); + if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) && hbqt_isObjectType( 1, HBQT_TYPE_QPrinter ) ) + { + __HB_RETPTRGC__( new QPrintDialog( hbqt_par_QPrinter( 1 ), hbqt_par_QWidget( 2 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) && hbqt_isObjectType( 1, HBQT_TYPE_QPrinter ) ) + { + __HB_RETPTRGC__( new QPrintDialog( hbqt_par_QPrinter( 1 ), 0 ) ); + } + else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + { + __HB_RETPTRGC__( new QPrintDialog( hbqt_par_QWidget( 1 ) ) ); + } + else + { + __HB_RETPTRGC__( new QPrintDialog() ); + } }