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

* contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth
  * contrib/hbqt/qtgui/qth/QDeclarativeError.qth
  * contrib/hbqt/qtgui/qth/QDeclarativeItem.qth
  * contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth
  * contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth
  * contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth
  * contrib/hbqt/qtgui/qth/QDialogButtonBox.qth
  * contrib/hbqt/qtgui/qth/QDockWidget.qth
  * contrib/hbqt/qtgui/qth/QDoubleValidator.qth
  * contrib/hbqt/qtgui/qth/QDragEnterEvent.qth
  * contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth
  * contrib/hbqt/qtgui/qth/QDragMoveEvent.qth
  * contrib/hbqt/qtgui/qth/QDropEvent.qth
  * contrib/hbqt/qtgui/qth/QFileDialog.qth
  * contrib/hbqt/qtgui/qth/QFileOpenEvent.qth
  * contrib/hbqt/qtgui/qth/QFocusEvent.qth
  * contrib/hbqt/qtgui/qth/QFont.qth
  * contrib/hbqt/qtgui/qth/QFontDialog.qth
  * contrib/hbqt/qtgui/qth/QFontInfo.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/QGraphicsProxyWidget.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
  * contrib/hbqt/qtgui/qth/QHelpEvent.qth
  * contrib/hbqt/qtgui/qth/QHideEvent.qth
  * contrib/hbqt/qtgui/qth/QHoverEvent.qth
  * contrib/hbqt/qtgui/qth/QImage.qth
  * contrib/hbqt/qtgui/qth/QInputEvent.qth
  * contrib/hbqt/qtgui/qth/QInputMethodEvent.qth
  * contrib/hbqt/qtgui/qth/QIntValidator.qth
  * contrib/hbqt/qtgui/qth/QItemDelegate.qth
  * contrib/hbqt/qtgui/qth/QItemEditorFactory.qth
  * contrib/hbqt/qtgui/qth/QItemSelectionModel.qth
  * contrib/hbqt/qtgui/qth/QKeyEvent.qth
  * contrib/hbqt/qtgui/qth/QKeySequence.qth
  * contrib/hbqt/qtgui/qth/QLabel.qth
  * contrib/hbqt/qtgui/qth/QLinearGradient.qth
  * contrib/hbqt/qtgui/qth/QListWidget.qth
  * contrib/hbqt/qtgui/qth/QMainWindow.qth
  * contrib/hbqt/qtgui/qth/QMdiArea.qth
  * contrib/hbqt/qtgui/qth/QMdiSubWindow.qth
  * contrib/hbqt/qtgui/qth/QMenu.qth
  * contrib/hbqt/qtgui/qth/QMenuBar.qth
  * contrib/hbqt/qtgui/qth/QMessageBox.qth
  * contrib/hbqt/qtgui/qth/QMouseEvent.qth
  * contrib/hbqt/qtgui/qth/QMoveEvent.qth
  * contrib/hbqt/qtgui/qth/QPainter.qth
  * contrib/hbqt/qtgui/qth/QPaintEvent.qth
  * contrib/hbqt/qtgui/qth/QPalette.qth
  * contrib/hbqt/qtgui/qth/QPicture.qth
  * contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth
  * contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
  * contrib/hbqt/qtgui/qth/QPrinter.qth
  * contrib/hbqt/qtgui/qth/QPushButton.qth
  * contrib/hbqt/qtgui/qth/QRadialGradient.qth
  * contrib/hbqt/qtgui/qth/QRadioButton.qth
  * contrib/hbqt/qtgui/qth/QRegExpValidator.qth
  * contrib/hbqt/qtgui/qth/QResizeEvent.qth
  * contrib/hbqt/qtgui/qth/QShortcutEvent.qth
  * contrib/hbqt/qtgui/qth/QShowEvent.qth
  * contrib/hbqt/qtgui/qth/QSizePolicy.qth
  * contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth
  * contrib/hbqt/qtgui/qth/QSpacerItem.qth
  * contrib/hbqt/qtgui/qth/QTableWidgetItem.qth
  * contrib/hbqt/qtgui/qth/QTextBlock.qth
  * contrib/hbqt/qtgui/qth/QTextBlockFormat.qth
  * contrib/hbqt/qtgui/qth/QToolBar.qth
  * contrib/hbqt/qtgui/qth/QWheelEvent.qth
  * contrib/hbqt/qtgui/qth/QWidget.qth
  * contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth
    - Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" )
    + Added: RTE where needed.
This commit is contained in:
Pritpal Bedi
2012-05-08 03:13:34 +00:00
parent c5f23b422e
commit 3b3410f9c5
76 changed files with 500 additions and 222 deletions

View File

@@ -16,6 +16,85 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-05-07 20:08 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QDeclarativeEngine.qth
* contrib/hbqt/qtgui/qth/QDeclarativeError.qth
* contrib/hbqt/qtgui/qth/QDeclarativeItem.qth
* contrib/hbqt/qtgui/qth/QDeclarativeListReference.qth
* contrib/hbqt/qtgui/qth/QDeclarativePropertyMap.qth
* contrib/hbqt/qtgui/qth/QDeclarativeScriptString.qth
* contrib/hbqt/qtgui/qth/QDialogButtonBox.qth
* contrib/hbqt/qtgui/qth/QDockWidget.qth
* contrib/hbqt/qtgui/qth/QDoubleValidator.qth
* contrib/hbqt/qtgui/qth/QDragEnterEvent.qth
* contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth
* contrib/hbqt/qtgui/qth/QDragMoveEvent.qth
* contrib/hbqt/qtgui/qth/QDropEvent.qth
* contrib/hbqt/qtgui/qth/QFileDialog.qth
* contrib/hbqt/qtgui/qth/QFileOpenEvent.qth
* contrib/hbqt/qtgui/qth/QFocusEvent.qth
* contrib/hbqt/qtgui/qth/QFont.qth
* contrib/hbqt/qtgui/qth/QFontDialog.qth
* contrib/hbqt/qtgui/qth/QFontInfo.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/QGraphicsProxyWidget.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
* contrib/hbqt/qtgui/qth/QHelpEvent.qth
* contrib/hbqt/qtgui/qth/QHideEvent.qth
* contrib/hbqt/qtgui/qth/QHoverEvent.qth
* contrib/hbqt/qtgui/qth/QImage.qth
* contrib/hbqt/qtgui/qth/QInputEvent.qth
* contrib/hbqt/qtgui/qth/QInputMethodEvent.qth
* contrib/hbqt/qtgui/qth/QIntValidator.qth
* contrib/hbqt/qtgui/qth/QItemDelegate.qth
* contrib/hbqt/qtgui/qth/QItemEditorFactory.qth
* contrib/hbqt/qtgui/qth/QItemSelectionModel.qth
* contrib/hbqt/qtgui/qth/QKeyEvent.qth
* contrib/hbqt/qtgui/qth/QKeySequence.qth
* contrib/hbqt/qtgui/qth/QLabel.qth
* contrib/hbqt/qtgui/qth/QLinearGradient.qth
* contrib/hbqt/qtgui/qth/QListWidget.qth
* contrib/hbqt/qtgui/qth/QMainWindow.qth
* contrib/hbqt/qtgui/qth/QMdiArea.qth
* contrib/hbqt/qtgui/qth/QMdiSubWindow.qth
* contrib/hbqt/qtgui/qth/QMenu.qth
* contrib/hbqt/qtgui/qth/QMenuBar.qth
* contrib/hbqt/qtgui/qth/QMessageBox.qth
* contrib/hbqt/qtgui/qth/QMouseEvent.qth
* contrib/hbqt/qtgui/qth/QMoveEvent.qth
* contrib/hbqt/qtgui/qth/QPainter.qth
* contrib/hbqt/qtgui/qth/QPaintEvent.qth
* contrib/hbqt/qtgui/qth/QPalette.qth
* contrib/hbqt/qtgui/qth/QPicture.qth
* contrib/hbqt/qtgui/qth/QPlainTextDocumentLayout.qth
* contrib/hbqt/qtgui/qth/QPlainTextEdit.qth
* contrib/hbqt/qtgui/qth/QPrinter.qth
* contrib/hbqt/qtgui/qth/QPushButton.qth
* contrib/hbqt/qtgui/qth/QRadialGradient.qth
* contrib/hbqt/qtgui/qth/QRadioButton.qth
* contrib/hbqt/qtgui/qth/QRegExpValidator.qth
* contrib/hbqt/qtgui/qth/QResizeEvent.qth
* contrib/hbqt/qtgui/qth/QShortcutEvent.qth
* contrib/hbqt/qtgui/qth/QShowEvent.qth
* contrib/hbqt/qtgui/qth/QSizePolicy.qth
* contrib/hbqt/qtgui/qth/QSortFilterProxyModel.qth
* contrib/hbqt/qtgui/qth/QSpacerItem.qth
* contrib/hbqt/qtgui/qth/QTableWidgetItem.qth
* contrib/hbqt/qtgui/qth/QTextBlock.qth
* contrib/hbqt/qtgui/qth/QTextBlockFormat.qth
* contrib/hbqt/qtgui/qth/QToolBar.qth
* contrib/hbqt/qtgui/qth/QWheelEvent.qth
* contrib/hbqt/qtgui/qth/QWidget.qth
* contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth
- Replaced: HB_ISOBJECT( n ) => hbqt_par_isDerivedFrom( n, "QXXX" )
+ Added: RTE where needed.
2012-05-07 01:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_pointer.cpp
+ Added: hbqt_par_isDerivedFrom() - protection against a null

View File

@@ -72,7 +72,7 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVEENGINE )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QDeclarativeEngine( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -71,7 +71,7 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVEERROR )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEERROR" ) )
{
__HB_RETPTRGC__( new QDeclarativeError( *hbqt_par_QDeclarativeError( 1 ) ) );
}

View File

@@ -72,7 +72,7 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVEITEM )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEITEM" ) )
{
__HB_RETPTRGC__( new QDeclarativeItem( hbqt_par_QDeclarativeItem( 1 ) ) );
}

View File

@@ -72,9 +72,13 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVELISTREFERENCE )
{
if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISCHAR( 2 ) )
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) && HB_ISCHAR( 2 ) && hbqt_par_isDerivedFrom( 1, "QDECLARATIVEENGINE" ) )
{
__HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QDeclarativeEngine( 3 ) : 0 ) );
__HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), hbqt_par_QDeclarativeEngine( 3 ) ) );
}
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) && HB_ISCHAR( 2 ) )
{
__HB_RETPTRGC__( new QDeclarativeListReference( hbqt_par_QObject( 1 ), hb_parc( 2 ), 0 ) );
}
else
{

View File

@@ -72,7 +72,7 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVEPROPERTYMAP )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QDeclarativePropertyMap( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -72,7 +72,7 @@ Version = 0x040700
*/
HB_FUNC( QT_QDECLARATIVESCRIPTSTRING )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDECLARATIVESCRIPTSTRING" ) )
{
__HB_RETPTRGC__( new QDeclarativeScriptString( *hbqt_par_QDeclarativeScriptString( 1 ) ) );
}

View File

@@ -73,17 +73,25 @@ New =
*/
HB_FUNC( QT_QDIALOGBUTTONBOX )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QDialogButtonBox( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QWidget( 3 ) : 0 ) );
__HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), hbqt_par_QWidget( 3 ) ) );
}
else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) );
__HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), 0 ) );
}
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), 0 ) );
}
else
{

View File

@@ -27,15 +27,21 @@ New = pParent
*/
HB_FUNC( QT_QDOCKWIDGET )
{
if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
__HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ), ( Qt::WindowFlags ) hb_parni( 3 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QDockWidget( hb_parstr_utf8( 1, &pText01, NULL ), 0, 0 ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QDockWidget( ( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
__HB_RETPTRGC__( new QDockWidget() );
}
}
</CODE>

View File

@@ -29,14 +29,18 @@ Destructor =
*/
HB_FUNC( QT_QDOUBLEVALIDATOR )
{
if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && hbqt_par_isDerivedFrom( 4, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QDoubleValidator( hb_parnd( 1 ), hb_parnd( 2 ), hb_parni( 3 ), HB_ISOBJECT( 4 ) ? hbqt_par_QObject( 4 ) : 0 ) );
__HB_RETPTRGC__( new QDoubleValidator( hb_parnd( 1 ), hb_parnd( 2 ), hb_parni( 3 ), hbqt_par_QObject( 4 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QDoubleValidator( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -28,14 +28,18 @@ Constructor = no
*/
HB_FUNC( QT_QDRAGENTEREVENT )
{
if( hb_pcount() == 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
if( hb_pcount() == 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
{
__HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGENTEREVENT" ) )
{
__HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QDragEnterEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -28,7 +28,7 @@ Constructor = no
*/
HB_FUNC( QT_QDRAGLEAVEEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGLEAVEEVENT" ) )
{
__HB_RETPTRGC__( new QDragLeaveEvent( *hbqt_par_QDragLeaveEvent( 1 ) ) );
}

View File

@@ -29,14 +29,18 @@ Constructor = no
*/
HB_FUNC( QT_QDRAGMOVEEVENT )
{
if( hb_pcount() >= 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
{
__HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::DragMove ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDRAGMOVEEVENT" ) )
{
__HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QDragMoveEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -29,14 +29,18 @@ Constructor = no
*/
HB_FUNC( QT_QDROPEVENT )
{
if( hb_pcount() >= 5 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QMIMEDATA" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
{
__HB_RETPTRGC__( new QDropEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::Drop ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QDROPEVENT" ) )
{
__HB_RETPTRGC__( new QDropEvent( *hbqt_par_QDropEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -27,11 +27,11 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QFILEDIALOG )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) 0 ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QFileDialog( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}

View File

@@ -70,19 +70,20 @@ New =
*/
HB_FUNC( QT_QFILEOPENEVENT )
{
if( hb_pcount() == 1 && ( HB_ISCHAR( 1 ) || HB_ISOBJECT( 1 ) ) )
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
if( HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QFileOpenEvent( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QFileOpenEvent( *hbqt_par_QFileOpenEvent( 1 ) ) );
}
void * pText01 = NULL;
__HB_RETPTRGC__( new QFileOpenEvent( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFILEOPENEVENT" ) )
{
__HB_RETPTRGC__( new QFileOpenEvent( *hbqt_par_QFileOpenEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>
@@ -102,5 +103,3 @@ QString file () const
<VARIABLES>
</VARIABLES>

View File

@@ -32,10 +32,14 @@ HB_FUNC( QT_QFOCUSEVENT )
{
__HB_RETPTRGC__( new QFocusEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::FocusReason ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : Qt::OtherFocusReason ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFOCUSEVENT" ) )
{
__HB_RETPTRGC__( new QFocusEvent( *hbqt_par_QFocusEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -54,11 +54,11 @@ HB_FUNC( QT_QFONT )
__HB_RETPTRGC__( new QFont( hb_parstr_utf8( 1, &pText01, NULL ), hb_parni( 2 ), hb_parni( 3 ), hb_parl( 4 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) )
{
__HB_RETPTRGC__( new QFont( *hbqt_par_QFont( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QFONT" ) && hbqt_par_isDerivedFrom( 2, "QPAINTDEVICE" ) )
{
__HB_RETPTRGC__( new QFont( *hbqt_par_QFont( 1 ), hbqt_par_QPaintDevice( 2 ) ) );
}

View File

@@ -26,17 +26,21 @@ New = pParent
*/
HB_FUNC( QT_QFONTDIALOG )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QFontDialog( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) )
{
__HB_RETPTRGC__( new QFontDialog( *hbqt_par_QFont( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QFONT" ) && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QFontDialog( *hbqt_par_QFont( 1 ), hbqt_par_QWidget( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QFontDialog( 0 ) );
__HB_RETPTRGC__( new QFontDialog() );
}
}
</CODE>

View File

@@ -27,14 +27,18 @@ New = pParent
*/
HB_FUNC( QT_QFONTINFO )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONTINFO" ) )
{
__HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFontInfo( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QFONT" ) )
{
__HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFont( 2 ) ) );
__HB_RETPTRGC__( new QFontInfo( *hbqt_par_QFont( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -29,7 +29,7 @@ Version =
*/
HB_FUNC( QT_QGRAPHICSGRIDLAYOUT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSLAYOUTITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsGridLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) );
}

View File

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

View File

@@ -28,7 +28,7 @@ New =
*/
HB_FUNC( QT_QGRAPHICSITEMGROUP )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsItemGroup( hbqt_par_QGraphicsItem( 1 ) ) );
}

View File

@@ -29,13 +29,15 @@ New =
*/
HB_FUNC( QT_QGRAPHICSLINEARLAYOUT )
{
if( hb_pcount() >= 1 )
{
if( HB_ISNUM( 1 ) )
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsLayoutItem( 2 ) : 0 ) ) );
__HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ) ) );
}
else if( HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSLAYOUTITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsLinearLayout( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QGraphicsLayoutItem( 2 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSLAYOUTITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsLinearLayout( hbqt_par_QGraphicsLayoutItem( 1 ) ) );
}
@@ -43,11 +45,6 @@ HB_FUNC( QT_QGRAPHICSLINEARLAYOUT )
{
__HB_RETPTRGC__( new QGraphicsLinearLayout() );
}
}
else
{
__HB_RETPTRGC__( new QGraphicsLinearLayout() );
}
}
</CODE>

View File

@@ -28,9 +28,13 @@ New =
*/
HB_FUNC( QT_QGRAPHICSPROXYWIDGET )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) );
__HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ) ) );
}
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QGraphicsProxyWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{

View File

@@ -30,22 +30,21 @@ New =
*/
HB_FUNC( QT_QGRAPHICSSIMPLETEXTITEM )
{
if( hb_pcount() >= 1 )
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
if( HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) );
hb_strfree( pText01 );
}
else if( HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QGraphicsSimpleTextItem() );
}
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSimpleTextItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsSimpleTextItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{

View File

@@ -28,22 +28,21 @@ New =
*/
HB_FUNC( QT_QGRAPHICSSVGITEM )
{
if( hb_pcount() >= 1 )
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
if( HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) );
hb_strfree( pText01 );
}
else if( HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QGraphicsSvgItem() );
}
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsSvgItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsSvgItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{

View File

@@ -32,22 +32,21 @@ New =
*/
HB_FUNC( QT_QGRAPHICSTEXTITEM )
{
if( hb_pcount() >= 1 )
if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
if( HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QGraphicsItem( 1 ) : 0 ) ) );
hb_strfree( pText01 );
}
else if( HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QGraphicsTextItem() );
}
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QGRAPHICSITEM" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QGraphicsTextItem( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QGraphicsItem( 1 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsTextItem( hbqt_par_QGraphicsItem( 1 ) ) );
}
else
{

View File

@@ -28,7 +28,7 @@ New =
*/
HB_FUNC( QT_QGRAPHICSWIDGET )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QGRAPHICSITEM" ) )
{
__HB_RETPTRGC__( new QGraphicsWidget( hbqt_par_QGraphicsItem( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) );
}

View File

@@ -28,14 +28,18 @@ Destructor =
*/
HB_FUNC( QT_QHELPEVENT )
{
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) )
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) )
{
__HB_RETPTRGC__( new QHelpEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHELPEVENT" ) )
{
__HB_RETPTRGC__( new QHelpEvent( *hbqt_par_QHelpEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -32,7 +32,7 @@ HB_FUNC( QT_QHIDEEVENT )
{
__HB_RETPTRGC__( new QHideEvent() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHIDEEVENT" ) )
{
__HB_RETPTRGC__( new QHideEvent( *hbqt_par_QHideEvent( 1 ) ) );
}

View File

@@ -70,11 +70,11 @@ New =
*/
HB_FUNC( QT_QHOVEREVENT )
{
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISOBJECT( 2 ) && HB_ISOBJECT( 3 ) )
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) )
{
__HB_RETPTRGC__( new QHoverEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QHOVEREVENT" ) )
{
__HB_RETPTRGC__( new QHoverEvent( *hbqt_par_QHoverEvent( 1 ) ) );
}

View File

@@ -39,7 +39,7 @@ New =
*/
HB_FUNC( QT_QIMAGE )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QIMAGE" ) )
{
__HB_RETPTRGC__( new QImage( *hbqt_par_QImage( 1 ) ) );
}
@@ -55,7 +55,7 @@ HB_FUNC( QT_QIMAGE )
__HB_RETPTRGC__( new QImage( hb_parstr_utf8( 1, &pText01, NULL ), ( const char * ) hb_parcx( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSIZE" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QImage( *hbqt_par_QSize( 1 ), ( QImage::Format ) hb_parni( 2 ) ) );
}

View File

@@ -32,10 +32,14 @@ HB_FUNC( QT_QINPUTEVENT )
{
__HB_RETPTRGC__( new QInputEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::KeyboardModifiers ) hb_parni( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QINPUTEVENT" ) )
{
__HB_RETPTRGC__( new QInputEvent( *hbqt_par_QInputEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -29,7 +29,7 @@ Destructor =
*/
HB_FUNC( QT_QINPUTMETHODEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QINPUTMETHODEVENT" ) )
{
__HB_RETPTRGC__( new QInputMethodEvent( *hbqt_par_QInputMethodEvent( 1 ) ) );
}

View File

@@ -29,14 +29,18 @@ Destructor =
*/
HB_FUNC( QT_QINTVALIDATOR )
{
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) )
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QIntValidator( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QObject( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QIntValidator( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

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

View File

@@ -35,13 +35,13 @@ New =
*/
HB_FUNC( QT_QITEMEDITORFACTORY )
{
if( HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QITEMEDITORFACTORY" ) )
{
__HB_RETPTRGC__( new QItemEditorFactory() );
__HB_RETPTRGC__( new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QItemEditorFactory( *hbqt_par_QItemEditorFactory( 1 ) ) );
__HB_RETPTRGC__( new QItemEditorFactory() );
}
}
</CODE>

View File

@@ -29,10 +29,18 @@ Destructor =
*/
HB_FUNC( QT_QITEMSELECTIONMODEL )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QABSTRACTITEMMODEL" ) )
{
__HB_RETPTRGC__( new QItemSelectionModel( hbqt_par_QAbstractItemModel( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QABSTRACTITEMMODEL" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QItemSelectionModel( hbqt_par_QAbstractItemModel( 1 ), hbqt_par_QObject( 2 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -35,14 +35,18 @@ HB_FUNC( QT_QKEYEVENT )
__HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), hb_parstr_utf8( 4, &pText01, NULL ), HB_ISLOG( 5 ) ? hb_parl( 5 ) : false, HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) );
hb_strfree( pText01 );
}
if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
{
__HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), QString(), HB_ISLOG( 5 ) ? hb_parl( 5 ) : false, HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) );
__HB_RETPTRGC__( new QKeyEvent( ( QEvent::Type ) hb_parni( 1 ), hb_parni( 2 ), ( Qt::KeyboardModifiers ) hb_parni( 3 ), QString(), hb_parl( 5 ), HB_ISNUM( 6 ) ? hb_parni( 6 ) : 1 ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QKEYEVENT" ) )
{
__HB_RETPTRGC__( new QKeyEvent( *hbqt_par_QKeyEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -32,18 +32,24 @@ New =
*/
HB_FUNC( QT_QKEYSEQUENCE )
{
if( HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QKEYSEQUENCE" ) )
{
__HB_RETPTRGC__( new QKeySequence( *hbqt_par_QKeySequence( 1 ) ) );
else if( HB_ISCHAR( 1 ) )
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QKeySequence( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( HB_ISNUM( 1 ) )
__HB_RETPTRGC__( new QKeySequence( hb_parni( 1 ) ) );
else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QKeySequence( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) );
}
else
{
__HB_RETPTRGC__( new QKeySequence() );
}
}
</CODE>

View File

@@ -28,15 +28,25 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QLABEL )
{
if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
if( hb_pcount() >= 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ), ( HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ), HB_ISNUM( 3 ) ? ( Qt::WindowFlags ) hb_parni( 3 ) : ( Qt::WindowFlags ) 0 ) );
__HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ), ( Qt::WindowFlags ) hb_parni( 3 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QLabel( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QLabel( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{
__HB_RETPTRGC__( new QLabel( ( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ), HB_ISNUM( 2 ) ? ( Qt::WindowFlags ) hb_parni( 2 ) : ( Qt::WindowFlags ) 0 ) );
__HB_RETPTRGC__( new QLabel() );
}
}
</CODE>

View File

@@ -29,11 +29,11 @@ New =
*/
HB_FUNC( QT_QLINEARGRADIENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QLINEARGRADIENT" ) )
{
__HB_RETPTRGC__( new QLinearGradient( *hbqt_par_QLinearGradient( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && hbqt_par_isDerivedFrom( 2, "QPOINTF" ) )
{
__HB_RETPTRGC__( new QLinearGradient( *hbqt_par_QPointF( 1 ), *hbqt_par_QPointF( 2 ) ) );
}

View File

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

View File

@@ -27,9 +27,9 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QMAINWINDOW )
{
if( hb_pcount() <= 2 && HB_ISOBJECT( 1 ) )
if( hb_pcount() <= 2 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) );
__HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{

View File

@@ -32,7 +32,7 @@ New =
*/
HB_FUNC( QT_QMDIAREA )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMdiArea( hbqt_par_QWidget( 1 ) ) );
}

View File

@@ -32,7 +32,7 @@ New =
*/
HB_FUNC( QT_QMDISUBWINDOW )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMdiSubWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}

View File

@@ -14,7 +14,7 @@
<CLASS>
Inherit = QWidget
New = pParent
PaintEvent = YES
PaintEvent =
</CLASS>
<CODE>
@@ -28,22 +28,26 @@ PaintEvent = YES
*/
HB_FUNC( QT_QMENU )
{
if( hb_pcount() == 0 )
{
__HB_RETPTRGC__( new QMenu() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMenu( hbqt_par_QWidget( 1 ) ) );
}
/*
else if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) );
__HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
*/
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QMenu( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else
{
__HB_RETPTRGC__( new QMenu() );
}
}
</CODE>

View File

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

View File

@@ -27,7 +27,37 @@ New = pParent
*/
HB_FUNC( QT_QMESSAGEBOX )
{
__HB_RETPTRGC__( new QMessageBox() );
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMessageBox( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() >= 3 && HB_ISNUM( 1 ) && HB_ISCHAR( 2 ) && HB_ISCHAR( 3 ) )
{
void * pText01 = NULL;
void * pText02 = NULL;
if( hb_pcount() == 3 )
{
__HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), QMessageBox::NoButton ) );
}
else if( hb_pcount() == 4 && HB_ISNUM( 4 ) )
{
__HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ) ) );
}
else if( hb_pcount() == 5 && HB_ISNUM( 4 ) && hbqt_par_isDerivedFrom( 5, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ), hbqt_par_QWidget( 5 ) ) );
}
else if( hb_pcount() == 6 && HB_ISNUM( 4 ) && hbqt_par_isDerivedFrom( 5, "QWIDGET" ) && HB_ISNUM( 6 ) )
{
__HB_RETPTRGC__( new QMessageBox( ( QMessageBox::Icon ) hb_parni( 1 ), hb_parstr_utf8( 2, &pText01, NULL ), hb_parstr_utf8( 3, &pText02, NULL ), ( QMessageBox::StandardButtons ) hb_parni( 4 ), hbqt_par_QWidget( 5 ), ( Qt::WindowFlags ) hb_parni( 6 ) ) );
}
hb_strfree( pText01 );
hb_strfree( pText02 );
}
else
{
__HB_RETPTRGC__( new QMessageBox( 0 ) );
}
}
</CODE>

View File

@@ -29,18 +29,22 @@ New =
*/
HB_FUNC( QT_QMOUSEEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QMOUSEEVENT" ) )
{
__HB_RETPTRGC__( new QMouseEvent( *hbqt_par_QMouseEvent( 1 ) ) );
}
else if( hb_pcount() == 5 )
else if( hb_pcount() == 5 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) )
{
__HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), ( Qt::MouseButton ) hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) );
}
else if( hb_pcount() == 6 )
else if( hb_pcount() == 6 && HB_ISNUM( 1 ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && hbqt_par_isDerivedFrom( 3, "QPOINT" ) && HB_ISNUM( 4 ) && HB_ISNUM( 5 ) && HB_ISNUM( 6 ) )
{
__HB_RETPTRGC__( new QMouseEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ), ( Qt::MouseButton ) hb_parni( 4 ), ( Qt::MouseButtons ) hb_parni( 5 ), ( Qt::KeyboardModifiers ) hb_parni( 6 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -29,14 +29,18 @@ Constructor =
*/
HB_FUNC( QT_QMOVEEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QMOVEEVENT" ) )
{
__HB_RETPTRGC__( new QMoveEvent( *hbqt_par_QMoveEvent( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) )
{
__HB_RETPTRGC__( new QMoveEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -28,29 +28,22 @@ New =
*/
HB_FUNC( QT_QPAINTEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QREGION" ) )
{
if( hbqt_par_isDerivedFrom( 1, "QREGION" ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) );
}
else if( hbqt_par_isDerivedFrom( 1, "QRECT" ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) );
}
else if( hbqt_par_isDerivedFrom( 1, "QPAINTEVENT" ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QPaintEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRegion( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRECT" ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPAINTEVENT" ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QPaintEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
}
</CODE>

View File

@@ -26,7 +26,7 @@ New = pDevice
*/
HB_FUNC( QT_QPAINTER )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPAINTDEVICE" ) )
{
__HB_RETPTRGC__( new QPainter( hbqt_par_QPaintDevice( 1 ) ) );
}

View File

@@ -38,11 +38,15 @@ HB_FUNC( QT_QPALETTE )
{
__HB_RETPTRGC__( new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPALETTE" ) )
{
__HB_RETPTRGC__( new QPalette( *hbqt_par_QPalette( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) )
{
__HB_RETPTRGC__( new QPalette( *hbqt_par_QColor( 1 ) ) );
}
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QCOLOR" ) && hbqt_par_isDerivedFrom( 2, "QCOLOR" ) )
{
__HB_RETPTRGC__( new QPalette( *hbqt_par_QColor( 1 ), *hbqt_par_QColor( 2 ) ) );
}

View File

@@ -39,7 +39,7 @@ HB_FUNC( QT_QPICTURE )
{
__HB_RETPTRGC__( new QPicture( hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QPICTURE" ) )
{
__HB_RETPTRGC__( new QPicture( *hbqt_par_QPicture( 1 ) ) );
}

View File

@@ -28,10 +28,14 @@ New =
*/
HB_FUNC( QT_QPLAINTEXTDOCUMENTLAYOUT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTDOCUMENT" ) )
{
__HB_RETPTRGC__( new QPlainTextDocumentLayout( hbqt_par_QTextDocument( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -38,16 +38,16 @@ HB_FUNC( QT_QPLAINTEXTEDIT )
__HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), 0 ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QPlainTextEdit( hbqt_par_QWidget( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && HB_ISOBJECT( 2 ) )
else if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
__HB_RETPTRGC__( new QPlainTextEdit( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QPlainTextEdit( hbqt_par_QWidget( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QPlainTextEdit() );

View File

@@ -29,7 +29,7 @@ New =
*/
HB_FUNC( QT_QPRINTER )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QPRINTERINFO" ) )
{
__HB_RETPTRGC__( new QPrinter( *hbqt_par_QPrinterInfo( 1 ), ( QPrinter::PrinterMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QPrinter::ScreenResolution ) ) );
}

View File

@@ -48,7 +48,14 @@ HB_FUNC( QT_QPUSHBUTTON )
__HB_RETPTRGC__( new QPushButton( HB_ISOBJECT( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) );
}
*/
__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
{
__HB_RETPTRGC__( new QPushButton() );
}
}
</CODE>

View File

@@ -32,15 +32,15 @@ New =
*/
HB_FUNC( QT_QRADIALGRADIENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRADIALGRADIENT" ) )
{
__HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QRadialGradient( 1 ) ) );
}
else if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) )
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QPointF( 1 ), hb_parnd( 2 ) ) );
}
else if( hb_pcount() == 3 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) && HB_ISOBJECT( 3 ) )
else if( hb_pcount() == 3 && hbqt_par_isDerivedFrom( 1, "QPOINTF" ) && HB_ISNUM( 2 ) && hbqt_par_isDerivedFrom( 3, "QPOINTF" ) )
{
__HB_RETPTRGC__( new QRadialGradient( *hbqt_par_QPointF( 1 ), hb_parnd( 2 ), *hbqt_par_QPointF( 3 ) ) );
}

View File

@@ -26,13 +26,19 @@ New = pParent
*/
HB_FUNC( QT_QRADIOBUTTON )
{
if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) )
if( hb_pcount() == 2 && HB_ISCHAR( 1 ) && hbqt_par_isDerivedFrom( 2, "QWIDGET" ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) );
__HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ), hbqt_par_QWidget( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QRadioButton( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
__HB_RETPTRGC__( new QRadioButton( hbqt_par_QWidget( 1 ) ) );
else
__HB_RETPTRGC__( new QRadioButton() );

View File

@@ -29,14 +29,18 @@ Destructor =
*/
HB_FUNC( QT_QREGEXPVALIDATOR )
{
if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QREGEXP" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QRegExpValidator( *hbqt_par_QRegExp( 1 ), hbqt_par_QObject( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QRegExpValidator( hbqt_par_QObject( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -28,14 +28,18 @@ Constructor =
*/
HB_FUNC( QT_QRESIZEEVENT )
{
if( hb_pcount() == 2 && HB_ISOBJECT( 1 ) && HB_ISOBJECT( 2 ) )
if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QSIZE" ) && hbqt_par_isDerivedFrom( 2, "QSIZE" ) )
{
__HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QSize( 1 ), *hbqt_par_QSize( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRESIZEEVENT" ) )
{
__HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QResizeEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -71,14 +71,18 @@ New =
*/
HB_FUNC( QT_QSHORTCUTEVENT )
{
if( hb_pcount() >= 2 && HB_ISOBJECT( 1 ) && HB_ISNUM( 2 ) )
if( hb_pcount() >= 2 && hbqt_par_isDerivedFrom( 1, "QKEYSEQUENCE" ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QKeySequence( 1 ), hb_parni( 2 ), ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : false ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSHORTCUTEVENT" ) )
{
__HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QShortcutEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -32,7 +32,7 @@ HB_FUNC( QT_QSHOWEVENT )
{
__HB_RETPTRGC__( new QShowEvent() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSHOWEVENT" ) )
{
__HB_RETPTRGC__( new QShowEvent( *hbqt_par_QShowEvent( 1 ) ) );
}

View File

@@ -29,11 +29,15 @@ New =
*/
HB_FUNC( QT_QSIZEPOLICY )
{
if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
{
__HB_RETPTRGC__( new QSizePolicy( ( QSizePolicy::Policy ) hb_parni( 1 ), ( QSizePolicy::Policy ) hb_parni( 2 ), ( QSizePolicy::ControlType ) hb_parni( 3 ) ) );
}
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QSizePolicy( ( QSizePolicy::Policy ) hb_parni( 1 ), ( QSizePolicy::Policy ) hb_parni( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSIZEPOLICY" ) )
{
__HB_RETPTRGC__( new QSizePolicy( *hbqt_par_QSizePolicy( 1 ) ) );
}

View File

@@ -79,7 +79,7 @@ Constructor =
*/
HB_FUNC( QT_QSORTFILTERPROXYMODEL )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
{
__HB_RETPTRGC__( new QSortFilterProxyModel( hbqt_par_QObject( 1 ) ) );
}

View File

@@ -34,10 +34,14 @@ HB_FUNC( QT_QSPACERITEM )
HB_ISNUM( 3 ) ? ( QSizePolicy::Policy ) hb_parni( 3 ) : QSizePolicy::Minimum,
HB_ISNUM( 4 ) ? ( QSizePolicy::Policy ) hb_parni( 4 ) : QSizePolicy::Minimum );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QSPACERITEM" ) )
{
__HB_RETPTRGC__( new QSpacerItem( *hbqt_par_QSpacerItem( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -35,17 +35,23 @@ HB_FUNC( QT_QTABLEWIDGETITEM )
__HB_RETPTRGC__( new QTableWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ), hb_parni( 2 ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
{
void * pText01 = NULL;
__HB_RETPTRGC__( new QTableWidgetItem( hb_parstr_utf8( 1, &pText01, NULL ) ) );
hb_strfree( pText01 );
}
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QTableWidgetItem( hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTABLEWIDGETITEM" ) )
{
__HB_RETPTRGC__( new QTableWidgetItem( *hbqt_par_QTableWidgetItem( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QTableWidgetItem( 0 ) );
__HB_RETPTRGC__( new QTableWidgetItem() );
}
}
</CODE>

View File

@@ -28,7 +28,7 @@ New =
*/
HB_FUNC( QT_QTEXTBLOCK )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTBLOCK" ) )
{
__HB_RETPTRGC__( new QTextBlock( *hbqt_par_QTextBlock( 1 ) ) );
}

View File

@@ -28,7 +28,7 @@ New =
*/
HB_FUNC( QT_QTEXTBLOCKFORMAT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QTEXTBLOCKFORMAT" ) )
{
__HB_RETPTRGC__( new QTextBlockFormat( *hbqt_par_QTextBlockFormat( 1 ) ) );
}

View File

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

View File

@@ -29,18 +29,22 @@ Constructor =
*/
HB_FUNC( QT_QWHEELEVENT )
{
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWHEELEVENT" ) )
{
__HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QWheelEvent( 1 ) ) );
}
else if( hb_pcount() >= 4 )
else if( hb_pcount() >= 4 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && ISNUM( 2 ) && ISNUM( 3 ) && HB_ISNUM( 4 ) )
{
__HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), hb_parni( 2 ), ( Qt::MouseButtons ) hb_parni( 3 ), ( Qt::KeyboardModifiers ) hb_parni( 4 ), ( Qt::Orientation ) ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : Qt::Vertical ) ) );
}
else if( hb_pcount() >= 5 )
else if( hb_pcount() >= 5 && hbqt_par_isDerivedFrom( 1, "QPOINT" ) && hbqt_par_isDerivedFrom( 2, "QPOINT" ) && ISNUM( 3 ) && ISNUM( 4 ) && HB_ISNUM( 5 ) )
{
__HB_RETPTRGC__( new QWheelEvent( *hbqt_par_QPoint( 1 ), *hbqt_par_QPoint( 2 ), hb_parni( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( Qt::Orientation ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : Qt::Vertical ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>

View File

@@ -31,9 +31,9 @@ PaintEvent = YES
*/
HB_FUNC( QT_QWIDGET )
{
if( hb_pcount() >= 1 && HB_ISOBJECT( 1 ) )
if( hb_pcount() >= 1 && hbqt_par_isDerivedFrom( 1, "QWIDGET" ) )
{
__HB_RETPTRGC__( new QWidget( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) );
__HB_RETPTRGC__( new QWidget( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
}
else
{

View File

@@ -36,10 +36,14 @@ HB_FUNC( QT_QWINDOWSTATECHANGEEVENT )
{
__HB_RETPTRGC__( new QWindowStateChangeEvent( ( Qt::WindowStates ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QWINDOWSTATECHANGEEVENT" ) )
{
__HB_RETPTRGC__( new QWindowStateChangeEvent( *hbqt_par_QWindowStateChangeEvent( 1 ) ) );
}
else
{
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
}
</CODE>