2012-06-01 08:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/qth/HBQTableView.qth
  * contrib/hbqt/qtgui/qth/QHeaderView.qth
  * contrib/hbqt/qtgui/qth/QListWidgetItem.qth
  * contrib/hbqt/qtgui/qth/QStatusBar.qth
  * contrib/hbqt/qtgui/qth/QTextDocument.qth
  * contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
    ! Fixed: constructors for few more classes. 
      Now contrib/hbxbp/demoxbp.prg shows up at least.
This commit is contained in:
Pritpal Bedi
2012-06-01 15:08:44 +00:00
parent 5614f62a18
commit aba6fd4905
7 changed files with 112 additions and 7 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-01 08:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/HBQTableView.qth
* contrib/hbqt/qtgui/qth/QHeaderView.qth
* contrib/hbqt/qtgui/qth/QListWidgetItem.qth
* contrib/hbqt/qtgui/qth/QStatusBar.qth
* contrib/hbqt/qtgui/qth/QTextDocument.qth
* contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
! Fixed: constructors for few more classes.
Now contrib/hbxbp/demoxbp.prg shows up at least.
2012-05-31 23:32 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QApplication.qth
* contrib/hbqt/qtgui/qth/QColorDialog.qth

View File

@@ -56,7 +56,14 @@ HBQT_GC_FUNC( hbqt_gcMark_HBQTableView )
*/
HB_FUNC( QT_HBQTABLEVIEW )
{
__HB_RETPTRGC__( new HBQTableView( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new HBQTableView( hbqt_par_QWidget( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new HBQTableView() );
}
}
</CODE>

View File

@@ -26,7 +26,18 @@ New = pParent
*/
HB_FUNC( QT_QHEADERVIEW )
{
__HB_RETPTRGC__( new QHeaderView( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QHeaderView( ( Qt::Orientation ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QHeaderView( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -30,7 +30,42 @@ New = pParent
*/
HB_FUNC( QT_QLISTWIDGETITEM )
{
__HB_RETPTRGC__( new QListWidgetItem( hbqt_par_QListWidget( 1 ), hb_parni( 2 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLISTWIDGET" ) )
{
__HB_RETPTRGC__( new QListWidgetItem( hbqt_par_QListWidget( 1 ), hb_parni( 2 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLISTWIDGETITEM" ) )
{
__HB_RETPTRGC__( new QListWidgetItem( *hbqt_par_QListWidgetItem( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QListWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QLISTWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QListWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QListWidget( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QListWidgetItem( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 3 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 3, "QLISTWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QListWidgetItem( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hbqt_par_QListWidget( 3 ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QListWidgetItem() );
}
}
</CODE>

View File

@@ -27,7 +27,14 @@ New =
*/
HB_FUNC( QT_QSTATUSBAR )
{
__HB_RETPTRGC__( new QStatusBar( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QStatusBar( hbqt_par_QWidget( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QStatusBar() );
}
}
</CODE>

View File

@@ -30,7 +30,26 @@ New =
*/
HB_FUNC( QT_QTEXTDOCUMENT )
{
__HB_RETPTRGC__( new QTextDocument( hbqt_par_QObject( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QObject" ) )
{
__HB_RETPTRGC__( new QTextDocument( hbqt_par_QObject( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QTextDocument( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QObject" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QTextDocument( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QTextDocument() );
}
}
</CODE>

View File

@@ -34,14 +34,30 @@ New = iType
*/
HB_FUNC( QT_QTREEWIDGETITEM )
{
if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QTreeWidgetItem( hb_parni( 1 ) ) );
}
else
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTREEWIDGET" ) )
{
__HB_RETPTRGC__( new QTreeWidgetItem( hbqt_par_QTreeWidget( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTREEWIDGETITEM" ) )
{
__HB_RETPTRGC__( new QTreeWidgetItem( hbqt_par_QTreeWidgetItem( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QTREEWIDGET" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QTreeWidgetItem( hbqt_par_QTreeWidget( 1 ), hb_parni( 2 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QTREEWIDGETITEM" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QTreeWidgetItem( hbqt_par_QTreeWidgetItem( 1 ), hb_parni( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QTreeWidgetItem() );
}
}
</CODE>