2009-08-12 22:48 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt.hbc
! Changed the instructions order ( per Viktor's advise )
* contrib/hbqt/hbqt_slots.cpp
* contrib/hbqt/hbqt_slots.h
* contrib/hbqt/moc_slots.cpp
+ Added more signal/slots.
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-12 22:48 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt.hbc
|
||||
! Changed the instructions order ( per Viktor's advise )
|
||||
* contrib/hbqt/hbqt_slots.cpp
|
||||
* contrib/hbqt/hbqt_slots.h
|
||||
* contrib/hbqt/moc_slots.cpp
|
||||
+ Added more signal/slots.
|
||||
|
||||
2009-08-12 23:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbthread.h
|
||||
* added workaround for different CRITICAL_SECTION definitions in
|
||||
|
||||
@@ -6,7 +6,6 @@ incpaths=.
|
||||
|
||||
{allwin}libpaths=${HB_DIR_QT}\lib
|
||||
|
||||
{mingw|mingwce|(gcc&(linux|darwin))}libs=supc++
|
||||
{!HB_QT_STATIC}libs=hbqt
|
||||
{HB_QT_STATIC}libs=hbqts
|
||||
{win}libs=version shlwapi
|
||||
@@ -17,5 +16,6 @@ incpaths=.
|
||||
{darwin}libs=/Library/Frameworks/QtGui.framework/QtGui
|
||||
{darwin}libs=/Library/Frameworks/QtNetwork.framework/QtNetwork
|
||||
{darwin}libs=/Library/Frameworks/QtWebKit.framework/QtWebKit
|
||||
{mingw|mingwce|(gcc&(linux|darwin))}libs=supc++
|
||||
gui=yes
|
||||
gt=gtnul
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
#include "hbqt_slots.h"
|
||||
|
||||
// #include <windows.h> ////////////////////////////////////////////////////
|
||||
#include <windows.h> ////////////////////////////////////////////////////
|
||||
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
@@ -939,7 +939,31 @@ void Slots::sortIndicatorChanged( int logicalIndex, Qt::SortOrder order )
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecIntInt( object, ( char* ) "sortIndicatorChanged(int,int)", logicalIndex, order );
|
||||
}
|
||||
|
||||
void Slots::buttonClicked( int id )
|
||||
{
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecInt( object, ( char* ) "buttonClicked(int)", id );
|
||||
}
|
||||
void Slots::buttonPressed( int id )
|
||||
{
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecInt( object, ( char* ) "buttonPressed(int)", id );
|
||||
}
|
||||
void Slots::buttonReleased( int id )
|
||||
{
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecInt( object, ( char* ) "buttonReleased(int)", id );
|
||||
}
|
||||
void Slots::linkActivated( const QString & link )
|
||||
{
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecString( object, ( char* ) "linkActivated(QString)", link );
|
||||
}
|
||||
void Slots::linkHovered( const QString & link )
|
||||
{
|
||||
QObject *object = qobject_cast<QObject *>( sender() );
|
||||
SlotsExecString( object, ( char* ) "linkHovered(QString)", link );
|
||||
}
|
||||
|
||||
/*
|
||||
* harbour function to connect signals with slots
|
||||
@@ -1458,6 +1482,31 @@ HB_FUNC( QT_CONNECT_SIGNAL )
|
||||
ret = object->connect( object, SIGNAL( sortIndicatorChanged( int, Qt::SortOrder ) ),
|
||||
s_s, SLOT( sortIndicatorChanged( int, Qt::SortOrder ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "buttonClicked(int)" )
|
||||
{
|
||||
ret = object->connect( object, SIGNAL( buttonClicked( int ) ),
|
||||
s_s, SLOT( buttonClicked( int ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "buttonPressed(int)" )
|
||||
{
|
||||
ret = object->connect( object, SIGNAL( buttonPressed( int ) ),
|
||||
s_s, SLOT( buttonPressed( int ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "buttonReleased(int)" )
|
||||
{
|
||||
ret = object->connect( object, SIGNAL( buttonReleased( int ) ),
|
||||
s_s, SLOT( buttonReleased( int ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "linkActivated(QString)" )
|
||||
{
|
||||
ret = object->connect( object, SIGNAL( linkActivated( const QString & ) ),
|
||||
s_s, SLOT( linkActivated( const QString & ) ), Qt::AutoConnection );
|
||||
}
|
||||
if( signal == ( QString ) "linkHovered(QString)" )
|
||||
{
|
||||
ret = object->connect( object, SIGNAL( linkHovered( const QString & ) ),
|
||||
s_s, SLOT( linkHovered( const QString & ) ), Qt::AutoConnection );
|
||||
}
|
||||
|
||||
|
||||
hb_retl( ret );
|
||||
@@ -1826,8 +1875,6 @@ QVariant fetchRole( PHB_ITEM block, int what, int par1, int par2 )
|
||||
// return( hb_itemGetPtr( ret ) );
|
||||
else
|
||||
return QVariant();
|
||||
|
||||
hb_itemRelease( ret );
|
||||
}
|
||||
|
||||
HbDbfModel::HbDbfModel( PHB_ITEM pBlock ) : QAbstractItemModel()
|
||||
|
||||
@@ -285,6 +285,11 @@ public slots:
|
||||
void sectionPressed( int logicalIndex );
|
||||
void sectionResized( int logicalIndex, int oldSize, int newSize );
|
||||
void sortIndicatorChanged( int logicalIndex, Qt::SortOrder order );
|
||||
void buttonClicked( int id );
|
||||
void buttonPressed( int id );
|
||||
void buttonReleased( int id );
|
||||
void linkActivated( const QString & link );
|
||||
void linkHovered( const QString & link );
|
||||
};
|
||||
|
||||
class Events: public QObject
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'hbqt_slots.h'
|
||||
**
|
||||
** Created: Thu Aug 6 17:41:56 2009
|
||||
** Created: Wed Aug 12 22:46:34 2009
|
||||
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
@@ -311,7 +311,7 @@ static const uint qt_meta_data_Slots[] = {
|
||||
2, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
100, 12, // methods
|
||||
105, 12, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -417,6 +417,11 @@ static const uint qt_meta_data_Slots[] = {
|
||||
2801, 2574, 6, 6, 0x0a,
|
||||
2850, 2821, 6, 6, 0x0a,
|
||||
2897, 2878, 6, 6, 0x0a,
|
||||
2940, 2937, 6, 6, 0x0a,
|
||||
2959, 2937, 6, 6, 0x0a,
|
||||
2978, 2937, 6, 6, 0x0a,
|
||||
3003, 2998, 6, 6, 0x0a,
|
||||
3026, 2998, 6, 6, 0x0a,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -503,6 +508,9 @@ static const char qt_meta_stringdata_Slots[] = {
|
||||
"sectionResized(int,int,int)\0"
|
||||
"logicalIndex,order\0"
|
||||
"sortIndicatorChanged(int,Qt::SortOrder)\0"
|
||||
"id\0buttonClicked(int)\0buttonPressed(int)\0"
|
||||
"buttonReleased(int)\0link\0"
|
||||
"linkActivated(QString)\0linkHovered(QString)\0"
|
||||
};
|
||||
|
||||
const QMetaObject Slots::staticMetaObject = {
|
||||
@@ -630,9 +638,14 @@ int Slots::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
case 97: sectionPressed((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 98: sectionResized((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
|
||||
case 99: sortIndicatorChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Qt::SortOrder(*)>(_a[2]))); break;
|
||||
case 100: buttonClicked((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 101: buttonPressed((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 102: buttonReleased((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 103: linkActivated((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
case 104: linkHovered((*reinterpret_cast< const QString(*)>(_a[1]))); break;
|
||||
default: ;
|
||||
}
|
||||
_id -= 100;
|
||||
_id -= 105;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user