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/klegacy | |
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/klegacy')
-rw-r--r-- | tdestyles/klegacy/klegacystyle.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tdestyles/klegacy/klegacystyle.cpp b/tdestyles/klegacy/klegacystyle.cpp index 8daf82c06..9cc019795 100644 --- a/tdestyles/klegacy/klegacystyle.cpp +++ b/tdestyles/klegacy/klegacystyle.cpp @@ -1898,23 +1898,23 @@ void KLegacyStyle::polish(TQWidget *widget) { bool immediateRender = false; bool bgPixmap = false; - if (widget->inherits(TQBUTTON_OBJECT_NAME_STRING)) { + if (widget->inherits("TQButton")) { metaobject = TQButton::staticMetaObject(); eventFilter = true; } - if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) { + if (widget->inherits("TQComboBox")) { metaobject = TQComboBox::staticMetaObject(); eventFilter = true; } - if (widget->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) { + if (widget->inherits("TQScrollBar")) { metaobject = TQScrollBar::staticMetaObject(); eventFilter = true; mouseTrack = true; } - if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING)) { + if (widget->inherits("TQMenuBar")) { eventFilter = true; immediateRender = true; @@ -1930,7 +1930,7 @@ void KLegacyStyle::polish(TQWidget *widget) { widget->setBackgroundMode(TQWidget::PaletteBackground); } - if (widget->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) { + if (widget->inherits("TQToolBar")) { metaobject = TQToolBar::staticMetaObject(); eventFilter = true; @@ -1944,7 +1944,7 @@ void KLegacyStyle::polish(TQWidget *widget) { widget->setBackgroundMode(TQWidget::PaletteBackground); } - if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { + if (widget->inherits("TQLineEdit")) { metaobject = TQLineEdit::staticMetaObject(); eventFilter = true; @@ -1968,7 +1968,7 @@ void KLegacyStyle::polish(TQWidget *widget) { detail = "base"; } - if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { + if (widget->inherits("TQPopupMenu")) { tqDebug("polishing popup '%s'", widget->className()); metaobject = TQPopupMenu::staticMetaObject(); widget->setBackgroundMode(TQWidget::PaletteBackground); @@ -2544,7 +2544,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h, key.data.state = KLegacy::Normal; key.data.shadow = KLegacy::Out; - if (priv->lastWidget && priv->lastWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) + if (priv->lastWidget && priv->lastWidget->inherits("TQComboBox")) key.data.state = KLegacy::Prelight; TQPixmap *pix = gobj->draw(key, w, h, "optionmenu"); @@ -3081,7 +3081,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { { TQWidget *w = (TQWidget *) obj; - if (w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) && w->width() < 700) { + if (w->inherits("TQPopupMenu") && w->width() < 700) { GtkObject *gobj = priv->gtkDict.find(TQPopupMenu::staticMetaObject()); if (gobj) { @@ -3151,7 +3151,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (p && (! p->isNull())) w->setBackgroundPixmap(*p); } - } else if (w->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { + } else if (w->inherits("TQLineEdit")) { GtkObject *gobj = priv->gtkDict.find(TQLineEdit::staticMetaObject()); if (gobj) { @@ -3191,8 +3191,8 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { w->setPalette(pal); } } - } else if (w->inherits(TQMENUBAR_OBJECT_NAME_STRING) || - w->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) { + } else if (w->inherits("TQMenuBar") || + w->inherits("TQToolBar")) { GtkObject *gobj = priv->gtkDict.find(TQMenuBar::staticMetaObject()); if (gobj) { @@ -3256,13 +3256,13 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { case TQEvent::Enter: { - if (obj->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING) || - obj->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || - obj->inherits(TQSLIDER_OBJECT_NAME_STRING) || - obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) { + if (obj->inherits("TQPushButton") || + obj->inherits("TQComboBox") || + obj->inherits("TQSlider") || + obj->inherits("TQScrollBar")) { priv->lastWidget = (TQWidget *) obj; priv->lastWidget->repaint(false); - } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) { + } else if (obj->inherits("TQRadioButton")) { TQWidget *w = (TQWidget *) obj; if (! w->isTopLevel() && w->isEnabled()) { @@ -3290,7 +3290,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { } } } - } else if (obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { + } else if (obj->inherits("TQCheckBox")) { TQWidget *w = (TQWidget *) obj; if (! w->isTopLevel() && w->isEnabled()) { @@ -3328,8 +3328,8 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (obj == priv->lastWidget) { priv->lastWidget = 0; ((TQWidget *) obj)->repaint(false); - } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || - obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { + } else if (obj->inherits("TQRadioButton") || + obj->inherits("TQCheckBox")) { TQWidget *w = (TQWidget *) obj; if (! w->isTopLevel()) { @@ -3346,7 +3346,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { { TQMouseEvent *me = (TQMouseEvent *) e; priv->mousePos = me->pos(); - if (obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING) && + if (obj->inherits("TQScrollBar") && (! (me->state() & (LeftButton | MidButton | RightButton)))) { priv->hovering = true; ((TQWidget *) obj)->repaint(false); |