2012-05-07 00:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth
  * contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth
  * contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth
  * contrib/hbqt/qtgui/qth/QAction.qth
  * contrib/hbqt/qtgui/qth/QActionEvent.qth
  * contrib/hbqt/qtgui/qth/QActionGroup.qth
  * contrib/hbqt/qtgui/qth/QBrush.qth
  * contrib/hbqt/qtgui/qth/QButtonGroup.qth
  * contrib/hbqt/qtgui/qth/QCloseEvent.qth
  * contrib/hbqt/qtgui/qth/QColor.qth
  * contrib/hbqt/qtgui/qth/QComboBox.qth
  * contrib/hbqt/qtgui/qth/QContextMenuEvent.qth
    - Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" )
This commit is contained in:
Pritpal Bedi
2012-05-07 08:03:49 +00:00
parent 1eeb32a3f6
commit 8fd32d2325
13 changed files with 62 additions and 20 deletions

View File

@@ -16,6 +16,21 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-05-07 00:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth
* contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth
* contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth
* contrib/hbqt/qtgui/qth/QAction.qth
* contrib/hbqt/qtgui/qth/QActionEvent.qth
* contrib/hbqt/qtgui/qth/QActionGroup.qth
* contrib/hbqt/qtgui/qth/QBrush.qth
* contrib/hbqt/qtgui/qth/QButtonGroup.qth
* contrib/hbqt/qtgui/qth/QCloseEvent.qth
* contrib/hbqt/qtgui/qth/QColor.qth
* contrib/hbqt/qtgui/qth/QComboBox.qth
* contrib/hbqt/qtgui/qth/QContextMenuEvent.qth
- Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" )
2012-05-06 23:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/qth/QAbstractEventDispatcher.qth
* contrib/hbqt/qtcore/qth/QBitArray.qth

View File

@@ -45,7 +45,7 @@ HBQT_GC_FUNC( hbqt_gcMark_HBQGraphicsItem )
/*
* HBQGraphicsItem ()
* HBQGraphicsItem ( QGraphicsItem * parent )
* HBQGraphicsItem ( int type )
* HBQGraphicsItem ( int type, QGraphicsItem * parent )
* ~HBQGraphicsItem ()
*/
@@ -55,7 +55,7 @@ HB_FUNC( QT_HBQGRAPHICSITEM )
{
__HB_RETPTRGC__( new HBQGraphicsItem( hb_parni( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new HBQGraphicsItem( hb_parni( 1 ), hbqt_par_QGraphicsItem( 2 ) ) );
}

View File

@@ -49,7 +49,7 @@ HBQT_GC_FUNC( hbqt_gcMark_HBQGraphicsScene )
*/
HB_FUNC( QT_HBQGRAPHICSSCENE )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new HBQGraphicsScene( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -58,7 +58,7 @@ HB_FUNC( QT_HBQPLAINTEXTEDIT )
{
__HB_RETPTRGC__( new HBQPlainTextEdit() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new HBQPlainTextEdit( hbqt_par_QWidget( 1 ) ) );
}

View File

@@ -34,22 +34,26 @@ HB_FUNC( QT_QACTION )
{
int pcount;
pcount = hb_pcount();
if( pcount == 3 && HB_ISOBJECT( 1 ) && HB_ISCHAR( 2 ) && HB_ISOBJECT( 3 ) )
if( pcount == 3 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QAction( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hbqt_par_QObject( 3 ) ) );
hb_strfree( pText01 );
}
else if( pcount == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) )
else if( pcount == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QAction(hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) );
hb_strfree( pText01 );
}
else if( pcount == 1 && HB_ISOBJECT( 1 ) )
else if( pcount == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QAction( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -70,14 +70,22 @@ New =
*/
HB_FUNC( QT_QACTIONEVENT )
{
if( hb_pcount() <= 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && ( hb_pcount() == 3 ? HB_ISOBJECT( 3 ) : false ) )
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QACTION" ) && hbqt_par_isDerivedFrom( 3, "QACTION" ) )
{
__HB_RETPTRGC__( new QActionEvent( hb_parni( 1 ), hbqt_par_QAction( 2 ), ( HB_ISOBJECT( 3 ) ? hbqt_par_QAction( 3 ) : 0 ) ) );
__HB_RETPTRGC__( new QActionEvent( hb_parni( 1 ), hbqt_par_QAction( 2 ), hbqt_par_QAction( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QACTION" ) )
{
__HB_RETPTRGC__( new QActionEvent( hb_parni( 1 ), hbqt_par_QAction( 2 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QACTIONEVENT" ) )
{
__HB_RETPTRGC__( new QActionEvent( *hbqt_par_QActionEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -26,10 +26,14 @@ New =
*/
HB_FUNC( QT_QACTIONGROUP )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QActionGroup( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -76,7 +76,7 @@ HB_FUNC( QT_QBRUSH )
{
__HB_RETPTRGC__( new QBrush( *hbqt_par_QColor( 1 ), ( Qt::BrushStyle ) hb_parni( 2 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) && hbqt_par_isDerivedFrom( 2, "QPIXMAP" ) )
{
__HB_RETPTRGC__( new QBrush( *hbqt_par_QColor( 1 ), *hbqt_par_QPixmap( 2 ) ) );
}

View File

@@ -27,7 +27,7 @@ New =
*/
HB_FUNC( QT_QBUTTONGROUP )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QButtonGroup( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -28,7 +28,7 @@ New =
*/
HB_FUNC( QT_QCLOSEEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QCLOSEEVENT" ) )
{
__HB_RETPTRGC__( new QCloseEvent( *hbqt_par_QCloseEvent( 1 ) ) );
}

View File

@@ -50,7 +50,7 @@ HB_FUNC( QT_QCOLOR )
__HB_RETPTRGC__( new QColor( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) )
{
__HB_RETPTRGC__( new QColor( *hbqt_par_QColor( 1 ) ) );
}

View File

@@ -30,7 +30,14 @@ Calls = QT_QComboBox
*/
HB_FUNC( QT_QCOMBOBOX )
{
__HB_RETPTRGC__( new QComboBox( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QComboBox( hbqt_par_QWidget( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QComboBox( 0 ) );
}
}
</CODE>

View File

@@ -28,22 +28,26 @@ New =
*/
HB_FUNC( QT_QCONTEXTMENUEVENT )
{
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) )
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) )
{
__HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ) ) );
}
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) )
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) )
{
__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_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) )
else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) && 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 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 2, "QCONTEXTMENUEVENT" ) )
{
__HB_RETPTRGC__( new QContextMenuEvent( *hbqt_par_QContextMenuEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>