summaryrefslogtreecommitdiffstats
path: root/src/styles
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-08 17:42:40 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-08 17:42:40 -0500
commitb6053b1b40b51e3d9b1b679a8a1751e5472e06e2 (patch)
treea327afc6092b7c368e80e6b79dccbfd80a1567b3 /src/styles
parent43db215f601fd50f1fd8b502fae30c75c1bdee4a (diff)
downloadtqt3-b6053b1b40b51e3d9b1b679a8a1751e5472e06e2.tar.gz
tqt3-b6053b1b40b51e3d9b1b679a8a1751e5472e06e2.zip
Automated update from Qt3
Diffstat (limited to 'src/styles')
-rw-r--r--src/styles/ntqcommonstyle.h90
-rw-r--r--src/styles/ntqmotifstyle.h2
-rw-r--r--src/styles/ntqwindowsstyle.h2
-rw-r--r--src/styles/qcommonstyle.cpp208
-rw-r--r--src/styles/qmotifstyle.cpp7
-rw-r--r--src/styles/qwindowsstyle.cpp7
6 files changed, 36 insertions, 280 deletions
diff --git a/src/styles/ntqcommonstyle.h b/src/styles/ntqcommonstyle.h
index ed02fe418..8fe9ecfa1 100644
--- a/src/styles/ntqcommonstyle.h
+++ b/src/styles/ntqcommonstyle.h
@@ -55,15 +55,6 @@ public:
TQCommonStyle();
~TQCommonStyle();
- // Old API
- // DEPRECATED
- void drawPrimitive( PrimitiveElement pe,
- TQPainter *p,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
void drawPrimitive( PrimitiveElement pe,
TQPainter *p,
@@ -74,16 +65,6 @@ public:
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- // Old API
- // DEPRECATED
- void drawControl( ControlElement element,
- TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags how = Style_Default,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
void drawControl( ControlElement element,
TQPainter *p,
@@ -95,14 +76,6 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- void drawControlMask( ControlElement element,
- TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
void drawControlMask( ControlElement element,
TQPainter *p,
@@ -112,29 +85,9 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- TQRect subRect( SubRect r, const TQWidget *widget ) const;
-
// New API
TQRect subRect( SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const;
- // Old API
- // DEPRECATED
- void drawComplexControl( ComplexControl control,
- TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags how = Style_Default,
-#ifdef Q_QDOC
- SCFlags sub = SC_All,
-#else
- SCFlags sub = (uint)SC_All,
-#endif
- SCFlags subActive = SC_None,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
void drawComplexControl( ComplexControl control,
TQPainter *p,
@@ -152,14 +105,6 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- void drawComplexControlMask( ComplexControl control,
- TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
void drawComplexControlMask( ComplexControl control,
TQPainter *p,
@@ -169,13 +114,6 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- TQRect querySubControlMetrics( ComplexControl control,
- const TQWidget *widget,
- SubControl sc,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
TQRect querySubControlMetrics( ComplexControl control,
TQStyleControlElementData ceData,
@@ -184,13 +122,6 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- SubControl querySubControl( ComplexControl control,
- const TQWidget *widget,
- const TQPoint &pos,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
SubControl querySubControl( ComplexControl control,
TQStyleControlElementData ceData,
@@ -199,20 +130,9 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const;
-
// New API
int pixelMetric( PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- TQSize sizeFromContents( ContentsType s,
- const TQWidget *widget,
- const TQSize &contentsSize,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
TQSize sizeFromContents( ContentsType s,
TQStyleControlElementData ceData,
@@ -221,19 +141,9 @@ public:
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
- // Old API
- // DEPRECATED
- int styleHint(StyleHint sh, const TQWidget *, const TQStyleOption &, TQStyleHintReturn *) const;
-
// New API
int styleHint(StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &, TQStyleHintReturn *, const TQWidget * w) const;
- // Old API
- // DEPRECATED
- TQPixmap stylePixmap( StylePixmap sp,
- const TQWidget *widget = 0,
- const TQStyleOption& = TQStyleOption::Default ) const;
-
// New API
TQPixmap stylePixmap( StylePixmap sp,
TQStyleControlElementData ceData,
diff --git a/src/styles/ntqmotifstyle.h b/src/styles/ntqmotifstyle.h
index 9b9d3650d..ec55406cc 100644
--- a/src/styles/ntqmotifstyle.h
+++ b/src/styles/ntqmotifstyle.h
@@ -70,7 +70,7 @@ public:
void polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
void applicationPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
- void polishPopupMenu( TQPopupMenu* );
+ void polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
// new style API
void drawPrimitive( PrimitiveElement pe,
diff --git a/src/styles/ntqwindowsstyle.h b/src/styles/ntqwindowsstyle.h
index d626c3e3c..7220eacef 100644
--- a/src/styles/ntqwindowsstyle.h
+++ b/src/styles/ntqwindowsstyle.h
@@ -69,7 +69,7 @@ public:
void polish( TQPalette & );
- virtual void polishPopupMenu( TQPopupMenu* );
+ virtual void polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
// new stuff
void drawPrimitive( PrimitiveElement pe,
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp
index 20c6c9993..7162c4c0d 100644
--- a/src/styles/qcommonstyle.cpp
+++ b/src/styles/qcommonstyle.cpp
@@ -184,7 +184,6 @@ TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* obj
if (button) {
if (button->isDown()) cef = cef | TQStyle::CEF_IsDown;
if (button->isOn()) cef = cef | TQStyle::CEF_IsOn;
- if (button->isEnabled()) cef = cef | TQStyle::CEF_IsEnabled;
if (button->isToggleButton()) cef = cef | TQStyle::CEF_BiState;
}
}
@@ -223,6 +222,7 @@ TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* obj
// Generic flags
const TQWidget* widget = dynamic_cast<const TQWidget*>(object);
if (widget) {
+ if (widget->isEnabled()) cef = cef | TQStyle::CEF_IsEnabled;
if (widget->parentWidget()) cef = cef | TQStyle::CEF_HasParentWidget;
if (widget->focusProxy()) cef = cef | TQStyle::CEF_HasFocusProxy;
if (widget->hasFocus()) cef = cef | TQStyle::CEF_HasFocus;
@@ -254,6 +254,9 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
ceData.bgBrush = widget->backgroundBrush();
}
ceData.wflags = widget->getWFlags();
+ if (populateReliantFields) {
+ ceData.windowState = (TQt::WindowState)(widget->windowState());
+ }
ceData.bgColor = widget->eraseColor();
ceData.bgOffset = widget->backgroundOffset();
ceData.backgroundMode = widget->backgroundMode();
@@ -419,10 +422,10 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
const TQTitleBar *tb = dynamic_cast<const TQTitleBar*>(widget);
if (tb) {
ceData.titleBarData.hasWindow = !!(tb->window());
- if (ceData.titleBarData.hasWindow) {
- ceData.titleBarData.windowState = tb->window()->windowState();
- }
if (populateReliantFields) {
+ if (ceData.titleBarData.hasWindow) {
+ ceData.titleBarData.windowState = (TQt::WindowState)(tb->window()->windowState());
+ }
ceData.titleBarData.usesActiveColor = tb->usesActiveColor();
}
ceData.titleBarData.visibleText = tb->visibleText();
@@ -455,6 +458,9 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
ceData.viewportData.bgBrush = viewport->backgroundBrush();
}
ceData.viewportData.wflags = viewport->getWFlags();
+ if (populateReliantFields) {
+ ceData.viewportData.windowState = (TQt::WindowState)(widget->windowState());
+ }
ceData.viewportData.bgColor = viewport->eraseColor();
ceData.viewportData.bgOffset = viewport->backgroundOffset();
ceData.viewportData.backgroundMode = viewport->backgroundMode();
@@ -502,6 +508,9 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
ceData.parentWidgetData.bgBrush = parentWidget->backgroundBrush();
}
ceData.parentWidgetData.wflags = parentWidget->getWFlags();
+ if (populateReliantFields) {
+ ceData.parentWidgetData.windowState = (TQt::WindowState)(widget->windowState());
+ }
ceData.parentWidgetData.bgColor = parentWidget->eraseColor();
ceData.parentWidgetData.bgOffset = parentWidget->backgroundOffset();
ceData.parentWidgetData.backgroundMode = parentWidget->backgroundMode();
@@ -531,33 +540,20 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
ceData.dwData.closeEnabled = dw->isCloseEnabled();
}
}
- }
- return ceData;
-}
-
-/*! \reimp */
-void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
- TQPainter *p,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags flags,
- const TQStyleOption& opt ) const
-{
- const TQWidget* widget = 0;
-
- // Determine if the request needs widget information and set widget appropriately
- // FIXME
- if ((pe == PE_CheckListController) || (pe == PE_CheckListExclusiveIndicator) || (pe == PE_CheckListIndicator)) {
TQCheckListItem *item = opt.checkListItem();
if (item) {
- TQListView *lv = item->listView();
- widget = dynamic_cast<TQWidget*>(lv);
+ ceData.checkListItemData.dataValid = true;
+ ceData.checkListItemData.enabled = item->isEnabled();
+ ceData.checkListItemData.hasParent = ( item->parent() && (item->parent()->rtti() == 1) && (((TQCheckListItem*) item->parent())->type() == TQCheckListItem::Controller) );
+ ceData.checkListItemData.height = item->height();
+ }
+ else {
+ ceData.checkListItemData.dataValid = false;
}
}
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- drawPrimitive(pe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt);
+ return ceData;
}
/*! \reimp */
@@ -578,8 +574,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
p->drawPixmap(r, TQPixmap((const char **)check_list_controller_xpm));
break; }
case PE_CheckListExclusiveIndicator: {
- TQCheckListItem *item = opt.checkListItem();
- if(!item)
+ if(!ceData.checkListItemData.dataValid)
return;
int x = r.x(), y = r.y();
#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
@@ -630,8 +625,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
}
break; }
case PE_CheckListIndicator: {
- TQCheckListItem *item = opt.checkListItem();
- if(!item)
+ if(!ceData.checkListItemData.dataValid)
return;
int x = r.x(), y = r.y(), w = r.width(), h = r.width(), marg = ceData.listViewData.itemMargin;
@@ -640,14 +634,10 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
else
p->setPen( TQPen( ceData.palette.color( TQPalette::Disabled, TQColorGroup::Text ),
2 ) );
- bool parentControl = FALSE;
- if ( item->parent() && item->parent()->rtti() == 1 &&
- ((TQCheckListItem*) item->parent())->type() == TQCheckListItem::Controller )
- parentControl = TRUE;
- if ( flags & Style_Selected && !ceData.listViewData.rootDecorated && !parentControl ) {
- p->fillRect( 0, 0, x + marg + w + 4, item->height(),
+ if ( flags & Style_Selected && !ceData.listViewData.rootDecorated && !ceData.checkListItemData.hasParent ) {
+ p->fillRect( 0, 0, x + marg + w + 4, ceData.checkListItemData.height,
cg.brush( TQColorGroup::Highlight ) );
- if ( item->isEnabled() )
+ if ( ceData.checkListItemData.enabled )
p->setPen( TQPen( cg.highlightedText(), 2 ) );
}
@@ -1047,26 +1037,6 @@ void qt_style_erase_region(TQPainter* p, const TQRegion& region, TQStyleControlE
/*! \reimp */
void TQCommonStyle::drawControl( ControlElement element,
TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags flags,
- const TQStyleOption& opt ) const
-{
-#if defined(QT_CHECK_STATE)
- if (!widget) {
- tqWarning("TQCommonStyle::drawControl: widget parameter cannot be zero!");
- return;
- }
-#endif
-
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt);
- drawControl(element, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), r, cg, flags, opt, widget);
-}
-
-/*! \reimp */
-void TQCommonStyle::drawControl( ControlElement element,
- TQPainter *p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
@@ -1544,16 +1514,6 @@ void TQCommonStyle::drawControl( ControlElement element,
activePainter = 0;
}
-void TQCommonStyle::drawControlMask( ControlElement control,
- TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQStyleOption& opt ) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt);
- drawControlMask(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), r, opt, widget);
-}
-
/*! \reimp */
void TQCommonStyle::drawControlMask( ControlElement control,
TQPainter *p,
@@ -1593,20 +1553,6 @@ void TQCommonStyle::drawControlMask( ControlElement control,
}
/*! \reimp */
-TQRect TQCommonStyle::subRect(SubRect r, const TQWidget *widget) const
-{
-#if defined(QT_CHECK_STATE)
- if (! widget) {
- tqWarning("TQCommonStyle::subRect: widget parameter cannot be zero!");
- return TQRect();
- }
-#endif
-
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- return subRect(r, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget);
-}
-
-/*! \reimp */
TQRect TQCommonStyle::subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
{
TQRect rect, wrect(ceData.rect);
@@ -1936,28 +1882,6 @@ static int qPositionFromValue( TQStyleControlElementData ceData, int logical_val
/*! \reimp */
void TQCommonStyle::drawComplexControl( ComplexControl control,
TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQColorGroup &cg,
- SFlags flags,
- SCFlags controls,
- SCFlags active,
- const TQStyleOption& opt ) const
-{
-#if defined(QT_CHECK_STATE)
- if (! widget) {
- tqWarning("TQCommonStyle::drawComplexControl: widget parameter cannot be zero!");
- return;
- }
-#endif
-
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- drawComplexControl(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, controls, active, opt, widget);
-}
-
-/*! \reimp */
-void TQCommonStyle::drawComplexControl( ComplexControl control,
- TQPainter *p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
@@ -2360,17 +2284,6 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
/*! \reimp */
void TQCommonStyle::drawComplexControlMask( ComplexControl control,
TQPainter *p,
- const TQWidget *widget,
- const TQRect &r,
- const TQStyleOption& opt ) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- drawComplexControlMask(control, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, opt, widget);
-}
-
-/*! \reimp */
-void TQCommonStyle::drawComplexControlMask( ComplexControl control,
- TQPainter *p,
const TQStyleControlElementData ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
@@ -2388,23 +2301,6 @@ void TQCommonStyle::drawComplexControlMask( ComplexControl control,
/*! \reimp */
TQRect TQCommonStyle::querySubControlMetrics( ComplexControl control,
- const TQWidget *widget,
- SubControl sc,
- const TQStyleOption &opt ) const
-{
-#if defined(QT_CHECK_STATE)
- if (! widget) {
- tqWarning("TQCommonStyle::querySubControlMetrics: widget parameter cannot be zero!");
- return TQRect();
- }
-#endif
-
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption(), false);
- return querySubControlMetrics(control, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), sc, opt, widget);
-}
-
-/*! \reimp */
-TQRect TQCommonStyle::querySubControlMetrics( ComplexControl control,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
SubControl sc,
@@ -2637,17 +2533,6 @@ TQRect TQCommonStyle::querySubControlMetrics( ComplexControl control,
return TQRect();
}
-
-/*! \reimp */
-TQStyle::SubControl TQCommonStyle::querySubControl(ComplexControl control,
- const TQWidget *widget,
- const TQPoint &pos,
- const TQStyleOption& opt ) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, opt);
- return querySubControl(control, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, opt), pos, opt, widget);
-}
-
/*! \reimp */
TQStyle::SubControl TQCommonStyle::querySubControl(ComplexControl control,
TQStyleControlElementData ceData,
@@ -2724,14 +2609,6 @@ TQStyle::SubControl TQCommonStyle::querySubControl(ComplexControl control,
return ret;
}
-
-/*! \reimp */
-int TQCommonStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- return pixelMetric(m, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), widget);
-}
-
/*! \reimp */
int TQCommonStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
@@ -2954,25 +2831,6 @@ int TQCommonStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData,
/*! \reimp */
TQSize TQCommonStyle::sizeFromContents(ContentsType contents,
- const TQWidget *widget,
- const TQSize &contentsSize,
- const TQStyleOption& opt ) const
-{
- TQSize sz(contentsSize);
-
-#if defined(QT_CHECK_STATE)
- if (! widget) {
- tqWarning("TQCommonStyle::sizeFromContents: widget parameter cannot be zero!");
- return sz;
- }
-#endif
-
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption());
- return sizeFromContents(contents, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), contentsSize, opt, widget);
-}
-
-/*! \reimp */
-TQSize TQCommonStyle::sizeFromContents(ContentsType contents,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQSize &contentsSize,
@@ -3143,13 +3001,6 @@ TQSize TQCommonStyle::sizeFromContents(ContentsType contents,
}
/*! \reimp */
-int TQCommonStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption &so, TQStyleHintReturn *shr) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(w, TQStyleOption(), false);
- return styleHint(sh, ceData, getControlElementFlagsForObject(w, ceData.widgetObjectTypes, TQStyleOption(), false), so, shr, w);
-}
-
-/*! \reimp */
int TQCommonStyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &, TQStyleHintReturn *, const TQWidget * w) const
{
Q_UNUSED(w);
@@ -3233,13 +3084,6 @@ int TQCommonStyle::styleHint(StyleHint sh, TQStyleControlElementData ceData, Con
}
/*! \reimp */
-TQPixmap TQCommonStyle::stylePixmap(StylePixmap sp, const TQWidget *w, const TQStyleOption &so) const
-{
- TQStyleControlElementData ceData = populateControlElementDataFromWidget(w, TQStyleOption());
- return stylePixmap(sp, ceData, getControlElementFlagsForObject(w, ceData.widgetObjectTypes, TQStyleOption()), so, w);
-}
-
-/*! \reimp */
TQPixmap TQCommonStyle::stylePixmap(StylePixmap, TQStyleControlElementData, ControlElementFlags, const TQStyleOption&, const TQWidget *) const
{
return TQPixmap();
diff --git a/src/styles/qmotifstyle.cpp b/src/styles/qmotifstyle.cpp
index 37a5a34cf..b404dc917 100644
--- a/src/styles/qmotifstyle.cpp
+++ b/src/styles/qmotifstyle.cpp
@@ -1907,11 +1907,12 @@ TQRect TQMotifStyle::subRect( SubRect r, TQStyleControlElementData ceData, Contr
/*! \reimp
*/
-void TQMotifStyle::polishPopupMenu( TQPopupMenu* p)
+void TQMotifStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{
#ifndef QT_NO_POPUPMENU
- if ( !p->testWState( WState_Polished ) )
- p->setCheckable( FALSE );
+ if ( !(ceData.windowState & WState_Polished ) ) {
+ widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
+ }
#endif
}
diff --git a/src/styles/qwindowsstyle.cpp b/src/styles/qwindowsstyle.cpp
index 5a1289dca..dae52362f 100644
--- a/src/styles/qwindowsstyle.cpp
+++ b/src/styles/qwindowsstyle.cpp
@@ -1155,11 +1155,12 @@ TQSize TQWindowsStyle::sizeFromContents( ContentsType contents,
/*! \reimp
*/
-void TQWindowsStyle::polishPopupMenu( TQPopupMenu* p)
+void TQWindowsStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{
#ifndef QT_NO_POPUPMENU
- if ( !p->testWState( WState_Polished ) )
- p->setCheckable( TRUE );
+ if ( !(ceData.windowState & WState_Polished ) ) {
+ widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
+ }
#endif
}