From e243bddfaeb49af5e2225097032e6f88e3634498 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 26 Nov 2023 02:32:20 +0900 Subject: Replaced various '#define' with actual strings - part 4 Signed-off-by: Michele Calgaro (cherry picked from commit f6494efdde0a3cf0f93fd8e51f2f84accaeb19c1) --- styles/phase/phasestyle.cpp | 80 ++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'styles') diff --git a/styles/phase/phasestyle.cpp b/styles/phase/phasestyle.cpp index b19682bf..69a90749 100644 --- a/styles/phase/phasestyle.cpp +++ b/styles/phase/phasestyle.cpp @@ -154,26 +154,26 @@ void PhaseStyle::polish(const TQStyleControlElementData &ceData, ControlElementF if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); - if (::tqqt_cast(widget) || - ::tqqt_cast(widget)) { + if (::tqt_cast(widget) || + ::tqt_cast(widget)) { // anti-flicker optimization widget->setBackgroundMode(NoBackground); - } else if (::tqqt_cast(widget) || + } else if (::tqt_cast(widget) || widget->inherits(TQTOOLBAREXTENSION) || (!qstrcmp(widget->name(), KTOOLBARWIDGET))) { // needs special handling on paint events installObjectEventHandler(ceData, elementFlags, ptr, this); } else if (highlights_ && - (::tqqt_cast(widget) || - ::tqqt_cast(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) || + ::tqt_cast(widget) || + ::tqt_cast(widget) || widget->inherits(TQSPLITTERHANDLE))) { // mouseover highlighting installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if (highlights_ && ::tqqt_cast(widget)) { + } else if (highlights_ && ::tqt_cast(widget)) { // highlighting needing mouse tracking widget->setMouseTracking(true); installObjectEventHandler(ceData, elementFlags, ptr, this); @@ -216,23 +216,23 @@ void PhaseStyle::unPolish(const TQStyleControlElementData &ceData, ControlElemen if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast(ptr); - if (::tqqt_cast(widget) || - ::tqqt_cast(widget)) { + if (::tqt_cast(widget) || + ::tqt_cast(widget)) { widget->setBackgroundMode(PaletteBackground); - } else if (::tqqt_cast(widget) || + } else if (::tqt_cast(widget) || widget->inherits(TQTOOLBAREXTENSION) || (!qstrcmp(widget->name(), KTOOLBARWIDGET))) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } else if (highlights_ && // highlighting - (::tqqt_cast(widget) || - ::tqqt_cast(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) || + ::tqt_cast(widget) || + ::tqt_cast(widget) || widget->inherits(TQSPLITTERHANDLE))) { removeObjectEventHandler(ceData, elementFlags, ptr, this); - } else if (highlights_ && ::tqqt_cast(widget)) { + } else if (highlights_ && ::tqt_cast(widget)) { widget->setMouseTracking(false); removeObjectEventHandler(ceData, elementFlags, ptr, this); } @@ -895,7 +895,7 @@ void PhaseStyle::drawPrimitive(PrimitiveElement element, bool flat = true; if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) { - TQToolBar *toolbar = ::tqqt_cast(widget->parent()); + TQToolBar *toolbar = ::tqt_cast(widget->parent()); if (toolbar) { // toolbar not floating or in a TQMainWindow flat = flatToolbar(ceData, elementFlags, toolbar); @@ -1203,7 +1203,7 @@ void PhaseStyle::drawControl(ControlElement element, } case CE_PushButtonLabel: { - const TQPushButton* button = ::tqqt_cast(widget); + const TQPushButton* button = ::tqt_cast(widget); if (!button) { TDEStyle::drawControl(element, painter, ceData, elementFlags, rect, group, flags, option, widget); @@ -1280,7 +1280,7 @@ void PhaseStyle::drawControl(ControlElement element, case CE_CheckBoxLabel: case CE_RadioButtonLabel: { - const TQButton *b = ::tqqt_cast(widget); + const TQButton *b = ::tqt_cast(widget); if (!b) return; int alignment = reverse_ ? AlignRight : AlignLeft; @@ -1298,7 +1298,7 @@ void PhaseStyle::drawControl(ControlElement element, } case CE_DockWindowEmptyArea: { - const TQToolBar *tb = ::tqqt_cast(widget); + const TQToolBar *tb = ::tqt_cast(widget); if (tb) { // toolbar not floating or in a TQMainWindow if (flatToolbar(ceData, elementFlags, tb)) { @@ -1318,7 +1318,7 @@ void PhaseStyle::drawControl(ControlElement element, break; case CE_MenuBarItem: { - const TQMenuBar *mbar = ::tqqt_cast(widget); + const TQMenuBar *mbar = ::tqt_cast(widget); if (!mbar) { TDEStyle::drawControl(element, painter, ceData, elementFlags, rect, group, flags, option, widget); @@ -1550,7 +1550,7 @@ void PhaseStyle::drawControl(ControlElement element, } case CE_ToolBoxTab: { - const TQToolBox *box = ::tqqt_cast(widget); + const TQToolBox *box = ::tqt_cast(widget); if (!box) { TDEStyle::drawControl(element, painter, ceData, elementFlags, rect, group, flags, option, widget); @@ -1777,7 +1777,7 @@ void PhaseStyle::drawComplexControl(ComplexControl control, } case CC_SpinWidget: { - const TQSpinWidget *spin = ::tqqt_cast(widget); + const TQSpinWidget *spin = ::tqt_cast(widget); if (!spin) { TDEStyle::drawComplexControl(control, painter, ceData, elementFlags, rect, group, flags, controls, active, option, widget); @@ -1837,7 +1837,7 @@ void PhaseStyle::drawComplexControl(ComplexControl control, } case CC_ToolButton: { - const TQToolButton *btn = ::tqqt_cast(widget); + const TQToolButton *btn = ::tqt_cast(widget); TQToolBar *toolbar; bool horiz = true; @@ -1848,7 +1848,7 @@ void PhaseStyle::drawComplexControl(ComplexControl control, // check for TQToolBar parent if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) { - toolbar = (btn)?::tqqt_cast(btn->parent()):NULL; + toolbar = (btn)?::tqt_cast(btn->parent()):NULL; horiz = (ceData.toolBarData.orientation == TQt::Horizontal); if (normal) { // draw background if (toolbar && flatToolbar(ceData, elementFlags, toolbar)) { @@ -1871,8 +1871,8 @@ void PhaseStyle::drawComplexControl(ComplexControl control, // check for TQToolBarExtensionWidget parent else if (btn && ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAREXTENSION)) { TQWidget *extension; - if ((extension = ::tqqt_cast(btn->parent()))) { - toolbar = ::tqqt_cast(extension->parent()); + if ((extension = ::tqt_cast(btn->parent()))) { + toolbar = ::tqt_cast(extension->parent()); if (toolbar) { horiz = (toolbar->orientation() == TQt::Horizontal); if (normal) { // draw background @@ -2140,7 +2140,7 @@ TQSize PhaseStyle::sizeFromContents(ContentsType contents, switch (contents) { case CT_PushButton: { - const TQPushButton* button = ::tqqt_cast(widget); + const TQPushButton* button = ::tqt_cast(widget); if (!button) { return TDEStyle::sizeFromContents(contents, ceData, elementFlags, contentsize, option, widget); @@ -2280,21 +2280,21 @@ bool PhaseStyle::objectEventHandler( const TQStyleControlElementData &ceData, Co // TDE Toolbar Widget // patch by Daniel Brownlees if (object->parent() && !qstrcmp(object->name(), KTOOLBARWIDGET)) { - if (0 == (widget = ::tqqt_cast(object))) return false; - TQWidget *parent = ::tqqt_cast(object->parent()); + if (0 == (widget = ::tqt_cast(object))) return false; + TQWidget *parent = ::tqt_cast(object->parent()); int px = ceData.rect.x(), py = ceData.rect.y(); // find the toolbar while (parent && parent->parent() - && !::tqqt_cast(parent)) { + && !::tqt_cast(parent)) { px += parent->x(); py += parent->y(); - parent = ::tqqt_cast(parent->parent()); + parent = ::tqt_cast(parent->parent()); } if (!parent) return false; ceData.rect.rect(&x, &y, &w, &h); TQRect prect = parent->rect(); - toolbar = ::tqqt_cast(parent); + toolbar = ::tqt_cast(parent); horiz = (toolbar) ? (toolbar->orientation() == TQt::Horizontal) : (prect.height() < prect.width()); TQPainter painter(widget); @@ -2318,8 +2318,8 @@ bool PhaseStyle::objectEventHandler( const TQStyleControlElementData &ceData, Co // TQToolBarExtensionWidget else if (object && object->isWidgetType() && object->parent() && - (toolbar = ::tqqt_cast(object->parent()))) { - if (0 == (widget = ::tqqt_cast(object))) return false; + (toolbar = ::tqt_cast(object->parent()))) { + if (0 == (widget = ::tqt_cast(object))) return false; horiz = (toolbar->orientation() == TQt::Horizontal); TQPainter painter(widget); ceData.rect.rect(&x, &y, &w, &h); @@ -2349,7 +2349,7 @@ bool PhaseStyle::objectEventHandler( const TQStyleControlElementData &ceData, Co } // TQFrame lines (do this guy last) - else if (0 != (frame = ::tqqt_cast(object))) { + else if (0 != (frame = ::tqt_cast(object))) { TQFrame::Shape shape = frame->frameShape(); switch (shape) { case TQFrame::HLine: -- cgit v1.2.1