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

* contrib/hbqt/qtgui/qth/HBQSyntaxHighlighter.qth
  * contrib/hbqt/qtgui/qth/QAction.qth
  * contrib/hbqt/qtgui/qth/QBoxLayout.qth
  * contrib/hbqt/qtgui/qth/QFormLayout.qth
  * contrib/hbqt/qtgui/qth/QFrame.qth
  * contrib/hbqt/qtgui/qth/QGridLayout.qth
  * contrib/hbqt/qtgui/qth/QLineEdit.qth
  * contrib/hbqt/qtgui/qth/QPushButton.qth
  * contrib/hbqt/qtgui/qth/QScrollArea.qth
  * contrib/hbqt/qtgui/qth/QSizeGrip.qth
  * contrib/hbqt/qtgui/qth/QSlider.qth
  * contrib/hbqt/qtgui/qth/QSound.qth
  * contrib/hbqt/qtgui/qth/QSpinBox.qth
  * contrib/hbqt/qtgui/qth/QSplashScreen.qth
  * contrib/hbqt/qtgui/qth/QSplitter.qth
  * contrib/hbqt/qtgui/qth/QStackedWidget.qth
  * contrib/hbqt/qtgui/qth/QStandardItem.qth
  * contrib/hbqt/qtgui/qth/QStandardItemModel.qth
  * contrib/hbqt/qtgui/qth/QStringListModel.qth
  * contrib/hbqt/qtgui/qth/QSystemTrayIcon.qth
  * contrib/hbqt/qtgui/qth/QTabBar.qth
  * contrib/hbqt/qtgui/qth/QTableWidget.qth
  * contrib/hbqt/qtgui/qth/QTabWidget.qth
  * contrib/hbqt/qtgui/qth/QTextBrowser.qth
  * contrib/hbqt/qtgui/qth/QTextDocument.qth
  * contrib/hbqt/qtgui/qth/QTextEdit.qth
  * contrib/hbqt/qtgui/qth/QTextFormat.qth
  * contrib/hbqt/qtgui/qth/QTimeEdit.qth
  * contrib/hbqt/qtgui/qth/QToolBox.qth
  * contrib/hbqt/qtgui/qth/QToolButton.qth
  * contrib/hbqt/qtgui/qth/QTreeView.qth
  * contrib/hbqt/qtgui/qth/QTreeWidget.qth
  * contrib/hbqt/qtgui/qth/QWidgetAction.qth
  * contrib/hbqt/qtgui/qth/QWidgetItem.qth
  * contrib/hbqt/qtgui/qth/QWizardPage.qth
    ! Fixed: constructors. Now hbIDE shows up with __HBQT_REVAMP__.
This commit is contained in:
Pritpal Bedi
2012-06-02 00:22:08 +00:00
parent aba6fd4905
commit 7233d39e7e
36 changed files with 433 additions and 69 deletions

View File

@@ -16,6 +16,44 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-01 17:14 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/HBQSyntaxHighlighter.qth
* contrib/hbqt/qtgui/qth/QAction.qth
* contrib/hbqt/qtgui/qth/QBoxLayout.qth
* contrib/hbqt/qtgui/qth/QFormLayout.qth
* contrib/hbqt/qtgui/qth/QFrame.qth
* contrib/hbqt/qtgui/qth/QGridLayout.qth
* contrib/hbqt/qtgui/qth/QLineEdit.qth
* contrib/hbqt/qtgui/qth/QPushButton.qth
* contrib/hbqt/qtgui/qth/QScrollArea.qth
* contrib/hbqt/qtgui/qth/QSizeGrip.qth
* contrib/hbqt/qtgui/qth/QSlider.qth
* contrib/hbqt/qtgui/qth/QSound.qth
* contrib/hbqt/qtgui/qth/QSpinBox.qth
* contrib/hbqt/qtgui/qth/QSplashScreen.qth
* contrib/hbqt/qtgui/qth/QSplitter.qth
* contrib/hbqt/qtgui/qth/QStackedWidget.qth
* contrib/hbqt/qtgui/qth/QStandardItem.qth
* contrib/hbqt/qtgui/qth/QStandardItemModel.qth
* contrib/hbqt/qtgui/qth/QStringListModel.qth
* contrib/hbqt/qtgui/qth/QSystemTrayIcon.qth
* contrib/hbqt/qtgui/qth/QTabBar.qth
* contrib/hbqt/qtgui/qth/QTableWidget.qth
* contrib/hbqt/qtgui/qth/QTabWidget.qth
* contrib/hbqt/qtgui/qth/QTextBrowser.qth
* contrib/hbqt/qtgui/qth/QTextDocument.qth
* contrib/hbqt/qtgui/qth/QTextEdit.qth
* contrib/hbqt/qtgui/qth/QTextFormat.qth
* contrib/hbqt/qtgui/qth/QTimeEdit.qth
* contrib/hbqt/qtgui/qth/QToolBox.qth
* contrib/hbqt/qtgui/qth/QToolButton.qth
* contrib/hbqt/qtgui/qth/QTreeView.qth
* contrib/hbqt/qtgui/qth/QTreeWidget.qth
* contrib/hbqt/qtgui/qth/QWidgetAction.qth
* contrib/hbqt/qtgui/qth/QWidgetItem.qth
* contrib/hbqt/qtgui/qth/QWizardPage.qth
! Fixed: constructors. Now hbIDE shows up with __HBQT_REVAMP__.
2012-06-01 08:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/HBQTableView.qth
* contrib/hbqt/qtgui/qth/QHeaderView.qth

View File

@@ -36,7 +36,14 @@ New =
*/
HB_FUNC( QT_HBQSYNTAXHIGHLIGHTER )
{
__HB_RETPTRGC__( new HBQSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTDOCUMENT" ) )
{
__HB_RETPTRGC__( new HBQSyntaxHighlighter( hbqt_par_QTextDocument( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new HBQSyntaxHighlighter() );
}
}
</CODE>

View File

@@ -32,21 +32,19 @@ Calls = QT_QAction
*/
HB_FUNC( QT_QACTION )
{
int pcount;
pcount = hb_pcount();
if( pcount == 3 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) )
if( hb_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 ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
else if( hb_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_RETPTRGC__( new QAction( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) );
hb_strfree( pText01 );
}
else if( pcount == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QAction( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -26,7 +26,18 @@ New = nDirection, pParent
*/
HB_FUNC( QT_QBOXLAYOUT )
{
__HB_RETPTRGC__( new QBoxLayout( ( QBoxLayout::Direction ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QBoxLayout( ( QBoxLayout::Direction ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QBoxLayout( ( QBoxLayout::Direction ) 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

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

View File

@@ -26,7 +26,18 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QFRAME )
{
__HB_RETPTRGC__( new QFrame( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QFrame( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QFrame( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QFrame() );
}
}
</CODE>

View File

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

View File

@@ -28,7 +28,26 @@ New = pParent
*/
HB_FUNC( QT_QLINEEDIT )
{
__HB_RETPTRGC__( new QLineEdit( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QLineEdit( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QLineEdit( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QLineEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QLineEdit() );
}
}
</CODE>

View File

@@ -15,7 +15,7 @@
Inherit = QAbstractButton
New = pParent
PaintEvent = YES
PaintEvent = NO
</CLASS>
<CODE>
@@ -30,32 +30,34 @@ PaintEvent = YES
*/
HB_FUNC( QT_QPUSHBUTTON )
{
/*
if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPushButton( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) );
hb_strfree( pText01 );
}
else if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISCHAR( 2 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPushButton( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), HB_ISOBJECT( 3 ) ? hbqt_par_QWidget( 3 ) : 0 ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QPushButton( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) );
}
*/
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QPushButton( hbqt_par_QWidget( 1 ) ) );
}
else
#if 0
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPushButton( ( const char * ) hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPushButton( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPushButton( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
#endif
else
{
__HB_RETPTRGC__( new QPushButton() );
}
}
}
</CODE>

View File

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

View File

@@ -26,6 +26,13 @@ New = pParent
*/
HB_FUNC( QT_QSIZEGRIP )
{
__HB_RETPTRGC__( new QSizeGrip( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSizeGrip( hbqt_par_QWidget( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -27,10 +27,22 @@ New = pParent
*/
HB_FUNC( QT_QSLIDER )
{
if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QSlider( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
else
}
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSlider( hbqt_par_QWidget( 1 ) ) );
}
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSlider( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QSlider() );
}
}
</CODE>

View File

@@ -27,9 +27,22 @@ New =
*/
HB_FUNC( QT_QSOUND )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSound( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QSound( 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 QSound( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QObject( 2 ) ) );
hb_strfree( pText01 );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

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

View File

@@ -27,7 +27,22 @@ New = pParent
*/
HB_FUNC( QT_QSPLASHSCREEN )
{
__HB_RETPTRGC__( new QSplashScreen( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPIXMAP" ) )
{
__HB_RETPTRGC__( new QSplashScreen( *hbqt_par_QPixmap( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSplashScreen( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && hbqt_par_isDerivedFrom( 2, "QPIXMAP" ) )
{
__HB_RETPTRGC__( new QSplashScreen( hbqt_par_QWidget( 1 ), *hbqt_par_QPixmap( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QSplashScreen() );
}
}
</CODE>

View File

@@ -27,10 +27,22 @@ New = pParent
*/
HB_FUNC( QT_QSPLITTER )
{
if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
__HB_RETPTRGC__( new QSplitter( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
else
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSplitter( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QSplitter( ( Qt::Orientation ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QSplitter( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QSplitter() );
}
}
</CODE>

View File

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

View File

@@ -31,7 +31,22 @@ New =
*/
HB_FUNC( QT_QSTANDARDITEM )
{
__HB_RETPTRGC__( new QStandardItem() );
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QStandardItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QICON" ) && HB_ISCHAR( 2 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QStandardItem( *hbqt_par_QIcon( 1 ), hb_parstr_utf8( 2, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QStandardItem() );
}
}
</CODE>

View File

@@ -28,7 +28,22 @@ New =
*/
HB_FUNC( QT_QSTANDARDITEMMODEL )
{
__HB_RETPTRGC__( new QStandardItemModel( hbqt_par_QObject( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QStandardItemModel( hbqt_par_QObject( 1 ) ) );
}
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QStandardItemModel( hb_parni( 1 ), hb_parni( 2 ) ) );
}
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QStandardItemModel( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QObject( 3 ) ) );
}
else
{
__HB_RETPTRGC__( new QStandardItemModel() );
}
}
</CODE>

View File

@@ -27,7 +27,22 @@ New =
*/
HB_FUNC( QT_QSTRINGLISTMODEL )
{
__HB_RETPTRGC__( new QStringListModel() );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QStringListModel( hbqt_par_QObject( 1 ) ) );
}
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) )
{
__HB_RETPTRGC__( new QStringListModel( *hbqt_par_QStringList( 1 ) ) );
}
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSTRINGLIST" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QStringListModel( *hbqt_par_QStringList( 1 ), hbqt_par_QObject( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QStringListModel() );
}
}
</CODE>

View File

@@ -28,7 +28,22 @@ New =
*/
HB_FUNC( QT_QSYSTEMTRAYICON )
{
__HB_RETPTRGC__( new QSystemTrayIcon( hbqt_par_QObject( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSystemTrayIcon( hbqt_par_QObject( 1 ) ) );
}
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QICON" ) )
{
__HB_RETPTRGC__( new QSystemTrayIcon( *hbqt_par_QIcon( 1 ) ) );
}
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QICON" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSystemTrayIcon( *hbqt_par_QIcon( 1 ), hbqt_par_QObject( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QSystemTrayIcon() );
}
}
</CODE>

View File

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

View File

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

View File

@@ -27,10 +27,22 @@ New = pParent
*/
HB_FUNC( QT_QTABLEWIDGET )
{
if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
__HB_RETPTRGC__( new QTableWidget( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QWidget( 3 ) ) );
else
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QTableWidget( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QTableWidget( hb_parni( 1 ), hb_parni( 2 ) ) );
}
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QTableWidget( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QWidget( 3 ) ) );
}
else
{
__HB_RETPTRGC__( new QTableWidget() );
}
}
</CODE>

View File

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

View File

@@ -30,7 +30,7 @@ New =
*/
HB_FUNC( QT_QTEXTDOCUMENT )
{
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QObject" ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QTextDocument( hbqt_par_QObject( 1 ) ) );
}
@@ -40,7 +40,7 @@ HB_FUNC( QT_QTEXTDOCUMENT )
__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" ) )
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 ) ) );

View File

@@ -26,14 +26,26 @@ New = pParent
*/
HB_FUNC( QT_QTEXTEDIT )
{
if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QTextEdit( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QTextEdit( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else
__HB_RETPTRGC__( new QTextEdit( hbqt_par_QWidget( 1 ) ) );
{
__HB_RETPTRGC__( new QTextEdit() );
}
}
</CODE>

View File

@@ -30,7 +30,18 @@ New = pParent
*/
HB_FUNC( QT_QTEXTFORMAT )
{
__HB_RETPTRGC__( new QTextFormat() );
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QTextFormat( hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTFORMAT" ) )
{
__HB_RETPTRGC__( new QTextFormat( *hbqt_par_QTextFormat( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QTextFormat() );
}
}
</CODE>

View File

@@ -26,6 +26,21 @@ New = pParent
*/
HB_FUNC( QT_QTIMEEDIT )
{
__HB_RETPTRGC__( new QTimeEdit( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QTimeEdit( hbqt_par_QWidget( 1 ) ) );
}
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTIME" ) )
{
__HB_RETPTRGC__( new QTimeEdit( *hbqt_par_QTime( 1 ) ) );
}
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QTIME" ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QTimeEdit( *hbqt_par_QTime( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QTimeEdit() );
}
}
</CODE>

View File

@@ -26,7 +26,18 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QTOOLBOX )
{
__HB_RETPTRGC__( new QToolBox( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QToolBox( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QToolBox( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QToolBox() );
}
}
</CODE>

View File

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

View File

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

View File

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

View File

@@ -27,7 +27,14 @@ New =
*/
HB_FUNC( QT_QWIDGETACTION )
{
__HB_RETPTRGC__( new QWidgetAction( hbqt_par_QObject( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QWidgetAction( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -27,7 +27,14 @@ New =
*/
HB_FUNC( QT_QWIDGETITEM )
{
__HB_RETPTRGC__( new QWidgetItem( hbqt_par_QWidget( 1 ) ) );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QWidgetItem( hbqt_par_QWidget( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

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