diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-12-22 03:18:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-12-22 03:18:11 -0600 |
commit | 523c1fd99e9ba466064edfc235104ec5190e5ca3 (patch) | |
tree | 7cc06d8420c780ebd59197897f7ec096b361d9dc /src/kernel/qstyle.cpp | |
parent | d55c0cef4d3956a0c9d476bb06b4544ec702cd49 (diff) | |
download | tqt3-523c1fd99e9ba466064edfc235104ec5190e5ca3.tar.gz tqt3-523c1fd99e9ba466064edfc235104ec5190e5ca3.zip |
Automated update from Qt3
Diffstat (limited to 'src/kernel/qstyle.cpp')
-rw-r--r-- | src/kernel/qstyle.cpp | 78 |
1 files changed, 42 insertions, 36 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp index 5dd32a267..189a97575 100644 --- a/src/kernel/qstyle.cpp +++ b/src/kernel/qstyle.cpp @@ -637,8 +637,8 @@ TQStyle::~TQStyle() \sa unPolish() */ void TQStyle::polish( TQWidget *widget ) { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - polish(ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + polish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); } /*! @@ -652,8 +652,8 @@ void TQStyle::polish( TQWidget *widget ) { \sa polish() */ void TQStyle::unPolish( TQWidget *widget ) { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - unPolish(ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + unPolish(ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); } /*! @@ -715,8 +715,8 @@ void TQStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementF \sa unPolish() */ void TQStyle::polish( TQApplication *app ) { - TQStyleControlElementData ceData = populateControlElementDataFromApplication(app, TQStyleOption()); - applicationPolish(ceData, getControlElementFlagsForObject(app, ceData.widgetObjectTypes, TQStyleOption()), app); + const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); + applicationPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); } /*! @@ -727,8 +727,8 @@ void TQStyle::polish( TQApplication *app ) { \sa polish() */ void TQStyle::unPolish( TQApplication *app ) { - TQStyleControlElementData ceData = populateControlElementDataFromApplication(app, TQStyleOption()); - applicationUnPolish(ceData, getControlElementFlagsForObject(app, ceData.widgetObjectTypes, TQStyleOption()), app); + const TQStyleControlElementData &ceData = populateControlElementDataFromApplication(app, TQStyleOption()); + applicationUnPolish(ceData, getControlElementFlagsForObject(app, TQStyleOption()), app); } /*! @@ -782,8 +782,8 @@ void TQStyle::polish( TQPalette&) checkable by default (\l{TQPopupMenu::setCheckable()}). */ void TQStyle::polishPopupMenu( TQPopupMenu *pm ) { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(pm, TQStyleOption()); - unPolish(ceData, getControlElementFlagsForObject(pm, ceData.widgetObjectTypes, TQStyleOption()), pm); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(pm, TQStyleOption()); + unPolish(ceData, getControlElementFlagsForObject(pm, TQStyleOption()), pm); } /*! @@ -2351,14 +2351,16 @@ bool TQStyle::eventFilter(TQObject *o, TQEvent *e) { if (m_objectEventSourceToHandlerMap.contains(o)) { TQStyle* handler = m_objectEventSourceToHandlerMap[o]; - TQStyleControlElementData ceData = m_objectEventSourceDataToHandlerMap[o]; + const TQStyleControlElementData &ceData = m_objectEventSourceDataToHandlerMap[o]; ControlElementFlags elementFlags = m_objectEventSourceFlagsToHandlerMap[o]; bool ret; TQWidget* w = dynamic_cast<TQWidget*>(o); if ((w) && (e->type() == TQEvent::Paint)) { TQPainter p(w); - ceData.activePainter = &p; + TQPainter* activePainterOrig = ceData.activePainter; + const_cast<TQStyleControlElementData&>(ceData).activePainter = &p; ret = handler->objectEventHandler(ceData, elementFlags, o, e); + const_cast<TQStyleControlElementData&>(ceData).activePainter = activePainterOrig; } else { ret = handler->objectEventHandler(ceData, elementFlags, o, e); @@ -2638,8 +2640,8 @@ void TQStyle::drawPrimitive( PrimitiveElement pe, } } - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - drawPrimitive(pe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawPrimitive(pe, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, opt); } void TQStyle::drawControl( ControlElement element, @@ -2657,8 +2659,8 @@ void TQStyle::drawControl( ControlElement element, } #endif - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - drawControl(element, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), r, cg, flags, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawControl(element, p, ceData, getControlElementFlagsForObject(widget, opt), r, cg, flags, opt, widget); } void TQStyle::drawControlMask( ControlElement control, @@ -2667,8 +2669,8 @@ void TQStyle::drawControlMask( ControlElement control, const TQRect &r, const TQStyleOption& opt ) const { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - drawControlMask(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), r, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawControlMask(control, p, ceData, getControlElementFlagsForObject(widget, opt), r, opt, widget); } TQRect TQStyle::subRect(SubRect r, const TQWidget *widget) const @@ -2680,8 +2682,8 @@ TQRect TQStyle::subRect(SubRect r, const TQWidget *widget) const } #endif - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - return subRect(r, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); + return subRect(r, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); } void TQStyle::drawComplexControl( ComplexControl control, @@ -2701,8 +2703,8 @@ void TQStyle::drawComplexControl( ComplexControl control, } #endif - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - drawComplexControl(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, controls, active, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawComplexControl(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, cg, flags, controls, active, opt, widget); } void TQStyle::drawComplexControlMask( ComplexControl control, @@ -2711,8 +2713,8 @@ void TQStyle::drawComplexControlMask( ComplexControl control, const TQRect &r, const TQStyleOption& opt ) const { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - drawComplexControlMask(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + drawComplexControlMask(control, p, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), r, opt, widget); } TQRect TQStyle::querySubControlMetrics( ComplexControl control, @@ -2727,8 +2729,8 @@ TQRect TQStyle::querySubControlMetrics( ComplexControl control, } #endif - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt, false); - return querySubControlMetrics(control, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), sc, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt, false); + return querySubControlMetrics(control, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), sc, opt, widget); } TQStyle::SubControl TQStyle::querySubControl(ComplexControl control, @@ -2736,14 +2738,14 @@ TQStyle::SubControl TQStyle::querySubControl(ComplexControl control, const TQPoint &pos, const TQStyleOption& opt ) const { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - return querySubControl(control, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), pos, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + return querySubControl(control, ceData, getControlElementFlagsForObject(widget, opt), pos, opt, widget); } int TQStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - return pixelMetric(m, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, TQStyleOption(), false); + return pixelMetric(m, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), widget); } TQSize TQStyle::sizeFromContents(ContentsType contents, @@ -2760,8 +2762,8 @@ TQSize TQStyle::sizeFromContents(ContentsType contents, } #endif - TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt); - return sizeFromContents(contents, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), contentsSize, opt, widget); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(widget, opt); + return sizeFromContents(contents, ceData, getControlElementFlagsForObject(widget, TQStyleOption()), contentsSize, opt, widget); } int TQStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption &so, TQStyleHintReturn *shr) const @@ -2770,14 +2772,14 @@ int TQStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption &so if (sh == SH_Widget_ShareActivation) { ceDataNotNeeded = true; } - TQStyleControlElementData ceData = populateControlElementDataFromWidget(w, so, false, ceDataNotNeeded); - return styleHint(sh, ceData, getControlElementFlagsForObject(w, ceData.widgetObjectTypes, TQStyleOption(), false), so, shr, w); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so, false, ceDataNotNeeded); + return styleHint(sh, ceData, getControlElementFlagsForObject(w, TQStyleOption(), false), so, shr, w); } TQPixmap TQStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOption &so) const { - TQStyleControlElementData ceData = populateControlElementDataFromWidget(w, so); - return stylePixmap(sp, ceData, getControlElementFlagsForObject(w, ceData.widgetObjectTypes, TQStyleOption()), so, w); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(w, so); + return stylePixmap(sp, ceData, getControlElementFlagsForObject(w, TQStyleOption()), so, w); } /*! @@ -2830,4 +2832,8 @@ TQStyleControlElementData::TQStyleControlElementData() { topLevelWidgetFlags = 0; } +TQStyleControlElementData::~TQStyleControlElementData() { + // +} + #endif // QT_NO_STYLE |