diff --git a/KDE3PORTING.html b/KDE3PORTING.html index 457fd0cfa..912f81b60 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -116,11 +116,11 @@ The matchFilename( const TQString& filename, const TQString& pattern ) me renamed to
matchFileName( const TQString& filename, const TQString& pattern ). The old name will still work unless KDE_NO_COMPAT is defined. -

KStyle

-Due to the major changes in the TQStyle API in Qt3, KStyle has been completely -re-written. KStyle is now a thin wrapper around TQCommonStyle with a few extra -primitive elements and a simple popupMenu transparency engine. All KStyles can -now style Qt apps like designer and assistant automatically. KStyle is no longer +

TDEStyle

+Due to the major changes in the TQStyle API in Qt3, TDEStyle has been completely +re-written. TDEStyle is now a thin wrapper around TQCommonStyle with a few extra +primitive elements and a simple popupMenu transparency engine. All TDEStyles can +now style Qt apps like designer and assistant automatically. TDEStyle is no longer present in tdecore. It is now in a new library called tdefx to allow Qt apps to use KDE's styles without having the styles linked to tdecore/tdeui. @@ -318,7 +318,7 @@ The KRootPixmap class has been extended to make it more flexible, and the The old name will still work unless KDE_NO_COMPAT is defined.

KThemeBase, KThemeStyle

-KThemeBase and KThemeStyle have been ported over to the new QStyle/KStyle API +KThemeBase and KThemeStyle have been ported over to the new QStyle/TDEStyle API present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyle as its use is basically limited to KThemeStyle. diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index 4451f952c..7119af5a8 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -91,7 +91,7 @@ TQ_EXPORT_PLUGIN(AsteroidStylePlugin); /* Ok, now we get to the good stuff. */ -AsteroidStyle::AsteroidStyle() : KStyle(AllowMenuTransparency) +AsteroidStyle::AsteroidStyle() : TDEStyle(AllowMenuTransparency) { if (tqApp->inherits("TDEApplication")) { connect(tqApp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(paletteChanged())); @@ -139,13 +139,13 @@ void AsteroidStyle::polish(const TQStyleControlElementData &ceData, ControlEleme installObjectEventHandler(ceData, elementFlags, ptr, this); } else { - KStyle::polish(ceData, elementFlags, ptr); + TDEStyle::polish(ceData, elementFlags, ptr); } } void AsteroidStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - KStyle::unPolish(ceData, elementFlags, ptr); + TDEStyle::unPolish(ceData, elementFlags, ptr); } /*! @@ -179,7 +179,7 @@ void AsteroidStyle::renderMenuBlendPixmap(KPixmap &pix, p.fillRect(0, 0, pix.width(), pix.height(), cg.background()); } -void AsteroidStyle::drawKStylePrimitive(KStylePrimitive ksp, +void AsteroidStyle::drawTDEStylePrimitive(TDEStylePrimitive ksp, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -289,7 +289,7 @@ void AsteroidStyle::drawKStylePrimitive(KStylePrimitive ksp, } default: { - KStyle::drawKStylePrimitive(ksp, p, ceData, elementFlags, r, cg, sf, o, w); + TDEStyle::drawTDEStylePrimitive(ksp, p, ceData, elementFlags, r, cg, sf, o, w); } } } @@ -320,7 +320,7 @@ int AsteroidStyle::styleHint( TQ_StyleHint stylehint, } default: - return KStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget); + return TDEStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget); } } @@ -975,7 +975,7 @@ void AsteroidStyle::drawPrimitive(TQ_PrimitiveElement pe, } default: { - KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, sf, o); + TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, sf, o); } } } @@ -1716,7 +1716,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, } default: { - KStyle::drawControl(ce, p, ceData, elementFlags, r, cg, sf, o, w); + TDEStyle::drawControl(ce, p, ceData, elementFlags, r, cg, sf, o, w); } } } @@ -1763,7 +1763,7 @@ void AsteroidStyle::drawControlMask(TQ_ControlElement ce, CE_HeaderLabel */ default: { - KStyle::drawControlMask(ce, p, ceData, elementFlags, r, o, w); + TDEStyle::drawControlMask(ce, p, ceData, elementFlags, r, o, w); } } } @@ -2091,7 +2091,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, // Draw slider groove if ((sc & SC_SliderGroove) && groove.isValid()) { - drawKStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, sf, o, w ); + drawTDEStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, sf, o, w ); // Draw the focus rect around the groove if (elementFlags & CEF_HasFocus) @@ -2109,7 +2109,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, if ((sc & SC_SliderHandle) && handle.isValid()) { if (sa == SC_SliderHandle) sf |= Style_Active; - drawKStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, sf, o, w ); + drawTDEStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, sf, o, w ); } p2.end(); @@ -2179,7 +2179,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, default: { - KStyle::drawComplexControl(cc, p, ceData, elementFlags, r, cg, sf, sc, sa, o, w); + TDEStyle::drawComplexControl(cc, p, ceData, elementFlags, r, cg, sf, sc, sa, o, w); } } } @@ -2204,7 +2204,7 @@ void AsteroidStyle::drawComplexControlMask(TQ_ComplexControl cc, CC_ListView */ default: { - KStyle::drawComplexControlMask(cc, p, ceData, elementFlags, r, o, w); + TDEStyle::drawComplexControlMask(cc, p, ceData, elementFlags, r, o, w); } } } @@ -2303,7 +2303,7 @@ int AsteroidStyle::pixelMetric(PixelMetric pm, const TQStyleControlElementData & if (ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING)) { return 3; } else { - return KStyle::pixelMetric(pm, ceData, elementFlags, w); + return TDEStyle::pixelMetric(pm, ceData, elementFlags, w); } } @@ -2335,7 +2335,7 @@ int AsteroidStyle::pixelMetric(PixelMetric pm, const TQStyleControlElementData & return 0; default: { - return KStyle::pixelMetric(pm, ceData, elementFlags, w); + return TDEStyle::pixelMetric(pm, ceData, elementFlags, w); } } } @@ -2379,7 +2379,7 @@ TQRect AsteroidStyle::subRect(SubRect sr, const TQStyleControlElementData &ceDat SR_DialogButtonCustom */ default: { - return KStyle::subRect(sr, ceData, elementFlags, w); + return TDEStyle::subRect(sr, ceData, elementFlags, w); } } } @@ -2441,7 +2441,7 @@ TQRect AsteroidStyle::querySubControlMetrics(TQ_ComplexControl cc, return TQRect(r.x()+2, r.y()+2, r.width()-20, r.height()-4); } default: { - return KStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); + return TDEStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); } } @@ -2474,7 +2474,7 @@ TQRect AsteroidStyle::querySubControlMetrics(TQ_ComplexControl cc, case SC_SpinWidgetFrame: return ceData.rect; default: - return KStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); + return TDEStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); break; } @@ -2482,7 +2482,7 @@ TQRect AsteroidStyle::querySubControlMetrics(TQ_ComplexControl cc, } default: { - return KStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); + return TDEStyle::querySubControlMetrics(cc, ceData, elementFlags, sc, o, w); } } } @@ -2516,7 +2516,7 @@ TQSize AsteroidStyle::sizeFromContents(ContentsType ct, case CT_PushButton: { const TQPushButton *pb = dynamic_cast(w); - const TQSize ret = KStyle::sizeFromContents(ct, ceData, elementFlags, s, o, w); + const TQSize ret = TDEStyle::sizeFromContents(ct, ceData, elementFlags, s, o, w); int rw = ret.width(), rh = ret.height(); int mw; int mh; @@ -2615,7 +2615,7 @@ TQSize AsteroidStyle::sizeFromContents(ContentsType ct, } default: { - return KStyle::sizeFromContents(ct, ceData, elementFlags, s, o, w); + return TDEStyle::sizeFromContents(ct, ceData, elementFlags, s, o, w); } } } diff --git a/kstyles/asteroid/asteroid.h b/kstyles/asteroid/asteroid.h index 7bd652a12..52d18291b 100644 --- a/kstyles/asteroid/asteroid.h +++ b/kstyles/asteroid/asteroid.h @@ -9,7 +9,7 @@ #include -class AsteroidStyle : public KStyle +class AsteroidStyle : public TDEStyle { Q_OBJECT @@ -34,7 +34,7 @@ public: const TQColorGroup &, const TQPopupMenu *) const; - void drawKStylePrimitive(KStylePrimitive, + void drawTDEStylePrimitive(TDEStylePrimitive, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -98,7 +98,7 @@ public: int pixelMetric(PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * = 0) const; - int kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const; + int kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const; TQRect subRect(SubRect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *) const; diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp index 0dc02e7ec..4fccff059 100644 --- a/kstyles/highcolor/highcolor.cpp +++ b/kstyles/highcolor/highcolor.cpp @@ -174,7 +174,7 @@ KPixmap* GradientSet::gradient(GradientType type) // --------------------------------------------------------------------------- HighColorStyle::HighColorStyle( StyleType styleType ) - : KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) + : TDEStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) { type = styleType; highcolor = (type == HighColor && TQPixmap::defaultDepth() > 8); @@ -209,7 +209,7 @@ void HighColorStyle::polish(const TQStyleControlElementData &ceData, ControlElem } } - KStyle::polish( ceData, elementFlags, ptr ); + TDEStyle::polish( ceData, elementFlags, ptr ); } @@ -230,7 +230,7 @@ void HighColorStyle::unPolish(const TQStyleControlElementData &ceData, ControlEl } } - KStyle::unPolish( ceData, elementFlags, ptr ); + TDEStyle::unPolish( ceData, elementFlags, ptr ); } @@ -796,7 +796,7 @@ void HighColorStyle::drawPrimitive( TQ_PrimitiveElement pe, p->drawLine(x+1, y+1, x+1, y2-1); p->setPen(oldPen); } else - KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); + TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); break; } @@ -959,13 +959,13 @@ void HighColorStyle::drawPrimitive( TQ_PrimitiveElement pe, p->restore(); } else - KStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); + TDEStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); } } } -void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe, +void HighColorStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -1139,7 +1139,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe, } default: - KStyle::drawKStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -1515,7 +1515,7 @@ void HighColorStyle::drawControl( TQ_ControlElement element, } default: - KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -1543,7 +1543,7 @@ void HighColorStyle::drawControlMask( TQ_ControlElement element, } default: - KStyle::drawControlMask(element, p, ceData, elementFlags, r, opt, widget); + TDEStyle::drawControlMask(element, p, ceData, elementFlags, r, opt, widget); } } @@ -1728,7 +1728,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, default: - KStyle::drawComplexControl(control, p, ceData, elementFlags, + TDEStyle::drawComplexControl(control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget); break; } @@ -1759,7 +1759,7 @@ void HighColorStyle::drawComplexControlMask( TQ_ComplexControl control, } default: - KStyle::drawComplexControlMask(control, p, ceData, elementFlags, r, opt, widget); + TDEStyle::drawComplexControlMask(control, p, ceData, elementFlags, r, opt, widget); } } @@ -1786,7 +1786,7 @@ void HighColorStyle::drawItem( TQPainter *p, } else col = penColor; - KStyle::drawItem( p, r, flags, cg, enabled, pixmap, + TDEStyle::drawItem( p, r, flags, cg, enabled, pixmap, text, len, col ); } @@ -1813,7 +1813,7 @@ TQRect HighColorStyle::subRect(SubRect r, const TQStyleControlElementData &ceDat wrect.width() - dfw2 - dbw2 - 1, wrect.height() - dfw2 - dbw2 - 1); } else - return KStyle::subRect(r, ceData, elementFlags, widget); + return TDEStyle::subRect(r, ceData, elementFlags, widget); } @@ -1856,7 +1856,7 @@ int HighColorStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData & return 0; default: - return KStyle::pixelMetric(m, ceData, elementFlags, widget); + return TDEStyle::pixelMetric(m, ceData, elementFlags, widget); } } @@ -1878,7 +1878,7 @@ int HighColorStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceD } break; default: - ret = KStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); + ret = TDEStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); break; } @@ -1984,7 +1984,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents, default: - return KStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); } } @@ -2005,13 +2005,13 @@ TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap, break; } - return KStyle::stylePixmap(stylepixmap, ceData, elementFlags, opt, widget); + return TDEStyle::stylePixmap(stylepixmap, ceData, elementFlags, opt, widget); } bool HighColorStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { - if (KStyle::objectEventHandler( ceData, elementFlags, source, event )) + if (TDEStyle::objectEventHandler( ceData, elementFlags, source, event )) return true; TQToolBar* toolbar; diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h index 5f58b3f9c..33ded2d17 100644 --- a/kstyles/highcolor/highcolor.h +++ b/kstyles/highcolor/highcolor.h @@ -55,7 +55,7 @@ class GradientSet class TQPopupMenu; -class HighColorStyle : public KStyle +class HighColorStyle : public TDEStyle { Q_OBJECT @@ -71,7 +71,7 @@ class HighColorStyle : public KStyle void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg, const TQPopupMenu* popup ) const; - void drawKStylePrimitive( KStylePrimitive kpe, + void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index d212f7445..0b2e677b1 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -113,7 +113,7 @@ void addOffset (TQRect* r, int offset, int lineWidth = 0) // --------------------------------------------------------------------------- HighContrastStyle::HighContrastStyle() - : KStyle( 0, ThreeButtonScrollBar ) + : TDEStyle( 0, ThreeButtonScrollBar ) { TQSettings settings; settings.beginGroup("/highcontraststyle/Settings/"); @@ -175,7 +175,7 @@ void HighContrastStyle::polish (const TQStyleControlElementData &ceData, Control } } - KStyle::polish (ceData, elementFlags, ptr); + TDEStyle::polish (ceData, elementFlags, ptr); } @@ -188,7 +188,7 @@ void HighContrastStyle::unPolish (const TQStyleControlElementData &ceData, Contr } } - KStyle::unPolish (ceData, elementFlags, ptr); + TDEStyle::unPolish (ceData, elementFlags, ptr); } void HighContrastStyle::setColorsNormal (TQPainter* p, const TQColorGroup& cg, int flags, int highlight) const @@ -687,13 +687,13 @@ void HighContrastStyle::drawPrimitive (TQ_PrimitiveElement pe, } default: { - KStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); + TDEStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); } } } -void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, +void HighContrastStyle::drawTDEStylePrimitive (TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -758,11 +758,11 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, case KPE_ListViewExpander: { // TODO There is no pixelMetric associated with the - // ListViewExpander in KStyle. + // ListViewExpander in TDEStyle. // To have a properly large expander, the CC_ListView case of // drawComplexControl should be handled. // Probably it would be better to add a KPM_ListViewExpander metric - // to the KStyle KStylePixelMetric enum, and have the KStyle + // to the TDEStyle TDEStylePixelMetric enum, and have the TDEStyle // drawComplexControl handle it. TQ_PrimitiveElement direction; if (flags & Style_On) { // Collapsed = On @@ -779,7 +779,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, // TODO Draw (thick) dotted line. Check kstyle.cpp // Fall down for now default: - KStyle::drawKStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -1158,7 +1158,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, } default: - KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -1188,7 +1188,7 @@ void HighContrastStyle::drawControlMask (TQ_ControlElement element, } default: { - KStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w); + TDEStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w); } } } @@ -1405,8 +1405,8 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, boxrect = TQRect( bx-h/2, linebot-h/2, h, h ); boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On; - // KStyle extension: Draw the box and expand/collapse indicator - drawKStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL ); + // TDEStyle extension: Draw the box and expand/collapse indicator + drawTDEStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL ); // dotlinery p->setPen( cg.mid() ); @@ -1459,8 +1459,8 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, branchrect = TQRect( point, other-(thickness/2), end-point, thickness ); branchflags = TQStyle::Style_Horizontal; - // KStyle extension: Draw the horizontal branch - drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); + // TDEStyle extension: Draw the horizontal branch + drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); } else { // Vertical branch @@ -1475,8 +1475,8 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, else branchflags = TQStyle::Style_Default; - // KStyle extension: Draw the vertical branch - drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); + // TDEStyle extension: Draw the vertical branch + drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); } } } @@ -1484,7 +1484,7 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, } default: - KStyle::drawComplexControl(control, p, ceData, elementFlags, + TDEStyle::drawComplexControl(control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget); break; } @@ -1506,7 +1506,7 @@ void HighContrastStyle::drawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w); + TDEStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w); } } } @@ -1530,7 +1530,7 @@ void HighContrastStyle::drawItem( TQPainter *p, enabled = true; //do not ghost it in Qt - KStyle::drawItem (p, r, flags, cg, enabled, pixmap, text, len, penColor); + TDEStyle::drawItem (p, r, flags, cg, enabled, pixmap, text, len, penColor); p->restore(); } @@ -1585,7 +1585,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, default: break; } - return KStyle::querySubControlMetrics (control, ceData, elementFlags, subcontrol, opt, widget); + return TDEStyle::querySubControlMetrics (control, ceData, elementFlags, subcontrol, opt, widget); } @@ -1679,19 +1679,19 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQStyleControlElementDat return 0; default: - return KStyle::pixelMetric(m, ceData, elementFlags, widget); + return TDEStyle::pixelMetric(m, ceData, elementFlags, widget); } } -int HighContrastStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const +int HighContrastStyle::kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const { switch (kpm) { case KPM_ListViewBranchThickness: // XXX Proper support of thick branches requires reimplementation of - // the drawKStylePrimitive KPE_ListViewBranch case. + // the drawTDEStylePrimitive KPE_ListViewBranch case. return basicLineWidth; default: - return KStyle::kPixelMetric(kpm, ceData, elementFlags, widget); + return TDEStyle::kPixelMetric(kpm, ceData, elementFlags, widget); } } @@ -1817,7 +1817,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, default: - return KStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); } } @@ -1829,13 +1829,13 @@ TQRect HighContrastStyle::subRect (SubRect subrect, const TQStyleControlElementD case SR_ProgressBarLabel: return ceData.rect; default: - return KStyle::subRect (subrect, ceData, elementFlags, widget); + return TDEStyle::subRect (subrect, ceData, elementFlags, widget); } } bool HighContrastStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { - return KStyle::objectEventHandler (ceData, elementFlags, source, event); + return TDEStyle::objectEventHandler (ceData, elementFlags, source, event); } /*! \reimp */ @@ -1856,7 +1856,7 @@ int HighContrastStyle::styleHint(StyleHint sh, const TQStyleControlElementData & } break; default: - ret = KStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); + ret = TDEStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); break; } diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h index 89a716dc1..1a721e8c6 100644 --- a/kstyles/highcontrast/highcontrast.h +++ b/kstyles/highcontrast/highcontrast.h @@ -14,7 +14,7 @@ * (C) 2000 Dirk Mueller * (C) 2001 Martijn Klingens * - * Includes portions from KStyle, + * Includes portions from TDEStyle, * Copyright (C) 2001-2002 Karol Szwed * * Many thanks to Bradley T. Hughes for the 3 button scrollbar code. @@ -46,7 +46,7 @@ class TQPopupMenu; -class HighContrastStyle : public KStyle +class HighContrastStyle : public TDEStyle { Q_OBJECT @@ -59,7 +59,7 @@ class HighContrastStyle : public KStyle void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - void drawKStylePrimitive( KStylePrimitive kpe, + void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -137,7 +137,7 @@ class HighContrastStyle : public KStyle int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; - int kPixelMetric( KStylePixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, + int kPixelMetric( TDEStylePixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; TQSize sizeFromContents( ContentsType contents, diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 591a5aae3..d04c9abd8 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -12,7 +12,7 @@ (C) 2000 Dirk Mueller (C) 2001 Martijn Klingens - Progressbar code based on KStyle, Copyright (C) 2001-2002 Karol Szwed , + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed , Improvements to progressbar animation from Plastik, Copyright (C) 2003 Sandro Giessl This library is free software; you can redistribute it and/or @@ -237,7 +237,7 @@ TQRect KeramikStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, } default: - return KStyle::subRect( r, ceData, elementFlags, widget ); + return TDEStyle::subRect( r, ceData, elementFlags, widget ); } } @@ -269,14 +269,14 @@ TQPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap, break; } - return KStyle::stylePixmap(stylepixmap, ceData, elementFlags, opt, widget); + return TDEStyle::stylePixmap(stylepixmap, ceData, elementFlags, opt, widget); } KeramikStyle::KeramikStyle() - :KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ), + :TDEStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ), maskMode(false), formMode(false), toolbarBlendWidget(0), titleBarMode(None), flatMode(false), customScrollMode(false), kickerMode(false) { @@ -379,7 +379,7 @@ void KeramikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen } } - KStyle::polish(ceData, elementFlags, ptr); + TDEStyle::polish(ceData, elementFlags, ptr); } void KeramikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) @@ -418,7 +418,7 @@ void KeramikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem } } - KStyle::unPolish(ceData, elementFlags, ptr); + TDEStyle::unPolish(ceData, elementFlags, ptr); } void KeramikStyle::progressBarDestroyed(TQObject* obj) @@ -985,7 +985,7 @@ void KeramikStyle::drawPrimitive( TQ_PrimitiveElement pe, return; } } - KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); + TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); break; } case PE_WindowFrame: @@ -1014,7 +1014,7 @@ void KeramikStyle::drawPrimitive( TQ_PrimitiveElement pe, p->drawLine(x+1, y+1, x+1, y2-1); p->setPen(oldPen); } else - KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); + TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); break; } @@ -1215,12 +1215,12 @@ void KeramikStyle::drawPrimitive( TQ_PrimitiveElement pe, } else - KStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); + TDEStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, opt ); } } } -void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe, +void KeramikStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -1350,7 +1350,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe, default: - KStyle::drawKStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -1539,7 +1539,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, // nr.setWidth(r.width()-2); //Account for shadow } - KStyle::drawControl(element, p, ceData, elementFlags, nr, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, nr, cg, flags, opt, widget); break; } @@ -1602,7 +1602,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, tb->orientation() == Qt::Horizontal); } else - KStyle::drawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, ceData, elementFlags, + TDEStyle::drawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, ceData, elementFlags, r, cg, flags, opt, widget ); break; } @@ -1958,7 +1958,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, default: - KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -2353,7 +2353,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, case CC_TitleBar: titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons default: - KStyle::drawComplexControl( control, p, ceData, elementFlags, + TDEStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget ); titleBarMode = None; @@ -2457,7 +2457,7 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce return 2; default: - return KStyle::pixelMetric(m, ceData, elementFlags, widget); + return TDEStyle::pixelMetric(m, ceData, elementFlags, widget); } } @@ -2500,7 +2500,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, } else { - return KStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); } } @@ -2568,7 +2568,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, } default: - return KStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentSize, opt, widget ); } } @@ -2580,7 +2580,7 @@ TQStyle::SubControl KeramikStyle::querySubControl( TQ_ComplexControl control, const TQStyleOption& opt, const TQWidget* widget ) const { - SubControl result = KStyle::querySubControl( control, ceData, elementFlags, point, opt, widget ); + SubControl result = TDEStyle::querySubControl( control, ceData, elementFlags, point, opt, widget ); if ( control == CC_ScrollBar && result == SC_ScrollBarAddLine ) { TQRect addline = querySubControlMetrics( control, ceData, elementFlags, result, opt, widget ); @@ -2771,7 +2771,7 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, } default: break; } - return KStyle::querySubControlMetrics( control, ceData, elementFlags, subcontrol, opt, widget ); + return TDEStyle::querySubControlMetrics( control, ceData, elementFlags, subcontrol, opt, widget ); } @@ -2791,7 +2791,7 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { - if (KStyle::objectEventHandler( ceData, elementFlags, source, event )) + if (TDEStyle::objectEventHandler( ceData, elementFlags, source, event )) return true; if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { @@ -2993,7 +2993,7 @@ int KeramikStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceDat ret = 1; break; default: - ret = KStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); + ret = TDEStyle::styleHint(sh, ceData, elementFlags, opt, returnData, w); break; } diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h index 5acaabf8d..02ec9499e 100644 --- a/kstyles/keramik/keramik.h +++ b/kstyles/keramik/keramik.h @@ -39,7 +39,7 @@ class TQProgressBar; -class KeramikStyle : public KStyle +class KeramikStyle : public TDEStyle { Q_OBJECT @@ -55,7 +55,7 @@ public: void polish( TQPalette& ); void applicationPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); - void drawKStylePrimitive( KStylePrimitive kpe, + void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, diff --git a/kstyles/keramik/keramikimage.h b/kstyles/keramik/keramikimage.h index c8e684a00..05bc75900 100644 --- a/kstyles/keramik/keramikimage.h +++ b/kstyles/keramik/keramikimage.h @@ -12,7 +12,7 @@ (C) 2000 Dirk Mueller (C) 2001 Martijn Klingens - Progressbar code based on KStyle, Copyright (C) 2001-2002 Karol Szwed + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index d19dcec0a..5c083632e 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -1743,7 +1743,7 @@ bool KLegacyStylePrivate::parseStyle() { } -KLegacyStyle::KLegacyStyle(void) : KStyle() { +KLegacyStyle::KLegacyStyle(void) : TDEStyle() { setButtonDefaultIndicatorWidth(6); setScrollBarExtent(15, 15); setButtonMargin(3); @@ -1873,7 +1873,7 @@ void KLegacyStyle::polish(TQApplication *app) { qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &KLegacyStyle::drawMenuBarItem); - KStyle::polish(app); + TDEStyle::polish(app); } @@ -2066,12 +2066,12 @@ void KLegacyStyle::polish(TQWidget *widget) { widget->setMouseTracking(mouseTrack); } - KStyle::polish(widget); + TDEStyle::polish(widget); } void KLegacyStyle::polishPopupMenu(TQPopupMenu *popup) { - KStyle::polishPopupMenu(popup); + TDEStyle::polishPopupMenu(popup); popup->setMouseTracking(true); popup->setCheckable(true); @@ -2089,7 +2089,7 @@ void KLegacyStyle::unPolish(TQWidget *widget) { widget->removeEventFilter(this); widget->unsetPalette(); widget->setAutoMask(false); - KStyle::unPolish(widget); + TDEStyle::unPolish(widget); } @@ -2099,7 +2099,7 @@ void KLegacyStyle::unPolish(TQApplication *app) { qt_set_draw_menu_bar_impl(0); - KStyle::unPolish(app); + TDEStyle::unPolish(app); } @@ -2150,7 +2150,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(TQButton::staticMetaObject()); if (! gobj) { - KStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill); + TDEStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill); return; } @@ -2165,7 +2165,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h, if (pix && (! pix->isNull())) p->drawPixmap(x, y, *pix); else - KStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill); + TDEStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill); } @@ -2173,7 +2173,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { GtkObject *gobj = priv->gtkDict.find(TQPushButton::staticMetaObject()); if (! gobj) { - KStyle::drawPushButton(btn, p); + TDEStyle::drawPushButton(btn, p); return; } @@ -2199,7 +2199,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { if (pix) p->drawPixmap(x1, y1, *pix); else - KStyle::drawBevelButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1, + TDEStyle::drawBevelButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1, g, true, &fill); } @@ -2227,7 +2227,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { if (pix && ! pix->isNull()) p->drawPixmap(x1, y1, *pix); else { - KStyle::drawBevelButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1, + TDEStyle::drawBevelButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1, g, btn->isOn() || btn->isDown(), &fill); } } @@ -2240,7 +2240,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (! gobj) { - KStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled); + TDEStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled); return; } @@ -2255,7 +2255,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h, if (pix && (! pix->isNull())) p->drawPixmap(x, y, *pix); else - KStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled); + TDEStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled); } @@ -2263,7 +2263,7 @@ void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, i GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (! gobj) { - KStyle::drawIndicatorMask(p, x, y, w, h, state); + TDEStyle::drawIndicatorMask(p, x, y, w, h, state); return; } @@ -2278,14 +2278,14 @@ void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, i if (pix && pix->mask() && ! pix->mask()->isNull()) p->drawPixmap(x, y, *(pix->mask())); else - KStyle::drawIndicatorMask(p, x, y, w, h, state); + TDEStyle::drawIndicatorMask(p, x, y, w, h, state); } TQSize KLegacyStyle::indicatorSize(void) const { GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); - if (! gobj) return KStyle::indicatorSize(); + if (! gobj) return TDEStyle::indicatorSize(); KLegacyImageDataKey key; key.cachekey = 0; @@ -2293,7 +2293,7 @@ TQSize KLegacyStyle::indicatorSize(void) const { key.data.shadow = KLegacy::Out; KLegacyImageData *id = gobj->getImageData(key, "checkbutton"); - if (! id) return KStyle::indicatorSize(); + if (! id) return TDEStyle::indicatorSize(); TQString filename; if (! id->file.isNull()) @@ -2301,13 +2301,13 @@ TQSize KLegacyStyle::indicatorSize(void) const { else if (! id->overlayFile.isNull()) filename = id->overlayFile; else - return KStyle::indicatorSize(); + return TDEStyle::indicatorSize(); TQImage *image = imageCache->find(filename); if (! image) { image = new TQImage(filename); - if (! image) return KStyle::indicatorSize(); + if (! image) return TDEStyle::indicatorSize(); imageCache->insert(filename, image); } @@ -2338,7 +2338,7 @@ void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int if (pix && (! pix->isNull())) p->drawPixmap(x, y, *pix); else - KStyle::drawExclusiveIndicator(p, x, y, w, h, g, down, enabled); + TDEStyle::drawExclusiveIndicator(p, x, y, w, h, g, down, enabled); } @@ -2348,7 +2348,7 @@ void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (! gobj) { - KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on); + TDEStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on); return; } @@ -2363,7 +2363,7 @@ void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, if (pix && pix->mask() && ! pix->mask()->isNull()) p->drawPixmap(x, y, *(pix->mask())); else - KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on); + TDEStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on); } @@ -2371,7 +2371,7 @@ TQSize KLegacyStyle::exclusiveIndicatorSize(void) const { GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (! gobj) { - return KStyle::indicatorSize(); + return TDEStyle::indicatorSize(); } KLegacyImageDataKey key; @@ -2380,7 +2380,7 @@ TQSize KLegacyStyle::exclusiveIndicatorSize(void) const { key.data.shadow = KLegacy::Out; KLegacyImageData *id = gobj->getImageData(key, "radiobutton"); - if (! id) return KStyle::indicatorSize(); + if (! id) return TDEStyle::indicatorSize(); TQString filename; if (! id->file.isNull()) { @@ -2388,7 +2388,7 @@ TQSize KLegacyStyle::exclusiveIndicatorSize(void) const { } else if (! id->overlayFile.isNull()) { filename = id->overlayFile; } else { - return KStyle::indicatorSize(); + return TDEStyle::indicatorSize(); } TQImage *image = imageCache->find(filename); @@ -2396,7 +2396,7 @@ TQSize KLegacyStyle::exclusiveIndicatorSize(void) const { image = new TQImage(filename); if (! image) { - return KStyle::indicatorSize(); + return TDEStyle::indicatorSize(); } imageCache->insert(filename, image); @@ -2534,7 +2534,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject()); if (! gobj) { - KStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b); + TDEStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b); return; } @@ -2552,7 +2552,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h, if (pix && ! pix->isNull()) { p->drawPixmap(x, y, *pix); } else { - KStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b); + TDEStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b); return; } @@ -2574,7 +2574,7 @@ TQRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) { GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject()); if (! gobj) { - return KStyle::comboButtonRect(x, y, w, h); + return TDEStyle::comboButtonRect(x, y, w, h); } KLegacyImageDataKey key; @@ -2583,7 +2583,7 @@ TQRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) { KLegacyImageData *id = gobj->getImageData(key, "optionmenu"); if (! id) { - return KStyle::comboButtonRect(x, y, w, h); + return TDEStyle::comboButtonRect(x, y, w, h); } return TQRect(x + id->border.left() + 1, y + id->border.top() + 1, @@ -2651,7 +2651,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll GtkObject *gobj = priv->gtkDict.find(TQScrollBar::staticMetaObject()); if (! gobj) { - KStyle::drawScrollBarControls(p, scrollbar, start, controls, active); + TDEStyle::drawScrollBarControls(p, scrollbar, start, controls, active); return; } @@ -2663,7 +2663,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll KLegacyImageData *groove_id = gobj->getImageData(gkey, "trough"); if (! groove_id) { - KStyle::drawScrollBarControls(p, scrollbar, start, controls, active); + TDEStyle::drawScrollBarControls(p, scrollbar, start, controls, active); return; } @@ -2704,7 +2704,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll KLegacyImageData *slider_id = gobj->getImageData(skey, "slider"); if (! slider_id) { - KStyle::drawScrollBarControls(p, scrollbar, start, controls, active); + TDEStyle::drawScrollBarControls(p, scrollbar, start, controls, active); return; } @@ -2765,7 +2765,7 @@ void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQ GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject()); if (! gobj) { - KStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow); + TDEStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow); return; } @@ -2781,7 +2781,7 @@ void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQ if (pix && ! pix->isNull()) p->drawPixmap(x, y, *pix); else - KStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow); + TDEStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow); } @@ -2792,7 +2792,7 @@ void KLegacyStyle::drawSliderGroove(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject()); if (! gobj) { - KStyle::drawSliderGroove(p, x, y, w, h, g, c, o); + TDEStyle::drawSliderGroove(p, x, y, w, h, g, c, o); return; } @@ -2808,7 +2808,7 @@ void KLegacyStyle::drawSliderGroove(TQPainter *p, int x, int y, int w, int h, if (pix && ! pix->isNull()) p->drawPixmap(x, y, *pix); else - KStyle::drawSliderGroove(p, x, y, w, h, g, c, o); + TDEStyle::drawSliderGroove(p, x, y, w, h, g, c, o); } @@ -2819,7 +2819,7 @@ void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down, GtkObject *gobj = priv->gtkDict.find(&arrow_ptr); if (! gobj) { - KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); + TDEStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); return; } @@ -2840,7 +2840,7 @@ void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down, if (pix && ! pix->isNull()) p->drawPixmap(x, y, *pix); else - KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); + TDEStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); } @@ -2851,7 +2851,7 @@ void KLegacyStyle::drawMenuArrow(TQPainter *p, ArrowType type, bool down, GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr); if (! gobj) { - KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); + TDEStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); return; } @@ -2868,14 +2868,14 @@ void KLegacyStyle::drawMenuArrow(TQPainter *p, ArrowType type, bool down, p->drawPixmap(x + ((w - pix->width()) / 2), y + ((h - pix->height()) / 2), *pix); else - KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); + TDEStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); } void KLegacyStyle::drawPanel(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken, int, const TQBrush *brush) { - KStyle::drawPanel(p, x, y, w, h, g, sunken, 1, brush); + TDEStyle::drawPanel(p, x, y, w, h, g, sunken, 1, brush); } @@ -2894,7 +2894,7 @@ void KLegacyStyle::drawCheckMark(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(&checkmenuitem_ptr); if (! gobj) { - KStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled); + TDEStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled); return; } @@ -2910,7 +2910,7 @@ void KLegacyStyle::drawCheckMark(TQPainter *p, int x, int y, int w, int h, y += (h - pix->height()) / 2; p->drawPixmap(x, y, *pix); } else { - KStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled); + TDEStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled); } } @@ -2945,7 +2945,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo GtkObject *gobj = priv->gtkDict.find(TQTabBar::staticMetaObject()); if (! gobj) { - KStyle::drawTab(p, tabbar, tab, selected); + TDEStyle::drawTab(p, tabbar, tab, selected); return; } @@ -2974,7 +2974,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo if (pix && ! pix->isNull()) p->drawPixmap(tab->r.left(), ry, *pix); else - KStyle::drawTab(p, tabbar, tab, selected); + TDEStyle::drawTab(p, tabbar, tab, selected); } @@ -2984,7 +2984,7 @@ void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h, GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject()); if (! gobj) { - KStyle::drawKBarHandle(p, x, y, w, h, g, type, fill); + TDEStyle::drawKBarHandle(p, x, y, w, h, g, type, fill); return; } @@ -3362,5 +3362,5 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { } } - return KStyle::eventFilter(obj, e); + return TDEStyle::eventFilter(obj, e); } diff --git a/kstyles/klegacy/klegacystyle.h b/kstyles/klegacy/klegacystyle.h index 5288fd4f8..ee3cecfe5 100644 --- a/kstyles/klegacy/klegacystyle.h +++ b/kstyles/klegacy/klegacystyle.h @@ -31,7 +31,7 @@ class KLegacyStylePrivate; -class Q_EXPORT KLegacyStyle : public KStyle { +class Q_EXPORT KLegacyStyle : public TDEStyle { Q_OBJECT public: KLegacyStyle(void); diff --git a/kstyles/klegacy/plugin.cpp b/kstyles/klegacy/plugin.cpp index a146de2c3..5d3a58492 100644 --- a/kstyles/klegacy/plugin.cpp +++ b/kstyles/klegacy/plugin.cpp @@ -2,13 +2,13 @@ #include extern "C" { - KStyle* allocate(); + TDEStyle* allocate(); int minor_version(); int major_version(); const char *description(); } -KStyle* allocate() +TDEStyle* allocate() { return(new KLegacyStyle()); } diff --git a/kstyles/kthemestyle/kstyledirs.cpp b/kstyles/kthemestyle/kstyledirs.cpp index 0128dac28..8755fb294 100644 --- a/kstyles/kthemestyle/kstyledirs.cpp +++ b/kstyles/kthemestyle/kstyledirs.cpp @@ -25,19 +25,19 @@ #include #include "kstyledirs.h" -KStyleDirs* KStyleDirs::instance = 0; +TDEStyleDirs* TDEStyleDirs::instance = 0; -KStyleDirs::KStyleDirs() +TDEStyleDirs::TDEStyleDirs() { addResourceType( "themepixmap", TDEStandardDirs::kde_default( "data" ) + "kstyle/pixmaps/" ); addResourceType( "themerc", TDEStandardDirs::kde_default( "data" ) + "kstyle/themes/" ); } -KStyleDirs::~KStyleDirs() +TDEStyleDirs::~TDEStyleDirs() { } -void KStyleDirs::addToSearch( const char* type, TQSettings& s ) const +void TDEStyleDirs::addToSearch( const char* type, TQSettings& s ) const { const TQStringList & dirs = resourceDirs(type); for ( int c = dirs.size()-1; c >= 0 ; c-- ) diff --git a/kstyles/kthemestyle/kstyledirs.h b/kstyles/kthemestyle/kstyledirs.h index 79887cce1..410fad2ef 100644 --- a/kstyles/kthemestyle/kstyledirs.h +++ b/kstyles/kthemestyle/kstyledirs.h @@ -39,13 +39,13 @@ * It add share/apps/kstyle/themes as "themerc", * share/apps/kstyle/pixmaps "themepixmap" */ -class KStyleDirs: public TDEStandardDirs +class TDEStyleDirs: public TDEStandardDirs { public: - static KStyleDirs* dirs() + static TDEStyleDirs* dirs() { if ( !instance) - instance = new KStyleDirs; + instance = new TDEStyleDirs; return instance; } @@ -60,7 +60,7 @@ public: For example, when one does the following: TQSettings settings; - KStyleDirs dirs; + TDEStyleDirs dirs; dirs.addToSearch("config",settings); The one can do settings.readEntry("kstyle/KDE/WidgetStyle") to access a settings in kstylerc. @@ -68,15 +68,15 @@ public: void addToSearch( const char* type, TQSettings& q) const; //Better name? protected: - static KStyleDirs* instance; + static TDEStyleDirs* instance; /** Creates an instance of the class, and calculates the path information. */ - KStyleDirs(); - KStyleDirs(const KStyleDirs&); - KStyleDirs& operator= (const KStyleDirs&); + TDEStyleDirs(); + TDEStyleDirs(const TDEStyleDirs&); + TDEStyleDirs& operator= (const TDEStyleDirs&); - virtual ~KStyleDirs(); + virtual ~TDEStyleDirs(); }; #endif diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 7ca3ffb06..adbf49084 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -423,7 +423,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ ) TQSettings config; if (configDirName.isEmpty() || configDirName == ".") { - KStyleDirs::dirs()->addToSearch( "themerc", config ); + TDEStyleDirs::dirs()->addToSearch( "themerc", config ); } else config.insertSearchPath( TQSettings::Unix, configDirName ); @@ -525,7 +525,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ ) } KThemeBase::KThemeBase( const TQString& dir, const TQString & configFile ) - : KStyle( FilledFrameWorkaround ), configFileName( configFile ) + : TDEStyle( FilledFrameWorkaround ), configFileName( configFile ) { d = new KThemeBasePrivate; if ( configFileName.isEmpty() ) @@ -648,7 +648,7 @@ KThemeBase::~KThemeBase() if ( grHighColors[ i ] ) delete( grHighColors[ i ] ); } - KStyleDirs::release(); + TDEStyleDirs::release(); delete cache; delete d; } @@ -656,7 +656,7 @@ KThemeBase::~KThemeBase() TQImage* KThemeBase::loadImage( const TQString &name ) { TQImage * image = new TQImage; - TQString path = KStyleDirs::dirs()->findResource( "themepixmap",name ); + TQString path = TDEStyleDirs::dirs()->findResource( "themepixmap",name ); image->load( path ); if ( !image->isNull() ) return ( image ); @@ -668,7 +668,7 @@ TQImage* KThemeBase::loadImage( const TQString &name ) KThemePixmap* KThemeBase::loadPixmap( const TQString &name ) { KThemePixmap * pixmap = new KThemePixmap( false ); - TQString path = KStyleDirs::dirs()->findResource( "themepixmap", name ); + TQString path = TDEStyleDirs::dirs()->findResource( "themepixmap", name ); pixmap->load( path ); if ( !pixmap->isNull() ) return pixmap; diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h index e9ea55d5b..faef98dfd 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -211,7 +211,7 @@ class KThemeBasePrivate; * * @author Daniel M. Duley */ -class KThemeBase: public KStyle +class KThemeBase: public TDEStyle { Q_OBJECT public: @@ -510,14 +510,14 @@ protected: */ virtual int pixelMetric ( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * widget = 0 ) const { - return KStyle::pixelMetric( metric, ceData, elementFlags, widget ); + return TDEStyle::pixelMetric( metric, ceData, elementFlags, widget ); } virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption& option = TQStyleOption::Default ) const { - KStyle::tqdrawPrimitive ( pe, p, ceData, elementFlags, r, cg, + TDEStyle::tqdrawPrimitive ( pe, p, ceData, elementFlags, r, cg, flags, option ); } @@ -532,7 +532,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - KStyle::drawControl( element, p, ceData, elementFlags, + TDEStyle::drawControl( element, p, ceData, elementFlags, r, cg, how, opt, widget ); } @@ -544,7 +544,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - KStyle::drawControlMask( element, p, ceData, elementFlags, r, opt, widget ); + TDEStyle::drawControlMask( element, p, ceData, elementFlags, r, opt, widget ); } @@ -560,11 +560,11 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget* widget = 0 ) const { - KStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget ); + TDEStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget ); } - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -574,7 +574,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget* widget = 0 ) const { - KStyle::drawKStylePrimitive( kpe, + TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget ); } @@ -585,7 +585,7 @@ protected: TQStyleHintReturn* returnData = 0, const TQWidget *widget = 0 ) const { - return KStyle::styleHint( sh, + return TDEStyle::styleHint( sh, ceData, elementFlags, opt, @@ -600,7 +600,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - return KStyle::sizeFromContents( contents, + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentsSize, opt, widget ); } diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 7d2c72c2a..4cc374e5d 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -130,7 +130,7 @@ public: TQStringList keys() const { TQSettings cfg; - KStyleDirs::dirs()->addToSearch( "config", cfg ); + TDEStyleDirs::dirs()->addToSearch( "config", cfg ); TQStringList keys; bool ok; @@ -145,7 +145,7 @@ public: TQStyle* create( const TQString& key ) { TQSettings cfg; - KStyleDirs::dirs()->addToSearch( "config", cfg ); + TDEStyleDirs::dirs()->addToSearch( "config", cfg ); TQString file = cfg.readEntry( "/kthemestyle/" + key + "/file" ); if ( !key.isEmpty() ) @@ -330,7 +330,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQStyleControlElementData &ceData, return checkbox; } } - return KStyle::subRect(sr, ceData, elementFlags, widget); + return TDEStyle::subRect(sr, ceData, elementFlags, widget); } int KThemeStyle::pixelMetric ( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * widget ) const @@ -515,7 +515,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C } } - return KStyle::objectEventHandler(ceData, elementFlags, source, event); + return TDEStyle::objectEventHandler(ceData, elementFlags, source, event); } void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) @@ -626,7 +626,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen } } - KStyle::polish( ceData, elementFlags, ptr ); + TDEStyle::polish( ceData, elementFlags, ptr ); } void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) @@ -662,7 +662,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem w->unsetPalette(); } - KStyle::unPolish( ceData, elementFlags, ptr ); + TDEStyle::unPolish( ceData, elementFlags, ptr ); } @@ -1831,7 +1831,7 @@ void KThemeStyle::drawControlMask( ControlElement element, } -void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, +void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -2004,7 +2004,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, if ( !handled ) { - KThemeBase::drawKStylePrimitive( kpe, p, ceData, elementFlags, + KThemeBase::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget ); } diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h index c978601a8..24f24e1a8 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -116,7 +116,7 @@ public: const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp index ef71e3c7f..0d343f778 100644 --- a/kstyles/light/lightstyle-v2.cpp +++ b/kstyles/light/lightstyle-v2.cpp @@ -67,7 +67,7 @@ static LightStyleV2Private *singleton = 0; LightStyleV2::LightStyleV2() - : KStyle(AllowMenuTransparency) + : TDEStyle(AllowMenuTransparency) { if (! singleton) singleton = new LightStyleV2Private; @@ -85,7 +85,7 @@ LightStyleV2::~LightStyleV2() void LightStyleV2::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - KStyle::polishPopupMenu(ceData, elementFlags, ptr); + TDEStyle::polishPopupMenu(ceData, elementFlags, ptr); } static void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h index 3141ad978..75d096a4b 100644 --- a/kstyles/light/lightstyle-v2.h +++ b/kstyles/light/lightstyle-v2.h @@ -34,7 +34,7 @@ #endif // QT_PLUGIN -class Q_EXPORT_STYLE_LIGHT_V2 LightStyleV2 : public KStyle +class Q_EXPORT_STYLE_LIGHT_V2 LightStyleV2 : public TDEStyle { Q_OBJECT diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp index bf0163029..735bd3169 100644 --- a/kstyles/light/lightstyle-v3.cpp +++ b/kstyles/light/lightstyle-v3.cpp @@ -45,7 +45,7 @@ // The Light Style, 3rd revision LightStyleV3::LightStyleV3() - : KStyle(AllowMenuTransparency) + : TDEStyle(AllowMenuTransparency) { basestyle = TQStyleFactory::create( "Windows" ); if ( ! basestyle ) @@ -61,7 +61,7 @@ LightStyleV3::~LightStyleV3() void LightStyleV3::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - KStyle::polishPopupMenu(ceData, elementFlags, ptr); + TDEStyle::polishPopupMenu(ceData, elementFlags, ptr); // empty to satisy pure virtual requirements } diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h index ccda6cada..7ce62c3a8 100644 --- a/kstyles/light/lightstyle-v3.h +++ b/kstyles/light/lightstyle-v3.h @@ -37,7 +37,7 @@ #endif // QT_PLUGIN -class Q_EXPORT_STYLE_LIGHT_V3 LightStyleV3 : public KStyle +class Q_EXPORT_STYLE_LIGHT_V3 LightStyleV3 : public TDEStyle { Q_OBJECT TQStyle *basestyle; diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp index 77f6b0e1b..e7b6acd7f 100644 --- a/kstyles/plastik/plastik.cpp +++ b/kstyles/plastik/plastik.cpp @@ -20,7 +20,7 @@ Copyright (C) 2000 Daniel M. Duley (C) 2000 Dirk Mueller (C) 2001 Martijn Klingens - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed This library is free software; you can redistribute it and/or @@ -151,7 +151,7 @@ class PlastikStylePlugin : public TQStylePlugin KDE_Q_EXPORT_PLUGIN( PlastikStylePlugin ) // -- end -- -PlastikStyle::PlastikStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollBar), +PlastikStyle::PlastikStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrollBar), kickerMode(false), kornMode(false), flatMode(false) @@ -275,7 +275,7 @@ void PlastikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen } } - KStyle::polish(ceData, elementFlags, ptr); + TDEStyle::polish(ceData, elementFlags, ptr); } void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) @@ -311,7 +311,7 @@ void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem } } - KStyle::unPolish(ceData, elementFlags, ptr); + TDEStyle::unPolish(ceData, elementFlags, ptr); } void PlastikStyle::tdehtmlWidgetDestroyed(TQObject* obj) @@ -1198,7 +1198,7 @@ void PlastikStyle::renderTab(TQPainter *p, } } -void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe, +void PlastikStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -1373,7 +1373,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe, break; } - // copied and slightly modified from KStyle. + // copied and slightly modified from TDEStyle. case KPE_ListViewBranch: { // Typical Windows style listview branch element (dotted line). @@ -1446,7 +1446,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe, } default: - KStyle::drawKStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawTDEStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -2175,7 +2175,7 @@ void PlastikStyle::drawPrimitive(TQ_PrimitiveElement pe, } default: { - return KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); + return TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); } } } @@ -2375,7 +2375,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget); break; default: - KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); } break; @@ -2734,7 +2734,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, break; default: - KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); + TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); } } @@ -2755,7 +2755,7 @@ void PlastikStyle::drawControlMask(TQ_ControlElement element, } default: { - KStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w); + TDEStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w); } } } @@ -2778,7 +2778,7 @@ void PlastikStyle::drawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w); + TDEStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w); } } } @@ -3168,7 +3168,7 @@ void PlastikStyle::drawComplexControl(TQ_ComplexControl control, } default: - KStyle::drawComplexControl(control, p, ceData, elementFlags, + TDEStyle::drawComplexControl(control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget); break; @@ -3183,7 +3183,7 @@ TQRect PlastikStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, return querySubControlMetrics( CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget ); } - // Don't use KStyles progressbar subrect + // Don't use TDEStyles progressbar subrect // TODO: case SR_ProgressBarGroove: { return TQRect(ceData.rect); @@ -3195,7 +3195,7 @@ TQRect PlastikStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, } default: { - return KStyle::subRect(r, ceData, elementFlags, widget); + return TDEStyle::subRect(r, ceData, elementFlags, widget); } } } @@ -3216,7 +3216,7 @@ TQRect PlastikStyle::querySubControlMetrics(TQ_ComplexControl control, return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4); } default: { - return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); + return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); } } break; @@ -3260,13 +3260,13 @@ TQRect PlastikStyle::querySubControlMetrics(TQ_ComplexControl control, return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2); } default: { - return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); + return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); } } break; } default: { - return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); + return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); } } } @@ -3373,7 +3373,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce return 2; default: - return KStyle::pixelMetric(m, ceData, elementFlags, widget); + return TDEStyle::pixelMetric(m, ceData, elementFlags, widget); } } @@ -3456,14 +3456,14 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t, if(widget->parent() && ::tqqt_cast(widget->parent()) ) return TQSize( s.width()+2*4, s.height()+2*4 ); else - return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); + return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); } default: - return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); + return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); } - return KStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); + return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget); } int PlastikStyle::styleHint( TQ_StyleHint stylehint, @@ -3489,13 +3489,13 @@ int PlastikStyle::styleHint( TQ_StyleHint stylehint, } default: - return KStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget); + return TDEStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget); } } bool PlastikStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *ev ) { - if (KStyle::objectEventHandler(ceData, elementFlags, source, ev) ) + if (TDEStyle::objectEventHandler(ceData, elementFlags, source, ev) ) return true; if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h index a1870b701..7c3e0484b 100644 --- a/kstyles/plastik/plastik.h +++ b/kstyles/plastik/plastik.h @@ -18,7 +18,7 @@ Copyright (C) 2000 Daniel M. Duley (C) 2000 Dirk Mueller (C) 2001 Martijn Klingens - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed This library is free software; you can redistribute it and/or @@ -54,7 +54,7 @@ class TQSettings; class TQTab; class TQTimer; -class PlastikStyle : public KStyle +class PlastikStyle : public TDEStyle { Q_OBJECT @@ -66,7 +66,7 @@ public: void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); - void drawKStylePrimitive(KStylePrimitive kpe, + void drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, diff --git a/kstyles/web/plugin.cpp b/kstyles/web/plugin.cpp index c22bb08fa..6ab10ebd8 100644 --- a/kstyles/web/plugin.cpp +++ b/kstyles/web/plugin.cpp @@ -3,7 +3,7 @@ extern "C" { - KStyle * allocate() { return new WebStyle; } + TDEStyle * allocate() { return new WebStyle; } int minor_version() { return 0; } int major_version() { return 1; } const char * description() { return(i18n("Web style plugin").utf8()); } diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index 3e850394f..aca43fb74 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -218,7 +218,7 @@ drawFunkyRect } WebStyle::WebStyle() - : KStyle() + : TDEStyle() { setButtonDefaultIndicatorWidth(6); setScrollBarExtent(_scrollBarExtent, _scrollBarExtent); @@ -423,7 +423,7 @@ WebStyle::drawPushButtonLabel(TQPushButton * b, TQPainter * p) { // This is complicated stuff and we don't really want to mess with it. - KStyle::drawPushButtonLabel(b, p); + TDEStyle::drawPushButtonLabel(b, p); } void @@ -474,7 +474,7 @@ WebStyle::drawScrollBarControls Qt::ArrowType t = sb->orientation() == Horizontal ? Qt::RightArrow : Qt::DownArrow; - // Is it me or is KStyle::drawArrow broken ? + // Is it me or is TDEStyle::drawArrow broken ? drawArrow ( @@ -930,7 +930,7 @@ WebStyle::drawArrow const TQBrush * fill ) { - KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, fill); + TDEStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, fill); } void @@ -1308,7 +1308,7 @@ WebStyle::drawPopupMenuItem ) { // TODO - KStyle::drawPopupMenuItem(p, checkable, maxpmw, tab, mi, pal, act, enabled, x, y, w, h); + TDEStyle::drawPopupMenuItem(p, checkable, maxpmw, tab, mi, pal, act, enabled, x, y, w, h); } void diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h index 611cf8485..68f83c99b 100644 --- a/kstyles/web/webstyle.h +++ b/kstyles/web/webstyle.h @@ -28,7 +28,7 @@ class TQScrollBar; class TQPushButton; class TQWidget; -class WebStyle : public KStyle +class WebStyle : public TDEStyle { public: diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index 968664bad..57f3a3811 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -2277,7 +2277,7 @@ void TDEApplication::applyGUIStyle() if ( !useStyles ) return; TDEConfigGroup pConfig (TDEGlobal::config(), "General"); - TQString defaultStyle = KStyle::defaultStyle(); + TQString defaultStyle = TDEStyle::defaultStyle(); TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle); if (d->overrideStyle.isEmpty()) { diff --git a/tdecore/kapplication.h b/tdecore/kapplication.h index 4b29dd94c..93092e53e 100644 --- a/tdecore/kapplication.h +++ b/tdecore/kapplication.h @@ -45,7 +45,7 @@ struct _IceConn; class TQPopupMenu; class TQStrList; class KSessionManaged; -class KStyle; +class TDEStyle; class KURL; #define kapp TDEApplication::kApplication() @@ -872,7 +872,7 @@ public: /** * @deprecated */ - KDE_DEPRECATED KStyle* kstyle() const { return 0; } + KDE_DEPRECATED TDEStyle* kstyle() const { return 0; } /** * Builds a caption that contains the application name along with the diff --git a/tdefx/Mainpage.dox b/tdefx/Mainpage.dox index 65fcadfc8..6352e6198 100644 --- a/tdefx/Mainpage.dox +++ b/tdefx/Mainpage.dox @@ -23,7 +23,7 @@ * architecture extensions that are useful when processing images, * such as MMX, SSE, 3DNow! and AltiVec. * - * KStyle is the base class for the %Trinity widget styles. It simplifies + * TDEStyle is the base class for the %Trinity widget styles. It simplifies * and extends the QStyle API in order to make style coding easier. * It also provides an internal menu transparency and drop shadow * engine, which means that all styles inheriting this class will diff --git a/tdefx/kdrawutil.h b/tdefx/kdrawutil.h index a229625a4..909792817 100644 --- a/tdefx/kdrawutil.h +++ b/tdefx/kdrawutil.h @@ -33,7 +33,7 @@ */ /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Draws a Next-style button (solid black shadow with light and midlight highlight). @@ -49,7 +49,7 @@ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, const TQRect &r, const TQColorGr bool sunken=false, const TQBrush *fill=0); /** - * @relates KStyle + * @relates TDEStyle * @overload */ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h, @@ -57,7 +57,7 @@ TDEFX_EXPORT void kDrawNextButton(TQPainter *p, int x, int y, int w, int h, const TQBrush *fill=0); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Draws a Be-style button. @@ -73,7 +73,7 @@ TDEFX_EXPORT void kDrawBeButton(TQPainter *p, TQRect &r, const TQColorGroup &g, bool sunken=false, const TQBrush *fill=0); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * @overload */ @@ -82,7 +82,7 @@ TDEFX_EXPORT void kDrawBeButton(TQPainter *p, int x, int y, int w, int h, const TQBrush *fill=0); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Draws a rounded oval button. This function doesn't fill the button. @@ -97,14 +97,14 @@ TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, const TQRect &r, const TQColorG bool sunken=false); /** - * @relates KStyle + * @relates TDEStyle * @overload */ TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken=false); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Sets a region to the pixels covered by a round button of the given @@ -121,7 +121,7 @@ TDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h, TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Paints the pixels covered by a round button of the given size with @@ -138,7 +138,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h); TDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear=false); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * * Paints the provided bitmaps in the painter, using the supplied colorgroup for @@ -167,7 +167,7 @@ TDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int TQBitmap *blackColor=0, TQBitmap *whiteColor=0); /** - * @relates KStyle + * @relates TDEStyle * @c \#include @c * @overload */ diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp index dde47eeb2..29663faf3 100644 --- a/tdefx/kstyle.cpp +++ b/tdefx/kstyle.cpp @@ -1,6 +1,6 @@ /* * - * KStyle + * TDEStyle * Copyright (C) 2001-2002 Karol Szwed * * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech, @@ -124,7 +124,7 @@ namespace static bool useDropShadow(TQWidget* w) { return w && w->metaObject() && - w->metaObject()->findProperty("KStyleMenuDropShadow") != -1; + w->metaObject()->findProperty("TDEStyleMenuDropShadow") != -1; } } @@ -133,7 +133,7 @@ namespace class TransparencyHandler : public TQObject { public: - TransparencyHandler(KStyle* style, TransparencyEngine tEngine, + TransparencyHandler(TDEStyle* style, TransparencyEngine tEngine, float menuOpacity, bool useDropShadow); ~TransparencyHandler(); bool eventFilter(TQObject* object, TQEvent* event); @@ -154,12 +154,12 @@ class TransparencyHandler : public TQObject bool dropShadow; float opacity; TQPixmap pix; - KStyle* kstyle; + TDEStyle* kstyle; TransparencyEngine te; }; } // namespace -struct KStylePrivate +struct TDEStylePrivate { bool highcolor : 1; bool useFilledFrameWorkaround : 1; @@ -174,9 +174,9 @@ struct KStylePrivate float menuOpacity; TransparencyEngine transparencyEngine; - KStyle::KStyleScrollBarType scrollbarType; + TDEStyle::TDEStyleScrollBarType scrollbarType; TransparencyHandler* menuHandler; - KStyle::KStyleFlags flags; + TDEStyle::TDEStyleFlags flags; //For KPE_ListViewBranch TQBitmap *verticalLine; @@ -186,8 +186,8 @@ struct KStylePrivate // ----------------------------------------------------------------------------- -KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype ) - : TQCommonStyle(), d(new KStylePrivate) +TDEStyle::TDEStyle( TDEStyleFlags flags, TDEStyleScrollBarType sbtype ) + : TQCommonStyle(), d(new TDEStylePrivate) { d->flags = flags; bool useMenuTransparency = (flags & AllowMenuTransparency); @@ -197,18 +197,18 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype ) // Read style settings TQSettings settings; - d->popupMenuDelay = settings.readNumEntry ("/KStyle/Settings/PopupMenuDelay", 256); - d->sloppySubMenus = settings.readBoolEntry("/KStyle/Settings/SloppySubMenus", false); - d->etchDisabledText = settings.readBoolEntry("/KStyle/Settings/EtchDisabledText", true); - d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true); - d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false); - d->autoHideAccelerators = settings.readBoolEntry("/KStyle/Settings/AutoHideAccelerators", false); - d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false); - d->semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false); + d->popupMenuDelay = settings.readNumEntry ("/TDEStyle/Settings/PopupMenuDelay", 256); + d->sloppySubMenus = settings.readBoolEntry("/TDEStyle/Settings/SloppySubMenus", false); + d->etchDisabledText = settings.readBoolEntry("/TDEStyle/Settings/EtchDisabledText", true); + d->menuAltKeyNavigation = settings.readBoolEntry("/TDEStyle/Settings/MenuAltKeyNavigation", true); + d->scrollablePopupmenus = settings.readBoolEntry("/TDEStyle/Settings/ScrollablePopupMenus", false); + d->autoHideAccelerators = settings.readBoolEntry("/TDEStyle/Settings/AutoHideAccelerators", false); + d->menuDropShadow = settings.readBoolEntry("/TDEStyle/Settings/MenuDropShadow", false); + d->semiTransparentRubberband = settings.readBoolEntry("/TDEStyle/Settings/SemiTransparentRubberband", false); d->menuHandler = NULL; if (useMenuTransparency) { - TQString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled"); + TQString effectEngine = settings.readEntry("/TDEStyle/Settings/MenuTransparencyEngine", "Disabled"); #ifdef HAVE_XRENDER if (effectEngine == "XRender") @@ -226,7 +226,7 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype ) if (d->transparencyEngine != Disabled) { // Create an instance of the menu transparency handler - d->menuOpacity = settings.readDoubleEntry("/KStyle/Settings/MenuOpacity", 0.90); + d->menuOpacity = settings.readDoubleEntry("/TDEStyle/Settings/MenuOpacity", 0.90); d->menuHandler = new TransparencyHandler(this, d->transparencyEngine, d->menuOpacity, d->menuDropShadow); } @@ -241,7 +241,7 @@ KStyle::KStyle( KStyleFlags flags, KStyleScrollBarType sbtype ) } -KStyle::~KStyle() +TDEStyle::~TDEStyle() { delete d->verticalLine; delete d->horizontalLine; @@ -253,7 +253,7 @@ KStyle::~KStyle() } -TQString KStyle::defaultStyle() +TQString TDEStyle::defaultStyle() { if (TQPixmap::defaultDepth() > 8) return TQString("plastik"); @@ -261,7 +261,7 @@ TQString KStyle::defaultStyle() return TQString("light, 3rd revision"); } -void KStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) +void TDEStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { TQWidget* widget = reinterpret_cast(ptr); @@ -285,7 +285,7 @@ void KStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlag } -void KStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) +void TDEStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { TQWidget* widget = reinterpret_cast(ptr); @@ -304,7 +304,7 @@ void KStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFl // Style changes (should) always re-polish popups. -void KStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) +void TDEStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { if ( !(ceData.windowState & WState_Polished ) ) { widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable); @@ -324,26 +324,26 @@ void KStyle::polishPopupMenu( const TQStyleControlElementData &ceData, ControlEl // ----------------------------------------------------------------------------- -// KStyle extensions +// TDEStyle extensions // ----------------------------------------------------------------------------- -void KStyle::setScrollBarType(KStyleScrollBarType sbtype) +void TDEStyle::setScrollBarType(TDEStyleScrollBarType sbtype) { d->scrollbarType = sbtype; } -KStyle::KStyleFlags KStyle::styleFlags() const +TDEStyle::TDEStyleFlags TDEStyle::styleFlags() const { return d->flags; } -void KStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg, +void TDEStyle::renderMenuBlendPixmap( KPixmap &pix, const TQColorGroup &cg, const TQPopupMenu* /* popup */ ) const { pix.fill(cg.button()); // Just tint as the default behavior } -void KStyle::drawKStylePrimitive( KStylePrimitive kpe, +void TDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -352,10 +352,10 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe, const TQStyleOption &opt ) const { TQStyleControlElementData ceData = populateControlElementDataFromWidget(widget, TQStyleOption()); - drawKStylePrimitive(kpe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt); + drawTDEStylePrimitive(kpe, p, ceData, getControlElementFlagsForObject(widget, ceData.widgetObjectTypes, TQStyleOption()), r, cg, flags, opt); } -void KStyle::drawKStylePrimitive( KStylePrimitive kpe, +void TDEStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -543,7 +543,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe, } -int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const +int TDEStyle::kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const { int value; switch(kpm) @@ -571,7 +571,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData // #ifdef USE_QT4 // tdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now -//void KStyle::drawPrimitive( TQ_ControlElement pe, +//void TDEStyle::drawPrimitive( TQ_ControlElement pe, // TQPainter* p, // const TQStyleControlElementData &ceData, // ControlElementFlags elementFlags, @@ -591,7 +591,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData // ----------------------------------------------------------------------------- -void KStyle::drawPrimitive( TQ_PrimitiveElement pe, +void TDEStyle::drawPrimitive( TQ_PrimitiveElement pe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -619,16 +619,16 @@ void KStyle::drawPrimitive( TQ_PrimitiveElement pe, (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock // Draw a toolbar handle - drawKStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); + drawTDEStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); else if (ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) // Draw a dock window handle - drawKStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); + drawTDEStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); else // General handle, probably a kicker applet handle. - drawKStylePrimitive( KPE_GeneralHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); + drawTDEStylePrimitive( KPE_GeneralHandle, p, ceData, elementFlags, r, cg, flags, opt, widget ); #if TQT_VERSION >= 0x030300 #ifdef HAVE_XRENDER } else if ( d->semiTransparentRubberband && pe == TQStyle::PE_RubberBand ) { @@ -686,7 +686,7 @@ void KStyle::drawPrimitive( TQ_PrimitiveElement pe, -void KStyle::drawControl( TQ_ControlElement element, +void TDEStyle::drawControl( TQ_ControlElement element, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -988,7 +988,7 @@ void KStyle::drawControl( TQ_ControlElement element, } -TQRect KStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const +TQRect TDEStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget* widget) const { switch(r) { @@ -1010,7 +1010,7 @@ TQRect KStyle::subRect(SubRect r, const TQStyleControlElementData &ceData, const } -int KStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget) const +int TDEStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget) const { switch(m) { @@ -1132,7 +1132,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void KStyle::drawComplexControl( TQ_ComplexControl control, +void TDEStyle::drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -1248,7 +1248,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, // Draw slider groove if ((controls & SC_SliderGroove) && groove.isValid()) { - drawKStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, flags, opt, widget ); + drawTDEStylePrimitive( KPE_SliderGroove, &p2, ceData, elementFlags, groove, cg, flags, opt, widget ); // Draw the focus rect around the groove if (elementFlags & CEF_HasFocus) { @@ -1265,7 +1265,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, if ((controls & SC_SliderHandle) && handle.isValid()) { if (active == SC_SliderHandle) flags |= Style_Active; - drawKStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, flags, opt, widget ); + drawTDEStylePrimitive( KPE_SliderHandle, &p2, ceData, elementFlags, handle, cg, flags, opt, widget ); } p2.end(); @@ -1352,8 +1352,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, boxrect = TQRect( bx-4, linebot-4, 9, 9 ); boxflags = child->isOpen() ? TQStyle::Style_Off : TQStyle::Style_On; - // KStyle extension: Draw the box and expand/collapse indicator - drawKStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL ); + // TDEStyle extension: Draw the box and expand/collapse indicator + drawTDEStylePrimitive( KPE_ListViewExpander, p, ceData, elementFlags, boxrect, cg, boxflags, opt, NULL ); // dotlinery p->setPen( cg.mid() ); @@ -1406,8 +1406,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, branchrect = TQRect( point, other-(thickness/2), end-point, thickness ); branchflags = TQStyle::Style_Horizontal; - // KStyle extension: Draw the horizontal branch - drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); + // TDEStyle extension: Draw the horizontal branch + drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); } else { // Vertical branch @@ -1422,8 +1422,8 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, else branchflags = TQStyle::Style_Default; - // KStyle extension: Draw the vertical branch - drawKStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); + // TDEStyle extension: Draw the vertical branch + drawTDEStylePrimitive( KPE_ListViewBranch, p, ceData, elementFlags, branchrect, cg, branchflags, opt, NULL ); } } } @@ -1438,7 +1438,7 @@ void KStyle::drawComplexControl( TQ_ComplexControl control, } -TQStyle::SubControl KStyle::querySubControl( TQ_ComplexControl control, +TQStyle::SubControl TDEStyle::querySubControl( TQ_ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, @@ -1456,7 +1456,7 @@ TQStyle::SubControl KStyle::querySubControl( TQ_ComplexControl control, } -TQRect KStyle::querySubControlMetrics( TQ_ComplexControl control, +TQRect TDEStyle::querySubControlMetrics( TQ_ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl sc, @@ -1842,7 +1842,7 @@ static const char* const critical_xpm[]={ "...........aaaaaaaaaaa..........", ".............aaaaaaa............"}; -TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap, +TQPixmap TDEStyle::stylePixmap( StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& opt, @@ -1876,7 +1876,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap, } -int KStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, +int TDEStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt, TQStyleHintReturn* shr, const TQWidget* w) const { switch (sh) @@ -1935,7 +1935,7 @@ int KStyle::styleHint( TQ_StyleHint sh, const TQStyleControlElementData &ceData, } -bool KStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) +bool TDEStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { TQObject* object = reinterpret_cast(source); @@ -1990,10 +1990,10 @@ bool KStyle::objectEventHandler( const TQStyleControlElementData &ceData, Contro // ----------------------------------------------------------------------------- -// I N T E R N A L - KStyle menu transparency handler +// I N T E R N A L - TDEStyle menu transparency handler // ----------------------------------------------------------------------------- -TransparencyHandler::TransparencyHandler( KStyle* style, +TransparencyHandler::TransparencyHandler( TDEStyle* style, TransparencyEngine tEngine, float menuOpacity, bool useDropShadow ) : TQObject() { @@ -2401,7 +2401,7 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p) } #endif -void KStyle::virtual_hook( int, void* ) +void TDEStyle::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } // HACK for gtk-qt-engine @@ -2409,7 +2409,7 @@ void KStyle::virtual_hook( int, void* ) extern "C" KDE_EXPORT void kde_kstyle_set_scrollbar_type_windows( void* style ) { - ((KStyle*)style)->setScrollBarType( KStyle::WindowsStyleScrollBar ); + ((TDEStyle*)style)->setScrollBarType( TDEStyle::WindowsStyleScrollBar ); } // vim: set noet ts=4 sw=4: diff --git a/tdefx/kstyle.h b/tdefx/kstyle.h index c8a704381..9c3867bb3 100644 --- a/tdefx/kstyle.h +++ b/tdefx/kstyle.h @@ -1,7 +1,7 @@ /* * $Id$ * - * KStyle + * TDEStyle * Copyright (C) 2001-2002 Karol Szwed * * TQWindowsStyle CC_ListView and style images were kindly donated by TrollTech, @@ -38,11 +38,11 @@ class KPixmap; -struct KStylePrivate; +struct TDEStylePrivate; /** * Simplifies and extends the TQStyle API to make style coding easier. * - * The KStyle class provides a simple internal menu transparency engine + * The TDEStyle class provides a simple internal menu transparency engine * which attempts to use XRender for accelerated blending where requested, * or falls back to fast internal software tinting/blending routines. * It also simplifies more complex portions of the TQStyle API, such as @@ -54,7 +54,7 @@ struct KStylePrivate; * @author Karol Szwed (gallium@kde.org) * @version $Id$ */ -class TDEFX_EXPORT KStyle: public TQCommonStyle +class TDEFX_EXPORT TDEStyle: public TQCommonStyle { Q_OBJECT @@ -62,12 +62,12 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle public: /** - * KStyle Flags: + * TDEStyle Flags: * * @li Default - Default style setting, where menu transparency * and the FilledFrameWorkaround are disabled. * - * @li AllowMenuTransparency - Enable this flag to use KStyle's + * @li AllowMenuTransparency - Enable this flag to use TDEStyle's * internal menu transparency engine. * * @li FilledFrameWorkaround - Enable this flag to facilitate @@ -77,15 +77,15 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * this workaround to enable painting of gradients in menubars and * toolbars. */ - typedef uint KStyleFlags; - enum KStyleOption { + typedef uint TDEStyleFlags; + enum TDEStyleOption { Default = 0x00000000, //!< All options disabled AllowMenuTransparency = 0x00000001, //!< Internal transparency enabled FilledFrameWorkaround = 0x00000002 //!< Filled frames enabled }; /** - * KStyle ScrollBarType: + * TDEStyle ScrollBarType: * * Allows the style writer to easily select what type of scrollbar * should be used without having to duplicate large amounts of source @@ -105,9 +105,9 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * @li NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but * with the buttons grouped on the opposite end of the scrollbar. * - * @see KStyle::KStyle() + * @see TDEStyle::TDEStyle() */ - enum KStyleScrollBarType { + enum TDEStyleScrollBarType { WindowsStyleScrollBar = 0x00000000, //!< two button, windows style PlatinumStyleScrollBar = 0x00000001, //!< two button, platinum style ThreeButtonScrollBar = 0x00000002, //!< three buttons, %KDE style @@ -115,31 +115,31 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle }; /** - * Constructs a KStyle object. + * Constructs a TDEStyle object. * - * Select the appropriate KStyle flags and scrollbar type + * Select the appropriate TDEStyle flags and scrollbar type * for your style. The user's style preferences selected in KControl * are read by using TQSettings and are automatically applied to the style. - * As a fallback, KStyle paints progressbars and tabbars. It inherits from + * As a fallback, TDEStyle paints progressbars and tabbars. It inherits from * TQCommonStyle for speed, so don't expect much to be implemented. * * It is advisable to use a currently implemented style such as the HighColor - * style as a foundation for any new KStyle, so the limited number of + * style as a foundation for any new TDEStyle, so the limited number of * drawing fallbacks should not prove problematic. * * @param flags the style to be applied * @param sbtype the scroll bar type - * @see KStyle::KStyleFlags - * @see KStyle::KStyleScrollBarType + * @see TDEStyle::TDEStyleFlags + * @see TDEStyle::TDEStyleScrollBarType * @author Karol Szwed (gallium@kde.org) */ - KStyle( KStyleFlags flags = KStyle::Default, - KStyleScrollBarType sbtype = KStyle::WindowsStyleScrollBar ); + TDEStyle( TDEStyleFlags flags = TDEStyle::Default, + TDEStyleScrollBarType sbtype = TDEStyle::WindowsStyleScrollBar ); /** - * Destructs the KStyle object. + * Destructs the TDEStyle object. */ - ~KStyle(); + ~TDEStyle(); /** * Returns the default widget style depending on color depth. @@ -152,19 +152,19 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * This function is only provided for convenience. It allows * you to make a late decision about what scrollbar type to use for the * style after performing some processing in your style's constructor. - * In most situations however, setting the scrollbar type via the KStyle + * In most situations however, setting the scrollbar type via the TDEStyle * constructor should suffice. * @param sbtype the scroll bar type - * @see KStyle::KStyleScrollBarType + * @see TDEStyle::TDEStyleScrollBarType */ - void setScrollBarType(KStyleScrollBarType sbtype); + void setScrollBarType(TDEStyleScrollBarType sbtype); /** - * Returns the KStyle flags used to initialize the style. + * Returns the TDEStyle flags used to initialize the style. * * This is used solely for the kcmstyle module, and hence is internal. */ - KStyleFlags styleFlags() const; + TDEStyleFlags styleFlags() const; // --------------------------------------------------------------------------- @@ -173,7 +173,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * menu and the background to create different menu transparency effects. * For example, you can fill the pixmap "pix" with a gradient based on the * popup's colorGroup, a texture, or some other fancy painting routine. - * KStyle will then internally blend this pixmap with a snapshot of the + * TDEStyle will then internally blend this pixmap with a snapshot of the * background behind the popupMenu to create the illusion of transparency. * * This virtual is never called if XRender/Software blending is disabled by @@ -183,20 +183,20 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle const TQPopupMenu* popup ) const; /** - * KStyle Primitive Elements: + * TDEStyle Primitive Elements: * - * The KStyle class extends the Qt's Style API by providing certain - * simplifications for parts of TQStyle. To do this, the KStylePrimitive + * The TDEStyle class extends the Qt's Style API by providing certain + * simplifications for parts of TQStyle. To do this, the TDEStylePrimitive * elements were defined, which are very similar to Qt's PrimitiveElement. * * The first three Handle primitives simplify and extend PE_DockWindowHandle, - * so do not reimplement PE_DockWindowHandle if you want the KStyle handle + * so do not reimplement PE_DockWindowHandle if you want the TDEStyle handle * simplifications to be operable. Similarly do not reimplement CC_Slider, - * SC_SliderGroove and SC_SliderHandle when using the KStyle slider - * primitives. KStyle automatically double-buffers slider painting - * when they are drawn via these KStyle primitives to avoid flicker. + * SC_SliderGroove and SC_SliderHandle when using the TDEStyle slider + * primitives. TDEStyle automatically double-buffers slider painting + * when they are drawn via these TDEStyle primitives to avoid flicker. * - * @li KPE_DockWindowHandle - This primitive is already implemented in KStyle, + * @li KPE_DockWindowHandle - This primitive is already implemented in TDEStyle, * and paints a bevelled rect with the DockWindow caption text. Re-implement * this primitive to perform other more fancy effects when drawing the dock window * handle. @@ -218,14 +218,14 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * paint the slider handle. The default implementation paints a filled rect of * arbitrary color. * - * @li KPE_ListViewExpander - This primitive is already implemented in KStyle. It + * @li KPE_ListViewExpander - This primitive is already implemented in TDEStyle. It * is used to draw the Expand/Collapse element in QListViews. To indicate the * expanded state, the style flags are set to Style_Off, while Style_On implies collapsed. * - * @li KPE_ListViewBranch - This primitive is already implemented in KStyle. It is + * @li KPE_ListViewBranch - This primitive is already implemented in TDEStyle. It is * used to draw the ListView branches where necessary. */ - enum KStylePrimitive { + enum TDEStylePrimitive { KPE_DockWindowHandle, KPE_ToolBarHandle, KPE_GeneralHandle, @@ -239,7 +239,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle // Old API // DEPRECATED - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -250,13 +250,13 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle /** * This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that * it adds one further parameter, 'widget', that can be used to determine - * the widget state of the KStylePrimitive in question. + * the widget state of the TDEStylePrimitive in question. * - * @see KStyle::KStylePrimitive + * @see TDEStyle::TDEStylePrimitive * @see TQStyle::tqdrawPrimitive * @see TQStyle::drawComplexControl */ - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -267,7 +267,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle const TQWidget* widget = 0 ) const; - enum KStylePixelMetric { + enum TDEStylePixelMetric { KPM_MenuItemSeparatorHeight = 0x00000001, KPM_MenuItemHMargin = 0x00000002, KPM_MenuItemVMargin = 0x00000004, @@ -279,7 +279,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle KPM_ListViewBranchThickness = 0x00000100 }; - int kPixelMetric( KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; + int kPixelMetric( TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; // --------------------------------------------------------------------------- @@ -368,13 +368,13 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle private: // Disable copy constructor and = operator - KStyle( const KStyle & ); - KStyle& operator=( const KStyle & ); + TDEStyle( const TDEStyle & ); + TDEStyle& operator=( const TDEStyle & ); protected: virtual void virtual_hook( int id, void* data ); private: - KStylePrivate *d; + TDEStylePrivate *d; }; diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 670b7ce78..a1fcc2fd3 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -6,7 +6,7 @@ KDialogBase, KAboutDialog (based on work by Mirko), KHelpMenu, KTextBrowser and various adjustments here and there. Daniel M. Duley -Maintainer of KPixmapEffect, KStyle, KThemeStyle, and KThemeBase - as well as +Maintainer of KPixmapEffect, TDEStyle, KThemeStyle, and KThemeBase - as well as general misc coding here and there. Matthias Kalle Dalheimer : diff --git a/tdeui/karrowbutton.h b/tdeui/karrowbutton.h index df25c69eb..c490c8aab 100644 --- a/tdeui/karrowbutton.h +++ b/tdeui/karrowbutton.h @@ -30,7 +30,7 @@ class KArrowButtonPrivate; * Draws a button which shows an arrow pointing into a certain direction. The * arrow's alignment on the button depends on the direction it's pointing to, * e.g. a left arrow is aligned at the left border, a upwards arrow at the top - * border. This class honors the currently configured KStyle when drawing + * border. This class honors the currently configured TDEStyle when drawing * the arrow. * * @author Frerich Raabe diff --git a/win/tdelibs_export_win.h b/win/tdelibs_export_win.h index c7ce9b410..b9c42bde4 100644 --- a/win/tdelibs_export_win.h +++ b/win/tdelibs_export_win.h @@ -114,7 +114,7 @@ # define TDESU_EXPORT KDE_IMPORT #endif -// all KStyle libs +// all TDEStyle libs #ifdef MAKE_KSTYLE_LIB # define KSTYLE_EXPORT KDE_EXPORT #else