2009-07-07 01:13 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbqt/generator/hbqtgen.prg
* harbour/contrib/hbqt/qth/QBrush.qth
* harbour/contrib/hbqt/qth/QColor.qth
* harbour/contrib/hbqt/qth/QCursor.qth
* harbour/contrib/hbqt/qth/QIcon.qth
* harbour/contrib/hbqt/qth/QPalette.qth
* harbour/contrib/hbqt/qth/QPen.qth
* harbour/contrib/hbqt/qth/QSize.qth
* harbour/contrib/hbqt/hbqt.h
* harbour/contrib/hbqt/QBrush.cpp
* harbour/contrib/hbqt/QColor.cpp
* harbour/contrib/hbqt/QCursor.cpp
* harbour/contrib/hbqt/QIcon.cpp
* harbour/contrib/hbqt/QPalette.cpp
* harbour/contrib/hbqt/QPen.cpp
* harbour/contrib/hbqt/QSize.cpp
* harbour/contrib/hbqt/TQBrush.prg
* harbour/contrib/hbqt/TQColor.prg
* harbour/contrib/hbqt/TQCursor.prg
* harbour/contrib/hbqt/TQIcon.prg
* harbour/contrib/hbqt/TQPalette.prg
* harbour/contrib/hbqt/TQPen.prg
* harbour/contrib/hbqt/TQSize.prg
! More qualifying classes with :new( ... ) syntax.
This commit is contained in:
@@ -17,6 +17,36 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-07 01:13 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbqt/generator/hbqtgen.prg
|
||||
|
||||
* harbour/contrib/hbqt/qth/QBrush.qth
|
||||
* harbour/contrib/hbqt/qth/QColor.qth
|
||||
* harbour/contrib/hbqt/qth/QCursor.qth
|
||||
* harbour/contrib/hbqt/qth/QIcon.qth
|
||||
* harbour/contrib/hbqt/qth/QPalette.qth
|
||||
* harbour/contrib/hbqt/qth/QPen.qth
|
||||
* harbour/contrib/hbqt/qth/QSize.qth
|
||||
|
||||
* harbour/contrib/hbqt/hbqt.h
|
||||
|
||||
* harbour/contrib/hbqt/QBrush.cpp
|
||||
* harbour/contrib/hbqt/QColor.cpp
|
||||
* harbour/contrib/hbqt/QCursor.cpp
|
||||
* harbour/contrib/hbqt/QIcon.cpp
|
||||
* harbour/contrib/hbqt/QPalette.cpp
|
||||
* harbour/contrib/hbqt/QPen.cpp
|
||||
* harbour/contrib/hbqt/QSize.cpp
|
||||
|
||||
* harbour/contrib/hbqt/TQBrush.prg
|
||||
* harbour/contrib/hbqt/TQColor.prg
|
||||
* harbour/contrib/hbqt/TQCursor.prg
|
||||
* harbour/contrib/hbqt/TQIcon.prg
|
||||
* harbour/contrib/hbqt/TQPalette.prg
|
||||
* harbour/contrib/hbqt/TQPen.prg
|
||||
* harbour/contrib/hbqt/TQSize.prg
|
||||
! More qualifying classes with :new( ... ) syntax.
|
||||
|
||||
2009-07-07 07:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* Formatting.
|
||||
|
||||
@@ -78,7 +78,63 @@
|
||||
*/
|
||||
HB_FUNC( QT_QBRUSH )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QPixmap( 1 ) ) );
|
||||
|
||||
#if 0 /* ToDO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QPixmap" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QPixmap( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QImage" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QImage( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QBrush" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QBrush( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QGradient" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QGradient( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QColor" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), Qt::SolidPattern ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), Qt::SolidPattern ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), ( Qt::BrushStyle ) hb_parni( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), ( Qt::BrushStyle ) hb_parni( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), *hbqt_par_QPixmap( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), *hbqt_par_QPixmap( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -66,30 +66,38 @@
|
||||
QColor ()
|
||||
QColor ( int r, int g, int b, int a = 255 )
|
||||
QColor ( QRgb color )
|
||||
QColor ( Qt::GlobalColor color )
|
||||
QColor ( const QString & name )
|
||||
QColor ( const char * name )
|
||||
QColor ( const QColor & color )
|
||||
QColor ( Qt::GlobalColor color )
|
||||
*/
|
||||
HB_FUNC( QT_QCOLOR )
|
||||
{
|
||||
if( hb_pcount() == 1 )
|
||||
if( hb_pcount() >= 1 )
|
||||
{
|
||||
if( HB_ISNUM( 1 ) && hb_parni( 1 ) < 25 )
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) && hb_parni( 1 ) < 25 )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( ( QRgb ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISPOINTER( 1 ) )
|
||||
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hbqt_par_QString( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hbqt_par_QString( 1 ) ) );
|
||||
hb_retptr( ( QColor* ) new QColor( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), ( int ) 255 ) );
|
||||
}
|
||||
else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -76,7 +76,46 @@
|
||||
*/
|
||||
HB_FUNC( QT_QCURSOR )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( ( Qt::CursorShape ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), -1, -1 ) );
|
||||
|
||||
#if 0 /* TODO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QPixmap" )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), -1, -1 ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QCursor" )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QCursor( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QBitmap( 1 ), *hbqt_par_QBitmap( 2 ),
|
||||
HB_ISNUM( 3 ) ? hb_parni( 3 ) : -1,
|
||||
HB_ISNUM( 4 ) ? hb_parni( 4 ) : -1 ) );
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), hb_parni( 2 ),
|
||||
HB_ISNUM( 3 ) ? hb_parni( 3 ) : -1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -87,6 +87,10 @@ HB_FUNC( QT_QICON )
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon( hbqt_par_QString( 1 ) ) );
|
||||
}
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon( *hbqt_par_QPixmap( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon() );
|
||||
|
||||
@@ -74,24 +74,17 @@
|
||||
*/
|
||||
HB_FUNC( QT_QPALETTE )
|
||||
{
|
||||
if( hb_pcount() >= 2 )
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette() );
|
||||
hb_retptr( ( QPalette* ) new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 )
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette() );
|
||||
}
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QPalette( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QColor( 1 ), *hbqt_par_QColor( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -85,7 +85,36 @@ HB_FUNC( QT_QPEN )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen() );
|
||||
hb_retptr( ( QPen* ) new QPen( ( Qt::PenStyle ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QColor( 1 ) ) );
|
||||
|
||||
#if 0 /* TODO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QColor" )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QPen" )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QPen( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QBrush( 1 ), hb_parnd( 2 ),
|
||||
HB_ISNUM( 3 ) ? ( Qt::PenStyle ) hb_parni( 3 ) : Qt::SolidLine,
|
||||
HB_ISNUM( 4 ) ? ( Qt::PenCapStyle ) hb_parni( 4 ) : Qt::SquareCap,
|
||||
HB_ISNUM( 5 ) ? ( Qt::PenJoinStyle ) hb_parni( 5 ) : Qt::BevelJoin
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -66,12 +66,17 @@
|
||||
/*
|
||||
* QSize ()
|
||||
* QSize ( int width, int height )
|
||||
* QSize boundedTo ( const QSize & otherSize ) const
|
||||
* QSize expandedTo ( const QSize & otherSize ) const
|
||||
*/
|
||||
HB_FUNC( QT_QSIZE )
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -170,6 +175,22 @@ HB_FUNC( QT_QSIZE_WIDTH )
|
||||
hb_retni( hbqt_par_QSize( 1 )->width() );
|
||||
}
|
||||
|
||||
/*
|
||||
* QSize boundedTo ( const QSize & otherSize ) const
|
||||
*/
|
||||
HB_FUNC( QT_QSIZE_BOUNDEDTO )
|
||||
{
|
||||
hb_retptr( new QSize( hbqt_par_QSize( 1 )->boundedTo( *hbqt_par_QSize( 2 ) ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* QSize expandedTo ( const QSize & otherSize ) const
|
||||
*/
|
||||
HB_FUNC( QT_QSIZE_EXPANDEDTO )
|
||||
{
|
||||
hb_retptr( new QSize( hbqt_par_QSize( 1 )->expandedTo( *hbqt_par_QSize( 2 ) ) ) );
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif /* #if QT_VERSION >= 0x040500 */
|
||||
|
||||
@@ -82,11 +82,47 @@ CREATE CLASS QBrush
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QBrush
|
||||
METHOD New( ... ) CLASS QBrush
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QBrush( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QBrush()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QBrush( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QBrush( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -133,11 +133,47 @@ CREATE CLASS QColor
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QColor
|
||||
METHOD New( ... ) CLASS QColor
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QColor( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QColor()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QColor( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QColor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -77,11 +77,47 @@ CREATE CLASS QCursor
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QCursor
|
||||
METHOD New( ... ) CLASS QCursor
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QCursor( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QCursor()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QCursor( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QCursor( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -78,11 +78,47 @@ CREATE CLASS QIcon
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QIcon
|
||||
METHOD New( ... ) CLASS QIcon
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QIcon( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QIcon()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QIcon( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QIcon( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -103,11 +103,47 @@ CREATE CLASS QPalette
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QPalette
|
||||
METHOD New( ... ) CLASS QPalette
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QPalette( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QPalette()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QPalette( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QPalette( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -89,11 +89,47 @@ CREATE CLASS QPen
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QPen
|
||||
METHOD New( ... ) CLASS QPen
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QPen( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QPen()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QPen( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QPen( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -75,16 +75,54 @@ CREATE CLASS QSize
|
||||
METHOD setWidth( nWidth ) INLINE Qt_QSize_setWidth( ::pPtr, nWidth )
|
||||
METHOD transpose() INLINE Qt_QSize_transpose( ::pPtr )
|
||||
METHOD width() INLINE Qt_QSize_width( ::pPtr )
|
||||
METHOD boundedTo( pOtherSize ) INLINE Qt_QSize_boundedTo( ::pPtr, pOtherSize )
|
||||
METHOD expandedTo( pOtherSize ) INLINE Qt_QSize_expandedTo( ::pPtr, pOtherSize )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD New( pParent ) CLASS QSize
|
||||
METHOD New( ... ) CLASS QSize
|
||||
LOCAL aP, nParams
|
||||
|
||||
::pParent := pParent
|
||||
aP := hb_aParams()
|
||||
nParams := len( aP )
|
||||
|
||||
::pPtr := Qt_QSize( pParent )
|
||||
DO CASE
|
||||
CASE nParams == 0
|
||||
::pPtr := Qt_QSize()
|
||||
|
||||
CASE nParams == 1
|
||||
::pPtr := Qt_QSize( aP[ 1 ] )
|
||||
|
||||
CASE nParams == 2
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ] )
|
||||
|
||||
CASE nParams == 3
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ] )
|
||||
|
||||
CASE nParams == 4
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ] )
|
||||
|
||||
CASE nParams == 5
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ] )
|
||||
|
||||
CASE nParams == 6
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ] )
|
||||
|
||||
CASE nParams == 7
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ] )
|
||||
|
||||
CASE nParams == 8
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ] )
|
||||
|
||||
CASE nParams == 9
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ] )
|
||||
|
||||
CASE nParams ==10
|
||||
::pPtr := Qt_QSize( aP[ 1 ], aP[ 2 ], aP[ 3 ], aP[ 4 ], aP[ 5 ], aP[ 6 ], aP[ 7 ], aP[ 8 ], aP[ 9 ], aP[10 ] )
|
||||
|
||||
ENDCASE
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -1484,13 +1484,11 @@ FUNCTION Build_HTML( cWidget, aHM_, aHF_, cPathOut, docum_ )
|
||||
aColumns := { { 1,'Function', 'C', 100 },;
|
||||
{ 2,'Returns' , 'C', 20 } }
|
||||
|
||||
//cTitle := 'harbour/contrib/hbqt/' + cWidget
|
||||
|
||||
aHTML := {}
|
||||
nCols := len( aColumns )
|
||||
|
||||
aadd( aHtml, "<HTML>" )
|
||||
Build_HtmlHeader( @aHTML, .F. )
|
||||
Build_HtmlHeader( @aHTML )
|
||||
|
||||
s := '<BODY BGCOLOR="' + SetColorBG + '" TEXT="' + SetColorText + '"' + '>'
|
||||
aadd( aHtml, s )
|
||||
@@ -1499,12 +1497,12 @@ FUNCTION Build_HTML( cWidget, aHM_, aHF_, cPathOut, docum_ )
|
||||
aadd( aHtml, '<TBODY>' )
|
||||
|
||||
/* Class Documentation */
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + " align=CENTER bgcolor=#ffff80><B>" + "CLASS METHODS" + "</B></TD></TR>"
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + " align=CENTER bgcolor=#ffff80><B>" + "CLASS REFERENCE" + "</B></TD></TR>"
|
||||
aadd( aHtml, s )
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + " align=CENTER bgcolor=#ffff80><B>" + "Source: /harbour/contrib/hbqt/T" + cWidget + ".prg" + "</B></TD></TR>"
|
||||
aadd( aHtml, s )
|
||||
s := QT_WEB + QT_VER + "/" + lower( cWidget ) + ".htm"
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + ' align=CENTER bgcolor=#ffff80><B><a href="' + s + '">' + s + "</a></B></TD></TR>"
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + ' align=CENTER bgcolor=#CFBFA1><B><a href="' + s + '">' + s + "</a></B></TD></TR>"
|
||||
aadd( aHtml, s )
|
||||
//
|
||||
IF !empty( docum_ )
|
||||
@@ -1515,7 +1513,9 @@ FUNCTION Build_HTML( cWidget, aHM_, aHF_, cPathOut, docum_ )
|
||||
s += '<TD class="only" >'
|
||||
s += '<PRE id="' + cPara + '">'
|
||||
s += CRLF
|
||||
|
||||
s += CRLF
|
||||
s += "IMPORTANT: Call the constructor with exact number of parameter. "+ CRLF
|
||||
s += " No defaults, otherwise application will GPF" + CRLF
|
||||
for i := 1 to len( docum_ )
|
||||
s += docum_[ i ] + CRLF
|
||||
next
|
||||
@@ -1541,9 +1541,9 @@ FUNCTION Build_HTML( cWidget, aHM_, aHF_, cPathOut, docum_ )
|
||||
NEXT
|
||||
|
||||
/* Function Documentation */
|
||||
s := "<TR><TD colspan="+hb_ntos( nCols )+" align=CENTER bgcolor=#ffff80><B>"+ "FUNCTIONS" +"</B></TD></TR>"
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + " align=CENTER bgcolor=#ffff80><B>" + "FUNCTIONS REFERENCE" + "</B></TD></TR>"
|
||||
aadd( aHtml, s )
|
||||
s := "<TR><TD colspan="+hb_ntos( nCols )+" align=CENTER bgcolor=#ffff80><B>"+ "Source: /harbour/contrib/hbqt/hbqt_"+ lower( cWidget ) +".cpp" +"</B></TD></TR>"
|
||||
s := "<TR><TD colspan=" + hb_ntos( nCols ) + " align=CENTER bgcolor=#ffff80><B>" + "Source: /harbour/contrib/hbqt/" + cWidget + ".cpp" + "</B></TD></TR>"
|
||||
aadd( aHtml, s )
|
||||
FOR j := 1 TO len( aHF_ )
|
||||
s := "<TR>"
|
||||
@@ -1598,9 +1598,7 @@ FUNCTION Build_HtmlTable( aHTML, cTitle, SetColorTable )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION Build_HtmlHeader( aHTML, lPreDisplayNone )
|
||||
|
||||
DEFAULT lPreDisplayNone TO .T.
|
||||
FUNCTION Build_HtmlHeader( aHTML )
|
||||
|
||||
aadd( aHtml, '<head> ' )
|
||||
aadd( aHtml, ' <meta name="Author" CONTENT=Pritpal Bedi [pritpal@vouchcac.com]">' )
|
||||
@@ -1628,9 +1626,6 @@ FUNCTION Build_HtmlHeader( aHTML, lPreDisplayNone )
|
||||
aadd( aHtml, ' } ' )
|
||||
aadd( aHtml, ' pre ' )
|
||||
aadd( aHtml, ' { ' )
|
||||
if lPreDisplayNone
|
||||
aadd( aHtml, ' display : none; ' )
|
||||
endif
|
||||
aadd( aHtml, ' font-family : Courier New; ' )
|
||||
aadd( aHtml, ' font-size : .7em; ' )
|
||||
aadd( aHtml, ' color : black; ' )
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
#define hbqt_par_QEventLoop( n ) ( ( QEventLoop* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QPaintEvent( n ) ( ( QPaintEvent* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QInputEvent( n ) ( ( QInputEvent* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QIcon( n ) ( ( QIcon* ) hb_parcx( n ) )
|
||||
#define hbqt_par_QIcon( n ) ( ( QIcon* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleOption( n ) ( ( QStyleOption* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QStyleOptionComplex( n ) ( ( QStyleOptionComplex* ) hb_parptr( n ) )
|
||||
#define hbqt_par_QFontMetrics( n ) ( ( QFontMetrics* ) hb_parptr( n ) )
|
||||
|
||||
@@ -56,10 +56,27 @@
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oBrush := QBrush():new()
|
||||
oBrush := QBrush():new( pQPixmap )
|
||||
oBrush := QBrush():new( nQt_GlobalColor )
|
||||
oBrush := QBrush():new( nQt_GlobalColor, nQt_BrushStyle ) // i.e. Qt_SolidPattern
|
||||
oBrush := QBrush():new( pQColor, nQt_BrushStyle ) // i.e. Qt_SolidPattern
|
||||
oBrush := QBrush():new( pQColor, pQPixmap )
|
||||
oBrush := QBrush():new( nQt_GlobalColor, pQPixmap )
|
||||
|
||||
/* TODO
|
||||
* oBrush := QBrush():new( pQImage )
|
||||
* oBrush := QBrush():new( pQBrush )
|
||||
* oBrush := QBrush():new( pQGradient )
|
||||
* oBrush := QBrush():new( pQColor )
|
||||
*/
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QBrush>
|
||||
|
||||
@@ -79,7 +96,63 @@ New =
|
||||
*/
|
||||
HB_FUNC( QT_QBRUSH )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QPixmap( 1 ) ) );
|
||||
|
||||
#if 0 /* ToDO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QPixmap" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QPixmap( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QImage" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QImage( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QBrush" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QBrush( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QGradient" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QGradient( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QColor" )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), Qt::SolidPattern ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), Qt::SolidPattern ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), ( Qt::BrushStyle ) hb_parni( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), ( Qt::BrushStyle ) hb_parni( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( *hbqt_par_QColor( 1 ), *hbqt_par_QPixmap( 2 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush( ( Qt::GlobalColor ) hb_parni( 1 ), *hbqt_par_QPixmap( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QBrush* ) new QBrush() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
|
||||
@@ -56,10 +56,20 @@
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oColor := QColor():new() // You will supply other parameter later
|
||||
oColor := QColor():new( nQt_Color ) // R: hbqt.ch
|
||||
oColor := QColor():new( nRGB ) // ( nR + ( nG * 256 ) + ( nB * 256 * 256 ) )
|
||||
oColor := QColor():new( cColorName ) // #RRGGBB
|
||||
oColor := QColor():new( pQColor ) // Pointer to previously obtained QColor
|
||||
oColor := QColor():new( nR, nG, nB ) // Red Green Blue values
|
||||
oColor := QColor():new( nR, nG, nB, nAlpha ) // Red Green Blue values with Alpha Channel
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QColor>
|
||||
|
||||
@@ -67,30 +77,38 @@ New =
|
||||
QColor ()
|
||||
QColor ( int r, int g, int b, int a = 255 )
|
||||
QColor ( QRgb color )
|
||||
QColor ( Qt::GlobalColor color )
|
||||
QColor ( const QString & name )
|
||||
QColor ( const char * name )
|
||||
QColor ( const QColor & color )
|
||||
QColor ( Qt::GlobalColor color )
|
||||
*/
|
||||
HB_FUNC( QT_QCOLOR )
|
||||
{
|
||||
if( hb_pcount() == 1 )
|
||||
if( hb_pcount() >= 1 )
|
||||
{
|
||||
if( HB_ISNUM( 1 ) && hb_parni( 1 ) < 25 )
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) && hb_parni( 1 ) < 25 )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
else if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( ( QRgb ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISPOINTER( 1 ) )
|
||||
else if( hb_pcount() == 1 && HB_ISCHAR( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hbqt_par_QString( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISCHAR( 1 ) )
|
||||
else if( hb_pcount() == 3 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hbqt_par_QString( 1 ) ) );
|
||||
hb_retptr( ( QColor* ) new QColor( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), ( int ) 255 ) );
|
||||
}
|
||||
else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) )
|
||||
{
|
||||
hb_retptr( ( QColor* ) new QColor( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -56,10 +56,22 @@
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oCursor := QCursor():new()
|
||||
oCursor := QCursor():new( nQt_CursorShape )
|
||||
oCursor := QCursor():new( pQPixmap )
|
||||
oCursor := QCursor():new( pQBitmap, pQBitmapAsMask, [ nHotX = -1 ], [ nHotY = -1 ] )
|
||||
oCursor := QCursor():new( pQPixmap, nHotX, [ nHotY = -1 ] )
|
||||
|
||||
/* TODO
|
||||
* oCursor := QCursor():new( pQCursor )
|
||||
*/
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <qpixmap.h>
|
||||
#include <QtGui/QCursor>
|
||||
@@ -77,7 +89,46 @@ New =
|
||||
*/
|
||||
HB_FUNC( QT_QCURSOR )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( ( Qt::CursorShape ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), -1, -1 ) );
|
||||
|
||||
#if 0 /* TODO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QPixmap" )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), -1, -1 ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QCursor" )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QCursor( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QBitmap( 1 ), *hbqt_par_QBitmap( 2 ),
|
||||
HB_ISNUM( 3 ) ? hb_parni( 3 ) : -1,
|
||||
HB_ISNUM( 4 ) ? hb_parni( 4 ) : -1 ) );
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor( *hbqt_par_QPixmap( 1 ), hb_parni( 2 ),
|
||||
HB_ISNUM( 3 ) ? hb_parni( 3 ) : -1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QCursor* ) new QCursor() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
|
||||
@@ -55,10 +55,16 @@
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
Type = Core
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oIcon := QIcon():new()
|
||||
oIcon := QIcon():new( cFileName )
|
||||
oIcon := QIcon():new( pQPixmap )
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QIcon>
|
||||
|
||||
@@ -78,6 +84,10 @@ HB_FUNC( QT_QICON )
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon( hbqt_par_QString( 1 ) ) );
|
||||
}
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon( *hbqt_par_QPixmap( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QIcon* ) new QIcon() );
|
||||
|
||||
@@ -56,10 +56,17 @@
|
||||
|
||||
<CLASS>
|
||||
Inherits =
|
||||
Type = Core
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oPalette := QPalette():new()
|
||||
oPalette := QPalette():new( nQt_color )
|
||||
oPalette := QPalette():new( pQPalette )
|
||||
oPalette := QPalette():new( pQColorButton, pQColorWindow )
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QPalette>
|
||||
|
||||
@@ -75,24 +82,17 @@ New =
|
||||
*/
|
||||
HB_FUNC( QT_QPALETTE )
|
||||
{
|
||||
if( hb_pcount() >= 2 )
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette() );
|
||||
hb_retptr( ( QPalette* ) new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 )
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
if( HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( ( Qt::GlobalColor ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette() );
|
||||
}
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QPalette( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 2 && HB_ISPOINTER( 1 ) && HB_ISPOINTER( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QPalette* ) new QPalette( *hbqt_par_QColor( 1 ), *hbqt_par_QColor( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -55,9 +55,23 @@
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
New =
|
||||
New =
|
||||
Type = PlainObject
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oPen := QPen():new()
|
||||
oPen := QPen():new( nQt_PenStyle )
|
||||
oPen := QPen():new( pQColor )
|
||||
oPen := QPen():new( pQBrush, nWidth, [ nQt_PenStyle = Qt_SolidLine ], ;
|
||||
[ nQt_CapStyle = Qt_SquareCap ], ;
|
||||
[ nQt_PenJointStyle = Qt_BevelJoin ] )
|
||||
|
||||
/* TODO
|
||||
* oPen := QPen():new( pQPen )
|
||||
*/
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtGui/QPen>
|
||||
|
||||
@@ -74,8 +88,37 @@ HB_FUNC( QT_QPEN )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen() );
|
||||
hb_retptr( ( QPen* ) new QPen( ( Qt::PenStyle ) hb_parni( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QColor( 1 ) ) );
|
||||
|
||||
#if 0 /* TODO */
|
||||
QString objName = hbqt_par_QObject( 1 )->objectName();
|
||||
|
||||
if( objName == ( QString ) "QColor" )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QColor( 1 ) ) );
|
||||
}
|
||||
else if( objName == ( QString ) "QPen" )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QPen( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if( hb_pcount() >= 2 && HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen( *hbqt_par_QBrush( 1 ), hb_parnd( 2 ),
|
||||
HB_ISNUM( 3 ) ? ( Qt::PenStyle ) hb_parni( 3 ) : Qt::SolidLine,
|
||||
HB_ISNUM( 4 ) ? ( Qt::PenCapStyle ) hb_parni( 4 ) : Qt::SquareCap,
|
||||
HB_ISNUM( 5 ) ? ( Qt::PenJoinStyle ) hb_parni( 5 ) : Qt::BevelJoin
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QPen* ) new QPen() );
|
||||
|
||||
@@ -55,10 +55,15 @@
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
Type = Core
|
||||
New = nWidth, nHeight
|
||||
Type = PlainObject
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<DOC>
|
||||
oSize := QSize():new()
|
||||
oSize := QSize():new( nWidth, nHeight )
|
||||
</DOC>
|
||||
|
||||
<CODE>
|
||||
#include <QtCore/QSize>
|
||||
|
||||
@@ -66,12 +71,17 @@ New = nWidth, nHeight
|
||||
/*
|
||||
* QSize ()
|
||||
* QSize ( int width, int height )
|
||||
* QSize boundedTo ( const QSize & otherSize ) const
|
||||
* QSize expandedTo ( const QSize & otherSize ) const
|
||||
*/
|
||||
HB_FUNC( QT_QSIZE )
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize( hb_parni( 1 ), hb_parni( 2 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_retptr( ( QSize* ) new QSize() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
@@ -91,6 +101,8 @@ void setHeight ( int height )
|
||||
void setWidth ( int width )
|
||||
void transpose ()
|
||||
int width () const
|
||||
QSize boundedTo ( const QSize & otherSize ) const
|
||||
QSize expandedTo ( const QSize & otherSize ) const
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
|
||||
Reference in New Issue
Block a user