diff options
Diffstat (limited to 'style/baghira.cpp')
-rw-r--r-- | style/baghira.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/style/baghira.cpp b/style/baghira.cpp index bb61570..09397ac 100644 --- a/style/baghira.cpp +++ b/style/baghira.cpp @@ -41,8 +41,8 @@ #include <tqtabbar.h> #include <tqtabwidget.h> #include <tqvariant.h> -#include <ktoolbar.h> -#include <ktoolbarbutton.h> +#include <tdetoolbar.h> +#include <tdetoolbarbutton.h> #include <kwordwrap.h> #include "config.h" @@ -132,13 +132,13 @@ TQPixmap LiquidStyle::popupBack; //============ -class KAccessToolBarButton : public KToolBarButton +class KAccessToolBarButton : public TDEToolBarButton { // to get me access to the toolbbar friend class LiquidStyle; public: KAccessToolBarButton( TQWidget* parent=0, const char* name=0 ) - : KToolBarButton( parent, name ) {} + : TDEToolBarButton( parent, name ) {} }; @@ -172,7 +172,7 @@ static const int arrowHMargin = 6; static const int rightBorder = 12; -LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) +LiquidStyle::LiquidStyle() : TDEStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) { TQIntDict<ButtonFadeInfo>bfi(31);// assuming 31 btns will be enough - a pointer list would be more accurate, but we need to lookup this every 50ms... TQIntDict<ButtonTile>btnShadowedDict(223);// we need around 10/color, 3 colors/button assuming 10 different colors (e.g. kcalc) @@ -1357,12 +1357,12 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, p->setBrush( oldBrush ); } else - KStyle::drawPrimitive( pe, p, r, cg, flags, opt ); + TDEStyle::drawPrimitive( pe, p, r, cg, flags, opt ); } } // general switch } -void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, +void LiquidStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const @@ -1514,7 +1514,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, break; } default: - KStyle::drawKStylePrimitive( kpe, p, widget, r, cg, flags, opt ); + TDEStyle::drawTDEStylePrimitive( kpe, p, widget, r, cg, flags, opt ); } } @@ -2154,7 +2154,7 @@ void LiquidStyle::drawControl( ControlElement element, TQPainter *p, break; }*/ default: - KStyle::drawControl( element, p, widget, r, cg, flags, opt ); + TDEStyle::drawControl( element, p, widget, r, cg, flags, opt ); } } @@ -2166,7 +2166,7 @@ void LiquidStyle::drawControl( ControlElement element, TQPainter *p, // break; // } // default: -// KStyle::drawControlMask( element, p, widget, r, opt ); +// TDEStyle::drawControlMask( element, p, widget, r, opt ); // break; // } // } @@ -2178,7 +2178,7 @@ void LiquidStyle::drawControl( ControlElement element, TQPainter *p, // // break; // // } // // default: -// KStyle::drawComplexControlMask( control, p, widget, r, opt ); +// TDEStyle::drawComplexControlMask( control, p, widget, r, opt ); // // } // } @@ -2251,7 +2251,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons TQRect button, menuarea; button = querySubControlMetrics( control, widget, SC_ToolButton, opt ); menuarea = querySubControlMetrics( control, widget, SC_ToolButtonMenu, opt ); - if (::tqt_cast<KToolBarButton*>(toolbutton)) + if (::tqt_cast<TDEToolBarButton*>(toolbutton)) { toolbutton2 = (const KAccessToolBarButton*)toolbutton; #if GCC_VERSION < 40000 @@ -2304,11 +2304,11 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons else { myPosition pos = full; - KToolBar *bar = NULL; + TDEToolBar *bar = NULL; - if (toolbutton2 && toolbutton2->parentWidget() && ::tqt_cast<KToolBar*>(toolbutton2->parentWidget()) ) - { //position calculation - would be nice if ktoolbarbutton provided this as flag - bar = (KToolBar*)toolbutton2->parentWidget(); + if (toolbutton2 && toolbutton2->parentWidget() && ::tqt_cast<TDEToolBar*>(toolbutton2->parentWidget()) ) + { //position calculation - would be nice if tdetoolbarbutton provided this as flag + bar = (TDEToolBar*)toolbutton2->parentWidget(); int buttonId = toolbutton2->id(); int buttonIndex = bar->itemIndex(buttonId); @@ -2332,19 +2332,19 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons { if (buttonIndex == 0) { - KToolBarButton *tmpButton = bar->getButton(bar->idAt(buttonIndex+1)); + TDEToolBarButton *tmpButton = bar->getButton(bar->idAt(buttonIndex+1)); (tmpButton && tmpButton->x() == toolbutton2->x()+toolbutton2->width()) ? pos = left : pos = full; } else if (buttonIndex == bar->count() - 1) { - KToolBarButton *tmpButton = NULL; + TDEToolBarButton *tmpButton = NULL; tmpButton = bar->getButton(bar->idAt(buttonIndex-1)); (tmpButton && tmpButton->x() + tmpButton->width() == toolbutton2->x()) ? pos = right : pos = full; } else { - KToolBarButton *tmpButton1 = bar->getButton(bar->idAt(buttonIndex-1)); - KToolBarButton *tmpButton2 = bar->getButton(bar->idAt(buttonIndex+1)); + TDEToolBarButton *tmpButton1 = bar->getButton(bar->idAt(buttonIndex-1)); + TDEToolBarButton *tmpButton2 = bar->getButton(bar->idAt(buttonIndex+1)); tmpButton1 && tmpButton1->x() + tmpButton1->width() == toolbutton2->x() ? pos = center : pos = left; if (!(tmpButton2 && tmpButton2->x() == toolbutton2->x()+toolbutton2->width())) @@ -2355,21 +2355,21 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons { if (buttonIndex == 0) { - KToolBarButton *tmpButton = bar->getButton(bar->idAt(buttonIndex+1)); + TDEToolBarButton *tmpButton = bar->getButton(bar->idAt(buttonIndex+1)); (tmpButton && tmpButton->y() == toolbutton2->y()+toolbutton2->height()) ? pos = left : pos = full; } else if (buttonIndex == bar->count() - 1) { - KToolBarButton *tmpButton = NULL; + TDEToolBarButton *tmpButton = NULL; tmpButton = bar->getButton(bar->idAt(buttonIndex-1)); (tmpButton && tmpButton->y() + tmpButton->height() == toolbutton2->y()) ? pos = right : pos = full; } else { - KToolBarButton *tmpButton1 = bar->getButton(bar->idAt(buttonIndex-1)); - KToolBarButton *tmpButton2 = bar->getButton(bar->idAt(buttonIndex+1)); + TDEToolBarButton *tmpButton1 = bar->getButton(bar->idAt(buttonIndex-1)); + TDEToolBarButton *tmpButton2 = bar->getButton(bar->idAt(buttonIndex+1)); tmpButton1 && tmpButton1->y() + tmpButton1->height() == toolbutton2->y() ? pos = center : pos = left; if (!(tmpButton2 && tmpButton2->y() == toolbutton2->y()+toolbutton2->height())) @@ -2413,7 +2413,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons case CC_ScrollBar: { const_cast<LiquidStyle*>( this ) ->currentScrollBar = ( TQScrollBar * ) widget; - KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TDEStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } case CC_SpinWidget: { @@ -2511,7 +2511,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons // Draw slider groove if ((controls & SC_SliderGroove) && groove.isValid()) { - drawKStylePrimitive( KPE_SliderGroove, &p2, widget, groove, cg, flags, opt ); + drawTDEStylePrimitive( KPE_SliderGroove, &p2, widget, groove, cg, flags, opt ); // Draw the focus rect around the groove /* if (slider->hasFocus()) @@ -2527,7 +2527,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons if ((controls & SC_SliderHandle) && handle.isValid()) { if (active == SC_SliderHandle) flags |= Style_Active; - drawKStylePrimitive( KPE_SliderHandle, &p2, widget, handle, cg, flags, opt ); + drawTDEStylePrimitive( KPE_SliderHandle, &p2, widget, handle, cg, flags, opt ); } p2.end(); @@ -2842,7 +2842,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, cons #endif //QT_NO_TITLEBAR default: - KStyle::drawComplexControl( control, p, widget, + TDEStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -2860,9 +2860,9 @@ int LiquidStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption if (optionHandler->CenterTabs() && !TQApplication::reverseLayout()) return AlignHCenter; else - return KStyle::styleHint(sh, w, opt, shr); + return TDEStyle::styleHint(sh, w, opt, shr); default: - return KStyle::styleHint(sh, w, opt, shr); + return TDEStyle::styleHint(sh, w, opt, shr); } } @@ -2870,7 +2870,7 @@ TQRect LiquidStyle::subRect( SubRect r, const TQWidget *widget ) const { if (r == SR_ComboBoxFocusRect){ return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ); } - return ( KStyle::subRect( r, widget ) ); + return ( TDEStyle::subRect( r, widget ) ); } int LiquidStyle::pixelMetric( PixelMetric m, const TQWidget *widget ) const @@ -2955,7 +2955,7 @@ int LiquidStyle::pixelMetric( PixelMetric m, const TQWidget *widget ) const case PM_ButtonShiftVertical: return 0; default: - return KStyle::pixelMetric( m, widget ); + return TDEStyle::pixelMetric( m, widget ); } } @@ -3000,7 +3000,7 @@ TQSize LiquidStyle::sizeFromContents( ContentsType contents, } case CT_ComboBox: { - // TQSize sz = KStyle::sizeFromContents( contents, widget, contentSize, opt ); + // TQSize sz = TDEStyle::sizeFromContents( contents, widget, contentSize, opt ); // return ( TQSize( sz.width()+3, sz.height() > 25 ? sz.height() : 25 ) ); if ( ::tqt_cast<const TQComboBox *>(widget) && ((const TQComboBox *)widget)->editable()) return ( TQSize( contentSize.width()+27, contentSize.height() + 4 > 22 ? contentSize.height() + 4 : 26 ) ); @@ -3054,14 +3054,14 @@ TQSize LiquidStyle::sizeFromContents( ContentsType contents, default: break; } - return KStyle::sizeFromContents( contents, widget, contentSize, opt ); + return TDEStyle::sizeFromContents( contents, widget, contentSize, opt ); } TQPixmap LiquidStyle::stylePixmap( StylePixmap stylepixmap, const TQWidget* widget, const TQStyleOption& opt ) const { - return KStyle::stylePixmap( stylepixmap, widget, opt ); + return TDEStyle::stylePixmap( stylepixmap, widget, opt ); } #include "eventfilter.cpp" @@ -3091,11 +3091,11 @@ TQRect LiquidStyle::querySubControlMetrics( ComplexControl control, const TQWidg case SC_TitleBarUnshadeButton: return TQRect( widget->width() - 29, 1, 24, 16 ); default: - return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); + return ( TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } } else - return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); + return ( TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } TQImage LiquidStyle::fetchImage( const char *name ){ |