2011-02-28 08:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/qtcore/hbqt_pointer.cpp
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
* contrib/hbqt/qtcore/hbqt_init.cpp
+ Patch from Francesco. (more slot callbacks + minor formatting patches of mine)
* src/rtl/gtwvt/gtwvt.h
* src/rtl/gtwvt/gtwvt.c
* Minors.
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-02-28 08:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtcore/hbqt_pointer.cpp
|
||||
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
|
||||
* contrib/hbqt/qtcore/hbqt_init.cpp
|
||||
+ Patch from Francesco. (more slot callbacks + minor formatting patches of mine)
|
||||
|
||||
* src/rtl/gtwvt/gtwvt.h
|
||||
* src/rtl/gtwvt/gtwvt.c
|
||||
* Minors.
|
||||
|
||||
2011-02-27 18:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/qtgui/hbqt_init.cpp
|
||||
* contrib/hbqt/qtcore/hbqt_pointer.cpp
|
||||
|
||||
@@ -174,18 +174,8 @@ int HBQSlots::qt_metacall( QMetaObject::Call c, int id, void ** arguments )
|
||||
}
|
||||
else
|
||||
{
|
||||
// if( arrayOfTypes.at( i ).contains( "*" ) )
|
||||
// {
|
||||
// parList += "pointer";
|
||||
// // use [] because .at returns const QByteArray
|
||||
// HB_TRACE( HB_TR_ALWAYS, ( "SlotsProxy callback object %s", arrayOfTypes[i].replace( "*","").trimmed().toUpper().data() ) );
|
||||
// pList += arrayOfTypes[ i ].replace( "*", "" ).trimmed().toUpper();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
parList += arrayOfTypes.at( i ).trimmed() ;
|
||||
pList += arrayOfTypes.at( i ).trimmed().toUpper();
|
||||
// }
|
||||
parList += arrayOfTypes.at( i ).trimmed() ;
|
||||
pList += arrayOfTypes.at( i ).trimmed().toUpper();
|
||||
}
|
||||
}
|
||||
paramString = parList.join( "$" ).toAscii();
|
||||
|
||||
@@ -94,7 +94,6 @@ extern void * hbqt_gcAllocate_QDateTime( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QTime( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QModelIndex( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QStringList( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QTreeWidgetItem( void * pObj, bool bNew );
|
||||
HB_EXTERN_END
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -105,37 +104,8 @@ static void hbqt_SlotsExecPointer( PHB_ITEM * codeBlock, void ** arguments, QStr
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecPointer 1 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).toAscii().data() ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecPointer 2 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).toAscii().data()) );
|
||||
hb_vmSend( 1 );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecPointer 3 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQMdiSubWindow( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQMdiSubWindow 1 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QMdiSubWindow( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "QMdiSubWindow" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQMdiSubWindow 2 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmSend( 1 );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQMdiSubWindow 3 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTreeWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQTreeWidgetItem 1 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "QTreeWidgetItem" ) );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQTreeWidgetItem 2 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
hb_vmSend( 1 );
|
||||
HB_TRACE( HB_TR_DEBUG, ( "ExecQTreeWidgetItem 3 %s", pList.at( 0 ).toAscii().data() ) );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecPointerPointer( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
@@ -243,7 +213,7 @@ static void hbqt_SlotsExecModel( PHB_ITEM * codeBlock, void ** arguments, QStrin
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "QModelIndex" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -253,8 +223,8 @@ static void hbqt_SlotsExecModelModel( PHB_ITEM * codeBlock, void ** arguments, Q
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "QModelIndex" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 2 ] ) ) ), true ), "QModelIndex" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QModelIndex" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
@@ -264,7 +234,7 @@ static void hbqt_SlotsExecStringList( PHB_ITEM * codeBlock, void ** arguments, Q
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QStringList( new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), true ), "QStringList" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QStringList( new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QStringList" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -274,7 +244,7 @@ static void hbqt_SlotsExecQPoint( PHB_ITEM * codeBlock, void ** arguments, QStri
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QPoint( new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), true ), "QPoint" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QPoint( new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QPoint" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -284,7 +254,7 @@ static void hbqt_SlotsExecQUrl( PHB_ITEM * codeBlock, void ** arguments, QString
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QUrl( new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), true ), "QUrl" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QUrl( new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QUrl" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -294,7 +264,7 @@ static void hbqt_SlotsExecQDate( PHB_ITEM * codeBlock, void ** arguments, QStrin
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QDate( new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), true ), "QDate" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QDate( new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDate" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -304,7 +274,7 @@ static void hbqt_SlotsExecQDateTime( PHB_ITEM * codeBlock, void ** arguments, QS
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QDateTime( new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), true ), "QDateTime" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QDateTime( new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDateTime" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -314,7 +284,7 @@ static void hbqt_SlotsExecQTime( PHB_ITEM * codeBlock, void ** arguments, QStrin
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTime( new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), true ), "QTime" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTime( new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTime" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -324,7 +294,7 @@ static void hbqt_SlotsExecQRectF( PHB_ITEM * codeBlock, void ** arguments, QStri
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRectF( new QRectF( ( *reinterpret_cast< QRectF( * ) >( arguments[ 1 ] ) ) ), true ), "QRectF" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRectF( new QRectF( ( *reinterpret_cast< QRectF( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRectF" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -334,7 +304,7 @@ static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QSt
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "QRect" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
|
||||
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
@@ -345,7 +315,7 @@ static void hbqt_SlotsExecQRect( PHB_ITEM * codeBlock, void ** arguments, QStrin
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "QRect" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -355,7 +325,7 @@ static void hbqt_SlotsExecQSizeF( PHB_ITEM * codeBlock, void ** arguments, QStri
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QSizeF( new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), true ), "QSizeF" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QSizeF( new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QSizeF" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -365,7 +335,7 @@ static void hbqt_SlotsExecModelIndexIntInt( PHB_ITEM * codeBlock, void ** argume
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "QModelIndex" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
|
||||
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
|
||||
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 3 ] ) );
|
||||
hb_vmSend( 3 );
|
||||
@@ -385,13 +355,35 @@ static void hbqt_SlotsExecModelIndexList( PHB_ITEM * codeBlock, void ** argument
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QObject" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
HB_FUNC_EXTERN( HB_QEVENT );
|
||||
// HB_FUNC_EXTERN( QMODELINDEX );
|
||||
|
||||
void _hbqtcore_force_link_for_event( void )
|
||||
{
|
||||
HB_FUNC_EXEC( HB_QEVENT );
|
||||
// HB_FUNC_EXEC( QMODELINDEX );
|
||||
}
|
||||
|
||||
static void hbqt_registerCallbacks( void )
|
||||
@@ -406,8 +398,6 @@ static void hbqt_registerCallbacks( void )
|
||||
hbqt_slots_register_callback( "double" , hbqt_SlotsExecDouble );
|
||||
hbqt_slots_register_callback( "pointer" , hbqt_SlotsExecPointer );
|
||||
hbqt_slots_register_callback( "pointer$pointer" , hbqt_SlotsExecPointerPointer );
|
||||
hbqt_slots_register_callback( "QTreeWidgetItem*" , hbqt_SlotsExecQTreeWidgetItem );
|
||||
hbqt_slots_register_callback( "QMdiSubWindow*" , hbqt_SlotsExecQMdiSubWindow );
|
||||
hbqt_slots_register_callback( "pointer$int" , hbqt_SlotsExecPointerInt );
|
||||
hbqt_slots_register_callback( "QDate" , hbqt_SlotsExecQDate );
|
||||
hbqt_slots_register_callback( "QDateTime" , hbqt_SlotsExecQDateTime );
|
||||
@@ -424,8 +414,8 @@ static void hbqt_registerCallbacks( void )
|
||||
hbqt_slots_register_callback( "QStringList" , hbqt_SlotsExecStringList );
|
||||
hbqt_slots_register_callback( "QTime" , hbqt_SlotsExecQTime );
|
||||
hbqt_slots_register_callback( "QUrl" , hbqt_SlotsExecQUrl );
|
||||
// hbqt_slots_register_callback( "QObject*" , hbqt_SlotsExecQObject );
|
||||
// hbqt_slots_register_callback( "QWidget*" , hbqt_SlotsExecQWidget );
|
||||
hbqt_slots_register_callback( "QObject*" , hbqt_SlotsExecQObject );
|
||||
hbqt_slots_register_callback( "QWidget*" , hbqt_SlotsExecQWidget );
|
||||
|
||||
hbqt_events_register_createobj( QEvent::Timer , "hb_QEvent" );
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName )
|
||||
hb_vmPushNil();
|
||||
hb_vmDo( 0 );
|
||||
|
||||
pRetVal = hb_itemNew( hb_stackReturnItem() ) ;
|
||||
pRetVal = hb_itemNew( hb_stackReturnItem() );
|
||||
hb_objSendMsg( pRetVal, "_PPTR", 1, pItem );
|
||||
hb_itemReturn( pRetVal );
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ extern void * hbqt_gcAllocate_QPrinter( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QStandardItem( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QListWidgetItem( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QTreeWidgetItem( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QTableWidgetItem( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QWidget( void * pObj, bool bNew );
|
||||
HB_EXTERN_END
|
||||
|
||||
@@ -107,7 +108,7 @@ static void hbqt_SlotsExecQColor( PHB_ITEM * codeBlock, void ** arguments, QStri
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QColor( new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), true ), "QColor" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QColor( new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QColor" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -117,8 +118,8 @@ static void hbqt_SlotsExecItemSelItemSel( PHB_ITEM * codeBlock, void ** argument
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), true ), "QItemSelection" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), true ), "QItemSelection" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QItemSelection" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QItemSelection" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
@@ -128,7 +129,7 @@ static void hbqt_SlotsExecQTextCharFormat( PHB_ITEM * codeBlock, void ** argumen
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextCharFormat( new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), true ), "QTextCharFormat" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextCharFormat( new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCharFormat" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ static void hbqt_SlotsExecQFont( PHB_ITEM * codeBlock, void ** arguments, QStrin
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QFont( new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), true ), "QFont" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QFont( new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QFont" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -148,7 +149,7 @@ static void hbqt_SlotsExecQTextCursor( PHB_ITEM * codeBlock, void ** arguments,
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextCursor( new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), true ), "QTextCursor" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextCursor( new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCursor" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
@@ -158,20 +159,156 @@ static void hbqt_SlotsExecQTextBlock( PHB_ITEM * codeBlock, void ** arguments, Q
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextBlock( new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), true ), "QTextBlock" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTextBlock( new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextBlock" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
HBQT_SLOT_CALLBACK_OBJ( QAbstractButton )
|
||||
HBQT_SLOT_CALLBACK_OBJ( QAction )
|
||||
HBQT_SLOT_CALLBACK_OBJ( QMdiSubWindow )
|
||||
HBQT_SLOT_CALLBACK_OBJ( QPrinter )
|
||||
HBQT_SLOT_CALLBACK_OBJ( QStandardItem )
|
||||
HBQT_SLOT_CALLBACK_OBJ_OBJ( QListWidgetItem, QListWidgetItem )
|
||||
HBQT_SLOT_CALLBACK_OBJ_OBJ( QTableWidgetItem, QTableWidgetItem )
|
||||
HBQT_SLOT_CALLBACK_OBJ_OBJ( QTreeWidgetItem, QTreeWidgetItem )
|
||||
HBQT_SLOT_CALLBACK_OBJ_OBJ( QWidget, QWidget )
|
||||
HBQT_SLOT_CALLBACK_OBJ_INT( QTreeWidgetItem )
|
||||
static void hbqt_SlotsExecQAbstractButton( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QAbstractButton( new QWidget( ( QAbstractButton * ) ( arguments[ 1 ] ) ) , true ), "hb_QAbstractButton" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQAction( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QAction( new QAction( ( QAction * ) ( arguments[ 1 ] ) ), true ), "hb_QAction" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQMdiSubWindow( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QMdiSubWindow( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QMdiSubWindow" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTreeWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTreeWidgetItemInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
|
||||
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQPrinter( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QPrinter( ( *reinterpret_cast< void*(*)> ( arguments[ 1 ] ) ), false ), "hb_QPrinter" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQStandardItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QStandardItem( ( *reinterpret_cast< void*( * )>( arguments[ 1 ] ) ), false ), "hb_QStandardItem" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQListWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQListWidgetItemQListWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QListWidgetItem" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTableWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTableWidgetItemQTableWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTableWidgetItem" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTreeWidgetItem" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQWidgetQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QWidget" ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
static void hbqt_SlotsExecQWidgetInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
|
||||
{
|
||||
Q_UNUSED( pList );
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_object( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
|
||||
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
HB_FUNC_EXTERN( HB_QABSTRACTBUTTON );
|
||||
@@ -253,23 +390,26 @@ void _hbqtgui_force_link_for_event( void )
|
||||
|
||||
static void hbqt_registerCallbacks( void )
|
||||
{
|
||||
hbqt_slots_register_callback( "QColor" , hbqt_SlotsExecQColor );
|
||||
hbqt_slots_register_callback( "QFont" , hbqt_SlotsExecQFont );
|
||||
hbqt_slots_register_callback( "QItemSelection$QItemSelection" , hbqt_SlotsExecItemSelItemSel );
|
||||
hbqt_slots_register_callback( "QTextBlock" , hbqt_SlotsExecQTextBlock );
|
||||
hbqt_slots_register_callback( "QTextCharFormat" , hbqt_SlotsExecQTextCharFormat );
|
||||
hbqt_slots_register_callback( "QTextCursor" , hbqt_SlotsExecQTextCursor );
|
||||
hbqt_slots_register_callback( "QAbstractButton*" , hbqt_SlotsExecQAbstractButton );
|
||||
hbqt_slots_register_callback( "QAction*" , hbqt_SlotsExecQAction );
|
||||
hbqt_slots_register_callback( "QColor" , hbqt_SlotsExecQColor );
|
||||
hbqt_slots_register_callback( "QFont" , hbqt_SlotsExecQFont );
|
||||
hbqt_slots_register_callback( "QItemSelection$QItemSelection" , hbqt_SlotsExecItemSelItemSel );
|
||||
hbqt_slots_register_callback( "QTextBlock" , hbqt_SlotsExecQTextBlock );
|
||||
hbqt_slots_register_callback( "QTextCharFormat" , hbqt_SlotsExecQTextCharFormat );
|
||||
hbqt_slots_register_callback( "QTextCursor" , hbqt_SlotsExecQTextCursor );
|
||||
|
||||
hbqt_slots_register_callback( "QAbstractButton*" , hbqt_SlotsExecQAbstractButton );
|
||||
hbqt_slots_register_callback( "QAction*" , hbqt_SlotsExecQAction );
|
||||
hbqt_slots_register_callback( "QListWidgetItem*$QListWidgetItem*" , hbqt_SlotsExecQListWidgetItemQListWidgetItem );
|
||||
hbqt_slots_register_callback( "QMdiSubWindow*" , hbqt_SlotsExecQMdiSubWindow );
|
||||
hbqt_slots_register_callback( "QPrinter*" , hbqt_SlotsExecQPrinter );
|
||||
hbqt_slots_register_callback( "QStandardItem*" , hbqt_SlotsExecQStandardItem );
|
||||
hbqt_slots_register_callback( "QMdiSubWindow*" , hbqt_SlotsExecQMdiSubWindow );
|
||||
hbqt_slots_register_callback( "QPrinter*" , hbqt_SlotsExecQPrinter );
|
||||
hbqt_slots_register_callback( "QStandardItem*" , hbqt_SlotsExecQStandardItem );
|
||||
hbqt_slots_register_callback( "QTableWidgetItem*$QTableWidgetItem*" , hbqt_SlotsExecQTableWidgetItemQTableWidgetItem );
|
||||
hbqt_slots_register_callback( "QTreeWidgetItem*$int" , hbqt_SlotsExecQTreeWidgetItemInt );
|
||||
hbqt_slots_register_callback( "QTreeWidgetItem*$QTreeWidgetItem*" , hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem );
|
||||
hbqt_slots_register_callback( "QWidget*$int" , hbqt_SlotsExecQWidgetInt );
|
||||
hbqt_slots_register_callback( "QWidget*$QWidget*" , hbqt_SlotsExecQWidgetQWidget );
|
||||
hbqt_slots_register_callback( "QWidget*$int" , hbqt_SlotsExecQWidgetInt );
|
||||
hbqt_slots_register_callback( "QWidget*$QWidget*" , hbqt_SlotsExecQWidgetQWidget );
|
||||
hbqt_slots_register_callback( "QTreeWidgetItem*" , hbqt_SlotsExecQTreeWidgetItem );
|
||||
hbqt_slots_register_callback( "QListWidgetItem*" , hbqt_SlotsExecQListWidgetItem );
|
||||
|
||||
hbqt_events_register_createobj( QEvent::MouseButtonPress , "hb_QMouseEvent" );
|
||||
hbqt_events_register_createobj( QEvent::MouseButtonRelease , "hb_QMouseEvent" );
|
||||
|
||||
@@ -349,7 +349,7 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
|
||||
pWVT->bBeingMarked = HB_FALSE;
|
||||
pWVT->bBeginMarked = HB_FALSE;
|
||||
pWVT->bFullScreen = HB_FALSE;
|
||||
pWVT->AltEnter = HB_FALSE;
|
||||
pWVT->bAltEnter = HB_FALSE;
|
||||
|
||||
pWVT->MarginTop = 0;
|
||||
pWVT->MarginLeft = 0;
|
||||
@@ -1222,7 +1222,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
|
||||
{
|
||||
case VK_RETURN:
|
||||
/* in WM_CHAR i was unable to read Alt key state */
|
||||
if( bAlt && pWVT->AltEnter )
|
||||
if( bAlt && pWVT->bAltEnter )
|
||||
{
|
||||
hb_gt_wvt_FullScreen( pWVT->pGT );
|
||||
pWVT->IgnoreWM_SYSCHAR = HB_TRUE;
|
||||
@@ -2216,7 +2216,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
|
||||
switch( iType )
|
||||
{
|
||||
|
||||
case HB_GTI_FULLSCREEN:
|
||||
pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bFullScreen );
|
||||
if( hb_itemType( pInfo->pNewVal ) & HB_IT_LOGICAL )
|
||||
@@ -2228,9 +2227,9 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
break;
|
||||
|
||||
case HB_GTI_ALTENTER:
|
||||
pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->AltEnter );
|
||||
pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->bAltEnter );
|
||||
if( hb_itemType( pInfo->pNewVal ) & HB_IT_LOGICAL )
|
||||
pWVT->AltEnter = hb_itemGetL( pInfo->pNewVal );
|
||||
pWVT->bAltEnter = hb_itemGetL( pInfo->pNewVal );
|
||||
break;
|
||||
|
||||
case HB_GTI_KBDSUPPORT:
|
||||
|
||||
@@ -184,9 +184,9 @@ typedef struct
|
||||
HB_BOOL bResizable;
|
||||
HB_BOOL bClosable;
|
||||
HB_BOOL bFullScreen;
|
||||
HB_BOOL bAltEnter; /* Can use Alt+Enter to enter full screen mode */
|
||||
int MarginTop;
|
||||
int MarginLeft;
|
||||
HB_BOOL AltEnter; /* Can use Alt+Enter to enter full screen mode */
|
||||
|
||||
HB_BOOL bMaximized; /* Flag is set when window has been maximized */
|
||||
HB_BOOL bBeingMarked; /* Flag to control DOS window like copy operation */
|
||||
|
||||
Reference in New Issue
Block a user