diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-12 11:09:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-07-13 10:04:24 +0900 |
commit | 707310036113d2d0ae9da1cc7f85d0e642bf9686 (patch) | |
tree | afa9b616af366f63e0418df74b2287299d8572a3 /tdestyles/keramik | |
parent | 08eacf589a6ee0358c49f177fca34a29e0515164 (diff) | |
download | tdelibs-707310036113d2d0ae9da1cc7f85d0e642bf9686.tar.gz tdelibs-707310036113d2d0ae9da1cc7f85d0e642bf9686.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 36c049e135b0cec7cf97b41888860186813df5f0)
Diffstat (limited to 'tdestyles/keramik')
-rw-r--r-- | tdestyles/keramik/keramik.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp index 2b7213eee..53d6f4316 100644 --- a/tdestyles/keramik/keramik.cpp +++ b/tdestyles/keramik/keramik.cpp @@ -329,7 +329,7 @@ KeramikStyle::~KeramikStyle() void KeramikStyle::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")) { kickerMode = true; @@ -339,28 +339,28 @@ void KeramikStyle::applicationPolish(const TQStyleControlElementData &ceData, Co void KeramikStyle::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); // Put in order of highest occurrence to maximise hit rate - if ( widget->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) || widget->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) ) + if ( widget->inherits( "TQPushButton" ) || widget->inherits( "TQComboBox" ) || widget->inherits("TQToolButton") ) { installObjectEventHandler(ceData, elementFlags, ptr, this); - if ( widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) + if ( widget->inherits( "TQComboBox" ) ) widget->setBackgroundMode( NoBackground ); } - else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) || widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) + else if ( widget->inherits( "TQMenuBar" ) || widget->inherits( "TQPopupMenu" ) ) widget->setBackgroundMode( NoBackground ); else if ( widget->parentWidget() && - ( ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) && widget->parentWidget()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) || + ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) || widget->inherits( "TDECompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 4 ); listbox->setBackgroundMode( NoBackground ); installObjectEventHandler(ceData, elementFlags, ptr, this); - } else if (widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) { + } else if (widget->inherits("TQToolBarExtensionWidget")) { installObjectEventHandler(ceData, elementFlags, ptr, this); //widget->setBackgroundMode( NoBackground ); } @@ -384,28 +384,28 @@ void KeramikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen void KeramikStyle::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); //### TODO: This needs major cleanup (and so does polish() ) - if ( widget->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) + if ( widget->inherits( "TQPushButton" ) || widget->inherits( "TQComboBox" ) ) { - if ( widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) + if ( widget->inherits( "TQComboBox" ) ) widget->setBackgroundMode( PaletteButton ); removeObjectEventHandler(ceData, elementFlags, ptr, this); } - else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) || widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) + else if ( widget->inherits( "TQMenuBar" ) || widget->inherits( "TQPopupMenu" ) ) widget->setBackgroundMode( PaletteBackground ); else if ( widget->parentWidget() && - ( ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) && widget->parentWidget()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) || + ( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) ) || widget->inherits( "TDECompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 1 ); listbox->setBackgroundMode( PaletteBackground ); removeObjectEventHandler(ceData, elementFlags, ptr, this); widget->clearMask(); - } else if (widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) { + } else if (widget->inherits("TQToolBarExtensionWidget")) { removeObjectEventHandler(ceData, elementFlags, ptr, this); } else if ( !qstrcmp( widget->name(), kdeToolbarWidget ) ) { @@ -1283,7 +1283,7 @@ void KeramikStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQToolBar* parent = 0; - if (widget && widget->parent() && widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) + if (widget && widget->parent() && widget->parent()->inherits("TQToolBar")) parent = static_cast<TQToolBar*>(TQT_TQWIDGET(widget->parent())); renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal)); @@ -1414,7 +1414,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, } else { - if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) + if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar")) toolbarBlendWidget = widget; drawPrimitive( PE_ButtonCommand, p, ceData, elementFlags, r, cg, flags ); @@ -1520,7 +1520,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, case CE_ToolButtonLabel: { - bool onToolbar = ceData.parentWidgetData.widgetObjectTypes.contains( TQTOOLBAR_OBJECT_NAME_STRING ); + bool onToolbar = ceData.parentWidgetData.widgetObjectTypes.contains( "TQToolBar" ); TQRect nr = r; if (!onToolbar) @@ -1588,7 +1588,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, case CE_DockWindowEmptyArea: { TQRect pr = r; - if (ceData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) + if (ceData.widgetObjectTypes.contains("TQToolBar")) { const TQToolBar* tb = static_cast<const TQToolBar*>(widget); if (tb->place() == TQDockWindow::OutsideDock) @@ -2029,7 +2029,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, if (controls == SC_All) { //Double-buffer only when we are in the slower full-blend mode - if ( ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING) || !qstrcmp(ceData.parentWidgetData.name.ascii(), kdeToolbarWidget) ) + if ( ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar") || !qstrcmp(ceData.parentWidgetData.name.ascii(), kdeToolbarWidget) ) { buf = new TQPixmap( r.width(), r.height() ); br.setX(0); @@ -2257,10 +2257,10 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, // TOOLBUTTON // ------------------------------------------------------------------- case CC_ToolButton: { - bool onToolbar = ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING); + bool onToolbar = ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar"); bool onExtender = !onToolbar && - ceData.parentWidgetData.widgetObjectTypes.contains( TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING) && - widget && widget->parentWidget()->parentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING ); + ceData.parentWidgetData.widgetObjectTypes.contains( "TQToolBarExtensionWidget") && + widget && widget->parentWidget()->parentWidget()->inherits( "TQToolBar" ); bool onControlButtons = false; if (!onToolbar && !onExtender && !ceData.parentWidgetData.widgetObjectTypes.isEmpty() && @@ -2437,7 +2437,7 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce case PM_TabBarTabShiftVertical: { - if (ceData.widgetObjectTypes.contains(TQTABBAR_OBJECT_NAME_STRING)) + if (ceData.widgetObjectTypes.contains("TQTabBar")) { if (ceData.tabBarData.shape == TQTabBar::RoundedBelow || ceData.tabBarData.shape == TQTabBar::TriangularBelow) @@ -2492,7 +2492,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, case CT_ToolButton: { - bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING ); + bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "TQToolBar" ); if (!onToolbar) //Behaves like a button, so scale appropriately to the border { int w = contentSize.width(); @@ -2795,7 +2795,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData, if (TDEStyle::objectEventHandler( ceData, elementFlags, source, event )) return true; - if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { + if (ceData.widgetObjectTypes.contains("TQObject")) { TQObject* object = reinterpret_cast<TQObject*>(source); if ( !object->isWidgetType() ) return false; |