diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-12 10:11:08 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-13 09:57:17 +0900 |
commit | 94e67d0ad7aa5ca14b46f3ef43c9c8f4d8398977 (patch) | |
tree | eceace065c01a1eec4550313c5ef48aa51eef996 | |
parent | e762b45c22c02eab876e5d8da8be33893d5880b2 (diff) | |
download | tdeartwork-94e67d0ad7aa5ca14b46f3ef43c9c8f4d8398977.tar.gz tdeartwork-94e67d0ad7aa5ca14b46f3ef43c9c8f4d8398977.zip |
Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit b5eebf6368e540fe7769e76d70dd98b6e6ca0499)
-rw-r--r-- | styles/dotnet/dotnet.cpp | 26 | ||||
-rw-r--r-- | styles/phase/phasestyle.cpp | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/styles/dotnet/dotnet.cpp b/styles/dotnet/dotnet.cpp index 418a48fb..484aec19 100644 --- a/styles/dotnet/dotnet.cpp +++ b/styles/dotnet/dotnet.cpp @@ -111,7 +111,7 @@ bool dotNETstyle::inheritsTDEHTML(const TQWidget* w) const void dotNETstyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); if (!qstrcmp(tqApp->argv()[0], "kicker") || ceData.widgetObjectTypes.contains("Kicker")) @@ -124,7 +124,7 @@ void dotNETstyle::polish(const TQStyleControlElementData &ceData, ControlElement // to update the palette again. // bool extraPalette = false; - if (ceData.widgetObjectTypes.contains(TQCOMBOBOX_OBJECT_NAME_STRING) && !inheritsTDEHTML(widget)) { + if (ceData.widgetObjectTypes.contains("TQComboBox") && !inheritsTDEHTML(widget)) { installObjectEventHandler(ceData, elementFlags, ptr, this); updatePalette( (TQComboBox*) widget ); // extraPalette = true; @@ -137,10 +137,10 @@ void dotNETstyle::polish(const TQStyleControlElementData &ceData, ControlElement // other bad things (see bug #54569) /* if (!widget->ownPalette()) { - if (ceData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQToolBar")) { updatePalette( (TQToolBar*) widget ); extraPalette = true; - } else if (ceData.widgetObjectTypes.contains(TQMENUBAR_OBJECT_NAME_STRING)) { + } else if (ceData.widgetObjectTypes.contains("TQMenuBar")) { updatePalette( (TQMenuBar*) widget ); extraPalette = true; } @@ -153,10 +153,10 @@ void dotNETstyle::unPolish(const TQStyleControlElementData &ceData, ControlEleme { winstyle->unPolish(ceData, elementFlags, ptr); - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); - if (ceData.widgetObjectTypes.contains(TQCOMBOBOX_OBJECT_NAME_STRING) && !inheritsTDEHTML(widget)) { + if (ceData.widgetObjectTypes.contains("TQComboBox") && !inheritsTDEHTML(widget)) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } } @@ -1871,10 +1871,10 @@ int dotNETstyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ceD if (!pseudo3D) { return 1; } else { - if (ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING) || - ceData.widgetObjectTypes.contains(TQMENUBAR_OBJECT_NAME_STRING) || - ceData.widgetObjectTypes.contains(TQRANGECONTROL_OBJECT_NAME_STRING) || - ceData.widgetObjectTypes.contains(TQSCROLLVIEW_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQPopupMenu") || + ceData.widgetObjectTypes.contains("TQMenuBar") || + ceData.widgetObjectTypes.contains("TQRangeControl") || + ceData.widgetObjectTypes.contains("TQScrollView")) { return 1; } else { return 2; @@ -2067,10 +2067,10 @@ void dotNETstyle::slotDestroyed() bool dotNETstyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags, void* source, TQEvent *ev ) { - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* obj = reinterpret_cast<TQObject*>(source); - if (obj->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) { + if (obj->inherits("TQComboBox")) { if (ev->type() == TQEvent::Enter) { TQWidget *btn = (TQWidget *)obj; if (btn->isEnabled()) { @@ -2090,7 +2090,7 @@ bool dotNETstyle::objectEventHandler( const TQStyleControlElementData &ceData, C pal.active().color(TQColorGroup::Background)); btn->setPalette(pal); } - } else if (obj->inherits(TQBUTTON_OBJECT_NAME_STRING)) { + } else if (obj->inherits("TQButton")) { TQWidget *btn = (TQWidget *)obj; TQPalette pal = btn->palette(); pal.setColor(TQColorGroup::Button, diff --git a/styles/phase/phasestyle.cpp b/styles/phase/phasestyle.cpp index 782116a6..4379e6ac 100644 --- a/styles/phase/phasestyle.cpp +++ b/styles/phase/phasestyle.cpp @@ -54,7 +54,7 @@ #include "phasestyle.h" #include "bitmaps.h" -static const char* TQSPLITTERHANDLE = TQSPLITTERHANDLE_OBJECT_NAME_STRING; +static const char* TQSPLITTERHANDLE = "TQSplitterHandle"; static const char* TQTOOLBAREXTENSION = "TQToolBarExtensionWidget"; static const char* KTOOLBARWIDGET = "tde toolbar widget"; @@ -138,7 +138,7 @@ PhaseStyle::~PhaseStyle() void PhaseStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQApplication")) { TQApplication *app = reinterpret_cast<TQApplication*>(ptr); if (!qstrcmp(app->argv()[0], "kicker")) kicker_ = true; } @@ -151,7 +151,7 @@ void PhaseStyle::applicationPolish(const TQStyleControlElementData &ceData, Cont void PhaseStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); if (::tqqt_cast<TQMenuBar*>(widget) || @@ -213,7 +213,7 @@ void PhaseStyle::polish(TQPalette &pal) void PhaseStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) { - if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQWidget")) { TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); if (::tqqt_cast<TQMenuBar*>(widget) || @@ -638,7 +638,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element, horiz = true; } - if ((ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING)) || + if ((ceData.widgetObjectTypes.contains("TQPopupMenu")) || (ceData.widgetObjectTypes.contains("TDEPopupTitle"))) { // kicker/kdesktop menu titles drawPhaseBevel(painter, x,y,w,h, @@ -894,7 +894,7 @@ void PhaseStyle::drawPrimitive(TQ_PrimitiveElement element, widget = dynamic_cast<TQWidget*>(painter->device()); bool flat = true; - if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) { + if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) { TQToolBar *toolbar = ::tqqt_cast<TQToolBar*>(widget->parent()); if (toolbar) { // toolbar not floating or in a TQMainWindow @@ -1349,7 +1349,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element, } case CE_PopupMenuItem: { - if (!ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING)) { + if (!ceData.widgetObjectTypes.contains("TQPopupMenu")) { TDEStyle::drawControl(element, painter, ceData, elementFlags, rect, group, flags, option, widget); return; @@ -1503,7 +1503,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element, } case CE_TabBarTab: { - if (ceData.widgetObjectTypes.contains(TQTABBAR_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQTabBar")) { // this guy can get complicated, we we do it elsewhere drawPhaseTab(painter, x, y, w, h, group, ceData, elementFlags, option, flags); @@ -1522,7 +1522,7 @@ void PhaseStyle::drawControl(TQ_ControlElement element, } case CE_ProgressBarContents: { - if (!ceData.widgetObjectTypes.contains(TQPROGRESSBAR_OBJECT_NAME_STRING)) { + if (!ceData.widgetObjectTypes.contains("TQProgressBar")) { TDEStyle::drawControl(element, painter, ceData, elementFlags, rect, group, flags, option, widget); return; @@ -1847,7 +1847,7 @@ void PhaseStyle::drawComplexControl(TQ_ComplexControl control, y2 = rect.bottom(); // check for TQToolBar parent - if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) { + if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) { toolbar = (btn)?::tqqt_cast<TQToolBar*>(btn->parent()):NULL; horiz = (ceData.toolBarData.orientation == TQt::Horizontal); if (normal) { // draw background @@ -1967,7 +1967,7 @@ int PhaseStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementData return 24; case PM_TabBarTabVSpace: - if (ceData.widgetObjectTypes.contains(TQTABBAR_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQTabBar")) { if (ceData.tabBarData.shape == TQTabBar::RoundedAbove) { return 10; } else { @@ -2161,7 +2161,7 @@ TQSize PhaseStyle::sizeFromContents(ContentsType contents, case CT_PopupMenuItem: { if (!widget || option.isDefault()) return contentsize; - if (!ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING)) { + if (!ceData.widgetObjectTypes.contains("TQPopupMenu")) { return TDEStyle::sizeFromContents(contents, ceData, elementFlags, contentsize, option, widget); } @@ -2261,7 +2261,7 @@ int PhaseStyle::styleHint(StyleHint sh, const TQStyleControlElementData &ceData, bool PhaseStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* object = reinterpret_cast<TQObject*>(source); if (TDEStyle::objectEventHandler(ceData, elementFlags, source, event)) return true; |