diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9fcc5e4760..5abf399ed0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-28 18:23 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/doc/en/class_qpainter.txt + * contrib/hbqt/qtgui/g/QPainter.cpp + * contrib/hbqt/qtgui/g/TQPainter.prg + * contrib/hbqt/qtgui/qth/QPainter.qth + + * contrib/hbide/hbqreportsmanager.prg + ! Few optimizations. + 2010-09-28 17:17 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/tests/testbrow.prg ! Adopted to latest changes. diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index 760d28b696..6a8de0c2fd 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -2634,12 +2634,12 @@ METHOD HqrGraphicsItem:drawChart( qPainter, qRect ) ENDIF rc := rc:adjusted( 0, nFHeight / 2, 0, 0 ) - x := m_barsIdentation + x := m_barsIdentation barWidth := ( rc:width() - m_barsIdentation * ( len( ::xData ) + 1 ) ) / len( ::xData ) py := maxHeight / maxVal FOR EACH cv IN ::xData - lg := QLinearGradient( QPointF( x + barWidth / 2, 0 ), QPointF( x + barWidth, 0 ) ) + lg := QLinearGradient( QPointF( x + barWidth / 2, 0.0 ), QPointF( x + barWidth, 0.0 ) ) // lg:setSpread( QGradient_ReflectSpread ) lg:setColorAt( 0, cv[ 3 ] ) diff --git a/harbour/contrib/hbqt/qtgui/doc/en/class_qpainter.txt b/harbour/contrib/hbqt/qtgui/doc/en/class_qpainter.txt index 16e7ec5b27..d79e0c6df7 100644 --- a/harbour/contrib/hbqt/qtgui/doc/en/class_qpainter.txt +++ b/harbour/contrib/hbqt/qtgui/doc/en/class_qpainter.txt @@ -133,17 +133,14 @@ * :eraseRect_2( nX, nY, nWidth, nHeight ) -> NIL * :fillPath( pPath, pBrush ) -> NIL * :fillRect( pRectangle, pBrush ) -> NIL - * :fillRect_1( pRectangle, pColor ) -> NIL - * :fillRect_2( pRectangle, nColor ) -> NIL - * :fillRect_3( pRectangle, pBrush ) -> NIL - * :fillRect_4( pRectangle, pColor ) -> NIL - * :fillRect_5( pRectangle, nColor ) -> NIL - * :fillRect_6( nX, nY, nWidth, nHeight, pBrush ) -> NIL - * :fillRect_7( nX, nY, nWidth, nHeight, pColor ) -> NIL - * :fillRect_8( nX, nY, nWidth, nHeight, nColor ) -> NIL - * :fillRect_9( pRectangle, nStyle ) -> NIL - * :fillRect_10( pRectangle, nStyle ) -> NIL - * :fillRect_11( nX, nY, nWidth, nHeight, nStyle ) -> NIL + * :fillRect_1( pRectangle, pBrush ) -> NIL + * :fillRect_2( pRectangle, pColor ) -> NIL + * :fillRect_3( pRectangle, pColor ) -> NIL + * :fillRect_4( nX, nY, nWidth, nHeight, pBrush ) -> NIL + * :fillRect_5( nX, nY, nWidth, nHeight, pColor ) -> NIL + * :fillRect_6( nX, nY, nWidth, nHeight, nColor ) -> NIL + * :fillRect_7( pRectangle, nColor ) -> NIL + * :fillRect_8( pRectangle, nColor ) -> NIL * :font() -> pQFont * :fontInfo() -> pQFontInfo * :fontMetrics() -> pQFontMetrics diff --git a/harbour/contrib/hbqt/qtgui/g/QPainter.cpp b/harbour/contrib/hbqt/qtgui/g/QPainter.cpp index eeb6263851..92746accc2 100644 --- a/harbour/contrib/hbqt/qtgui/g/QPainter.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QPainter.cpp @@ -105,7 +105,7 @@ */ /* - * Constructed[ 182/188 [ 96.81% ] ] + * Constructed[ 179/185 [ 96.76% ] ] * * *** Unconvered Prototypes *** * @@ -118,22 +118,9 @@ * * *** Commented out protostypes *** * - * // - * // NOT IMPLEMENTED - * // - * // original order - * // void fillRect ( const QRectF & rectangle, const QBrush & brush ) - * // void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) - * // void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) - * // void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) - * // void fillRect ( const QRect & rectangle, const QBrush & brush ) - * // void fillRect ( const QRect & rectangle, const QColor & color ) - * // void fillRect ( const QRectF & rectangle, const QColor & color ) - * // void fillRect ( int x, int y, int width, int height, const QBrush & brush ) - * // void fillRect ( int x, int y, int width, int height, const QColor & color ) - * // void fillRect ( int x, int y, int width, int height, Qt::GlobalColor color ) - * // void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) - * // void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) + * //void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) + * //void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) + * //void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) */ #include @@ -1522,34 +1509,10 @@ HB_FUNC( QT_QPAINTER_FILLRECT ) } } -/* - * void fillRect ( const QRectF & rectangle, const QColor & color ) - */ -HB_FUNC( QT_QPAINTER_FILLRECT_1 ) -{ - QPainter * p = hbqt_par_QPainter( 1 ); - if( p ) - { - ( p )->fillRect( *hbqt_par_QRectF( 2 ), *hbqt_par_QColor( 3 ) ); - } -} - -/* - * void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) - */ -HB_FUNC( QT_QPAINTER_FILLRECT_2 ) -{ - QPainter * p = hbqt_par_QPainter( 1 ); - if( p ) - { - ( p )->fillRect( *hbqt_par_QRectF( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); - } -} - /* * void fillRect ( const QRect & rectangle, const QBrush & brush ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_3 ) +HB_FUNC( QT_QPAINTER_FILLRECT_1 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) @@ -1561,7 +1524,7 @@ HB_FUNC( QT_QPAINTER_FILLRECT_3 ) /* * void fillRect ( const QRect & rectangle, const QColor & color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_4 ) +HB_FUNC( QT_QPAINTER_FILLRECT_2 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) @@ -1571,21 +1534,21 @@ HB_FUNC( QT_QPAINTER_FILLRECT_4 ) } /* - * void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) + * void fillRect ( const QRectF & rectangle, const QColor & color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_5 ) +HB_FUNC( QT_QPAINTER_FILLRECT_3 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) { - ( p )->fillRect( *hbqt_par_QRect( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); + ( p )->fillRect( *hbqt_par_QRectF( 2 ), *hbqt_par_QColor( 3 ) ); } } /* * void fillRect ( int x, int y, int width, int height, const QBrush & brush ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_6 ) +HB_FUNC( QT_QPAINTER_FILLRECT_4 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) @@ -1597,7 +1560,7 @@ HB_FUNC( QT_QPAINTER_FILLRECT_6 ) /* * void fillRect ( int x, int y, int width, int height, const QColor & color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_7 ) +HB_FUNC( QT_QPAINTER_FILLRECT_5 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) @@ -1609,7 +1572,7 @@ HB_FUNC( QT_QPAINTER_FILLRECT_7 ) /* * void fillRect ( int x, int y, int width, int height, Qt::GlobalColor color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_8 ) +HB_FUNC( QT_QPAINTER_FILLRECT_6 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) @@ -1619,38 +1582,26 @@ HB_FUNC( QT_QPAINTER_FILLRECT_8 ) } /* - * void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) + * void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_9 ) +HB_FUNC( QT_QPAINTER_FILLRECT_7 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) { - ( p )->fillRect( *hbqt_par_QRectF( 2 ), ( Qt::BrushStyle ) hb_parni( 3 ) ); + ( p )->fillRect( *hbqt_par_QRect( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); } } /* - * void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) + * void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_10 ) +HB_FUNC( QT_QPAINTER_FILLRECT_8 ) { QPainter * p = hbqt_par_QPainter( 1 ); if( p ) { - ( p )->fillRect( *hbqt_par_QRect( 2 ), ( Qt::BrushStyle ) hb_parni( 3 ) ); - } -} - -/* - * void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) - */ -HB_FUNC( QT_QPAINTER_FILLRECT_11 ) -{ - QPainter * p = hbqt_par_QPainter( 1 ); - if( p ) - { - ( p )->fillRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( Qt::BrushStyle ) hb_parni( 6 ) ); + ( p )->fillRect( *hbqt_par_QRectF( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); } } diff --git a/harbour/contrib/hbqt/qtgui/g/TQPainter.prg b/harbour/contrib/hbqt/qtgui/g/TQPainter.prg index f42937a690..4c1681b2f0 100644 --- a/harbour/contrib/hbqt/qtgui/g/TQPainter.prg +++ b/harbour/contrib/hbqt/qtgui/g/TQPainter.prg @@ -951,18 +951,13 @@ METHOD QPainter:fillRect( ... ) CASE 5 DO CASE CASE hb_isNumeric( hb_pvalue( 1 ) ) .AND. hb_isNumeric( hb_pvalue( 2 ) ) .AND. hb_isNumeric( hb_pvalue( 3 ) ) .AND. hb_isNumeric( hb_pvalue( 4 ) ) .AND. hb_isNumeric( hb_pvalue( 5 ) ) - SWITCH __objGetClsName( hb_pvalue( 5 ) ) - CASE "QT::GLOBALCOLOR" - RETURN Qt_QPainter_fillRect_8( ::pPtr, ... ) - CASE "QT::BRUSHSTYLE" - RETURN Qt_QPainter_fillRect_11( ::pPtr, ... ) - ENDSWITCH + RETURN Qt_QPainter_fillRect_6( ::pPtr, ... ) CASE hb_isNumeric( hb_pvalue( 1 ) ) .AND. hb_isNumeric( hb_pvalue( 2 ) ) .AND. hb_isNumeric( hb_pvalue( 3 ) ) .AND. hb_isNumeric( hb_pvalue( 4 ) ) .AND. hb_isObject( hb_pvalue( 5 ) ) SWITCH __objGetClsName( hb_pvalue( 5 ) ) CASE "QBRUSH" - RETURN Qt_QPainter_fillRect_6( ::pPtr, ... ) + RETURN Qt_QPainter_fillRect_4( ::pPtr, ... ) CASE "QCOLOR" - RETURN Qt_QPainter_fillRect_7( ::pPtr, ... ) + RETURN Qt_QPainter_fillRect_5( ::pPtr, ... ) ENDSWITCH ENDCASE EXIT @@ -971,23 +966,19 @@ METHOD QPainter:fillRect( ... ) CASE hb_isObject( hb_pvalue( 1 ) ) .AND. hb_isNumeric( hb_pvalue( 2 ) ) SWITCH __objGetClsName( hb_pvalue( 1 ) ) CASE "QRECTF" - RETURN Qt_QPainter_fillRect_2( ::pPtr, ... ) + RETURN Qt_QPainter_fillRect_8( ::pPtr, ... ) CASE "QRECT" - RETURN Qt_QPainter_fillRect_5( ::pPtr, ... ) - CASE "QRECT" - RETURN Qt_QPainter_fillRect_10( ::pPtr, ... ) - CASE "QRECTF" - RETURN Qt_QPainter_fillRect_9( ::pPtr, ... ) + RETURN Qt_QPainter_fillRect_7( ::pPtr, ... ) ENDSWITCH CASE hb_isObject( hb_pvalue( 1 ) ) .AND. hb_isObject( hb_pvalue( 2 ) ) SWITCH __objGetClsName( hb_pvalue( 1 ) ) CASE "QRECT" - RETURN Qt_QPainter_fillRect_4( ::pPtr, ... ) - CASE "QRECTF" RETURN Qt_QPainter_fillRect_1( ::pPtr, ... ) CASE "QRECTF" RETURN Qt_QPainter_fillRect( ::pPtr, ... ) CASE "QRECT" + RETURN Qt_QPainter_fillRect_2( ::pPtr, ... ) + CASE "QRECTF" RETURN Qt_QPainter_fillRect_3( ::pPtr, ... ) ENDSWITCH ENDCASE diff --git a/harbour/contrib/hbqt/qtgui/qth/QPainter.qth b/harbour/contrib/hbqt/qtgui/qth/QPainter.qth index 8b18816f47..06c17d42f3 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QPainter.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QPainter.qth @@ -227,33 +227,17 @@ void eraseRect ( int x, int y, int width, int height ) void fillPath ( const QPainterPath & path, const QBrush & brush ) void fillRect ( const QRectF & rectangle, const QBrush & brush ) -void fillRect ( const QRectF & rectangle, const QColor & color ) -void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) +//void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) +//void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) +//void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) void fillRect ( const QRect & rectangle, const QBrush & brush ) void fillRect ( const QRect & rectangle, const QColor & color ) -void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) +void fillRect ( const QRectF & rectangle, const QColor & color ) void fillRect ( int x, int y, int width, int height, const QBrush & brush ) void fillRect ( int x, int y, int width, int height, const QColor & color ) void fillRect ( int x, int y, int width, int height, Qt::GlobalColor color ) -// -// NOT IMPLEMENTED -void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) -void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) -void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) -// -// original order -// void fillRect ( const QRectF & rectangle, const QBrush & brush ) -// void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) -// void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) -// void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) -// void fillRect ( const QRect & rectangle, const QBrush & brush ) -// void fillRect ( const QRect & rectangle, const QColor & color ) -// void fillRect ( const QRectF & rectangle, const QColor & color ) -// void fillRect ( int x, int y, int width, int height, const QBrush & brush ) -// void fillRect ( int x, int y, int width, int height, const QColor & color ) -// void fillRect ( int x, int y, int width, int height, Qt::GlobalColor color ) -// void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) -// void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) +void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) +void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) const QFont & font () const QFontInfo fontInfo () const