Update to new style API

pull/1/head
Timothy Pearson 12 years ago
parent 0530187e92
commit b80c68a29b

@ -1285,11 +1285,13 @@ void LipstikStyle::renderTab(TQPainter *p,
void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
TQPainter *p,
const TQWidget* widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags,
const TQStyleOption& opt) const
const TQStyleOption& opt,
const TQWidget* widget) const
{
// some "global" vars...
const bool enabled = (flags & Style_Enabled);
@ -1557,9 +1559,9 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawLine( centerx, centery - radius, centerx, centery + radius );
} else if(_drawTriangularExpander) {
if( flags & Style_On )
tqdrawPrimitive(PE_ArrowRight, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
drawPrimitive(PE_ArrowRight, p, ceData, elementFlags, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
if( flags & Style_Off )
tqdrawPrimitive(PE_ArrowDown, p, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
drawPrimitive(PE_ArrowDown, p, ceData, elementFlags, TQRect(r.x()+1,r.y()+1,r.width(),r.height()), cg,ButtonContour, flags);
}
break;
@ -1638,13 +1640,15 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
default:
KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt);
KStyle::drawKStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget);
}
}
void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
void LipstikStyle::drawPrimitive(PrimitiveElement pe,
TQPainter *p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags,
@ -1877,7 +1881,7 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
surfaceFlags);
p->setPen(cg.foreground());
tqdrawPrimitive((horiz ? PE_ArrowLeft : PE_ArrowUp), p, r, cg, flags);
drawPrimitive((horiz ? PE_ArrowLeft : PE_ArrowUp), p, ceData, elementFlags, r, cg, flags);
break;
}
@ -1903,7 +1907,7 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
surfaceFlags);
p->setPen(cg.foreground());
tqdrawPrimitive((horiz ? PE_ArrowRight : PE_ArrowDown), p, r, cg, flags);
drawPrimitive((horiz ? PE_ArrowRight : PE_ArrowDown), p, ceData, elementFlags, r, cg, flags);
break;
}
@ -1932,7 +1936,7 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
renderSurface(p, TQRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2),
cg.background(), contentColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2), surfaceFlags);
tqdrawPrimitive(PE_CheckMark, p, r, cg, flags);
drawPrimitive(PE_CheckMark, p, ceData, elementFlags, r, cg, flags);
break;
}
@ -2410,8 +2414,8 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
const TQWMatrix oldMatrix( p->worldMatrix() );
if (flags & Style_Down) {
p->translate(pixelMetric(PM_ButtonShiftHorizontal),
pixelMetric(PM_ButtonShiftVertical));
p->translate(pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags),
pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags));
}
a.translate((r.x()+r.width()/2), (r.y()+r.height()/2));
@ -2446,7 +2450,7 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
}
default: {
return KStyle::tqdrawPrimitive(pe, p, r, cg, flags, opt);
return KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt);
}
}
}
@ -2454,11 +2458,13 @@ void LipstikStyle::tqdrawPrimitive(PrimitiveElement pe,
void LipstikStyle::drawControl(ControlElement element,
TQPainter *p,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags,
const TQStyleOption& opt) const
const TQStyleOption& opt,
const TQWidget *widget) const
{
const bool reverseLayout = TQApplication::reverseLayout();
@ -2650,7 +2656,7 @@ void LipstikStyle::drawControl(ControlElement element,
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget);
}
break;
@ -2670,12 +2676,12 @@ void LipstikStyle::drawControl(ControlElement element,
TQColorGroup g2 = cg;
if (isDefault)
g2.setColor(TQColorGroup::Background, cg.background().dark(120) );
tqdrawPrimitive(PE_ButtonBevel, p,
drawPrimitive(PE_ButtonBevel, p, ceData, elementFlags,
isDefault?TQRect(r.x()+1,r.y()+1,r.width()-2,r.height()-2):r,
g2, flags, TQStyleOption(button) );
if (isDefault ) {
tqdrawPrimitive(PE_ButtonDefault, p, r, cg, flags);
drawPrimitive(PE_ButtonDefault, p, ceData, elementFlags, r, cg, flags);
}
break;
@ -2693,15 +2699,15 @@ void LipstikStyle::drawControl(ControlElement element,
// Shift button contents if pushed.
if ( active )
{
x += pixelMetric(PM_ButtonShiftHorizontal, widget);
y += pixelMetric(PM_ButtonShiftVertical, widget);
x += pixelMetric(PM_ButtonShiftHorizontal, ceData, elementFlags, widget);
y += pixelMetric(PM_ButtonShiftVertical, ceData, elementFlags, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
int dx = pixelMetric( PM_MenuButtonIndicator, ceData, elementFlags, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
(dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
@ -2710,7 +2716,7 @@ void LipstikStyle::drawControl(ControlElement element,
else
{
p->setPen(cg.buttonText());
tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
drawPrimitive( PE_ArrowDown, p, ceData, elementFlags, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@ -2736,7 +2742,7 @@ void LipstikStyle::drawControl(ControlElement element,
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
if (cornArrow) //Draw over the icon
tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
drawPrimitive( PE_ArrowDown, p, ceData, elementFlags, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
@ -2752,8 +2758,8 @@ void LipstikStyle::drawControl(ControlElement element,
if ( flags & Style_HasFocus )
tqdrawPrimitive( PE_FocusRect, p,
visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
drawPrimitive( PE_FocusRect, p, ceData, elementFlags,
visualRect( subRect( SR_PushButtonFocusRect, ceData, elementFlags, widget ), ceData, elementFlags ),
cg, flags );
break;
}
@ -2803,9 +2809,9 @@ void LipstikStyle::drawControl(ControlElement element,
p->drawText(r, text_flags, mi->text());
} else {
if (down) {
tqdrawPrimitive(PE_ButtonTool, p, r, cg, flags|Style_Down, opt);
drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, r, cg, flags|Style_Down, opt);
} else {
tqdrawPrimitive(PE_ButtonTool, p, r, cg, flags, opt);
drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, r, cg, flags, opt);
}
p->setPen(cg.buttonText() );
p->drawText(r, text_flags, mi->text());
@ -2837,7 +2843,7 @@ void LipstikStyle::drawControl(ControlElement element,
bool enabled = mi->isEnabled();
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
bool etchtext = styleHint( SH_EtchDisabledText, ceData, elementFlags );
bool reverse = TQApplication::reverseLayout();
if ( checkable )
@ -2973,7 +2979,7 @@ void LipstikStyle::drawControl(ControlElement element,
SFlags cflags = Style_On;
if (enabled)
cflags |= Style_Enabled;
tqdrawPrimitive( PE_CheckMark, p, cr, cg, cflags );
drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags );
}
}
@ -2990,7 +2996,7 @@ void LipstikStyle::drawControl(ControlElement element,
SFlags cflags = Style_On;
if (enabled)
cflags |= Style_Enabled;
tqdrawPrimitive( PE_CheckMark, p, cr, cg, cflags );
drawPrimitive( PE_CheckMark, p, ceData, elementFlags, cr, cg, cflags );
}
// Time to draw the menu item label...
@ -3099,7 +3105,7 @@ void LipstikStyle::drawControl(ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
int dim = pixelMetric(PM_MenuButtonIndicator, ceData, elementFlags) - 1;
TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
@ -3110,12 +3116,12 @@ void LipstikStyle::drawControl(ControlElement element,
p->setPen(cg.highlightedText());
else
p->setPen(cg.buttonText());
tqdrawPrimitive( arrow, p, vr, cg, Style_Enabled );
drawPrimitive( arrow, p, ceData, elementFlags, vr, cg, Style_Enabled );
}
else
{
p->setPen(cg.buttonText());
tqdrawPrimitive( arrow, p, vr, cg, enabled? Style_Enabled : Style_Default );
drawPrimitive( arrow, p, ceData, elementFlags, vr, cg, enabled? Style_Enabled : Style_Default );
}
}
break;
@ -3146,15 +3152,17 @@ void LipstikStyle::drawControl(ControlElement element,
break;
default:
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget);
}
}
void LipstikStyle::drawControlMask(ControlElement element,
TQPainter *p,
const TQWidget *w,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &opt) const
const TQStyleOption &opt,
const TQWidget *w) const
{
switch (element) {
case CE_PushButton: {
@ -3165,16 +3173,18 @@ void LipstikStyle::drawControlMask(ControlElement element,
}
default: {
KStyle::drawControlMask (element, p, w, r, opt);
KStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w);
}
}
}
void LipstikStyle::drawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQStyleControlElementData ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &o) const
const TQStyleOption &o,
const TQWidget *w) const
{
switch (c) {
case CC_SpinWidget:
@ -3186,20 +3196,22 @@ void LipstikStyle::drawComplexControlMask(ComplexControl c,
break;
}
default: {
KStyle::drawComplexControlMask (c, p, w, r, o);
KStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w);
}
}
}
void LipstikStyle::drawComplexControl(ComplexControl control,
TQPainter *p,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
const TQStyleOption& opt) const
const TQStyleOption& opt,
const TQWidget *widget) const
{
const bool reverseLayout = TQApplication::reverseLayout();
@ -3231,7 +3243,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
if (_inputFocusHighlight && hasFocus && editable && enabled)
{
TQRect editField = querySubControlMetrics(control, widget, SC_ComboBoxEditField);
TQRect editField = querySubControlMetrics(control, ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget);
TQRect editFrame = r;
TQRect buttonFrame = r;
@ -3320,7 +3332,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
cg.background(), buttonColor, getColor(cg,MouseOverHighlight), enabled?_contrast+3:(_contrast/2),
surfaceFlags);
if (hasFocus) {
tqdrawPrimitive(PE_FocusRect, p,
drawPrimitive(PE_FocusRect, p, ceData, elementFlags,
TQRect(RcontentSurface.x() + 2,
RcontentSurface.y() + 2,
RcontentSurface.width() - 4,
@ -3363,7 +3375,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
} else {
p->setPen(cg.foreground());
}
tqdrawPrimitive(PE_SpinWidgetDown, p, RbuttonSurface, cg, Style_Default|Style_Enabled|Style_Raised);
drawPrimitive(PE_SpinWidgetDown, p, ceData, elementFlags, RbuttonSurface, cg, Style_Default|Style_Enabled|Style_Raised);
// TQComboBox draws the text using cg.text(), we can override this
// from here
@ -3378,15 +3390,15 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
const TQToolButton *tb = (const TQToolButton *) widget;
TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
button = querySubControlMetrics(control, ceData, elementFlags, SC_ToolButton, opt, widget);
menuarea = querySubControlMetrics(control, ceData, elementFlags, SC_ToolButtonMenu, opt, widget);
SFlags bflags = flags,
mflags = flags;
if (kornMode)
{
tqdrawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, button, cg, bflags, opt);
break;
}
else
@ -3426,7 +3438,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
if ( widget == hoverWidget && tb->parentWidget()->inherits( "KTabWidget" )) {
renderButton(p, r, cg, false, true, false, true, false );
} else {
tqdrawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
drawPrimitive(PE_ButtonTool, p, ceData, elementFlags, button, cg, bflags, opt);
}
} else if (tb->parentWidget() &&
tb->parentWidget()->backgroundPixmap() &&
@ -3439,15 +3451,15 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
// Draw a toolbutton menu indicator if required
if (controls & SC_ToolButtonMenu) {
if (mflags & (Style_Down | Style_On | Style_Raised)) {
tqdrawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, opt);
drawPrimitive(PE_ButtonDropDown, p, ceData, elementFlags, menuarea, cg, mflags, opt);
}
tqdrawPrimitive(PE_ArrowDown, p, menuarea, cg, mflags, opt);
drawPrimitive(PE_ArrowDown, p, ceData, elementFlags, menuarea, cg, mflags, opt);
}
if (tb->hasFocus() && !tb->focusProxy()) {
TQRect fr = tb->rect();
fr.addCoords(2, 2, -2, -2);
tqdrawPrimitive(PE_FocusRect, p, fr, cg);
drawPrimitive(PE_FocusRect, p, ceData, elementFlags, fr, cg);
}
// Set the color for the ToolButton menu indicator
@ -3477,7 +3489,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
const bool heightDividable = ((r.height()%2) == 0);
if (_inputFocusHighlight && hasFocus && enabled)
{
TQRect editField = querySubControlMetrics(control, widget, SC_SpinWidgetEditField);
TQRect editField = querySubControlMetrics(control, ceData, elementFlags, SC_SpinWidgetEditField, TQStyleOption::Default);
TQRect editFrame = r;
TQRect buttonFrame = r;
@ -3508,7 +3520,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
}
else
{
renderContour(p, querySubControlMetrics(control, widget, SC_SpinWidgetFrame),
renderContour(p, querySubControlMetrics(control, ceData, elementFlags, SC_SpinWidgetFrame, TQStyleOption::Default, widget),
cg.background(), getColor(cg, ButtonContour, enabled) );
}
p->setPen(alphaBlendColors(cg.background(), getColor(cg, ButtonContour, enabled), 50) );
@ -3572,7 +3584,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
else
pe = PE_SpinWidgetUp;
p->setPen(cg.foreground());
tqdrawPrimitive(pe, p, upRect, cg, sflags);
drawPrimitive(pe, p, ceData, elementFlags, upRect, cg, sflags);
sflags = Style_Default | Style_Enabled;
if (active == SC_SpinWidgetDown) {
@ -3585,7 +3597,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
else
pe = PE_SpinWidgetDown;
p->setPen(cg.foreground());
tqdrawPrimitive(pe, p, downRect, cg, sflags);
drawPrimitive(pe, p, ceData, elementFlags, downRect, cg, sflags);
// thin frame around the input area
const TQRect Rcontent = TQRect(reverseLayout?r.left()+1+handleWidth+1:r.left()+1, r.top()+1,
@ -3618,19 +3630,19 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
}
default:
KStyle::drawComplexControl(control, p, widget,
KStyle::drawComplexControl(control, p, ceData, elementFlags,
r, cg, flags, controls,
active, opt);
active, opt, widget);
break;
}
}
TQRect LipstikStyle::subRect(SubRect r, const TQWidget *widget) const
TQRect LipstikStyle::subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch (r) {
case SR_ComboBoxFocusRect: {
return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField );
return querySubControlMetrics( CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget );
}
// Don't use KStyles progressbar subrect
@ -3645,15 +3657,17 @@ TQRect LipstikStyle::subRect(SubRect r, const TQWidget *widget) const
}
default: {
return KStyle::subRect(r, widget);
return KStyle::subRect(r, ceData, elementFlags, widget);
}
}
}
TQRect LipstikStyle::querySubControlMetrics(ComplexControl control,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &opt) const
const TQStyleOption &opt,
const TQWidget *widget) const
{
if (!widget) {
return TQRect();
@ -3668,7 +3682,7 @@ TQRect LipstikStyle::querySubControlMetrics(ComplexControl control,
return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
}
}
break;
@ -3712,18 +3726,18 @@ TQRect LipstikStyle::querySubControlMetrics(ComplexControl control,
return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2);
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
}
}
break;
}
default: {
return KStyle::querySubControlMetrics(control, widget, subcontrol, opt);
return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
}
}
}
int LipstikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
int LipstikStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{
switch(m) {
// TABS
@ -3835,15 +3849,17 @@ int LipstikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
return KStyle::pixelMetric(m, widget);
return KStyle::pixelMetric(m, ceData, elementFlags, widget);
}
}
TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
const TQWidget *widget,
TQSize LipstikStyle::sizeFromContents(ContentsType t,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQSize &s,
const TQStyleOption &opt) const
const TQStyleOption &opt,
const TQWidget *widget) const
{
switch (t) {
case CT_PopupMenuItem: {
@ -3904,8 +3920,8 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
{
const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, ceData, elementFlags, widget);
int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, ceData, elementFlags, widget);
if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
return TQSize( w+25, h+5 );
@ -3916,27 +3932,29 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
if(widget->parent() && ::tqqt_cast<TQToolBar*>(widget->parent()) )
return TQSize( s.width()+2*4+_toolBarSpacing, s.height()+2*4 );
else
return KStyle::tqsizeFromContents (t, widget, s, opt);
return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
}
default:
return KStyle::tqsizeFromContents (t, widget, s, opt);
return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
}
return KStyle::tqsizeFromContents (t, widget, s, opt);
return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
}
int LipstikStyle::styleHint( StyleHint stylehint,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQStyleOption &option,
TQStyleHintReturn* returnData ) const
TQStyleHintReturn* returnData,
const TQWidget *widget ) const
{
switch (stylehint) {
case SH_PopupMenu_SubMenuPopupDelay:
return 96; // Motif-like delay...
default:
return KStyle::styleHint(stylehint, widget, option, returnData);
return KStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget);
}
}

@ -75,14 +75,18 @@ public:
void drawKStylePrimitive(KStylePrimitive kpe,
TQPainter* p,
const TQWidget* widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const;
void tqdrawPrimitive(PrimitiveElement pe,
void drawPrimitive(PrimitiveElement pe,
TQPainter *p,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
@ -90,49 +94,59 @@ public:
void drawControl(ControlElement element,
TQPainter *p,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
void drawControlMask( ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQStyleOption &, const TQWidget *) const;
void drawComplexControl(ComplexControl control,
TQPainter *p,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const;
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
int pixelMetric(PixelMetric m,
int pixelMetric(PixelMetric m, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQWidget *widget = 0 ) const;
TQRect subRect(SubRect r,
TQRect subRect(SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags,
const TQWidget *widget ) const;
TQRect querySubControlMetrics(ComplexControl control,
const TQWidget *widget,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
SubControl subcontrol,
const TQStyleOption &opt = TQStyleOption::Default ) const;
const TQStyleOption &opt = TQStyleOption::Default,
const TQWidget *widget = 0 ) const;
void drawComplexControlMask(TQStyle::ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQStyleControlElementData ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption &o=TQStyleOption::Default) const;
const TQStyleOption &o=TQStyleOption::Default,
const TQWidget *w = 0) const;
TQSize tqsizeFromContents(TQStyle::ContentsType t,
const TQWidget *w,
TQSize sizeFromContents(TQStyle::ContentsType t,
TQStyleControlElementData ceData,
ControlElementFlags elementFlags,
const TQSize &s,
const TQStyleOption &o) const;
const TQStyleOption &o,
const TQWidget *w = 0) const;
int styleHint(StyleHint, const TQWidget * = 0,
int styleHint(StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
const TQStyleOption & = TQStyleOption::Default,
TQStyleHintReturn * = 0 ) const;
TQStyleHintReturn * = 0, const TQWidget * = 0 ) const;
protected:
enum TabPosition

Loading…
Cancel
Save