2009-06-07 22:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/hbqt/generator/hbqtgen.prg

  * harbour/contrib/hbqt/hbqt_qabstractitemmodel.cpp
  * harbour/contrib/hbqt/hbqt_qabstractlistmodel.cpp
  * harbour/contrib/hbqt/hbqt_qcombobox.cpp
  * harbour/contrib/hbqt/hbqt_qdirmodel.cpp
  * harbour/contrib/hbqt/hbqt_qicon.cpp
  * harbour/contrib/hbqt/hbqt_qimage.cpp
  * harbour/contrib/hbqt/hbqt_qpainter.cpp
  * harbour/contrib/hbqt/hbqt_qpixmap.cpp
  * harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp
  * harbour/contrib/hbqt/hbqt_qstringlistmodel.cpp
  * harbour/contrib/hbqt/hbqt_qtextdocument.cpp
  * harbour/contrib/hbqt/hbqt_qwebview.cpp

  * harbour/contrib/hbqt/hbqt_slots.cpp
  * harbour/contrib/hbqt/hbqt_slots.h
  * harbour/contrib/hbqt/moc_slots.cpp

  * harbour/contrib/hbqt/tests/demoqt.prg

    ! HB_ISNIL() => HB_ISPOINTER()
    + Added more event handlers.
    + Cleaned up hbqtgen.prg.

    /*
        Now almost all the controls have events response in place.
        The exception is QListView(). I am struggling to understand
        why this widget do not respnd to events.
    */
This commit is contained in:
Pritpal Bedi
2009-06-08 05:21:44 +00:00
parent 4c91e51985
commit aab67233c7
18 changed files with 1536 additions and 1443 deletions

View File

@@ -17,6 +17,38 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-07 22:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbqt/generator/hbqtgen.prg
* harbour/contrib/hbqt/hbqt_qabstractitemmodel.cpp
* harbour/contrib/hbqt/hbqt_qabstractlistmodel.cpp
* harbour/contrib/hbqt/hbqt_qcombobox.cpp
* harbour/contrib/hbqt/hbqt_qdirmodel.cpp
* harbour/contrib/hbqt/hbqt_qicon.cpp
* harbour/contrib/hbqt/hbqt_qimage.cpp
* harbour/contrib/hbqt/hbqt_qpainter.cpp
* harbour/contrib/hbqt/hbqt_qpixmap.cpp
* harbour/contrib/hbqt/hbqt_qstandarditemmodel.cpp
* harbour/contrib/hbqt/hbqt_qstringlistmodel.cpp
* harbour/contrib/hbqt/hbqt_qtextdocument.cpp
* harbour/contrib/hbqt/hbqt_qwebview.cpp
* harbour/contrib/hbqt/hbqt_slots.cpp
* harbour/contrib/hbqt/hbqt_slots.h
* harbour/contrib/hbqt/moc_slots.cpp
* harbour/contrib/hbqt/tests/demoqt.prg
! HB_ISNIL() => HB_ISPOINTER()
+ Added more event handlers.
+ Cleaned up hbqtgen.prg.
/*
Now almost all the controls have events response in place.
The exception is QListView(). I am struggling to understand
why this widget do not respnd to events.
*/
2009-06-08 06:30 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
+ Added minimum tested version of MinGW.

File diff suppressed because it is too large Load Diff

View File

@@ -103,7 +103,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_CANFETCHMORE )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_COLUMNCOUNT )
{
hb_retni( hbqt_par_QAbstractItemModel( 1 )->columnCount( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retni( hbqt_par_QAbstractItemModel( 1 )->columnCount( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*
@@ -143,7 +143,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_FLAGS )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_HASCHILDREN )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->hasChildren( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->hasChildren( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*
@@ -151,7 +151,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_HASCHILDREN )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_HASINDEX )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->hasIndex( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->hasIndex( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -167,7 +167,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_HEADERDATA )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_INDEX )
{
hb_retptr( new QModelIndex( hbqt_par_QAbstractItemModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) ) );
hb_retptr( new QModelIndex( hbqt_par_QAbstractItemModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) ) );
}
/*
@@ -175,7 +175,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_INDEX )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTCOLUMN )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertColumn( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertColumn( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*
@@ -183,7 +183,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTCOLUMN )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTCOLUMNS )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertColumns( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertColumns( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -191,7 +191,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTCOLUMNS )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTROW )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertRow( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertRow( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*
@@ -199,7 +199,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTROW )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_INSERTROWS )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->insertRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -231,7 +231,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_PARENT )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVECOLUMN )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeColumn( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeColumn( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*
@@ -239,7 +239,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVECOLUMN )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVECOLUMNS )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeColumns( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeColumns( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -247,7 +247,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVECOLUMNS )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVEROW )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeRow( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeRow( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*
@@ -255,7 +255,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVEROW )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVEROWS )
{
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QAbstractItemModel( 1 )->removeRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -263,7 +263,7 @@ HB_FUNC( QT_QABSTRACTITEMMODEL_REMOVEROWS )
*/
HB_FUNC( QT_QABSTRACTITEMMODEL_ROWCOUNT )
{
hb_retni( hbqt_par_QAbstractItemModel( 1 )->rowCount( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retni( hbqt_par_QAbstractItemModel( 1 )->rowCount( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*

View File

@@ -77,7 +77,7 @@ HB_FUNC( QT_QABSTRACTLISTMODEL )
*/
HB_FUNC( QT_QABSTRACTLISTMODEL_INDEX )
{
hb_retptr( new QModelIndex( hbqt_par_QAbstractListModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) ) );
hb_retptr( new QModelIndex( hbqt_par_QAbstractListModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) ) );
}

View File

@@ -77,7 +77,7 @@ HB_FUNC( QT_QCOMBOBOX )
*/
HB_FUNC( QT_QCOMBOBOX_ADDITEM )
{
hbqt_par_QComboBox( 1 )->addItem( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? QVariant() : *hbqt_par_QVariant( 3 ) ) );
hbqt_par_QComboBox( 1 )->addItem( hbqt_par_QString( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QVariant( 3 ) : QVariant() ) );
}
/*
@@ -85,7 +85,7 @@ HB_FUNC( QT_QCOMBOBOX_ADDITEM )
*/
HB_FUNC( QT_QCOMBOBOX_ADDITEM_1 )
{
hbqt_par_QComboBox( 1 )->addItem( QIcon( hbqt_par_QString( 2 ) ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? QVariant() : *hbqt_par_QVariant( 4 ) ) );
hbqt_par_QComboBox( 1 )->addItem( QIcon( hbqt_par_QString( 2 ) ), hbqt_par_QString( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QVariant( 4 ) : QVariant() ) );
}
/*
@@ -181,7 +181,7 @@ HB_FUNC( QT_QCOMBOBOX_ICONSIZE )
*/
HB_FUNC( QT_QCOMBOBOX_INSERTITEM )
{
hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? QVariant() : *hbqt_par_QVariant( 4 ) ) );
hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), hbqt_par_QString( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QVariant( 4 ) : QVariant() ) );
}
/*
@@ -189,7 +189,7 @@ HB_FUNC( QT_QCOMBOBOX_INSERTITEM )
*/
HB_FUNC( QT_QCOMBOBOX_INSERTITEM_1 )
{
hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), QIcon( hbqt_par_QString( 3 ) ), hbqt_par_QString( 4 ), ( HB_ISNIL( 5 ) ? QVariant() : *hbqt_par_QVariant( 5 ) ) );
hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), QIcon( hbqt_par_QString( 3 ) ), hbqt_par_QString( 4 ), ( HB_ISPOINTER( 5 ) ? *hbqt_par_QVariant( 5 ) : QVariant() ) );
}
/*

View File

@@ -78,7 +78,7 @@ HB_FUNC( QT_QDIRMODEL )
*/
HB_FUNC( QT_QDIRMODEL_COLUMNCOUNT )
{
hb_retni( hbqt_par_QDirModel( 1 )->columnCount( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retni( hbqt_par_QDirModel( 1 )->columnCount( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*
@@ -150,7 +150,7 @@ HB_FUNC( QT_QDIRMODEL_FLAGS )
*/
HB_FUNC( QT_QDIRMODEL_HASCHILDREN )
{
hb_retl( hbqt_par_QDirModel( 1 )->hasChildren( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retl( hbqt_par_QDirModel( 1 )->hasChildren( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*
@@ -174,7 +174,7 @@ HB_FUNC( QT_QDIRMODEL_ICONPROVIDER )
*/
HB_FUNC( QT_QDIRMODEL_INDEX )
{
hb_retptr( new QModelIndex( hbqt_par_QDirModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) ) );
hb_retptr( new QModelIndex( hbqt_par_QDirModel( 1 )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) ) );
}
/*
@@ -278,7 +278,7 @@ HB_FUNC( QT_QDIRMODEL_RMDIR )
*/
HB_FUNC( QT_QDIRMODEL_ROWCOUNT )
{
hb_retni( hbqt_par_QDirModel( 1 )->rowCount( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retni( hbqt_par_QDirModel( 1 )->rowCount( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*
@@ -374,7 +374,7 @@ HB_FUNC( QT_QDIRMODEL_SUPPORTEDDROPACTIONS )
*/
HB_FUNC( QT_QDIRMODEL_REFRESH )
{
hbqt_par_QDirModel( 1 )->refresh( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) );
hbqt_par_QDirModel( 1 )->refresh( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) );
}

View File

@@ -99,7 +99,7 @@ HB_FUNC( QT_QICON_ACTUALSIZE )
*/
HB_FUNC( QT_QICON_ADDFILE )
{
hbqt_par_QIcon( 1 )->addFile( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? QSize() : *hbqt_par_QSize( 3 ) ), ( HB_ISNUM( 4 ) ? ( QIcon::Mode ) hb_parni( 4 ) : ( QIcon::Mode ) QIcon::Normal ), ( HB_ISNUM( 5 ) ? ( QIcon::State ) hb_parni( 5 ) : ( QIcon::State ) QIcon::Off ) );
hbqt_par_QIcon( 1 )->addFile( hbqt_par_QString( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QSize( 3 ) : QSize() ), ( HB_ISNUM( 4 ) ? ( QIcon::Mode ) hb_parni( 4 ) : ( QIcon::Mode ) QIcon::Normal ), ( HB_ISNUM( 5 ) ? ( QIcon::State ) hb_parni( 5 ) : ( QIcon::State ) QIcon::Off ) );
}
/*

View File

@@ -162,7 +162,7 @@ HB_FUNC( QT_QIMAGE_CONVERTTOFORMAT )
*/
HB_FUNC( QT_QIMAGE_COPY )
{
hb_retptr( new QImage( hbqt_par_QImage( 1 )->copy( ( HB_ISNIL( 2 ) ? QRect() : *hbqt_par_QRect( 2 ) ) ) ) );
hb_retptr( new QImage( hbqt_par_QImage( 1 )->copy( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QRect( 2 ) : QRect() ) ) ) );
}
/*

View File

@@ -146,7 +146,7 @@ HB_FUNC( QT_QPAINTER_BOUNDINGRECT_2 )
*/
HB_FUNC( QT_QPAINTER_BOUNDINGRECT_3 )
{
hb_retptr( new QRectF( hbqt_par_QPainter( 1 )->boundingRect( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? QTextOption() : *hbqt_par_QTextOption( 4 ) ) ) ) );
hb_retptr( new QRectF( hbqt_par_QPainter( 1 )->boundingRect( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QTextOption( 4 ) : QTextOption() ) ) ) );
}
/*
@@ -874,7 +874,7 @@ HB_FUNC( QT_QPAINTER_DRAWTEXT_5 )
*/
HB_FUNC( QT_QPAINTER_DRAWTEXT_6 )
{
hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? QTextOption() : *hbqt_par_QTextOption( 4 ) ) );
hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QTextOption( 4 ) : QTextOption() ) );
}
/*
@@ -882,7 +882,7 @@ HB_FUNC( QT_QPAINTER_DRAWTEXT_6 )
*/
HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP )
{
hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRectF( 2 ), *hbqt_par_QPixmap( 3 ), ( HB_ISNIL( 4 ) ? QPointF() : *hbqt_par_QPointF( 4 ) ) );
hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRectF( 2 ), *hbqt_par_QPixmap( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QPointF( 4 ) : QPointF() ) );
}
/*
@@ -890,7 +890,7 @@ HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP )
*/
HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP_1 )
{
hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRect( 2 ), *hbqt_par_QPixmap( 3 ), ( HB_ISNIL( 4 ) ? QPoint() : *hbqt_par_QPoint( 4 ) ) );
hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRect( 2 ), *hbqt_par_QPixmap( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QPoint( 4 ) : QPoint() ) );
}
/*

View File

@@ -98,7 +98,7 @@ HB_FUNC( QT_QPIXMAP_CACHEKEY )
*/
HB_FUNC( QT_QPIXMAP_COPY )
{
hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->copy( ( HB_ISNIL( 2 ) ? QRect() : *hbqt_par_QRect( 2 ) ) ) ) );
hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->copy( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QRect( 2 ) : QRect() ) ) ) );
}
/*

View File

@@ -125,7 +125,7 @@ HB_FUNC( QT_QSTANDARDITEMMODEL_INDEXFROMITEM )
*/
HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTCOLUMN )
{
hb_retl( hbqt_par_QStandardItemModel( 1 )->insertColumn( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QStandardItemModel( 1 )->insertColumn( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*
@@ -133,7 +133,7 @@ HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTCOLUMN )
*/
HB_FUNC( QT_QSTANDARDITEMMODEL_INSERTROW )
{
hb_retl( hbqt_par_QStandardItemModel( 1 )->insertRow( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? QModelIndex() : *hbqt_par_QModelIndex( 3 ) ) ) );
hb_retl( hbqt_par_QStandardItemModel( 1 )->insertRow( hb_parni( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QModelIndex( 3 ) : QModelIndex() ) ) );
}
/*

View File

@@ -93,7 +93,7 @@ HB_FUNC( QT_QSTRINGLISTMODEL_FLAGS )
*/
HB_FUNC( QT_QSTRINGLISTMODEL_INSERTROWS )
{
hb_retl( hbqt_par_QStringListModel( 1 )->insertRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QStringListModel( 1 )->insertRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -101,7 +101,7 @@ HB_FUNC( QT_QSTRINGLISTMODEL_INSERTROWS )
*/
HB_FUNC( QT_QSTRINGLISTMODEL_REMOVEROWS )
{
hb_retl( hbqt_par_QStringListModel( 1 )->removeRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? QModelIndex() : *hbqt_par_QModelIndex( 4 ) ) ) );
hb_retl( hbqt_par_QStringListModel( 1 )->removeRows( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) );
}
/*
@@ -109,7 +109,7 @@ HB_FUNC( QT_QSTRINGLISTMODEL_REMOVEROWS )
*/
HB_FUNC( QT_QSTRINGLISTMODEL_ROWCOUNT )
{
hb_retni( hbqt_par_QStringListModel( 1 )->rowCount( ( HB_ISNIL( 2 ) ? QModelIndex() : *hbqt_par_QModelIndex( 2 ) ) ) );
hb_retni( hbqt_par_QStringListModel( 1 )->rowCount( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QModelIndex( 2 ) : QModelIndex() ) ) );
}
/*

View File

@@ -183,7 +183,7 @@ HB_FUNC( QT_QTEXTDOCUMENT_DOCUMENTMARGIN )
*/
HB_FUNC( QT_QTEXTDOCUMENT_DRAWCONTENTS )
{
hbqt_par_QTextDocument( 1 )->drawContents( hbqt_par_QPainter( 2 ), ( HB_ISNIL( 3 ) ? QRectF() : *hbqt_par_QRectF( 3 ) ) );
hbqt_par_QTextDocument( 1 )->drawContents( hbqt_par_QPainter( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QRectF( 3 ) : QRectF() ) );
}
/*
@@ -559,7 +559,7 @@ HB_FUNC( QT_QTEXTDOCUMENT_TEXTWIDTH )
*/
HB_FUNC( QT_QTEXTDOCUMENT_TOHTML )
{
hb_retc( hbqt_par_QTextDocument( 1 )->toHtml( ( HB_ISNIL( 2 ) ? QByteArray() : *hbqt_par_QByteArray( 2 ) ) ).toLatin1().data() );
hb_retc( hbqt_par_QTextDocument( 1 )->toHtml( ( HB_ISPOINTER( 2 ) ? *hbqt_par_QByteArray( 2 ) : QByteArray() ) ).toLatin1().data() );
}
/*

View File

@@ -118,7 +118,7 @@ HB_FUNC( QT_QWEBVIEW_LOAD )
*/
HB_FUNC( QT_QWEBVIEW_LOAD_1 )
{
hbqt_par_QWebView( 1 )->load( *hbqt_par_QNetworkRequest( 2 ), ( HB_ISNUM( 3 ) ? ( QNetworkAccessManager::Operation ) hb_parni( 3 ) : ( QNetworkAccessManager::Operation ) QNetworkAccessManager::GetOperation ), ( HB_ISNIL( 4 ) ? QByteArray() : *hbqt_par_QByteArray( 4 ) ) );
hbqt_par_QWebView( 1 )->load( *hbqt_par_QNetworkRequest( 2 ), ( HB_ISNUM( 3 ) ? ( QNetworkAccessManager::Operation ) hb_parni( 3 ) : ( QNetworkAccessManager::Operation ) QNetworkAccessManager::GetOperation ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QByteArray( 4 ) : QByteArray() ) );
}
/*
@@ -150,7 +150,7 @@ HB_FUNC( QT_QWEBVIEW_SELECTEDTEXT )
*/
HB_FUNC( QT_QWEBVIEW_SETCONTENT )
{
hbqt_par_QWebView( 1 )->setContent( *hbqt_par_QByteArray( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? QUrl() : *hbqt_par_QUrl( 4 ) ) );
hbqt_par_QWebView( 1 )->setContent( *hbqt_par_QByteArray( 2 ), hbqt_par_QString( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QUrl( 4 ) : QUrl() ) );
}
/*
@@ -158,7 +158,7 @@ HB_FUNC( QT_QWEBVIEW_SETCONTENT )
*/
HB_FUNC( QT_QWEBVIEW_SETHTML )
{
hbqt_par_QWebView( 1 )->setHtml( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? QUrl() : *hbqt_par_QUrl( 3 ) ) );
hbqt_par_QWebView( 1 )->setHtml( hbqt_par_QString( 2 ), ( HB_ISPOINTER( 3 ) ? *hbqt_par_QUrl( 3 ) : QUrl() ) );
}
/*

View File

@@ -94,11 +94,34 @@ static void SlotsExec( QWidget* widget, QString event, PHB_ITEM pItem )
}
}
}
if( pItem != NULL )
{
hb_itemRelease( pItem );
}
}
static void SlotsExecInt( QWidget* widget, QString event, PHB_ITEM pItem, int iValue )
{
for( int i = 0; i < s->list1.size(); ++i )
{
if( ( QWidget* ) s->list1.at( i ) == widget )
{
if( ( ( QString ) s->list2.at( i ) == event ) && ( ( bool ) s->list4.at( i ) == true ) )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QWidget* ) widget );
PHB_ITEM pState = hb_itemPutNI( NULL, iValue );
hb_vmEvalBlockV( ( PHB_ITEM ) s->list3.at( i ), 2, pWidget, pState );
hb_itemRelease( pWidget );
hb_itemRelease( pState );
}
}
}
if( pItem != NULL )
{
hb_itemRelease( pItem );
}
}
Slots::Slots( QObject* parent ) : QObject( parent )
{
@@ -111,42 +134,43 @@ Slots::~Slots()
void Slots::clicked()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "clicked()", NULL );
}
#if 0
for( int i = 0; i < list1.size(); ++i )
{
if( ( QWidget* ) list1.at( i ) == ( QWidget* ) widget )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "clicked()" ) && ( ( bool ) list4.at( i ) == true ) )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QWidget* ) widget );
void Slots::returnPressed()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "returnPressed()", NULL );
}
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget );
hb_itemRelease( pWidget );
}
}
}
#endif
void Slots::viewportEntered()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "viewportEntered()", NULL );
}
void Slots::pressed()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "pressed()", NULL );
}
void Slots::released()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "released()", NULL );
}
void Slots::hovered()
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "hovered()", NULL );
}
void Slots::triggered()
{
QObject *widget = qobject_cast<QWidget *>( sender() );
for( int i = 0; i < list1.size(); ++i )
{
if( ( QObject* ) list1.at( i ) == ( QObject* ) widget )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "triggered()" ) && ( ( bool ) list4.at( i ) == true ) )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QObject * ) widget );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget );
hb_itemRelease( pWidget );
}
}
}
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExec( widget, ( QString ) "triggered()", NULL );
}
void Slots::triggered( bool checked )
@@ -169,36 +193,43 @@ void Slots::triggered( bool checked )
}
}
void Slots::hovered()
void Slots::stateChanged( int state )
{
QObject *widget = qobject_cast<QObject *>( sender() );
for( int i = 0; i < list1.size(); ++i )
{
if( ( QObject* ) list1.at( i ) == ( QObject* ) widget )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "hovered()" ) && ( ( bool ) list4.at( i ) == true ) )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QObject * ) widget );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget );
hb_itemRelease( pWidget );
}
}
}
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExecInt( widget, ( QString ) "stateChanged(int)", NULL, state );
}
void Slots::stateChanged( int state )
void Slots::activated( int index )
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExecInt( widget, ( QString ) "activated(int)", NULL, index );
}
void Slots::currentIndexChanged( int index )
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExecInt( widget, ( QString ) "currentIndexChanged(int)", NULL, index );
}
void Slots::highlighted( int index )
{
QWidget *widget = qobject_cast<QWidget *>( sender() );
SlotsExecInt( widget, ( QString ) "highlighted(int)", NULL, index );
}
void Slots::clicked_model( const QModelIndex & index )
{
QWidget * widget = qobject_cast<QWidget *>( sender() );
for( int i = 0; i < list1.size(); ++i )
{
if( ( QWidget * ) list1.at( i ) == ( QWidget * ) widget )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "stateChanged(int)" ) && ( ( bool ) list4.at( i ) == true ) )
if( ( ( QString ) list2.at( i ) == ( QString ) "clicked(QModelIndex)" ) && ( ( bool ) list4.at( i ) == true ) )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QWidget * ) widget );
PHB_ITEM pState = hb_itemPutNI( NULL, state );
PHB_ITEM pState = hb_itemPutPtr( NULL, ( QModelIndex * ) new QModelIndex( index ) );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 2, pWidget, pState );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget, pState );
hb_itemRelease( pWidget );
hb_itemRelease( pState );
}
@@ -206,36 +237,141 @@ void Slots::stateChanged( int state )
}
}
void Slots::pressed()
/*
* harbour function to connect signals with slots
*/
HB_FUNC( QT_CONNECT_SIGNAL )
{
QWidget * widget = qobject_cast<QWidget *>(sender());
for( int i = 0; i < list1.size(); ++i )
QWidget * widget = ( QWidget* ) hb_parptr( 1 ); /* get sender */
QString signal = hb_parc( 2 ); /* get signal */
PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK | HB_IT_BYREF ) ); /* get codeblock */
bool ret = false; /* return value */
/* create object s, if not created yet */
if( s == NULL )
s = new Slots();
/* connect signal with slot
* if the list become to long, more classes can be created
* TODO: parameter Qt::AutoConnection
*/
/* Events with no parameters */
if( signal == ( QString ) "clicked()" )
{
if( ( QWidget * ) list1.at( i ) == ( QWidget * ) widget )
ret = widget->connect( widget, SIGNAL( clicked() ) , s, SLOT( clicked() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "returnPressed()" )
{
ret = widget->connect( widget, SIGNAL( returnPressed() ) , s, SLOT( returnPressed() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "triggered()" )
{
ret = widget->connect( widget, SIGNAL( triggered() ) , s, SLOT( triggered() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "hovered()" )
{
ret = widget->connect( widget, SIGNAL( hovered() ) , s, SLOT( hovered() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "viewportEntered()" )
{
ret = widget->connect( widget, SIGNAL( viewportEntered() ), s, SLOT( viewportEntered() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "pressed()" )
{
ret = widget->connect( widget, SIGNAL( pressed() ) , s, SLOT( pressed() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "released()" )
{
ret = widget->connect( widget, SIGNAL( released() ) , s, SLOT( released() ) , Qt::AutoConnection );
}
/* Events with int parameter */
if( signal == ( QString ) "stateChanged(int)" )
{
ret = widget->connect( widget, SIGNAL( stateChanged( int ) ), s, SLOT( stateChanged( int ) ), Qt::AutoConnection );
}
if( signal == ( QString ) "activated(int)" )
{
ret = widget->connect( widget, SIGNAL( activated( int ) ) , s, SLOT( activated( int ) ) , Qt::AutoConnection );
}
if( signal == ( QString ) "currentIndexChanged(int)" )
{
ret = widget->connect( widget, SIGNAL( currentIndexChanged( int ) ), s, SLOT( currentIndexChanged( int ) ), Qt::AutoConnection );
}
if( signal == ( QString ) "highlighted(int)" )
{
ret = widget->connect( widget, SIGNAL( highlighted( int ) ) , s, SLOT( highlighted( int ) ) , Qt::AutoConnection );
}
/* Events with bool parameter */
if( signal == ( QString ) "triggered(bool)" )
{
ret = widget->connect( widget, SIGNAL( triggered( bool ) ) , s, SLOT( triggered( bool ) ) , Qt::AutoConnection );
}
/* Events with miscellaneous parameters */
if( signal == ( QString ) "clicked(QModelIndex)" )
{
ret = widget->connect( widget, SIGNAL( clicked_model( const QModelIndex & ) ), s, SLOT( clicked( const QModelIndex & ) ) , Qt::AutoConnection );
}
/* return connect result */
hb_retl( ret );
/* if connected: store widget, signal, codeblock and flag
* TODO: locate a inactive entry and use it
*/
if( ret == true )
{
s->list1 << widget;
s->list2 << signal;
s->list3 << codeblock;
s->list4 << true;
}
}
/*
* harbour function to disconnect signals
*/
HB_FUNC( QT_DISCONNECT_SIGNAL )
{
/* TODO */
}
/*
* harbour function to release all codeblocks storeds
*/
#if 0
HB_FUNC( RELEASE_CODEBLOCKS )
{
if( s )
{
for( int i = 0; i < s->list1.size(); ++i )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "pressed()" ) && ( ( bool ) list4.at( i ) == true ) )
if( ( bool ) s->list4.at( i ) == true )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, (QWidget *) widget );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget );
hb_itemRelease( pWidget );
hb_itemRelease( ( PHB_ITEM ) s->list3.at( i ) );
}
}
}
}
#endif
void Slots::released()
/*
* C function to release all codeblocks storeds
* called at end of the program
* see qapplication.cpp
*/
void release_codeblocks( void )
{
QWidget* widget = qobject_cast<QWidget *>( sender() );
for( int i = 0; i < list1.size(); ++i )
if( s )
{
if( ( QWidget* ) list1.at( i ) == ( QWidget* ) widget )
for( int i = 0; i < s->list1.size(); ++i )
{
if( ( ( QString ) list2.at( i ) == ( QString ) "released()" ) && ( ( bool ) list4.at( i ) == true ) )
if( ( bool ) s->list4.at( i ) == true )
{
PHB_ITEM pWidget = hb_itemPutPtr( NULL, ( QWidget * ) widget );
hb_vmEvalBlockV( ( PHB_ITEM ) list3.at( i ), 1, pWidget );
hb_itemRelease( pWidget );
hb_itemRelease( ( PHB_ITEM ) s->list3.at( i ) );
}
}
}
@@ -254,9 +390,9 @@ HB_FUNC( QT_CONNECT_SIGNAL_1 )
s = new Slots();
/* connect signal with slot
// if the list become to long, more classes can be created
// TODO: parameter Qt::AutoConnection
*/
* if the list become to long, more classes can be created
* TODO: parameter Qt::AutoConnection
*/
switch( signal )
{
case HBQT_EVT_CLICKED:
@@ -282,11 +418,12 @@ HB_FUNC( QT_CONNECT_SIGNAL_1 )
break;
}
// return connect result
/* return connect result */
hb_retl( ret );
// if connected: store widget, signal, codeblock and flag
// TODO: locate a inactive entry and use it
/* if connected: store widget, signal, codeblock and flag
* TODO: locate a inactive entry and use it
*/
if( ret == true )
{
s->list1 << widget;
@@ -297,116 +434,7 @@ HB_FUNC( QT_CONNECT_SIGNAL_1 )
}
#endif
/*
harbour function to connect signals with slots
*/
HB_FUNC( QT_CONNECT_SIGNAL )
{
QWidget * widget = ( QWidget* ) hb_parptr( 1 ); /* get sender */
QString signal = hb_parc( 2 ); /* get signal */
PHB_ITEM codeblock = hb_itemNew( hb_param( 3, HB_IT_BLOCK | HB_IT_BYREF ) ); /* get codeblock */
bool ret = false; /* return value */
/* create object s, if not created yet */
if( s == NULL )
s = new Slots();
/* connect signal with slot
// if the list become to long, more classes can be created
// TODO: parameter Qt::AutoConnection
*/
if( signal == ( QString ) "clicked()" )
{
ret = widget->connect( widget, SIGNAL( clicked() ) , s, SLOT( clicked() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "triggered()" )
{
ret = widget->connect( widget, SIGNAL( triggered() ) , s, SLOT( triggered() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "triggered(bool)" )
{
ret = widget->connect( widget, SIGNAL( triggered( bool ) ) , s, SLOT( triggered( bool ) ) , Qt::AutoConnection );
}
if( signal == ( QString ) "hovered()" )
{
ret = widget->connect( widget, SIGNAL( hovered() ) , s, SLOT( hovered() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "stateChanged(int)" )
{
ret = widget->connect( widget, SIGNAL( stateChanged( int ) ), s, SLOT( stateChanged( int ) ), Qt::AutoConnection );
}
if( signal == ( QString ) "pressed()" )
{
ret = widget->connect( widget, SIGNAL( pressed() ) , s, SLOT( pressed() ) , Qt::AutoConnection );
}
if( signal == ( QString ) "released()" )
{
ret = widget->connect( widget, SIGNAL( released() ) , s, SLOT( released() ) , Qt::AutoConnection );
}
// return connect result
hb_retl( ret );
// if connected: store widget, signal, codeblock and flag
// TODO: locate a inactive entry and use it
if( ret == true )
{
s->list1 << widget;
s->list2 << signal;
s->list3 << codeblock;
s->list4 << true;
}
}
/*
harbour function to disconnect signals
*/
HB_FUNC( QT_DISCONNECT_SIGNAL )
{
/* TODO */
}
/*
harbour function to release all codeblocks storeds
*/
#if 0
HB_FUNC( RELEASE_CODEBLOCKS )
{
if( s )
{
for( int i = 0; i < s->list1.size(); ++i )
{
if( ( bool ) s->list4.at( i ) == true )
{
hb_itemRelease( ( PHB_ITEM ) s->list3.at( i ) );
}
}
}
}
#endif
/*
C function to release all codeblocks storeds
called at end of the program
see qapplication.cpp
*/
void release_codeblocks( void )
{
if( s )
{
for( int i = 0; i < s->list1.size(); ++i )
{
if( ( bool ) s->list4.at( i ) == true )
{
hb_itemRelease( ( PHB_ITEM ) s->list3.at( i ) );
}
}
}
}
/*----------------------------------------------------------------------*/
#endif

View File

@@ -59,6 +59,7 @@
#include <QObject>
#include <QList>
#include <QModelIndex>
#include "hbapi.h"
#include "hbapiitm.h"
@@ -83,6 +84,12 @@ class Slots: public QObject
void stateChanged( int state );
void pressed();
void released();
void activated( int index );
void currentIndexChanged( int index );
void highlighted( int index );
void returnPressed();
void clicked_model( const QModelIndex & index );
void viewportEntered();
};
#endif

View File

@@ -1,20 +1,15 @@
/****************************************************************************
** Meta object code from reading C++ file "slots.h"
** Meta object code from reading C++ file hbqt_slots.h
**
** Created: Wed 18. Mar 17:25:39 2009
** Created: Sun Jun 7 21:29:21 2009
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "hbqt.h"
#if QT_VERSION >= 0x040500
#include "hbqt_slots.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file [slots.h] doesn,t include <QObject>."
#error "The header file hbqt_slots.h doesnt include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 61
#error "This file was generated using the moc from 4.5.0. It"
#error "cannot be used with the include files from this version of Qt."
@@ -28,7 +23,7 @@ static const uint qt_meta_data_Slots[] = {
2, // revision
0, // classname
0, 0, // classinfo
7, 12, // methods
13, 12, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
@@ -41,6 +36,12 @@ static const uint qt_meta_data_Slots[] = {
69, 63, 6, 6, 0x0a,
87, 6, 6, 6, 0x0a,
97, 6, 6, 6, 0x0a,
114, 108, 6, 6, 0x0a,
129, 108, 6, 6, 0x0a,
154, 108, 6, 6, 0x0a,
171, 6, 6, 6, 0x0a,
187, 108, 6, 6, 0x0a,
214, 6, 6, 6, 0x0a,
0 // eod
};
@@ -49,6 +50,9 @@ static const char qt_meta_stringdata_Slots[] = {
"Slots\0\0clicked()\0triggered()\0checked\0"
"triggered(bool)\0hovered()\0state\0"
"stateChanged(int)\0pressed()\0released()\0"
"index\0activated(int)\0currentIndexChanged(int)\0"
"highlighted(int)\0returnPressed()\0"
"clicked_model(QModelIndex)\0viewportEntered()\0"
};
const QMetaObject Slots::staticMetaObject = {
@@ -83,14 +87,17 @@ int Slots::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
case 4: stateChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 5: pressed(); break;
case 6: released(); break;
case 7: activated((*reinterpret_cast< int(*)>(_a[1]))); break;
case 8: currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 9: highlighted((*reinterpret_cast< int(*)>(_a[1]))); break;
case 10: returnPressed(); break;
case 11: clicked_model((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break;
case 12: viewportEntered(); break;
default: ;
}
_id -= 7;
_id -= 13;
}
return _id;
}
QT_END_MOC_NAMESPACE
#endif

View File

@@ -54,10 +54,19 @@
#define QT_PTROF( oObj ) ( oObj:pPtr )
#define QT_EVE_TRIGGERED "triggered(bool)"
#define QT_EVE_TRIGGERED_B "triggered(bool)"
#define QT_EVE_HOVERED "hovered()"
#define QT_EVE_CLICKED "clicked()"
#define QT_EVE_TRIGGERED "triggered()"
#define QT_EVE_TRIGGERED_B "triggered(bool)"
#define QT_EVE_HOVERED "hovered()"
#define QT_EVE_CLICKED "clicked()"
#define QT_EVE_STATECHANGED_I "stateChanged(int)"
#define QT_EVE_PRESSED "pressed()"
#define QT_EVE_RELEASED "released()"
#define QT_EVE_ACTIVATED_I "activated(int)"
#define QT_EVE_CURRENTINDEXCHANGED_I "currentIndexChanged(int)"
#define QT_EVE_HIGHLIGHTED_I "highlighted(int)"
#define QT_EVE_RETURNPRESSED "returnPressed()"
#define QT_EVE_CLICKED_M "clicked(QModelIndex)"
#define QT_EVE_VIEWPORTENTERED "viewportEntered()"
/*----------------------------------------------------------------------*/
/*
@@ -93,6 +102,7 @@ PROCEDURE Main()
LOCAL oPS, oPPrv, oMB, oWZ, oCD, oWP, oSBar, oStyle
oWnd := QMainWindow():new()
oWnd:setMouseTracking( .t. )
oWnd:setWindowTitle( "Testing - QMainWindow, QMenu, QMenuBar and QAction " )
oWnd:setWindowIcon( "test" )
pIcon := oWnd:windowIcon()
@@ -327,7 +337,8 @@ STATIC FUNCTION Build_TreeView( oWnd )
LOCAL oTV, oDirModel
oTV := QTreeView():new( QT_PTROF( oWnd ) )
oTV:setMouseTracking( .t. )
Qt_Connect_Signal( QT_PTROF( oTV ), QT_EVE_HOVERED, {|o,i| uiDebug( "oTV:hovered" ) } )
oDirModel := QDirModel():new( QT_PTROF( oTV ) )
oTV:setModel( QT_PTROF( oDirModel ) )
oTV:move( 5, 7 )
@@ -339,9 +350,11 @@ STATIC FUNCTION Build_TreeView( oWnd )
/*----------------------------------------------------------------------*/
STATIC FUNCTION Build_ListBox( oWnd, aPos, aSize )
LOCAL oListBox, oStrList, oStrModel
LOCAL oListBox, oStrList, oStrModel, oAct
oListBox := QListView():New( QT_PTROF( oWnd ) )
oListBox:setMouseTracking( .t. )
Qt_Connect_Signal( QT_PTROF( oListBox ), QT_EVE_HOVERED, {|o,i| uiDebug( "oListBox:hovered" ) } )
oStrList := QStringList():new( QT_PTROF( oListBox ) )
@@ -384,6 +397,7 @@ STATIC FUNCTION Build_Controls( oWnd )
LOCAL oEdit, oCheckBox, oComboBox, oSpinBox, oRadioButton, oVariant
oEdit := QLineEdit():new( QT_PTROF( oWnd ) )
Qt_Connect_Signal( QT_PTROF( oEdit ), QT_EVE_RETURNPRESSED, {|o,i| MsgInfo( oEdit:text() ) } )
oEdit:move( 5, 10 )
oEdit:resize( 345, 30 )
oEdit:setMaxLength( 40 )
@@ -392,15 +406,17 @@ STATIC FUNCTION Build_Controls( oWnd )
oEdit:show()
oComboBox := QComboBox():New( QT_PTROF( oWnd ) )
oComboBox:addItem( "First" )
oComboBox:addItem( "Second" )
oComboBox:addItem( "Third" )
Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_HIGHLIGHTED_I , {|o,i| uiDebug( oComboBox:itemText( i ) ) } )
Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_CURRENTINDEXCHANGED_I, {|o,i| MsgInfo( oComboBox:itemText( i ) ) } )
oComboBox:move( 5, 60 )
oComboBox:resize( 345, 30 )
oComboBox:show()
oCheckBox := QCheckBox():New( QT_PTROF( oWnd ) )
Qt_Connect_Signal( QT_PTROF( oCheckBox ), QT_EVE_STATECHANGED_I, {|o,i| MsgInfo( IF( i == 0,"Uncheckd","Checked" ) ) } )
oCheckBox:setText( "Testing CheckBox HbQt" )
oCheckBox:move( 5, 110 )
oCheckBox:resize( 345, 30 )
@@ -412,6 +428,7 @@ STATIC FUNCTION Build_Controls( oWnd )
oSpinBox:Show()
oRadioButton := QRadioButton():New( QT_PTROF( oWnd ) )
Qt_Connect_Signal( QT_PTROF( oRadioButton ), QT_EVE_CLICKED, {|o,i| MsgInfo( "Checked" ) } )
oRadioButton:Move( 5, 210 )
oRadioButton:ReSize( 345, 30 )
oRadioButton:Show()
@@ -718,3 +735,4 @@ HB_FUNC( UIDEBUG )
#PRAGMA ENDDUMP
/*----------------------------------------------------------------------*/