diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 88de679..675d65b 100644 --- a/style/qtc_kstyle.cpp +++ b/style/qtc_kstyle.cpp @@ -210,7 +210,7 @@ void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe, else pix.resize( w-2, h-2 ); - TQString title = wid->tqparentWidget()->caption(); + TQString title = wid->parentWidget()->caption(); TQPainter p2; p2.begin(&pix); p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight)); @@ -396,7 +396,7 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe, if (p && p->device()->devType() == TQInternal::Widget) { widget = static_cast(p->device()); - tqparent = widget->tqparentWidget(); + tqparent = widget->parentWidget(); } else return; // Don't paint on non-widgets @@ -763,7 +763,7 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const TQWidget* tqparent = 0; // Check that we are not a normal toolbar or a hidden dockwidget, // in which case we need to adjust the height for font size - if (widget && (tqparent = widget->tqparentWidget() ) + if (widget && (tqparent = widget->parentWidget() ) && !tqparent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && !tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) @@ -977,10 +977,10 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, TQPainter p2; p2.begin(&pix); - if ( slider->tqparentWidget() && - slider->tqparentWidget()->backgroundPixmap() && - !slider->tqparentWidget()->backgroundPixmap()->isNull() ) { - TQPixmap pixmap = *(slider->tqparentWidget()->backgroundPixmap()); + if ( slider->parentWidget() && + slider->parentWidget()->backgroundPixmap() && + !slider->parentWidget()->backgroundPixmap()->isNull() ) { + TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); p2.drawTiledPixmap(r, pixmap, slider->pos()); } else pix.fill(cg.background()); diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 5a8dbc4..8745118 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -131,7 +131,7 @@ static const TQWidget * getTopLevel(const TQWidget *widget) const TQWidget *w=widget; while(w && !w->isTopLevel()) - w=w->tqparentWidget(); + w=w->parentWidget(); return w; } @@ -142,7 +142,7 @@ static void emitMenuSize(const TQWidget *widget, unsigned short size) if(w) { static const Atom constAtom = XInternAtom(qt_xdisplay(), MENU_SIZE_ATOM, False); - XChangeProperty(qt_xdisplay(), w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId(), + XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1); } } @@ -154,7 +154,7 @@ void setBgndProp(TQWidget *widget, unsigned short app) if(w) { static const Atom constAtom = XInternAtom(qt_xdisplay(), BGND_ATOM, False); - XChangeProperty(qt_xdisplay(), w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId(), + XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1); } } @@ -167,7 +167,7 @@ static void triggerWMMove(const TQWidget *w, const TQPoint &p) xev.xclient.type = ClientMessage; xev.xclient.message_type = constNetMoveResize; xev.xclient.display = qt_xdisplay(); - xev.xclient.window = w->tqparentWidget() ? w->tqparentWidget()->winId() : w->winId(); + xev.xclient.window = w->parentWidget() ? w->parentWidget()->winId() : w->winId(); xev.xclient.format = 32; xev.xclient.data.l[0] = p.x(); xev.xclient.data.l[1] = p.y(); @@ -437,7 +437,7 @@ static bool kickerIsTrans() static bool isKhtmlWidget(const TQWidget *w, int level=1) { return w && ((w->name() && 0==strcmp(w->name(), "__khtml")) || - (level && isKhtmlWidget(w->tqparentWidget(), --level))); + (level && isKhtmlWidget(w->parentWidget(), --level))); } static bool isKhtmlFormWidget(const TQWidget *widget) @@ -449,18 +449,18 @@ static bool isKhtmlFormWidget(const TQWidget *widget) //Form widgets are in the KHTMLView, but that has 2 further inner levels //of widgets - TQClipperWidget, and outside of that, TQViewportWidget - TQWidget *potentialClipPort(widget ? widget->tqparentWidget() : 0L); + TQWidget *potentialClipPort(widget ? widget->parentWidget() : 0L); if (!potentialClipPort || potentialClipPort->isTopLevel()) return false; - TQWidget *potentialViewPort(potentialClipPort->tqparentWidget()); + TQWidget *potentialViewPort(potentialClipPort->parentWidget()); if (!potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp(potentialViewPort->name(), "qt_viewport")) return false; - TQWidget *potentialKHTML(potentialViewPort->tqparentWidget()); + TQWidget *potentialKHTML(potentialViewPort->parentWidget()); if (!potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp(potentialKHTML->className(), "KHTMLView")) @@ -475,7 +475,7 @@ static bool inStackWidget(const TQWidget *w) { if(::tqqt_cast(w)) return true; - w=w->tqparentWidget(); + w=w->parentWidget(); } return false; @@ -668,9 +668,9 @@ static void drawDots(TQPainter *p, const TQRect &r, bool horiz, int nLines, int static bool onToolBar(TQWidget *widget, int l=0) { - return l<3 && widget && widget->tqparentWidget() - ? widget->tqparentWidget()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || - onToolBar(widget->tqparentWidget(), ++l) + return l<3 && widget && widget->parentWidget() + ? widget->parentWidget()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || + onToolBar(widget->parentWidget(), ++l) : false; } @@ -1464,7 +1464,7 @@ void TQtCurveStyle::polish(TQWidget *widget) if(APPEARANCE_STRIPED==opts.bgndAppearance && (::tqqt_cast(widget) || ::tqqt_cast(widget))) setBgndProp(widget, APPEARANCE_STRIPED); - if(widget->tqparentWidget() && ::tqqt_cast(widget) && ::tqqt_cast(widget->tqparentWidget())) + if(widget->parentWidget() && ::tqqt_cast(widget) && ::tqqt_cast(widget->parentWidget())) { TQPalette pal(widget->tqpalette()); #if 0 @@ -1504,8 +1504,8 @@ void TQtCurveStyle::polish(TQWidget *widget) widget->setPalette(*itsMactorPal); // Get rid of Kontact's frame... - if(APP_KONTACT==itsThemedApp && ::tqqt_cast(widget) && widget->tqparentWidget() && - 0==qstrcmp(widget->tqparentWidget()->className(), "Kontact::MainWindow")) + if(APP_KONTACT==itsThemedApp && ::tqqt_cast(widget) && widget->parentWidget() && + 0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow")) ((TQHBox *)widget)->setLineWidth(0); if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast(widget)) @@ -1518,14 +1518,14 @@ void TQtCurveStyle::polish(TQWidget *widget) if ((opts.square&STQUARE_SCROLLVIEW) && widget && (::tqqt_cast(widget) || - (widget->tqparentWidget() && ::tqqt_cast(widget) && - widget->tqparentWidget()->inherits("KateView"))) && + (widget->parentWidget() && ::tqqt_cast(widget) && + widget->parentWidget()->inherits("KateView"))) && ((TQFrame *)widget)->lineWidth()>1) ((TQFrame *)widget)->setLineWidth(opts.gtkScrollViews ? 1 : 2); else if(!opts.popupBorder && widget && (::tqqt_cast(widget) || - (widget->tqparentWidget() && ::tqqt_cast(widget) && - ::tqqt_cast(widget->tqparentWidget())))) + (widget->parentWidget() && ::tqqt_cast(widget) && + ::tqqt_cast(widget->parentWidget())))) ((TQFrame *)widget)->setLineWidth(0); else if ((USE_LIGHTER_POPUP_MENU || !IS_FLAT_BGND(opts.menuBgndAppearance)) && !opts.borderMenuitems && widget && ::tqqt_cast(widget)) @@ -1684,8 +1684,8 @@ void TQtCurveStyle::polish(TQWidget *widget) widget->installEventFilter(this); if(onToolBar(widget)) widget->setName(kdeToolbarWidget); - if(widget && widget->tqparentWidget() && - widget->inherits("KLineEdit") && widget->tqparentWidget()->inherits("KIO::DefaultProgress") && + if(widget && widget->parentWidget() && + widget->inherits("KLineEdit") && widget->parentWidget()->inherits("KIO::DefaultProgress") && ::tqqt_cast(widget)) ((TQFrame *)widget)->setLineWidth(0); } @@ -1706,7 +1706,7 @@ void TQtCurveStyle::polish(TQWidget *widget) } } - if (widget->tqparentWidget() && ::tqqt_cast(widget->tqparentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING)) + if (widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING)) { widget->installEventFilter(this); widget->setBackgroundMode(NoBackground); // We paint whole background. @@ -1769,8 +1769,8 @@ void TQtCurveStyle::polish(TQWidget *widget) // The tqparent->isShown is needed for KWord. It's insert picure file dialog is a child of // the insert picture dialog - but the file dialog is shown *before* the picture dialog! - if( (SKIP_TASKBAR && !dlg->tqparentWidget()) || - ( (!dlg->tqparentWidget() || !dlg->tqparentWidget()->isShown())// && + if( (SKIP_TASKBAR && !dlg->parentWidget()) || + ( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// && /*(dlg->isModal() || ::tqqt_cast(widget))*/) ) widget->installEventFilter(this); } @@ -1795,20 +1795,20 @@ void TQtCurveStyle::polish(TQWidget *widget) if(APP_SYSTEMSETTINGS==itsThemedApp) { - if(widget && widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() && + if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && ::tqqt_cast(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() && - ::tqqt_cast(widget->tqparentWidget()) && - ::tqqt_cast(widget->tqparentWidget()->tqparentWidget())) + ::tqqt_cast(widget->parentWidget()) && + ::tqqt_cast(widget->parentWidget()->parentWidget())) ((TQFrame *)widget)->setFrameShape(TQFrame::NoFrame); - if(widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() && - ::tqqt_cast(widget->tqparentWidget()->tqparentWidget()) && - widget->inherits("KCMultiWidget") && widget->tqparentWidget()->inherits("TQViewportWidget")) - ((TQScrollView *)(widget->tqparentWidget()->tqparentWidget()))->setLineWidth(0); + if(widget->parentWidget() && widget->parentWidget()->parentWidget() && + ::tqqt_cast(widget->parentWidget()->parentWidget()) && + widget->inherits("KCMultiWidget") && widget->parentWidget()->inherits("TQViewportWidget")) + ((TQScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0); } - if(opts.tabBgnd && widget && widget->tqparentWidget() && ::tqqt_cast(widget) && - ::tqqt_cast(widget->tqparentWidget()) && + if(opts.tabBgnd && widget && widget->parentWidget() && ::tqqt_cast(widget) && + ::tqqt_cast(widget->parentWidget()) && 0==qstrcmp(widget->name(), "tab pages")) { TQPalette pal(widget->tqpalette()); @@ -1924,7 +1924,7 @@ void TQtCurveStyle::unPolish(TQWidget *widget) widget->removeEventFilter(this); widget->setBackgroundMode(PaletteBackground); } - if (widget->tqparentWidget() && ::tqqt_cast(widget->tqparentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING)) + if (widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING)) { widget->removeEventFilter(this); widget->setBackgroundMode(PaletteBackground); // We paint whole background. @@ -2110,8 +2110,8 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) } // Fix mdi buttons in menubars... - if(::tqqt_cast(object) && ((TQWidget *)object)->tqparentWidget() && - ::tqqt_cast(((TQWidget *)object)->tqparentWidget())) + if(::tqqt_cast(object) && ((TQWidget *)object)->parentWidget() && + ::tqqt_cast(((TQWidget *)object)->parentWidget())) { bool drawMenubar=false; @@ -2156,9 +2156,9 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) { TQWidget *widget(TQT_TQWIDGET(object)); - if (::tqqt_cast(widget->tqparentWidget())) + if (::tqqt_cast(widget->parentWidget())) { - widget->tqparentWidget()->tqrepaint(false); + widget->parentWidget()->tqrepaint(false); return false; } @@ -2306,7 +2306,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) // The tqparent->isShown is needed for KWord. It's insert picure file dialog is a // child of the insert picture dialog - but the file dialog is shown *before* the // picture dialog! - if((!dlg->tqparentWidget() || !dlg->tqparentWidget()->isShown())) // && + if((!dlg->parentWidget() || !dlg->parentWidget()->isShown())) // && //(dlg->isModal() || ::tqqt_cast(object))) { TQWidget *activeWindow=tqApp->activeWindow(); @@ -2367,9 +2367,9 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) case TQEvent::Hide: case TQEvent::Show: if(::tqqt_cast(object) && - (((TQListBox *)object)->tqparentWidget() && - ::tqqt_cast(((TQListBox *)object)->tqparentWidget()))) - ((TQComboBox *)(((TQListBox *)object)->tqparentWidget()))->tqrepaint(false); + (((TQListBox *)object)->parentWidget() && + ::tqqt_cast(((TQListBox *)object)->parentWidget()))) + ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->tqrepaint(false); // else if(::tqqt_cast(object) && // (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() || // TQFrame::WinPanel==((TQFrame *)object)->frameShape())) @@ -3828,8 +3828,8 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const bool sv(widget && ::tqqt_cast(widget)), square((opts.square&STQUARE_SCROLLVIEW) && (sv || - (widget && widget->tqparentWidget() && ::tqqt_cast(widget) && - widget->tqparentWidget()->inherits("KateView")))); + (widget && widget->parentWidget() && ::tqqt_cast(widget) && + widget->parentWidget()->inherits("KateView")))); const TQColor *use(opts.highlightScrollViews && /*!square &&*/ flags&Style_HasFocus ? itsHighlightCols : backgroundColors(cg)); @@ -4071,8 +4071,8 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQWidget *widget(dynamic_cast(p->device())); if(widget && 0==qstrcmp(widget->className(), "TQViewportWidget") && - widget->tqparentWidget() && ::tqqt_cast(widget->tqparentWidget()) && - widget->tqparentWidget()->tqparentWidget() && ::tqqt_cast(widget->tqparentWidget()->tqparentWidget())) + widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && + widget->parentWidget()->parentWidget() && ::tqqt_cast(widget->parentWidget()->parentWidget())) { struct TQtCurveListBoxItem : public TQListBoxItem { @@ -4082,7 +4082,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const } }; - TQListBox *box=(TQListBox *)widget->tqparentWidget(); + TQListBox *box=(TQListBox *)widget->parentWidget(); TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem())); if(item) @@ -4342,12 +4342,12 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const if (w > 2 && h > 2) { TQWidget *wid(const_cast(widget)); - bool hasClose(dynamic_cast(wid->tqparentWidget()) && - ((TQDockWindow *)(wid->tqparentWidget()))->area() && - ((TQDockWindow *)(wid->tqparentWidget()))->isCloseEnabled()); + bool hasClose(dynamic_cast(wid->parentWidget()) && + ((TQDockWindow *)(wid->parentWidget()))->area() && + ((TQDockWindow *)(wid->parentWidget()))->isCloseEnabled()); TQFont fnt(TQApplication::font(wid)); TQPixmap pix; - TQString title(wid->tqparentWidget()->caption()); + TQString title(wid->parentWidget()->caption()); TQPainter p2; fnt.setPointSize(fnt.pointSize()-2); @@ -4858,8 +4858,8 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ j(opts.embolden && button->isDefault() ? 2 : 1); bool sidebar(!opts.stdSidebarButtons && ((button->isFlat() && button->inherits("KMultiTabBarTab")) || - (button->tqparentWidget() && button->inherits("Ideal::Button") && - button->tqparentWidget()->inherits("Ideal::ButtonBar")))); + (button->parentWidget() && button->inherits("Ideal::Button") && + button->parentWidget()->inherits("Ideal::ButtonBar")))); const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On) ? TQApplication::tqpalette().active().highlightedText() : button->tqcolorGroup().buttonText()); @@ -5210,8 +5210,8 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ const TQPushButton *button(static_cast(widget)); bool sidebar(!opts.stdSidebarButtons && ((button->isFlat() && button->inherits("KMultiTabBarTab")) || - (button->tqparentWidget() && button->inherits("Ideal::Button") && - button->tqparentWidget()->inherits("Ideal::ButtonBar")))); + (button->parentWidget() && button->inherits("Ideal::Button") && + button->parentWidget()->inherits("Ideal::ButtonBar")))); if(sidebar) { @@ -5498,16 +5498,16 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c break; } - const TQToolBar *tb(widget->tqparentWidget() - ? ::tqqt_cast(widget->tqparentWidget()) : 0L); + const TQToolBar *tb(widget->parentWidget() + ? ::tqqt_cast(widget->parentWidget()) : 0L); bool onControlButtons(false), onExtender(!tb && - widget->tqparentWidget() && - widget->tqparentWidget()->inherits( "TQToolBarExtensionWidget") && - ::tqqt_cast(widget->tqparentWidget()->tqparentWidget())), + widget->parentWidget() && + widget->parentWidget()->inherits( "TQToolBarExtensionWidget") && + ::tqqt_cast(widget->parentWidget()->parentWidget())), isDWClose(!tb && !onExtender && - widget->tqparentWidget() && - widget->tqparentWidget()->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)); + widget->parentWidget() && + widget->parentWidget()->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)); if(isDWClose) { @@ -5517,8 +5517,8 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c bflags|=DW_CLOSE_BUTTON; } - if (!tb && !onExtender && widget->tqparentWidget() && - !qstrcmp(widget->tqparentWidget()->name(), "qt_maxcontrols")) + if (!tb && !onExtender && widget->parentWidget() && + !qstrcmp(widget->parentWidget()->name(), "qt_maxcontrols")) onControlButtons = true; if(active & SC_ToolButton) @@ -5531,8 +5531,8 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if(controls&SC_ToolButton) { if(onControlButtons || - (toolbutton->tqparentWidget() && toolbutton->tqparentWidget()->tqparentWidget() && - ::tqqt_cast(toolbutton->tqparentWidget()->tqparentWidget()))) + (toolbutton->parentWidget() && toolbutton->parentWidget()->parentWidget() && + ::tqqt_cast(toolbutton->parentWidget()->parentWidget()))) bflags|=NO_ETCH_BUTTON; // If we're pressed, on, or raised... @@ -5560,10 +5560,10 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c } // Check whether to draw a background pixmap - else if(APP_MACTOR!=itsThemedApp && toolbutton->tqparentWidget() && - toolbutton->tqparentWidget()->backgroundPixmap() && - !toolbutton->tqparentWidget()->backgroundPixmap()->isNull()) - p->drawTiledPixmap(r, *(toolbutton->tqparentWidget()->backgroundPixmap()), + else if(APP_MACTOR!=itsThemedApp && toolbutton->parentWidget() && + toolbutton->parentWidget()->backgroundPixmap() && + !toolbutton->parentWidget()->backgroundPixmap()->isNull()) + p->drawTiledPixmap(r, *(toolbutton->parentWidget()->backgroundPixmap()), toolbutton->pos()); else if(widget->tqparent()) { @@ -6277,9 +6277,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if(!tb) { paint->begin(&pix); - if (widget->tqparentWidget() && widget->tqparentWidget()->backgroundPixmap() && - !widget->tqparentWidget()->backgroundPixmap()->isNull()) - paint->drawTiledPixmap(r, *(widget->tqparentWidget()->backgroundPixmap()), widget->pos()); + if (widget->parentWidget() && widget->parentWidget()->backgroundPixmap() && + !widget->parentWidget()->backgroundPixmap()->isNull()) + paint->drawTiledPixmap(r, *(widget->parentWidget()->backgroundPixmap()), widget->pos()); else pix.fill(cg.background()); } @@ -6763,10 +6763,10 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con case PM_ButtonDefaultIndicator: return 0; case PM_DefaultFrameWidth: - if(APP_KATE==itsThemedApp && widget && widget->tqparentWidget() && widget->tqparentWidget()->tqparentWidget() && + if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && ::tqqt_cast(widget) && - ::tqqt_cast(widget->tqparentWidget()) && - ::tqqt_cast(widget->tqparentWidget()->tqparentWidget())) + ::tqqt_cast(widget->parentWidget()) && + ::tqqt_cast(widget->parentWidget()->parentWidget())) return 0; if ((opts.square&STQUARE_SCROLLVIEW) && widget && ::tqqt_cast(widget))