diff options
Diffstat (limited to 'kstyles/highcontrast')
-rw-r--r-- | kstyles/highcontrast/config/highcontrastconfig.cpp | 6 | ||||
-rw-r--r-- | kstyles/highcontrast/highcontrast.cpp | 90 | ||||
-rw-r--r-- | kstyles/highcontrast/highcontrast.h | 12 |
3 files changed, 54 insertions, 54 deletions
diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 233fb7365..fa980af2c 100644 --- a/kstyles/highcontrast/config/highcontrastconfig.cpp +++ b/kstyles/highcontrast/config/highcontrastconfig.cpp @@ -43,13 +43,13 @@ HighContrastStyleConfig::HighContrastStyleConfig( TQWidget* parent): TQWidget(parent) { // Should have no margins here, the dialog provides them - TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 0, 0); KGlobal::locale()->insertCatalogue("kstyle_highcontrast_config"); wideLinesBox = new TQCheckBox(i18n("Use wider lines"), this); - layout->add(wideLinesBox); - layout->addStretch(1); + tqlayout->add(wideLinesBox); + tqlayout->addStretch(1); TQSettings s; diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index 0b9c0cfcf..bc53393f5 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -702,13 +702,13 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } case KPE_ListViewExpander: { - // TODO There is no pixelMetric associated with the + // TODO There is no tqpixelMetric associated with the // ListViewExpander in KStyle. // To have a properly large expander, the CC_ListView case of - // drawComplexControl should be handled. + // tqdrawComplexControl should be handled. // Probably it would be better to add a KPM_ListViewExpander metric // to the KStyle KStylePixelMetric enum, and have the KStyle - // drawComplexControl handle it. + // tqdrawComplexControl handle it. PrimitiveElement direction; if (flags & Style_On) { // Collapsed = On direction = PE_ArrowRight; @@ -729,7 +729,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } -void HighContrastStyle::drawControl (ControlElement element, +void HighContrastStyle::tqdrawControl (ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -755,9 +755,9 @@ void HighContrastStyle::drawControl (ControlElement element, drawRoundRect (p, r); const TQTabBar *tb = static_cast< const TQTabBar * >(widget); - TQTabBar::Shape shape = tb->shape(); - if (shape == TQTabBar::TriangularBelow || - shape == TQTabBar::RoundedBelow) { + TQTabBar::Shape tqshape = tb->tqshape(); + if (tqshape == TQTabBar::TriangularBelow || + tqshape == TQTabBar::RoundedBelow) { p->fillRect (r.left(), r.top(), r.width(), 2*basicLineWidth, p->pen().color()); @@ -789,7 +789,7 @@ void HighContrastStyle::drawControl (ControlElement element, if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) { // Compensate for default indicator - static int di = pixelMetric( PM_ButtonDefaultIndicator ); + static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); addOffset (&br, di); } @@ -860,7 +860,7 @@ void HighContrastStyle::drawControl (ControlElement element, // Does the button have a popup menu? if (popup) { - int dx = pixelMetric (PM_MenuButtonIndicator, widget); + int dx = tqpixelMetric (PM_MenuButtonIndicator, widget); drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown); w -= dx; } @@ -1009,7 +1009,7 @@ void HighContrastStyle::drawControl (ControlElement element, // Do we have an icon? if ( mi->iconSet() && !mi->iconSet()->isNull() ) { TQIconSet::Mode mode; - TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if (!(flags & Style_Enabled)) @@ -1075,7 +1075,7 @@ void HighContrastStyle::drawControl (ControlElement element, // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.find( '\t' ); + int t = s.tqfind( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -1118,8 +1118,8 @@ void HighContrastStyle::drawControl (ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator); - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator); + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1129,11 +1129,11 @@ void HighContrastStyle::drawControl (ControlElement element, } default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void HighContrastStyle::drawControlMask (ControlElement element, +void HighContrastStyle::tqdrawControlMask (ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1157,12 +1157,12 @@ void HighContrastStyle::drawControlMask (ControlElement element, } default: { - KStyle::drawControlMask (element, p, w, r, opt); + KStyle::tqdrawControlMask (element, p, w, r, opt); } } } -// Helper to find the next sibling that's not hidden +// Helper to tqfind the next sibling that's not hidden // Lifted from kstyle.cpp static TQListViewItem* nextVisibleSibling(TQListViewItem* item) { @@ -1176,7 +1176,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void HighContrastStyle::drawComplexControl (ComplexControl control, +void HighContrastStyle::tqdrawComplexControl (ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1197,7 +1197,7 @@ void HighContrastStyle::drawComplexControl (ComplexControl control, setColorsText (p, cg, flags); drawRoundRect (p, r); - TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); if (flags & Style_HasFocus) { TQRect r3 (r); if (r2.left() > 0) @@ -1232,12 +1232,12 @@ void HighContrastStyle::drawComplexControl (ComplexControl control, setColorsButton (p, cg, flags); // Draw arrows if required if (controls & SC_SpinWidgetDown) { - TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth); } if (controls & SC_SpinWidgetUp) { - TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth); } @@ -1273,11 +1273,11 @@ void HighContrastStyle::drawComplexControl (ComplexControl control, drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt); // Check whether to draw a background pixmap - else if ( toolbutton->parentWidget() && - toolbutton->parentWidget()->backgroundPixmap() && - !toolbutton->parentWidget()->backgroundPixmap()->isNull() ) + else if ( toolbutton->tqparentWidget() && + toolbutton->tqparentWidget()->backgroundPixmap() && + !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() ) { - TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap()); + TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap()); p->drawTiledPixmap( r, pixmap, toolbutton->pos() ); } } @@ -1312,7 +1312,7 @@ void HighContrastStyle::drawComplexControl (ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1458,13 +1458,13 @@ void HighContrastStyle::drawComplexControl (ComplexControl control, } default: - KStyle::drawComplexControl(control, p, widget, + KStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighContrastStyle::drawComplexControlMask(ComplexControl c, +void HighContrastStyle::tqdrawComplexControlMask(ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1478,7 +1478,7 @@ void HighContrastStyle::drawComplexControlMask(ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, w, r, o); + KStyle::tqdrawComplexControlMask (c, p, w, r, o); } } } @@ -1515,7 +1515,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control, switch (control) { case CC_ComboBox : { - int arrow = pixelMetric (PM_ScrollBarExtent, widget); + int arrow = tqpixelMetric (PM_ScrollBarExtent, widget); switch (subcontrol) { case SC_ComboBoxFrame: @@ -1531,7 +1531,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control, break; } case CC_SpinWidget : { - int arrow = pixelMetric (PM_ScrollBarExtent, 0); + int arrow = tqpixelMetric (PM_ScrollBarExtent, 0); switch (subcontrol) { case SC_SpinWidgetFrame: @@ -1559,7 +1559,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control, } -int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { //### TODO: Use the tab metrics changes from Ker. switch(m) @@ -1643,7 +1643,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -1672,8 +1672,8 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, const TQPushButton* button = (const TQPushButton*) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = pixelMetric( PM_ButtonMargin, widget ); - int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = tqpixelMetric( PM_ButtonMargin, widget ); + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -1684,7 +1684,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, w = 80; // Compensate for default indicator - int di = pixelMetric( PM_ButtonDefaultIndicator ); + int di = tqpixelMetric( PM_ButtonDefaultIndicator ); w += di * 2; h += di * 2; } @@ -1709,7 +1709,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, case CT_ComboBox: { const TQComboBox *cb = static_cast< const TQComboBox* > (widget); int borderSize = (cb->editable() ? 4 : 2) * basicLineWidth; - int arrowSize = pixelMetric (PM_ScrollBarExtent, cb); + int arrowSize = tqpixelMetric (PM_ScrollBarExtent, cb); return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize; } @@ -1726,8 +1726,8 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, int w = contentSize.width(), h = contentSize.height(); if ( mi->custom() ) { - w = mi->custom()->sizeHint().width(); - h = mi->custom()->sizeHint().height(); + w = mi->custom()->tqsizeHint().width(); + h = mi->custom()->tqsizeHint().height(); if ( ! mi->custom()->fullSpan() ) h += 2*itemVMargin + 2*itemFrame; } @@ -1753,7 +1753,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 ) + if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 ) w += 12; else if ( mi->popup() ) w += 2 * arrowHMargin; @@ -1807,7 +1807,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) || widget->inherits ("QSpinWidget"))) { hoverWidget = widget; - widget->repaint (false); + widget->tqrepaint (false); } else if (event->type() == TQEvent::Leave && (widget->inherits ("QButton") @@ -1816,7 +1816,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) { if (object == hoverWidget) hoverWidget = 0L; - widget->repaint (false); + widget->tqrepaint (false); } // Make sure the focus rectangle is shown correctly. else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut) @@ -1830,9 +1830,9 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) } if (widgetparent) - widgetparent->repaint (false); + widgetparent->tqrepaint (false); else - widget->repaint (false); + widget->tqrepaint (false); } } @@ -1840,4 +1840,4 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) } // vim: set noet ts=4 sw=4: -// kate: indent-width 4; replace-tabs off; smart-indent on; tab-width 4; +// kate: indent-width 4; tqreplace-tabs off; smart-indent on; tab-width 4; diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h index fb3db68b1..5b9bd0fb9 100644 --- a/kstyles/highcontrast/highcontrast.h +++ b/kstyles/highcontrast/highcontrast.h @@ -74,7 +74,7 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( ControlElement element, + void tqdrawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -82,13 +82,13 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControlMask( ControlElement element, + void tqdrawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, + void tqdrawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -98,7 +98,7 @@ class HighContrastStyle : public KStyle SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControlMask( ComplexControl control, + void tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -120,7 +120,7 @@ class HighContrastStyle : public KStyle int len = -1, const TQColor *penColor = 0 ) const; - int pixelMetric( PixelMetric m, + int tqpixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; int kPixelMetric( KStylePixelMetric m, @@ -157,6 +157,6 @@ class HighContrastStyle : public KStyle }; // vim: set noet ts=4 sw=4: -// kate: indent-width 4; replace-tabs off; smart-indent on; tab-width 4; +// kate: indent-width 4; tqreplace-tabs off; smart-indent on; tab-width 4; #endif |