From 08147c8aedded5fced6eb4cfe7ba918996d3f481 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 26 Nov 2023 02:19:55 +0900 Subject: [PATCH] Replaced various '#define' with actual strings - part 4 Signed-off-by: Michele Calgaro --- style/qtc_tdestyle.cpp | 8 +- style/qtcurve.cpp | 252 +++++++++++++++++++------------------- style/shortcuthandler.cpp | 10 +- 3 files changed, 135 insertions(+), 135 deletions(-) diff --git a/style/qtc_tdestyle.cpp b/style/qtc_tdestyle.cpp index 548507b..266bb24 100644 --- a/style/qtc_tdestyle.cpp +++ b/style/qtc_tdestyle.cpp @@ -126,7 +126,7 @@ void TQtCTDEStyle::polish( TQStyleControlElementData ceData, ControlElementFlags if ( d->useFilledFrameWorkaround ) { - if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { + if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) { TQFrame::Shape shape = frame->frameShape(); if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) installObjectEventHandler(ceData, elementFlags, ptr, this); @@ -143,7 +143,7 @@ void TQtCTDEStyle::unPolish( TQStyleControlElementData ceData, ControlElementFla if ( d->useFilledFrameWorkaround ) { - if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { + if ( TQFrame *frame = ::tqt_cast< TQFrame* >( widget ) ) { TQFrame::Shape shape = frame->frameShape(); if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) removeObjectEventHandler(ceData, elementFlags, ptr, this); @@ -1696,14 +1696,14 @@ bool TQtCTDEStyle::objectEventHandler( TQStyleControlElementData ceData, Control // -- Karol. TQFrame *frame = 0; if ( event->type() == TQEvent::Paint - && (frame = ::tqqt_cast(object)) ) + && (frame = ::tqt_cast(object)) ) { if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel) return false; bool horizontal = true; TQPaintEvent* pe = (TQPaintEvent*)event; - TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame ); + TQToolBar *toolbar = ::tqt_cast< TQToolBar *>( frame ); TQRect r = pe->rect(); if (toolbar && toolbar->orientation() == TQt::Vertical) diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index dc46386..185faca 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -195,8 +195,8 @@ static void adjustToolbarButtons(const TQWidget *widget, const TQToolBar *toolba if (TQt::Horizontal==toolbar->orientation()) { - bool haveLeft=::tqqt_cast(toolbar->childAt(geo.x()-d, geo.y())), - haveRight=::tqqt_cast(toolbar->childAt(geo.right()+d, geo.y())); + bool haveLeft=::tqt_cast(toolbar->childAt(geo.x()-d, geo.y())), + haveRight=::tqt_cast(toolbar->childAt(geo.right()+d, geo.y())); if(haveLeft && haveRight) leftAdjust=-constAdjust, rightAdjust=constAdjust, round=ROUNDED_NONE; @@ -207,8 +207,8 @@ static void adjustToolbarButtons(const TQWidget *widget, const TQToolBar *toolba } else { - bool haveTop=::tqqt_cast(toolbar->childAt(geo.x(), geo.y()-d)), - haveBot=::tqqt_cast(toolbar->childAt(geo.x(), geo.bottom()+d)); + bool haveTop=::tqt_cast(toolbar->childAt(geo.x(), geo.y()-d)), + haveBot=::tqt_cast(toolbar->childAt(geo.x(), geo.bottom()+d)); if(haveTop && haveBot) topAdjust=-constAdjust, bottomAdjust=constAdjust, round=ROUNDED_NONE; @@ -268,13 +268,13 @@ static void adjust(TQRect &r, int dx1, int dy1, int dx2, int dy2) inline bool isSpecialHover(TQWidget *w) { return w && ( - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) ); } @@ -504,7 +504,7 @@ static bool inStackWidget(const TQWidget *w) { while(w) { - if(::tqqt_cast(w)) + if(::tqt_cast(w)) return true; w=w->parentWidget(); } @@ -518,7 +518,7 @@ static bool isOnToolbar(const TQWidget *widget, TQPainter *p) while(wid) { - if(::tqqt_cast(wid)) + if(::tqt_cast(wid)) return true; wid=wid->parentWidget(); } @@ -794,7 +794,7 @@ static void parseWindowLine(const TQString &line, TQValueList &data) static bool isCheckBoxOfGroupBox(const TQObject *w) { return w && w->parent() && - ::tqqt_cast(w) && ::tqqt_cast(w->parent()) && + ::tqt_cast(w) && ::tqt_cast(w->parent()) && !qstrcmp(w->name(), "qt_groupbox_checkbox"); } @@ -1565,13 +1565,13 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen if(isWindowDragWidget(TQT_TQOBJECT(widget))) installObjectEventHandler(ceData, elementFlags, ptr, this); - if(::tqqt_cast(widget) || ::tqqt_cast(widget)) + if(::tqt_cast(widget) || ::tqt_cast(widget)) { setBgndProp(widget, opts.bgndAppearance); installObjectEventHandler(ceData, elementFlags, ptr, this); // To trap palette change } - if(widget->parentWidget() && ::tqqt_cast(widget) && ::tqqt_cast(widget->parentWidget())) + if(widget->parentWidget() && ::tqt_cast(widget) && ::tqt_cast(widget->parentWidget())) { TQPalette pal(ceData.palette); #if 0 @@ -1601,7 +1601,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen end(children->end()); for(; it!=end; ++it) - if(::tqqt_cast(*it)) + if(::tqt_cast(*it)) ((TQWidget *)(*it))->setPalette(orig); } #endif @@ -1611,35 +1611,35 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen widget->setPalette(*itsMactorPal); // Get rid of Kontact's frame... - if(APP_KONTACT==itsThemedApp && ::tqqt_cast(widget) && widget->parentWidget() && + if(APP_KONTACT==itsThemedApp && ::tqt_cast(widget) && widget->parentWidget() && 0==qstrcmp(widget->parentWidget()->className(), "Kontact::MainWindow")) ((TQHBox *)widget)->setLineWidth(0); - if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast(widget)) + if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast(widget)) { installObjectEventHandler(ceData, elementFlags, ptr, this); } #if 0 - if(opts.menubarHiding && ::tqqt_cast(widget) && static_cast(widget)->menuBar()) + if(opts.menubarHiding && ::tqt_cast(widget) && static_cast(widget)->menuBar()) installObjectEventHandler(ceData, elementFlags, ptr, this); #endif if ((opts.square&SQUARE_SCROLLVIEW) && widget && - (::tqqt_cast(widget) || - (widget->parentWidget() && ::tqqt_cast(widget) && + (::tqt_cast(widget) || + (widget->parentWidget() && ::tqt_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->parentWidget() && ::tqqt_cast(widget) && - ::tqqt_cast(widget->parentWidget())))) + (::tqt_cast(widget) || + (widget->parentWidget() && ::tqt_cast(widget) && + ::tqt_cast(widget->parentWidget())))) ((TQFrame *)widget)->setLineWidth(0); - else if (!DRAW_MENU_BORDER && !opts.borderMenuitems && widget && ::tqqt_cast(widget)) + else if (!DRAW_MENU_BORDER && !opts.borderMenuitems && widget && ::tqt_cast(widget)) ((TQFrame *)widget)->setLineWidth(1); - if (::tqqt_cast(widget) || ::tqqt_cast(widget)) + if (::tqt_cast(widget) || ::tqt_cast(widget)) { bool framelessGroupBoxCheckBox=(NO_FRAME(opts.groupBox) && isCheckBoxOfGroupBox(TQT_TQOBJECT(widget))); @@ -1657,8 +1657,8 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen installObjectEventHandler(ceData, elementFlags, ptr, this); } } - else if (::tqqt_cast(widget) || ::tqqt_cast(widget) || ::tqqt_cast(widget)/* || - ::tqqt_cast(widget)*/) + else if (::tqt_cast(widget) || ::tqt_cast(widget) || ::tqt_cast(widget)/* || + ::tqt_cast(widget)*/) { if(enableFilter) { @@ -1666,7 +1666,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen installObjectEventHandler(ceData, elementFlags, ptr, this); } } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) widget->setBackgroundMode(PaletteBackground); @@ -1675,7 +1675,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen installObjectEventHandler(ceData, elementFlags, ptr, this); } } - else if (::tqqt_cast(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) + else if (::tqt_cast(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) { /*if(onToolBar(widget)) widget->setBackgroundMode(NoBackground); @@ -1684,7 +1684,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen if(enableFilter) installObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) widget->setBackgroundMode(PaletteBackground); @@ -1703,7 +1703,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen // installObjectEventHandler(ceData, elementFlags, ptr, this); } } - else if(::tqqt_cast(widget)) + else if(::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) widget->setBackgroundMode(PaletteBackground); @@ -1713,25 +1713,25 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen emitMenuSize(widget, ceData.rect.height()); setMenuTextColors(widget, true); } - else if(::tqqt_cast(widget)) + else if(::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) widget->setBackgroundMode(PaletteBackground); } - else if(::tqqt_cast(widget)) + else if(::tqt_cast(widget)) { widget->setBackgroundMode(NoBackground); // PaletteBackground); setMenuTextColors(widget, true); } else if (ceData.widgetObjectTypes.contains("TDEToolBarSeparator") || (ceData.widgetObjectTypes.contains("TDEListViewSearchLineWidget") && - widget->parent() && ::tqqt_cast(widget->parent()))) + widget->parent() && ::tqt_cast(widget->parent()))) { widget->setName(kdeToolbarWidget); widget->setBackgroundMode(NoBackground); installObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(enableFilter) { @@ -1740,11 +1740,11 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen } //widget->setBackgroundMode(NoBackground); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(enableFilter) installObjectEventHandler(ceData, elementFlags, ptr, this); - if(widget->parent() && ::tqqt_cast(widget->parent())) + if(widget->parent() && ::tqt_cast(widget->parent())) { widget->setName(kdeToolbarWidget); widget->setBackgroundMode(NoBackground); // We paint whole background. @@ -1757,14 +1757,14 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen connect(widget, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderThumbMoved(int))); connect(widget, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderThumbMoved(int))); } - else if (::tqqt_cast(widget) || ::tqqt_cast(widget)) + else if (::tqt_cast(widget) || ::tqt_cast(widget)) { installObjectEventHandler(ceData, elementFlags, ptr, this); if(onToolBar(widget)) widget->setName(kdeToolbarWidget); if(widget && widget->parentWidget() && ceData.widgetObjectTypes.contains("KLineEdit") && widget->parentWidget()->inherits("TDEIO::DefaultProgress") && - ::tqqt_cast(widget)) + ::tqt_cast(widget)) ((TQFrame *)widget)->setLineWidth(0); } else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle")) @@ -1784,14 +1784,14 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen } } - if (widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) + if (widget->parentWidget() && ::tqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) { installObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode(NoBackground); // We paint whole background. } else if (TQt::X11ParentRelative!=widget->backgroundMode() && - (::tqqt_cast(widget) || ::tqqt_cast(widget) || - ::tqqt_cast(widget)) && + (::tqt_cast(widget) || ::tqt_cast(widget) || + ::tqt_cast(widget)) && widget->parent() && ( 0==qstrcmp(TQT_TQWIDGET(widget->parent())->className(), "MainWindow") || onToolBar(widget))) @@ -1800,7 +1800,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen installObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode(NoBackground); // We paint the whole background. } - else if(::tqqt_cast(widget)) + else if(::tqt_cast(widget)) { if(ceData.palette.inactive().highlightedText()!=ceData.palette.active().highlightedText()) { @@ -1818,7 +1818,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen itsAnimationTimer->start(PROGRESS_ANIMATION, false); } } - else if(opts.highlightScrollViews && ::tqqt_cast(widget)) + else if(opts.highlightScrollViews && ::tqt_cast(widget)) installObjectEventHandler(ceData, elementFlags, ptr, this); else if(!qstrcmp(widget->className(), "KonqFrameStatusBar")) { @@ -1835,13 +1835,13 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen } else if(ceData.widgetObjectTypes.contains("KTabCtl")) installObjectEventHandler(ceData, elementFlags, ptr, this); - else if(NO_FRAME(opts.groupBox) && ::tqqt_cast(widget)) + else if(NO_FRAME(opts.groupBox) && ::tqt_cast(widget)) { ((TQGroupBox *)widget)->setFlat(false); ((TQGroupBox *)widget)->setFrameShape(TQFrame::NoFrame); } #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT - else if(opts.fixParentlessDialogs && ::tqqt_cast(widget)) + else if(opts.fixParentlessDialogs && ::tqt_cast(widget)) { TQDialog *dlg=(TQDialog *)widget; @@ -1849,7 +1849,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen // the insert picture dialog - but the file dialog is shown *before* the picture dialog! if( (SKIP_TASKBAR && !dlg->parentWidget()) || ( (!dlg->parentWidget() || !dlg->parentWidget()->isShown())// && - /*(dlg->isModal() || ::tqqt_cast(widget))*/) ) + /*(dlg->isModal() || ::tqt_cast(widget))*/) ) installObjectEventHandler(ceData, elementFlags, ptr, this); } @@ -1874,19 +1874,19 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen if(APP_SYSTEMSETTINGS==itsThemedApp) { if(widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && - ::tqqt_cast(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() && - ::tqqt_cast(widget->parentWidget()) && - ::tqqt_cast(widget->parentWidget()->parentWidget())) + ::tqt_cast(widget) && TQFrame::NoFrame!=((TQFrame *)widget)->frameShape() && + ::tqt_cast(widget->parentWidget()) && + ::tqt_cast(widget->parentWidget()->parentWidget())) ((TQFrame *)widget)->setFrameShape(TQFrame::NoFrame); if(widget->parentWidget() && widget->parentWidget()->parentWidget() && - ::tqqt_cast(widget->parentWidget()->parentWidget()) && + ::tqt_cast(widget->parentWidget()->parentWidget()) && ceData.widgetObjectTypes.contains("KCMultiWidget") && widget->parentWidget()->inherits("TQViewportWidget")) ((TQScrollView *)(widget->parentWidget()->parentWidget()))->setLineWidth(0); } - if(opts.tabBgnd && widget && widget->parentWidget() && ::tqqt_cast(widget) && - ::tqqt_cast(widget->parentWidget()) && + if(opts.tabBgnd && widget && widget->parentWidget() && ::tqt_cast(widget) && + ::tqt_cast(widget->parentWidget()) && 0==qstrcmp(ceData.name.ascii(), "tab pages")) { TQPalette pal(ceData.palette); @@ -1911,43 +1911,43 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem if(isFormWidget(widget)) itsKhtmlWidgets.remove(widget); - if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast(widget)) + if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast(widget)) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } #if 0 - if(opts.menubarHiding && ::tqqt_cast(widget) && static_cast(widget)->menuBar()) + if(opts.menubarHiding && ::tqt_cast(widget) && static_cast(widget)->menuBar()) removeObjectEventHandler(ceData, elementFlags, ptr, this); #endif if(isWindowDragWidget(TQT_TQOBJECT(widget))) removeObjectEventHandler(ceData, elementFlags, ptr, this); - if (::tqqt_cast(widget) || ::tqqt_cast(widget)) + if (::tqt_cast(widget) || ::tqt_cast(widget)) { widget->setMouseTracking(false); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget) || ::tqqt_cast(widget) || ::tqqt_cast(widget) /*|| - ::tqqt_cast(widget)*/) + else if (::tqt_cast(widget) || ::tqt_cast(widget) || ::tqt_cast(widget) /*|| + ::tqt_cast(widget)*/) { widget->setMouseTracking(false); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) + else if (::tqt_cast(widget) || ceData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) { if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) widget->setBackgroundMode(PaletteButton); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) widget->setBackgroundMode(PaletteButton); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) // && onToolBar(widget)) widget->setBackgroundMode(PaletteButton); @@ -1960,12 +1960,12 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem // removeObjectEventHandler(ceData, elementFlags, ptr, this); } } - else if (::tqqt_cast(widget) || ::tqqt_cast(widget)) + else if (::tqt_cast(widget) || ::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) widget->setBackgroundMode(PaletteBackground); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { if(NoBackground!=widget->backgroundMode()) widget->setBackgroundMode(PaletteBackground); @@ -1980,35 +1980,35 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem widget->setBackgroundMode(PaletteBackground); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { widget->setMouseTracking(false); removeObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode(PaletteButton); } - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { removeObjectEventHandler(ceData, elementFlags, ptr, this); - if(widget->parent() && ::tqqt_cast(widget->parent())) + if(widget->parent() && ::tqt_cast(widget->parent())) widget->setBackgroundMode(PaletteBackground); } - else if (::tqqt_cast(widget) || ::tqqt_cast(widget)) + else if (::tqt_cast(widget) || ::tqt_cast(widget)) removeObjectEventHandler(ceData, elementFlags, ptr, this); else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle")) removeObjectEventHandler(ceData, elementFlags, ptr, this); - else if (::tqqt_cast(widget)) + else if (::tqt_cast(widget)) { itsProgAnimWidgets.remove(widget); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if(opts.highlightScrollViews && ::tqqt_cast(widget)) + else if(opts.highlightScrollViews && ::tqt_cast(widget)) removeObjectEventHandler(ceData, elementFlags, ptr, this); else if(0==qstrcmp(ceData.name.ascii(), kdeToolbarWidget)) { removeObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode(PaletteBackground); } - if (widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) + if (widget->parentWidget() && ::tqt_cast(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); widget->setBackgroundMode(PaletteBackground); // We paint whole background. @@ -2016,7 +2016,7 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem else if(ceData.widgetObjectTypes.contains("KTabCtl")) removeObjectEventHandler(ceData, elementFlags, ptr, this); #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT - else if(opts.fixParentlessDialogs && ::tqqt_cast(widget)) + else if(opts.fixParentlessDialogs && ::tqt_cast(widget)) removeObjectEventHandler(ceData, elementFlags, ptr, this); #endif } @@ -2069,7 +2069,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, #if 0 // Works for qtconfig, but k3b hangs? - if(opts.menubarHiding && TQEvent::KeyRelease==event->type() && ::tqqt_cast(object)) + if(opts.menubarHiding && TQEvent::KeyRelease==event->type() && ::tqt_cast(object)) { TQMainWindow *window=static_cast(object); @@ -2108,7 +2108,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, pr(parent->rect()); bool horiz=pr.width() > pr.height(); TQPainter p(widget); - TQToolBar *tb(::tqqt_cast(parent)); + TQToolBar *tb(::tqt_cast(parent)); // If parent is a TQToolbar use its orientation, else just base on width>height. if (tb) @@ -2128,8 +2128,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz); } - if(!::tqqt_cast(object) && !::tqqt_cast(object) && - !(DO_EFFECT && ::tqqt_cast(object))) + if(!::tqt_cast(object) && !::tqt_cast(object) && + !(DO_EFFECT && ::tqt_cast(object))) { return false; // Now draw the contents } @@ -2151,7 +2151,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, } else if (TQEvent::Paint==event->type()) { - if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqqt_cast(object)) + if(!IS_FLAT_BGND(opts.menuBgndAppearance) && ::tqt_cast(object)) { TQWidget *widget=(TQWidget*)object; TQPainter painter(widget); @@ -2176,7 +2176,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, } else if (object->inherits("TDEToolBarSeparator")) { - TQFrame *frame(::tqqt_cast(object)); + TQFrame *frame(::tqt_cast(object)); if(frame && TQFrame::NoFrame!=frame->frameShape()) { @@ -2198,11 +2198,11 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, return true; // been drawn! } } - else if(object->inherits("KTabCtl") && ::tqqt_cast(object)) + else if(object->inherits("KTabCtl") && ::tqt_cast(object)) { TQWidget *widget((TQWidget*)object); TQObject *child(object->child("_tabbar")); - TQTabBar *tb(child ? ::tqqt_cast(child) : 0L); + TQTabBar *tb(child ? ::tqt_cast(child) : 0L); TQPainter painter(widget); TQRect r(ceData.rect); int tbHeight(tb ? tb->height()-1 : 28); @@ -2223,8 +2223,8 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, } // Fix mdi buttons in menubars... - if(::tqqt_cast(object) && ((TQWidget *)object)->parentWidget() && - ::tqqt_cast(((TQWidget *)object)->parentWidget())) + if(::tqt_cast(object) && ((TQWidget *)object)->parentWidget() && + ::tqt_cast(((TQWidget *)object)->parentWidget())) { bool drawMenubar=false; @@ -2263,13 +2263,13 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, // Taken from plastik... // focus highlight - if (::tqqt_cast(object) || ::tqqt_cast(object)/* || ::tqqt_cast(object)*/) + if (::tqt_cast(object) || ::tqt_cast(object)/* || ::tqt_cast(object)*/) { if(TQEvent::FocusIn==event->type() || TQEvent::FocusOut==event->type() || TQEvent::Enter==event->type() || TQEvent::Leave==event->type()) { TQWidget *widget(TQT_TQWIDGET(object)); - if (::tqqt_cast(widget->parentWidget())) + if (::tqt_cast(widget->parentWidget())) { widget->parentWidget()->repaint(false); return false; @@ -2280,7 +2280,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, return false; } - if(::tqqt_cast(object)) + if(::tqt_cast(object)) { bool useWindowCols=SHADE_WINDOW_BORDER==opts.shadeMenubars; @@ -2389,10 +2389,10 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, default: break; } - if(TQEvent::PaletteChange==event->type() && (::tqqt_cast(object) || ::tqqt_cast(object))) + if(TQEvent::PaletteChange==event->type() && (::tqt_cast(object) || ::tqt_cast(object))) setBgndProp(static_cast(object), opts.bgndAppearance); #ifdef TQTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT - if(opts.fixParentlessDialogs && ::tqqt_cast(object)) + if(opts.fixParentlessDialogs && ::tqt_cast(object)) { TQDialog *dlg=(TQDialog *)object; @@ -2424,7 +2424,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, // child of the insert picture dialog - but the file dialog is shown *before* the // picture dialog! if((!dlg->parentWidget() || !dlg->parentWidget()->isShown())) // && - //(dlg->isModal() || ::tqqt_cast(object))) + //(dlg->isModal() || ::tqt_cast(object))) { TQWidget *activeWindow=tqApp->activeWindow(); @@ -2467,7 +2467,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, #endif // Track show events for progress bars - if (opts.animatedProgress && ::tqqt_cast(object)) + if (opts.animatedProgress && ::tqt_cast(object)) { if(TQEvent::Show==event->type() && !itsAnimationTimer->isActive()) itsAnimationTimer->start(PROGRESS_ANIMATION, false); @@ -2478,16 +2478,16 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, { case TQEvent::FocusIn: case TQEvent::FocusOut: - if(opts.highlightScrollViews && object->isWidgetType() && ::tqqt_cast(object)) + if(opts.highlightScrollViews && object->isWidgetType() && ::tqt_cast(object)) ((TQWidget *)object)->repaint(false); break; case TQEvent::Hide: case TQEvent::Show: - if(::tqqt_cast(object) && + if(::tqt_cast(object) && (((TQListBox *)object)->parentWidget() && - ::tqqt_cast(((TQListBox *)object)->parentWidget()))) + ::tqt_cast(((TQListBox *)object)->parentWidget()))) ((TQComboBox *)(((TQListBox *)object)->parentWidget()))->repaint(false); -// else if(::tqqt_cast(object) && +// else if(::tqt_cast(object) && // (TQFrame::Box==((TQFrame *)object)->frameShape() || TQFrame::Panel==((TQFrame *)object)->frameShape() || // TQFrame::WinPanel==((TQFrame *)object)->frameShape())) // ((TQFrame *)object)->setFrameShape(TQFrame::StyledPanel); @@ -2499,7 +2499,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, if(itsHoverWidget && itsHoverWidget->isEnabled()) { - if(::tqqt_cast(object) && TQT_TQWIDGET(object)->isEnabled()) + if(::tqt_cast(object) && TQT_TQWIDGET(object)->isEnabled()) { itsHoverTab=0L; itsHoverWidget->repaint(false); @@ -2509,7 +2509,7 @@ bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, itsHoverWidget->repaint(false); itsFormMode=false; } - else if(opts.highlightScrollViews && ::tqqt_cast(itsHoverWidget)) + else if(opts.highlightScrollViews && ::tqt_cast(itsHoverWidget)) itsHoverWidget->repaint(false); } else @@ -3297,7 +3297,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl if (header) { - if(header->parent() && ::tqqt_cast(header->parent())) + if(header->parent() && ::tqt_cast(header->parent())) { TQTable *tbl((TQTable *)(header->parent())); @@ -3333,7 +3333,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl if(NO_SECT!=itsHoverSect && HOVER_HEADER==itsHover && itsHoverWidget) { - TQHeader *hd(::tqqt_cast(itsHoverWidget)); + TQHeader *hd(::tqt_cast(itsHoverWidget)); if(hd && hd->isClickEnabled(itsHoverSect) && r==hd->sectionRect(itsHoverSect)) flags|=Style_MouseOver; @@ -3955,10 +3955,10 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl if(APP_OPENOFFICE==itsThemedApp || data.lineWidth()>0 || data.isDefault()) { const TQWidget *widget=p && p->device() ? dynamic_cast(p->device()) : 0L; - bool sv(widget && ::tqqt_cast(widget)), + bool sv(widget && ::tqt_cast(widget)), square((opts.square&SQUARE_SCROLLVIEW) && (sv || - (widget && widget->parentWidget() && ::tqqt_cast(widget) && + (widget && widget->parentWidget() && ::tqt_cast(widget) && widget->parentWidget()->inherits("KateView")))); // if(square) @@ -4297,8 +4297,8 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl TQWidget *widget(dynamic_cast(p->device())); if(widget && (ceData.widgetObjectTypes.count() > 0) && 0==qstrcmp(ceData.widgetObjectTypes[ceData.widgetObjectTypes.count()-1], "TQViewportWidget") && - widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) && - widget->parentWidget()->parentWidget() && ::tqqt_cast(widget->parentWidget()->parentWidget())) + widget->parentWidget() && ::tqt_cast(widget->parentWidget()) && + widget->parentWidget()->parentWidget() && ::tqt_cast(widget->parentWidget()->parentWidget())) { struct QtCurveListBoxItem : public TQListBoxItem { @@ -4423,7 +4423,7 @@ void QtCurveStyle::drawPrimitive(PrimitiveElement pe, TQPainter *p, const TQStyl case PE_PanelLineEdit: { const TQWidget *widget=p && p->device() ? dynamic_cast(p->device()) : 0L; - bool scrollView=widget && ::tqqt_cast(widget); + bool scrollView=widget && ::tqt_cast(widget); // if((opts.square&SQUARE_SCROLLVIEW) && scrollView) // { @@ -4664,7 +4664,7 @@ void QtCurveStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, co drawSliderGroove(p, r, cg, flags, ceData, elementFlags, widget); break; case KPE_SliderHandle: - drawSliderHandle(p, r, cg, flags, widget ? ::tqqt_cast(widget) : 0L); + drawSliderHandle(p, r, cg, flags, widget ? ::tqt_cast(widget) : 0L); break; case KPE_ListViewExpander: { @@ -5755,12 +5755,12 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons } const TQToolBar *tb((widget)?(widget->parentWidget() - ? ::tqqt_cast(widget->parentWidget()) : 0L) : 0L); + ? ::tqt_cast(widget->parentWidget()) : 0L) : 0L); bool onControlButtons(false), onExtender(!tb && (elementFlags & CEF_HasParentWidget) && ceData.parentWidgetData.widgetObjectTypes.contains( "TQToolBarExtensionWidget") && - ::tqqt_cast(widget->parentWidget()->parentWidget())), + ::tqt_cast(widget->parentWidget()->parentWidget())), isDWClose(!tb && !onExtender && (elementFlags & CEF_HasParentWidget) && ceData.parentWidgetData.widgetObjectTypes.contains( "TQDockWindowHandle")); @@ -5806,7 +5806,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons { if(onControlButtons || ((elementFlags & CEF_HasParentWidget) && toolbutton && toolbutton->parentWidget()->parentWidget() && - ::tqqt_cast(toolbutton->parentWidget()->parentWidget()))) + ::tqt_cast(toolbutton->parentWidget()->parentWidget()))) bflags|=NO_ETCH_BUTTON; // If we're pressed, on, or raised... @@ -5870,7 +5870,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons { TQToolBar *tb(0L); - if(::tqqt_cast((widget)?widget->parent():0L)) + if(::tqt_cast((widget)?widget->parent():0L)) tb=(TQToolBar*)widget->parent(); else if(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBarExtensionWidget")) { @@ -6482,7 +6482,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons if((controls & SC_SliderGroove)&& groove.isValid()) drawSliderGroove(paint, groove, cg, flags, ceData, elementFlags, widget); if((controls & SC_SliderHandle)&& handle.isValid()) - drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast(widget) : 0L, tb); + drawSliderHandle(paint, handle, cg, flags, widget ? ::tqt_cast(widget) : 0L, tb); if(controls & SC_SliderTickmarks) TQCommonStyle::drawComplexControl(control, paint, ceData, elementFlags, r, cg, flags, SC_SliderTickmarks, active, data, widget); @@ -6684,7 +6684,7 @@ TQRect QtCurveStyle::querySubControlMetrics(ComplexControl control, const TQStyl if(SC_ComboBoxFrame==sc) { - const TQComboBox *cb(::tqqt_cast(widget)); + const TQComboBox *cb(::tqt_cast(widget)); if(cb && cb->editable()) r=TQRect(r.x()+r.width()-19, r.y(), 19, r.height()); @@ -6954,17 +6954,17 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementDat return 0; case PM_DefaultFrameWidth: if(APP_KATE==itsThemedApp && widget && widget->parentWidget() && widget->parentWidget()->parentWidget() && - ::tqqt_cast(widget) && - ::tqqt_cast(widget->parentWidget()) && - ::tqqt_cast(widget->parentWidget()->parentWidget())) + ::tqt_cast(widget) && + ::tqt_cast(widget->parentWidget()) && + ::tqt_cast(widget->parentWidget()->parentWidget())) return 0; - if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::tqqt_cast(widget)) + if ((opts.square&SQUARE_SCROLLVIEW) && widget && ::tqt_cast(widget)) return (opts.gtkScrollViews || opts.thinSbarGroove) && !opts.highlightScrollViews ? 1 : 2; if(DO_EFFECT && opts.etchEntry && widget && !isFormWidget(widget) && - (::tqqt_cast(widget) || ::tqqt_cast(widget) || - ::tqqt_cast(widget) || ::tqqt_cast(widget))) + (::tqt_cast(widget) || ::tqt_cast(widget) || + ::tqt_cast(widget) || ::tqt_cast(widget))) return 3; else return 2; @@ -8426,7 +8426,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) // is not sensitive. But, the widget can ocupy a larger area - and this whole area will // react to mouse over. This needs to be counteracted so that it looks as if only the // sensitive area mouse-overs... - TQRadioButton *rb(::tqqt_cast(itsHoverWidget)); + TQRadioButton *rb(::tqt_cast(itsHoverWidget)); if(rb) { @@ -8440,7 +8440,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) } else { - TQCheckBox *cb(::tqqt_cast(itsHoverWidget)); + TQCheckBox *cb(::tqt_cast(itsHoverWidget)); if(cb) { @@ -8453,7 +8453,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) } else { - TQScrollBar *sb(::tqqt_cast(itsHoverWidget)); + TQScrollBar *sb(::tqt_cast(itsHoverWidget)); if(sb) // So, are we over add button, sub button, slider, or none? { @@ -8501,7 +8501,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) else { { - TQHeader *hd(::tqqt_cast(itsHoverWidget)); + TQHeader *hd(::tqt_cast(itsHoverWidget)); if(hd) { @@ -8536,7 +8536,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) } else { - TQSpinWidget *sw(::tqqt_cast(itsHoverWidget)); + TQSpinWidget *sw(::tqt_cast(itsHoverWidget)); if(sw) // So, are we over up or down? { @@ -8560,7 +8560,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) } else { - TQTabBar *tabbar(::tqqt_cast(itsHoverWidget)); + TQTabBar *tabbar(::tqt_cast(itsHoverWidget)); if(tabbar) { @@ -8576,7 +8576,7 @@ bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos) } else { - TQComboBox *cb(::tqqt_cast(itsHoverWidget)); + TQComboBox *cb(::tqt_cast(itsHoverWidget)); if(cb) { @@ -8886,7 +8886,7 @@ bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos) { return opts.windowDrag && (//qobject_cast(o) || - (::tqqt_cast(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos))) + (::tqt_cast(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos))) //|| qobject_cast(o) //|| (o->inherits("TQToolButton") && !TQT_TQWIDGET(o)->isEnabled()) // || qobject_cast(o) @@ -8908,7 +8908,7 @@ void QtCurveStyle::updateProgressPos() bool visible(false); for (; it!=end; ++it) { - TQProgressBar *pb(::tqqt_cast(it.key())); + TQProgressBar *pb(::tqt_cast(it.key())); if (!pb) continue; @@ -8934,7 +8934,7 @@ void QtCurveStyle::progressBarDestroyed(TQObject *bar) void QtCurveStyle::sliderThumbMoved(int) { - TQSlider *slider(::tqqt_cast(sender())); + TQSlider *slider(::tqt_cast(sender())); if(slider) slider->update(); diff --git a/style/shortcuthandler.cpp b/style/shortcuthandler.cpp index b880a89..7407366 100644 --- a/style/shortcuthandler.cpp +++ b/style/shortcuthandler.cpp @@ -41,7 +41,7 @@ bool ShortcutHandler::hasSeenAlt(const TQWidget *widget) const if(widget && !widget->isEnabled()) return false; - if(::tqqt_cast(widget)) + if(::tqt_cast(widget)) return itsOpenMenus.count() && itsOpenMenus.last()==widget; else return itsOpenMenus.isEmpty() && itsSeenAlt.contains((TQWidget *)(widget->topLevelWidget())); @@ -94,7 +94,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e) if (!o->isWidgetType()) return TQObject::eventFilter(o, e); - TQWidget *widget = ::tqqt_cast(o); + TQWidget *widget = ::tqt_cast(o); switch(e->type()) { case TQEvent::KeyPress: @@ -102,7 +102,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e) { itsAltDown = true; - if(::tqqt_cast(widget)) + if(::tqt_cast(widget)) { setSeenAlt(widget); updateWidget(widget); @@ -145,7 +145,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e) } break; case TQEvent::Show: - if(::tqqt_cast(widget)) + if(::tqt_cast(widget)) { TQWidget *prev=itsOpenMenus.count() ? itsOpenMenus.last() : 0L; itsOpenMenus.append(widget); @@ -155,7 +155,7 @@ bool ShortcutHandler::eventFilter(TQObject *o, TQEvent *e) } break; case TQEvent::Hide: - if(::tqqt_cast(widget)) + if(::tqt_cast(widget)) { itsSeenAlt.remove(widget); itsUpdated.remove(widget);