2012-06-04 13:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/hbmk2_qt.hb
    ! Guarded: qth_is_QObject() function under __HBQT_REVAMP__.
      This facilitates to change how we would like to use this 
      construct in the future. Also there is a lot which may be 
      added to this protocol, apart from only detecting if a class
      is QObject() derived, and hence is subject to change.
      We will do what is proposed after all is settled on new 
      protocol.

    - Removed: QIcon() hack which was exploiting hbqt_par_Qstring()
      usage. Also it was not per Qt documantation. Now anywhere 
      an icon is needed, it has to be constructed explicitily 
      with a call to QIcon( cFileName ). Earlier QIcon() was passed
      as only a <cFileName>

      INCOMPATIBLE: 3rd party libs have to modify their code.

  * contrib/hbqt/qtcore/qth/QLibraryInfo.qth
  * contrib/hbqt/qtcore/qth/QMimeData.qth
  * contrib/hbqt/qtgui/qth/QClipboard.qth
  * contrib/hbqt/qtgui/qth/QDirModel.qth
  * contrib/hbqt/qtgui/qth/QDropEvent.qth
  * contrib/hbqt/qtgui/qth/QFileSystemModel.qth
  * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth
    + Implemented: _HBQT_REVAMP__ specific signal/slot firing objects.

  * contrib/hbqt/qtgui/qth/QPushButton.qth
    - Removed: <CLASS> PaintEvent = </CLASS> token.

  * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
  * contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
  * contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
  * contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
    + Implemented: _HBQT_REVAMP__ specific signal/slot firing objects.

  * contrib/hbqt/qtcore/hbqt_bind.cpp
  * contrib/hbqt/qtcore/hbqt_hbqevents.cpp
  * contrib/hbqt/qtcore/hbqt_hbqslots.cpp
  * contrib/hbqt/qtcore/hbqt_init.cpp
  * contrib/hbqt/qtcore/hbqt_pointer.cpp
  * contrib/hbqt/qtgui/hbqt_init.cpp
    + Implemented: _HBQT_REVAMP__ specific signal/slot/events management.

    ; NOTE: hbIDE is almost running under __HBQT_REVAMP__ methodoly
            with signal/slots/events catched anfired properly.
            This implementation is subject to a lot of improvements 
            but at of current shows up a good promise to achieve 
            the end-results soon.
This commit is contained in:
Pritpal Bedi
2012-06-04 20:53:35 +00:00
parent 41dce22eea
commit e350128439
20 changed files with 340 additions and 52 deletions

View File

@@ -16,6 +16,56 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-04 13:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
! Guarded: qth_is_QObject() function under __HBQT_REVAMP__.
This facilitates to change how we would like to use this
construct in the future. Also there is a lot which may be
added to this protocol, apart from only detecting if a class
is QObject() derived, and hence is subject to change.
We will do what is proposed after all is settled on new
protocol.
- Removed: QIcon() hack which was exploiting hbqt_par_Qstring()
usage. Also it was not per Qt documantation. Now anywhere
an icon is needed, it has to be constructed explicitily
with a call to QIcon( cFileName ). Earlier QIcon() was passed
as only a <cFileName>
INCOMPATIBLE: 3rd party libs have to modify their code.
* contrib/hbqt/qtcore/qth/QLibraryInfo.qth
* contrib/hbqt/qtcore/qth/QMimeData.qth
* contrib/hbqt/qtgui/qth/QClipboard.qth
* contrib/hbqt/qtgui/qth/QDirModel.qth
* contrib/hbqt/qtgui/qth/QDropEvent.qth
* contrib/hbqt/qtgui/qth/QFileSystemModel.qth
* contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth
+ Implemented: _HBQT_REVAMP__ specific signal/slot firing objects.
* contrib/hbqt/qtgui/qth/QPushButton.qth
- Removed: <CLASS> PaintEvent = </CLASS> token.
* contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
* contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
+ Implemented: _HBQT_REVAMP__ specific signal/slot firing objects.
* contrib/hbqt/qtcore/hbqt_bind.cpp
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
* contrib/hbqt/qtcore/hbqt_init.cpp
* contrib/hbqt/qtcore/hbqt_pointer.cpp
* contrib/hbqt/qtgui/hbqt_init.cpp
+ Implemented: _HBQT_REVAMP__ specific signal/slot/events management.
; NOTE: hbIDE is almost running under __HBQT_REVAMP__ methodoly
with signal/slots/events catched anfired properly.
This implementation is subject to a lot of improvements
but at of current shows up a good promise to achieve
the end-results soon.
2012-06-04 13:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qscintilla/qth/QsciStyle.qth
* contrib/hbqt/qscintilla/qth/QsciStyledText.qth

View File

@@ -2410,12 +2410,6 @@ STATIC FUNCTION hbqtgen_paramCheckStrCpp( cType, nArg, cCast, lObj )
ELSE
RETURN "hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ', "' + upper( cCast ) +'" )'
ENDIF
CASE "CO"
IF lObj
RETURN "( HB_ISOBJECT( " + hb_ntos( nArg ) + " )" + " || HB_ISCHAR( " + hb_ntos( nArg ) + " ) )"
ELSE
RETURN "( hbqt_par_isDerivedFrom( " + hb_ntos( nArg ) + ', "' + upper( cCast ) + '" )' + " || HB_ISCHAR( " + hb_ntos( nArg ) + " ) )"
ENDIF
CASE "N*"
RETURN "HB_ISBYREF( " + hb_ntos( nArg ) + " )"
CASE "N"
@@ -2797,13 +2791,6 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
oArg:cDoc := "c" + oMtd:cDocNM
oArg:cTypeHB := "C"
#endif
CASE oArg:cCast == "QIcon"
cRef := "QIcon"
s := "*hbqt_par_QIcon( " + cHBIdx + " )"
oArg:cBody := "( HB_ISCHAR( " + cHBIdx + " ) ? " + "QIcon( hbqt_par_QString( " + cHBIdx + " ) )" + " : " + s + ")"
oArg:cDoc := "co" + oArg:cCast
oArg:cTypeHB := "CO"
CASE oArg:lFar
cRef := oArg:cCast
oArg:cBody := "hbqt_par_" + oArg:cCast + "( " + cHBIdx + " )"
@@ -3427,6 +3414,7 @@ STATIC FUNCTION qth_is_extended( cQTHFileName )
RETURN lYes
/*----------------------------------------------------------------------*/
#ifdef __HBQT_REVAMP__
STATIC FUNCTION qth_is_QObject( cWidget )
STATIC aQObjects := {}
@@ -3438,36 +3426,36 @@ STATIC FUNCTION qth_is_QObject( cWidget )
IF empty( aQObjects )
aadd( aQObjects, "QObject" )
aadd( aQObjects, "QAbstractAnimation" ) // QAnimationGroup, QPauseAnimation, and QVariantAnimation. QParallelAnimationGroup and QSequentialAnimationGroup. QPropertyAnimation
aadd( aQObjects, "QAbstractAnimation" )
aadd( aQObjects, "QAbstractEventDispatcher" )
aadd( aQObjects, "QAbstractFontEngine" )
aadd( aQObjects, "QAbstractItemDelegate" ) // QItemDelegate and QStyledItemDelegate. QSqlRelationalDelegate.
aadd( aQObjects, "QAbstractItemModel" ) // QSqlRelationalTableModel. QSqlTableModel QSqlQueryModel. QIdentityProxyModel and QSortFilterProxyModel. QHelpIndexModel QStringListModel. QAbstractListModel, QAbstractProxyModel, QAbstractTableModel, QDirModel, QFileSystemModel, QHelpContentModel, QProxyModel, and QStandardItemModel.
aadd( aQObjects, "QAbstractItemDelegate" )
aadd( aQObjects, "QAbstractItemModel" )
aadd( aQObjects, "QAbstractMessageHandler" )
aadd( aQObjects, "QAbstractNetworkCache" ) // QNetworkDiskCache.
aadd( aQObjects, "QAbstractState" ) // QFinalState, QHistoryState, and QState. QStateMachine.
aadd( aQObjects, "QAbstractTextDocumentLayout" ) // QPlainTextDocumentLayout.
aadd( aQObjects, "QAbstractTransition" ) // QEventTransition and QSignalTransition. QKeyEventTransition and QMouseEventTransition.
aadd( aQObjects, "QAbstractNetworkCache" )
aadd( aQObjects, "QAbstractState" )
aadd( aQObjects, "QAbstractTextDocumentLayout" )
aadd( aQObjects, "QAbstractTransition" )
aadd( aQObjects, "QAbstractUriResolver" )
aadd( aQObjects, "QAbstractVideoSurface" )
aadd( aQObjects, "QAccessibleBridgePlugin" )
aadd( aQObjects, "QAccessiblePlugin" )
aadd( aQObjects, "QAction" ) // QMenuItem and QWidgetAction
aadd( aQObjects, "QAction" )
aadd( aQObjects, "QActionGroup" )
aadd( aQObjects, "QAudioInput" )
aadd( aQObjects, "QAudioOutput" )
aadd( aQObjects, "QAxFactory" )
aadd( aQObjects, "QAxObject" ) // QAxScriptEngine.
aadd( aQObjects, "QAxObject" )
aadd( aQObjects, "QAxScript" )
aadd( aQObjects, "QAxScriptManager" )
aadd( aQObjects, "QButtonGroup" )
aadd( aQObjects, "QClipboard" )
aadd( aQObjects, "QCompleter" )
aadd( aQObjects, "QCopChannel" )
aadd( aQObjects, "QCoreApplication" ) // QApplication
aadd( aQObjects, "QCoreApplication" )
aadd( aQObjects, "QDataWidgetMapper" )
aadd( aQObjects, "QDBusAbstractAdaptor" )
aadd( aQObjects, "QDBusAbstractInterface" ) // QDBusConnectionInterface and QDBusInterface.
aadd( aQObjects, "QDBusAbstractInterface" )
aadd( aQObjects, "QDBusPendingCallWatcher" )
aadd( aQObjects, "QDBusServiceWatcher" )
aadd( aQObjects, "QDeclarativeComponent" )
@@ -3489,16 +3477,16 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QFtp" )
aadd( aQObjects, "QFutureWatcher" )
aadd( aQObjects, "QGenericPlugin" )
aadd( aQObjects, "QGesture" ) // QPanGesture, QPinchGesture, QSwipeGesture, QTapAndHoldGesture, and QTapGesture.
aadd( aQObjects, "QGesture" )
aadd( aQObjects, "QGLShader" )
aadd( aQObjects, "QGLShaderProgram" )
aadd( aQObjects, "QGraphicsAnchor" )
aadd( aQObjects, "QGraphicsEffect" ) // QGraphicsBlurEffect, QGraphicsColorizeEffect, QGraphicsDropShadowEffect, and QGraphicsOpacityEffect.
aadd( aQObjects, "QGraphicsEffect" )
aadd( aQObjects, "QGraphicsItemAnimation" )
aadd( aQObjects, "QGraphicsObject" ) // QDeclarativeItem, QGraphicsSvgItem, QGraphicsTextItem, and QGraphicsWidget. QGraphicsProxyWidget and QGraphicsWebView.
aadd( aQObjects, "QGraphicsObject" )
aadd( aQObjects, "QGraphicsScene" )
aadd( aQObjects, "QGraphicsTransform" ) // QGraphicsRotation and QGraphicsScale.
aadd( aQObjects, "QHelpEngineCore" ) // QHelpEngine
aadd( aQObjects, "QGraphicsTransform" )
aadd( aQObjects, "QHelpEngineCore" )
aadd( aQObjects, "QHelpSearchEngine" )
aadd( aQObjects, "QHttp" )
aadd( aQObjects, "QHttpMultiPart" )
@@ -3507,10 +3495,10 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QImageIOPlugin" )
aadd( aQObjects, "QInputContext" )
aadd( aQObjects, "QInputContextPlugin" )
aadd( aQObjects, "QIODevice" ) // Q3Socket, Q3SocketDevice, QAbstractSocket, QBuffer, QFile, QLocalSocket, QNetworkReply, and QProcess QTcpSocket and QUdpSocket. QSslSocket. QTemporaryFile.
aadd( aQObjects, "QIODevice" )
aadd( aQObjects, "QItemSelectionModel" )
aadd( aQObjects, "QKbdDriverPlugin" )
aadd( aQObjects, "QLayout" ) // QBoxLayout, QFormLayout, QGridLayout, and QStackedLayout. Q3HBoxLayout, Q3VBoxLayout, QHBoxLayout, and QVBoxLayout.
aadd( aQObjects, "QLayout" )
aadd( aQObjects, "QLibrary" )
aadd( aQObjects, "QLocalServer" )
aadd( aQObjects, "QMimeData" )
@@ -3546,7 +3534,7 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QTcpServer" )
aadd( aQObjects, "QTextCodecPlugin" )
aadd( aQObjects, "QTextDocument" )
aadd( aQObjects, "QTextObject" ) // QTextBlockGroup and QTextFrame. QTextList. QTextTable.
aadd( aQObjects, "QTextObject" )
aadd( aQObjects, "QThread" )
aadd( aQObjects, "QThreadPool" )
aadd( aQObjects, "QTimeLine" )
@@ -3555,7 +3543,7 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QUiLoader" )
aadd( aQObjects, "QUndoGroup" )
aadd( aQObjects, "QUndoStack" )
aadd( aQObjects, "QValidator" ) // QDoubleValidator, QIntValidator, and QRegExpValidator.
aadd( aQObjects, "QValidator" )
aadd( aQObjects, "QWebFrame" )
aadd( aQObjects, "QWebHistoryInterface" )
aadd( aQObjects, "QWebPage" )
@@ -3565,23 +3553,23 @@ STATIC FUNCTION qth_is_QObject( cWidget )
aadd( aQObjects, "QWSInputMethod" )
aadd( aQObjects, "QWSServer" )
aadd( aQObjects, "QAbstractButton" ) // Q3Button, QCheckBox, QPushButton, QRadioButton, and QToolButton. QCommandLinkButton.
aadd( aQObjects, "QAbstractSlider" ) // QDial, QScrollBar, and QSlider.
aadd( aQObjects, "QAbstractSpinBox" ) // QDateTimeEdit, QDoubleSpinBox, and QSpinBox. QDateEdit and QTimeEdit.
aadd( aQObjects, "QAbstractButton" )
aadd( aQObjects, "QAbstractSlider" )
aadd( aQObjects, "QAbstractSpinBox" )
aadd( aQObjects, "QAxWidget" )
aadd( aQObjects, "QCalendarWidget" )
aadd( aQObjects, "QComboBox" ) // QFontComboBox.
aadd( aQObjects, "QComboBox" )
aadd( aQObjects, "QDesignerActionEditorInterface" )
aadd( aQObjects, "QDesignerFormWindowInterface" )
aadd( aQObjects, "QDesignerObjectInspectorInterface" )
aadd( aQObjects, "QDesignerPropertyEditorInterface" )
aadd( aQObjects, "QDesignerWidgetBoxInterface" )
aadd( aQObjects, "QDesktopWidget" )
aadd( aQObjects, "QDialog" ) // Q3FileDialog, Q3ProgressDialog, Q3TabDialog, Q3Wizard, QAbstractPrintDialog, QColorDialog, QErrorMessage, QFileDialog, QFontDialog, QInputDialog, QMessageBox, QPageSetupDialog, QPrintPreviewDialog, QProgressDialog, and QWizard. QPrintDialog.
aadd( aQObjects, "QDialog" )
aadd( aQObjects, "QDialogButtonBox" )
aadd( aQObjects, "QDockWidget" )
aadd( aQObjects, "QFocusFrame" )
aadd( aQObjects, "QFrame" ) // Q3Frame, Q3ProgressBar, QAbstractScrollArea, QLabel, QLCDNumber, QSplitter, QStackedWidget, and QToolBox. QAbstractItemView, QGraphicsView, QMdiArea, QPlainTextEdit, QScrollArea, and QTextEdit. QColumnView, QHeaderView, QListView, QTableView, and QTreeView QHelpIndexWidget, QListWidget, and QUndoView. QTableWidget. QHelpContentWidget and QTreeWidget. QDeclarativeView. QTextBrowser.
aadd( aQObjects, "QFrame" )
aadd( aQObjects, "QGLWidget" )
aadd( aQObjects, "QGroupBox" )
aadd( aQObjects, "QHelpSearchQueryWidget" )
@@ -3794,6 +3782,7 @@ STATIC FUNCTION qth_get_bits( cWidget, lNew )
ENDIF
RETURN hb_ntos( nBits )
#endif
/*----------------------------------------------------------------------*/

View File

@@ -134,6 +134,7 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassF
{
if( bind->qtObject == qtObject )
{
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindGetHbObject( %p ):if( bind->qtObject == qtObject )", qtObject ) );
pObject = hb_arrayCreateClone( pItem, ( PHB_BASEARRAY ) bind->hbObject );
break;
}
@@ -156,7 +157,7 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, PHB_SYMB pClassF
}
if( bind == NULL )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p )", qtObject ) );
HB_TRACE( HB_TR_ALWAYS, ( "hbqt_bindGetHbObject( %p )", qtObject ) );
bind = ( PHBQT_BIND ) hb_xgrab( sizeof( HBQT_BIND ) );
memset( bind, 0, sizeof( HBQT_BIND ) );

View File

@@ -244,11 +244,12 @@ bool HBQEvents::eventFilter( QObject * object, QEvent * event )
{
if( hb_vmRequestReenter() )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM pItem = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( s_lstCreateObj.at( eventId ) ), NULL, 0 );
#else
PHB_ITEM pItem = hb_itemNew( hbqt_create_objectGC( ( * pCallback )( event, false ), s_lstCreateObj.at( eventId ) ) );
PHB_ITEM ret = hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 1, pItem );
if( hb_itemType( ret ) & HB_IT_LOGICAL )
stopTheEventChain = ( bool ) hb_itemGetL( ret );
#endif
stopTheEventChain = ( bool ) hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 1, pItem ) );
hb_itemRelease( pItem );
hb_vmRequestRestore();

View File

@@ -221,7 +221,7 @@ int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock )
int HBQSlots::hbDisconnect( PHB_ITEM pObj, char * pszSignal )
{
//HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbDisconnect( %s )", pszSignal ) );
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbDisconnect( %s )", pszSignal ) );
int nResult = 1;

View File

@@ -106,7 +106,11 @@ static void hbqt_SlotsExecPointer( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( ( const char * ) pList.at( 0 ).data() ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
#endif
hb_vmSend( 1 );
}
@@ -116,8 +120,13 @@ static void hbqt_SlotsExecPointerPointer( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( ( const char * ) pList.at( 0 ).data() ), NULL, 2 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , hb_dynsymGetSymbol( ( const char * ) pList.at( 0 ).data() ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) ), false ), ( const char * ) pList.at( 1 ).data() ) );
#endif
hb_vmSend( 2 );
}
@@ -127,7 +136,11 @@ static void hbqt_SlotsExecPointerInt( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( ( const char * ) pList.at( 0 ).data() ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
}
@@ -215,7 +228,11 @@ static void hbqt_SlotsExecModel( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QMODELINDEX" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmSend( 1 );
}
@@ -225,8 +242,13 @@ static void hbqt_SlotsExecModelModel( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QMODELINDEX" ), NULL, 1 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 2 ] ) ) ), hb_dynsymGetSymbol( "HB_QMODELINDEX" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmSend( 2 );
}
@@ -236,7 +258,11 @@ static void hbqt_SlotsExecStringList( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QSTRINGLIST" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QStringList( new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QStringList" ) );
#endif
hb_vmSend( 1 );
}
@@ -246,7 +272,11 @@ static void hbqt_SlotsExecQPoint( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QPOINT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QPoint( new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QPoint" ) );
#endif
hb_vmSend( 1 );
}
@@ -256,7 +286,11 @@ static void hbqt_SlotsExecQUrl( PHB_ITEM * codeBlock, void ** arguments, QString
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QURL" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QUrl( new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QUrl" ) );
#endif
hb_vmSend( 1 );
}
@@ -266,7 +300,11 @@ static void hbqt_SlotsExecQDate( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QDATE" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QDate( new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDate" ) );
#endif
hb_vmSend( 1 );
}
@@ -276,7 +314,11 @@ static void hbqt_SlotsExecQDateTime( PHB_ITEM * codeBlock, void ** arguments, QS
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QDATETIME" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QDateTime( new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDateTime" ) );
#endif
hb_vmSend( 1 );
}
@@ -286,7 +328,11 @@ static void hbqt_SlotsExecQTime( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QTIME" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTime( new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTime" ) );
#endif
hb_vmSend( 1 );
}
@@ -306,7 +352,11 @@ static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QRECT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
}
@@ -317,7 +367,11 @@ static void hbqt_SlotsExecQRect( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QRECT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmSend( 1 );
}
@@ -327,7 +381,11 @@ static void hbqt_SlotsExecQSizeF( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QSIZEF" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QSizeF( new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QSizeF" ) );
#endif
hb_vmSend( 1 );
}
@@ -337,7 +395,11 @@ static void hbqt_SlotsExecModelIndexIntInt( PHB_ITEM * codeBlock, void ** argume
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QMODELINDEX" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 3 ] ) );
hb_vmSend( 3 );
@@ -349,7 +411,11 @@ static void hbqt_SlotsExecModelIndexList( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QList< QModelIndex *>( ( *reinterpret_cast< QList< QModelIndex *> *>( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QMODELINDEXLIST" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QList( new QList< QModelIndex *>( ( *reinterpret_cast< QList< QModelIndex *> *>( arguments[ 1 ] ) ) ), true ), "hb_QModelIndexList" ) );
#endif
hb_vmSend( 1 );
}
@@ -359,7 +425,11 @@ static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QOBJECT" ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QObject" ) );
#endif
hb_vmSend( 1 );
}

View File

@@ -267,9 +267,18 @@ void hbqt_par_detach_ptrGC( int iParam )
HB_FUNC( __HBQT_ISPOINTER )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM pObject = hb_stackSelfItem();
if( pObject == NULL )
pObject = hb_param( 1, HB_IT_OBJECT );
if( pObject )
hb_retl( ! ( hbqt_bindGetQtObject( pObject ) == NULL ) );
else
hb_retl( HB_FALSE );
#else
HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
hb_retl( p && p->ph );
#endif
}
HB_FUNC( HBQT_ISEQUAL )

View File

@@ -47,7 +47,11 @@ enum LibraryLocation { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath
<PROTOS>
QDate buildDate (){
#if QT_VERSION >= 0x040600
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QDate( QLibraryInfo::buildDate() ), hb_dynsymGetSymbol( "HB_QDATE" ), NULL, 1 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QDate( new QDate( QLibraryInfo::buildDate() ), true ) , "HB_QDATE" );
#endif
#endif
}
QString buildKey (){

View File

@@ -70,7 +70,11 @@ QStringList * hbUrlList() const{
{
strList << ( QString ) url.toString().toAscii().data();
}
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QStringList( strList ), hb_dynsymGetSymbol( "HB_QSTRINGLIST" ), NULL, 1 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QStringList( new QStringList( strList ), true ), "hb_QStringList" );
#endif
}
}
</PROTOS>

View File

@@ -490,7 +490,11 @@ void HBQGraphicsItem::contextMenuEvent( QGraphicsSceneContextMenuEvent * event )
{
if( block ){
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENECONTEXTMENUEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( event, false ), "hb_QGraphicsSceneContextMenuEvent" );
#endif
PHB_ITEM p3 = hb_itemPutC( NULL, objectName().toLatin1().data() );
hb_vmEvalBlockV( block, 3, p1, p2, p3 );
hb_itemRelease( p1 );
@@ -779,8 +783,13 @@ void HBQGraphicsItem::paint( QPainter * painter, const QStyleOptionGraphicsItem
QRectF rect = ( option->type == QStyleOption::SO_GraphicsItem ) ? boundingRect() : option->exposedRect;
PHB_ITEM p1 = hb_itemPutNI( NULL, 21017 );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) painter, hb_dynsymGetSymbol( "HB_QPAINTER" ), NULL, 0 );
PHB_ITEM p3 = hbqt_bindGetHbObject( NULL, ( void * ) &rect, hb_dynsymGetSymbol( "HB_QRECTF" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QPainter( painter, false ), "hb_QPainter" ) );
PHB_ITEM p3 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QRectF( &rect, false ), "hb_QRectF" ) );
#endif
hb_vmEvalBlockV( block, 3, p1, p2, p3 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -414,7 +414,11 @@ void HBQGraphicsScene::contextMenuEvent( QGraphicsSceneContextMenuEvent * event
if( ! item ){
if( block ){
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENECONTEXTMENUEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( event, false ), "hb_QGraphicsSceneContextMenuEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -428,7 +432,11 @@ void HBQGraphicsScene::dragEnterEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragEnter );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -443,7 +451,11 @@ void HBQGraphicsScene::dragLeaveEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragLeave );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -458,7 +470,11 @@ void HBQGraphicsScene::dragMoveEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragMove );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -477,7 +493,11 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
if( mime->hasFormat( ( QString ) "application/x-qabstractitemmodeldatalist" ) )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p3 = hb_itemNew( NULL );
QTreeWidget * tree = dynamic_cast< QTreeWidget * >( event->source() );
@@ -504,7 +524,11 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
else
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -1384,7 +1384,11 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
hb_arraySetNI( p2, 4, columnEnds );
hb_arraySetNI( p2, 5, selectionMode );
hb_arraySetNI( p2, 6, selectionState );
#ifdef __HBQT_REVAMP__
hb_arraySet( p2, 7, hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QKEYEVENT" ), NULL, 0 ) );
#else
hb_arraySet( p2, 7, hbqt_create_objectGC( hbqt_gcAllocate_QKeyEvent( event, false ), "hb_QKeyEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -99,7 +99,11 @@ void HBQTableView::mousePressEvent( QMouseEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QMOUSEEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMouseEvent( event, false ), "hb_QMouseEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
@@ -112,7 +116,11 @@ void HBQTableView::mouseDoubleClickEvent( QMouseEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QMOUSEEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMouseEvent( event, false ), "hb_QMouseEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
@@ -125,7 +133,11 @@ void HBQTableView::wheelEvent( QWheelEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, hb_dynsymGetSymbol( "HB_QWHEELEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QWheelEvent( event, false ), "hb_QWheelEvent" ) );
#endif
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );

View File

@@ -142,7 +142,11 @@ static void hbqt_SlotsExecQColor( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QCOLOR" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QColor( new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QColor" ) );
#endif
hb_vmSend( 1 );
}
@@ -152,8 +156,13 @@ static void hbqt_SlotsExecItemSelItemSel( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QITEMSELECTION" ), NULL, 1 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), hb_dynsymGetSymbol( "HB_QITEMSELECTION" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QItemSelection" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QItemSelection" ) );
#endif
hb_vmSend( 2 );
}
@@ -163,7 +172,11 @@ static void hbqt_SlotsExecQTextCharFormat( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QTEXTCHARFORMAT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextCharFormat( new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCharFormat" ) );
#endif
hb_vmSend( 1 );
}
@@ -173,7 +186,11 @@ static void hbqt_SlotsExecQFont( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QFONT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QFont( new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QFont" ) );
#endif
hb_vmSend( 1 );
}
@@ -183,7 +200,11 @@ static void hbqt_SlotsExecQTextCursor( PHB_ITEM * codeBlock, void ** arguments,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QTEXTCURSOR" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextCursor( new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCursor" ) );
#endif
hb_vmSend( 1 );
}
@@ -193,7 +214,11 @@ static void hbqt_SlotsExecQTextBlock( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QTEXTBLOCK" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextBlock( new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextBlock" ) );
#endif
hb_vmSend( 1 );
}
@@ -203,7 +228,11 @@ static void hbqt_SlotsExecQAbstractButton( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QWidget( ( QAbstractButton * ) ( arguments[ 1 ] ) ), hb_dynsymGetSymbol( "HB_QABSTRACTBUTTON" ), NULL, 3 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QAbstractButton( new QWidget( ( QAbstractButton * ) ( arguments[ 1 ] ) ) , true ), "hb_QAbstractButton" ) );
#endif
hb_vmSend( 1 );
}
@@ -213,7 +242,11 @@ static void hbqt_SlotsExecQAction( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QAction( ( QAction * ) ( arguments[ 1 ] ) ), hb_dynsymGetSymbol( "HB_QACTION" ), NULL, 3 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QAction( new QAction( ( QAction * ) ( arguments[ 1 ] ) ), true ), "hb_QAction" ) );
#endif
hb_vmSend( 1 );
}
@@ -223,7 +256,11 @@ static void hbqt_SlotsExecQMdiSubWindow( PHB_ITEM * codeBlock, void ** arguments
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QMDISUBWINDOW" ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QMdiSubWindow( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QMdiSubWindow" ) );
#endif
hb_vmSend( 1 );
}
@@ -233,7 +270,11 @@ static void hbqt_SlotsExecQTreeWidgetItem( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QTREEWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmSend( 1 );
}
@@ -243,7 +284,11 @@ static void hbqt_SlotsExecQTreeWidgetItemInt( PHB_ITEM * codeBlock, void ** argu
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QTREEWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
}
@@ -254,7 +299,11 @@ static void hbqt_SlotsExecQPrinter( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QPRINTER" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QPrinter( ( *reinterpret_cast< void*(*)> ( arguments[ 1 ] ) ), false ), "hb_QPrinter" ) );
#endif
hb_vmSend( 1 );
}
@@ -264,7 +313,11 @@ static void hbqt_SlotsExecQStandardItem( PHB_ITEM * codeBlock, void ** arguments
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QSTANDARDITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QStandardItem( ( *reinterpret_cast< void*( * )>( arguments[ 1 ] ) ), false ), "hb_QStandardItem" ) );
#endif
hb_vmSend( 1 );
}
@@ -274,7 +327,11 @@ static void hbqt_SlotsExecQListWidgetItem( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QLISTWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
#endif
hb_vmSend( 1 );
}
@@ -284,8 +341,13 @@ static void hbqt_SlotsExecQListWidgetItemQListWidgetItem( PHB_ITEM * codeBlock,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QLISTWIDGETITEM" ), NULL, 0 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , hb_dynsymGetSymbol( "HB_QLISTWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QListWidgetItem" ) );
#endif
hb_vmSend( 2 );
}
@@ -295,7 +357,11 @@ static void hbqt_SlotsExecQTableWidgetItem( PHB_ITEM * codeBlock, void ** argume
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QTABLEWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
#endif
hb_vmSend( 1 );
}
@@ -305,8 +371,13 @@ static void hbqt_SlotsExecQTableWidgetItemQTableWidgetItem( PHB_ITEM * codeBlock
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QTABLEWIDGETITEM" ), NULL, 0 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , hb_dynsymGetSymbol( "HB_QTABLEWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTableWidgetItem" ) );
#endif
hb_vmSend( 2 );
}
@@ -316,8 +387,13 @@ static void hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem( PHB_ITEM * codeBlock,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QTREEWIDGETITEM" ), NULL, 0 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , hb_dynsymGetSymbol( "HB_QTREEWIDGETITEM" ), NULL, 0 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmSend( 2 );
}
@@ -327,7 +403,11 @@ static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QWIDGET" ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmSend( 1 );
}
@@ -337,8 +417,13 @@ static void hbqt_SlotsExecQWidgetQWidget( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QWIDGET" ), NULL, 2 ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , hb_dynsymGetSymbol( "HB_QWIDGET" ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmSend( 2 );
}
@@ -348,7 +433,11 @@ static void hbqt_SlotsExecQWidgetInt( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , hb_dynsymGetSymbol( "HB_QWIDGET" ), NULL, 2 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
}
@@ -359,7 +448,11 @@ static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), hb_dynsymGetSymbol( "HB_QRECT" ), NULL, 1 ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
}

View File

@@ -47,7 +47,11 @@ const QMimeData * mimeData ( Mode mode = Clipboard ) const{
QClipboard * p = ( QClipboard * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), false ), "hb_QMimeData" );
#endif
}
}
bool ownsClipboard () const

View File

@@ -65,7 +65,11 @@ virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{
QDirModel * p = ( QDirModel * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" );
#endif
}
}
virtual QStringList mimeTypes () const

View File

@@ -59,7 +59,11 @@ const QMimeData * mimeData () const{
QDropEvent * p = ( QDropEvent * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData(), false ), "hb_QMimeData" );
#endif
}
}
#

View File

@@ -58,7 +58,11 @@ virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{
QFileSystemModel * p = ( QFileSystemModel * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" );
#endif
}
}
virtual QStringList mimeTypes () const

View File

@@ -45,10 +45,14 @@ void acceptProposedAction ()
Qt::MouseButtons buttons () const
Qt::DropAction dropAction () const
const QMimeData * mimeData () const{
QGraphicsSceneDragDropEvent * _graphicsscenedragdropevent = ( QGraphicsSceneDragDropEvent * ) hbqt_par_ptr( 0 );
if( _graphicsscenedragdropevent )
QGraphicsSceneDragDropEvent * p = ( QGraphicsSceneDragDropEvent * ) hbqt_par_ptr( 0 );
if( p )
{
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) _graphicsscenedragdropevent->mimeData(), false ), "hb_QMimeData" );
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData(), false ), "hb_QMimeData" );
#endif
}
}
Qt::KeyboardModifiers modifiers () const

View File

@@ -14,8 +14,6 @@
<CLASS>
Inherit = QAbstractButton
New = pParent
PaintEvent = NO
</CLASS>
<CODE>