diff options
Diffstat (limited to 'src/kernel/qstyle.cpp')
-rw-r--r-- | src/kernel/qstyle.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp index df83f00eb..845c2f150 100644 --- a/src/kernel/qstyle.cpp +++ b/src/kernel/qstyle.cpp @@ -54,7 +54,6 @@ #include <limits.h> - class TQStylePrivate { public: @@ -495,7 +494,7 @@ void TQStyle::unPolish( TQWidget *widget ) { \sa unPolish() */ -void TQStyle::polish( TQStyleControlElementData ceData, ControlElementFlags, void *ptr ) { +void TQStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { if (ceData.widgetObjectTypes.contains("TQWidget")) { // Enable dynamic hide/show of accelerator shortcuts TQWidget* widget = reinterpret_cast<TQWidget*>(ptr); @@ -513,7 +512,7 @@ void TQStyle::polish( TQStyleControlElementData ceData, ControlElementFlags, voi \sa polish() */ -void TQStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags, void *ptr ) { +void TQStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr ) { if (ceData.widgetObjectTypes.contains("TQWidget")) { // Disable dynamic hide/show of accelerator shortcuts TQWidget* widget = reinterpret_cast<TQWidget*>(ptr); @@ -555,7 +554,7 @@ void TQStyle::unPolish( TQApplication *app ) { \sa unPolish() */ -void TQStyle::applicationPolish( TQStyleControlElementData, ControlElementFlags, void * ) { +void TQStyle::applicationPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { // } @@ -571,7 +570,7 @@ void TQStyle::applicationPolish( TQStyleControlElementData, ControlElementFlags, \sa polish() */ -void TQStyle::applicationUnPolish( TQStyleControlElementData, ControlElementFlags, void * ) { +void TQStyle::applicationUnPolish( const TQStyleControlElementData&, ControlElementFlags, void * ) { // } @@ -605,7 +604,7 @@ void TQStyle::polishPopupMenu( TQPopupMenu *pm ) { (\l{TQPopupMenu::setMouseTracking()}) and whether the menu is checkable by default (\l{TQPopupMenu::setCheckable()}). */ -void TQStyle::polishPopupMenu( TQStyleControlElementData, ControlElementFlags, void * ) +void TQStyle::polishPopupMenu( const TQStyleControlElementData&, ControlElementFlags, void * ) { } @@ -909,7 +908,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn void TQStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption& opt) const + \fn void TQStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption& opt) const Draws the style PrimitiveElement \a pe using the painter \a p in the area \a r. Colors are used from the color group \a cg. @@ -1042,7 +1041,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn void TQStyle::drawControl( ControlElement element, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, const TQStyleOption& opt, const TQWidget *widget) const + \fn void TQStyle::drawControl( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, const TQStyleOption& opt, const TQWidget *widget) const Draws the ControlElement \a element using the painter \a p in the area \a r. Colors are used from the color group \a cg. @@ -1201,7 +1200,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn void TQStyle::drawControlMask( ControlElement element, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const + \fn void TQStyle::drawControlMask( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const Draw a bitmask for the ControlElement \a element using the painter \a p in the area \a r. See drawControl() for an explanation of the @@ -1274,7 +1273,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn TQRect TQStyle::subRect( SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const; + \fn TQRect TQStyle::subRect( SubRect subrect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const; Returns the sub-area \a subrect for the \a widget in logical coordinates. @@ -1406,7 +1405,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn void TQStyle::drawComplexControl( ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, SCFlags sub, SCFlags subActive, const TQStyleOption& opt, const TQWidget *widget ) const + \fn void TQStyle::drawComplexControl( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags how, SCFlags sub, SCFlags subActive, const TQStyleOption& opt, const TQWidget *widget ) const Draws the ComplexControl \a control using the painter \a p in the area \a r. Colors are used from the color group \a cg. The \a sub @@ -1504,7 +1503,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn void TQStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const + \fn void TQStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& opt, const TQWidget *widget) const Draw a bitmask for the ComplexControl \a control using the painter \a p in the area \a r. See drawComplexControl() for an explanation @@ -1524,7 +1523,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn TQRect TQStyle::querySubControlMetrics( ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl subcontrol, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + \fn TQRect TQStyle::querySubControlMetrics( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl subcontrol, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; Returns the rect for the SubControl \a subcontrol for \a widget in logical coordinates. @@ -1546,7 +1545,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn SubControl TQStyle::querySubControl( ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQPoint &pos, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + \fn SubControl TQStyle::querySubControl( ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; Returns the SubControl for \a widget at the point \a pos. The \a widget argument is a pointer to a TQWidget or one of its @@ -1672,7 +1671,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn int TQStyle::pixelMetric( PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; + \fn int TQStyle::pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; Returns the pixel metric for \a metric. @@ -1734,7 +1733,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn TQSize TQStyle::sizeFromContents( ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &contentsSize, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + \fn TQSize TQStyle::sizeFromContents( ContentsType contents, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &contentsSize, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; Returns the size of \a widget based on the contents size \a contentsSize. @@ -1924,7 +1923,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn int TQStyle::styleHint( StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn *returnData = 0, const TQWidget *widget = 0 ) const; + \fn int TQStyle::styleHint( StyleHint stylehint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn *returnData = 0, const TQWidget *widget = 0 ) const; Returns the style hint \a stylehint for \a widget. Currently, \a widget, \a opt, and \a returnData are unused; they're included to @@ -1971,7 +1970,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, */ /*! - \fn TQPixmap TQStyle::stylePixmap( StylePixmap stylepixmap, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + \fn TQPixmap TQStyle::stylePixmap( StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const; Returns a pixmap for \a stylepixmap. @@ -2011,7 +2010,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r, function is provided to aid style implementors in supporting right-to-left mode. - Note that this function is deprecated in favor of visualRect( const TQRect &logical, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags ); + Note that this function is deprecated in favor of visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); \sa TQApplication::reverseLayout() */ @@ -2023,7 +2022,7 @@ TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ) } /*! - \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags ); + \fn TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ); Returns the rect \a logical in screen coordinates. The bounding rect for the widget described by \a ceData and \a elementFlags @@ -2033,7 +2032,7 @@ TQRect TQStyle::visualRect( const TQRect &logical, const TQWidget *w ) \sa TQApplication::reverseLayout() */ -TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags ) +TQRect TQStyle::visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags ) { Q_UNUSED(elementFlags) @@ -2065,15 +2064,15 @@ TQRect TQStyle::visualRect( const TQRect &logical, const TQRect &boundingRect ) } /*! - \fn void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + \fn void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); Intercepts events generated by \a source and sends them to \a handler via - the bool TQStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) virtual method. + the bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) virtual method. \sa void TQStyle::removeObjectEventHandler( TQObject* source, TQStyle* handler ) - \sa bool TQStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) + \sa bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) */ -void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { +void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { bool cbret = false; if (m_eventHandlerInstallationHook) { cbret = (*m_eventHandlerInstallationHook)(ceData, elementFlags, source, handler); @@ -2090,13 +2089,13 @@ void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, Contr } /*! - \fn void TQStyle::removeObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); + \fn void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ); Stops intercepting events generated by \a source. - \sa void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ -void TQStyle::removeObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { +void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) { bool cbret = false; if (m_eventHandlerRemovalHook) { cbret = (*m_eventHandlerRemovalHook)(ceData, elementFlags, source, handler); @@ -2117,9 +2116,9 @@ void TQStyle::removeObjectEventHandler( TQStyleControlElementData ceData, Contro Sets a callback function \a hook which will be called whenever a new intercept request is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - \sa void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook ) { m_eventHandlerInstallationHook = hook; @@ -2130,24 +2129,24 @@ void TQStyle::setEventHandlerInstallationHook( EventHandlerInstallationHook hook Sets a callback function \a hook which will be called whenever a new intercept deactivation request is made via the TQStyle::removeObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - \sa void TQStyle::removeObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ void TQStyle::setEventHandlerRemovalHook( EventHandlerRemovalHook hook ) { m_eventHandlerRemovalHook = hook; } /*! - \fn bool TQStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); + \fn bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); Override this virtual function to intercept events requested by a previous call to TQStyle::installObjectEventHandler. - \sa void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) - \sa void TQStyle::removeObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ -bool TQStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) { +bool TQStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ) { Q_UNUSED(ceData); Q_UNUSED(elementFlags); Q_UNUSED(source); @@ -2193,20 +2192,20 @@ bool TQStyle::eventFilter(TQObject *o, TQEvent *e) { Sets a callback function \a hook which will be called whenever a new widget action request is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - \sa void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ) { m_widgetActionRequestHook = hook; } /*! - \fn bool widgetActionRequestHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request ); + \fn bool widgetActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request ); Handles widget action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. */ -bool TQStyle::widgetActionRequest( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) { +bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) { bool cbret = false; if (m_widgetActionRequestHook) { cbret = (*m_widgetActionRequestHook)(ceData, elementFlags, source, request, requestData); @@ -2327,20 +2326,20 @@ bool TQStyle::widgetActionRequest( TQStyleControlElementData ceData, ControlElem Sets a callback function \a hook which will be called whenever a new application action request is made via the TQStyle::installObjectEventHandler method. The callback function must - use this definition: bool callbackFunction( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). + use this definition: bool callbackFunction( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ). - \sa void TQStyle::installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) + \sa void TQStyle::installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler ) */ void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook ) { m_applicationActionRequestHook = hook; } /*! - \fn bool applicationActionRequestHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request ); + \fn bool applicationActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request ); Handles application action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing. */ -bool TQStyle::applicationActionRequest( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) { +bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) { bool cbret = false; if (m_applicationActionRequestHook) { cbret = (*m_applicationActionRequestHook)(ceData, elementFlags, source, request, requestData); @@ -2609,6 +2608,7 @@ TQPixmap TQStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOp */ TQStyleControlElementData::TQStyleControlElementData() { + isNull = true; activePainter = 0; tickMarkSetting = 0; comboBoxLineEditFlags = 0; |