diff options
Diffstat (limited to 'src/gui/kdeext/klearlook.cpp')
-rw-r--r-- | src/gui/kdeext/klearlook.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp index 17d37ad..adfe33e 100644 --- a/src/gui/kdeext/klearlook.cpp +++ b/src/gui/kdeext/klearlook.cpp @@ -664,38 +664,38 @@ void KlearlookStyle::unPolish( TQWidget *widget ) { } bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { - if ( object->tqparent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) { + if ( object->parent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) { // Draw background for custom widgets in the toolbar that have specified a "kde toolbar widget" name. if ( TQEvent::Paint == event->type() ) { TQWidget * widget = TQT_TQWIDGET( object ), - *tqparent = TQT_TQWIDGET( object->tqparent() ); + *parent = TQT_TQWIDGET( object->parent() ); #ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS // Find the top-level toolbar of this widget, since it may be nested in other // widgets that are on the toolbar. int x_offset = widget->x(), y_offset = widget->y(); - while ( tqparent && tqparent->tqparent() && !qstrcmp( tqparent->name(), kdeToolbarWidget ) ) { - x_offset += tqparent->x(); - y_offset += tqparent->y(); - tqparent = TQT_TQWIDGET( tqparent->tqparent() ); + while ( parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) { + x_offset += parent->x(); + y_offset += parent->y(); + parent = TQT_TQWIDGET( parent->parent() ); } - TQRect pr( tqparent->rect() ); + TQRect pr( parent->rect() ); bool horiz_grad = pr.width() < pr.height(); - // Check if the tqparent is a TQToolbar, and use its orientation, else guess. - TQToolBar *toolbar = dynamic_cast<TQToolBar*>( tqparent ); + // Check if the parent is a TQToolbar, and use its orientation, else guess. + TQToolBar *toolbar = dynamic_cast<TQToolBar*>( parent ); if ( toolbar ) horiz_grad = toolbar->orientation() == TQt::Vertical; - drawBevelGradient( tqparent->tqcolorGroup().background(), true, 1, &TQPainter( widget ), + drawBevelGradient( parent->tqcolorGroup().background(), true, 1, &TQPainter( widget ), TQRect( x_offset, y_offset, pr.width(), pr.height() ), horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); #else - TQPainter( widget ).fillRect( widget->rect(), tqparent->tqcolorGroup().background() ); + TQPainter( widget ).fillRect( widget->rect(), parent->tqcolorGroup().background() ); #endif return false; // Now draw the contents @@ -1478,8 +1478,8 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons : lv->tqpalette().color( TQPalette::Disabled, TQColorGroup::Text ) ) ); if ( flags & Style_Selected && !lv->rootIsDecorated() && - !( ( item->tqparent() && 1 == item->tqparent() ->rtti() && - TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) )) { + !( ( item->parent() && 1 == item->parent() ->rtti() && + TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->parent() ) ->type() ) )) { p->fillRect( 0, 0, x + marg + w + 4, item->height(), cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) @@ -1504,9 +1504,9 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons if ( flags & Style_Selected ) { flags -= Style_Selected; if ( !lv->rootIsDecorated() && - !( ( item->tqparent() && 1 == item->tqparent() ->rtti() && + !( ( item->parent() && 1 == item->parent() ->rtti() && TQCheckListItem::Controller == - ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) ) ) { + ( ( TQCheckListItem* ) item->parent() ) ->type() ) ) ) { p->fillRect( 0, 0, r.x() + lv->itemMargin() + r.width() + 4, item->height(), cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) { @@ -2212,8 +2212,8 @@ void KlearlookStyle::tqdrawControl( bool cornerWidget = false, firstTab = 0 == tb->indexOf( data.tab() ->identifier() ); - if ( ::tqqt_cast<const TQTabWidget *>( tb->tqparent() ) ) { - const TQTabWidget * tw = ( const TQTabWidget* ) tb->tqparent(); + if ( ::tqqt_cast<const TQTabWidget *>( tb->parent() ) ) { + const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent(); // is there a corner widget in the (top) left edge? if ( tw->cornerWidget( TQt::TopLeft ) ) @@ -3127,22 +3127,22 @@ void KlearlookStyle::tqdrawComplexControl( !toolbutton->parentWidget() ->backgroundPixmap() ->isNull() ) { p->drawTiledPixmap( r, *( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() ); - } else if ( widget->tqparent() ) { - if ( ::tqqt_cast<const TQToolBar *>( widget->tqparent() ) ) { - TQToolBar * tqparent = ( TQToolBar* ) widget->tqparent(); + } else if ( widget->parent() ) { + if ( ::tqqt_cast<const TQToolBar *>( widget->parent() ) ) { + TQToolBar * parent = ( TQToolBar* ) widget->parent(); #ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( cg.background(), true, 0, - p, tqparent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); + p, parent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); else #endif - p->fillRect( tqparent->rect(), cg.background() ); - } else if ( widget->tqparent() ->inherits( "TQToolBarExtensionWidget" ) ) { - TQWidget * tqparent = ( TQWidget* ) widget->tqparent(); - TQToolBar *toolbar = ( TQToolBar* ) tqparent->tqparent(); + p->fillRect( parent->rect(), cg.background() ); + } else if ( widget->parent() ->inherits( "TQToolBarExtensionWidget" ) ) { + TQWidget * parent = ( TQWidget* ) widget->parent(); + TQToolBar *toolbar = ( TQToolBar* ) parent->parent(); #ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS @@ -3555,7 +3555,7 @@ TQSize KlearlookStyle::tqsizeFromContents( ContentsType t, } case CT_ToolButton: { - if ( widget->tqparent() && ::tqqt_cast<TQToolBar*>( widget->tqparent() ) ) + if ( widget->parent() && ::tqqt_cast<TQToolBar*>( widget->parent() ) ) return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 ); else { return KStyle::tqsizeFromContents ( t, widget, s, opt ); |