summaryrefslogtreecommitdiffstats
path: root/tdestyles
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 11:09:49 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 11:12:16 +0900
commit36c049e135b0cec7cf97b41888860186813df5f0 (patch)
treeb1f87aff496d5ca1d3ca648817088eefb77c7316 /tdestyles
parent7f7e5585b2aee3db125045d6af2aaed1f8c37af7 (diff)
downloadtdelibs-36c049e135b0cec7cf97b41888860186813df5f0.tar.gz
tdelibs-36c049e135b0cec7cf97b41888860186813df5f0.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>
Diffstat (limited to 'tdestyles')
-rw-r--r--tdestyles/asteroid/asteroid.cpp10
-rw-r--r--tdestyles/highcolor/highcolor.cpp24
-rw-r--r--tdestyles/highcontrast/highcontrast.cpp20
-rw-r--r--tdestyles/keramik/keramik.cpp48
-rw-r--r--tdestyles/klegacy/klegacystyle.cpp42
-rw-r--r--tdestyles/kthemestyle/kthemestyle.cpp12
-rw-r--r--tdestyles/light/lightstyle-v2.cpp2
-rw-r--r--tdestyles/light/lightstyle-v3.cpp2
-rw-r--r--tdestyles/plastik/plastik.cpp12
-rw-r--r--tdestyles/web/webstyle.cpp8
10 files changed, 90 insertions, 90 deletions
diff --git a/tdestyles/asteroid/asteroid.cpp b/tdestyles/asteroid/asteroid.cpp
index 305a140c8..6034b1c42 100644
--- a/tdestyles/asteroid/asteroid.cpp
+++ b/tdestyles/asteroid/asteroid.cpp
@@ -97,7 +97,7 @@ AsteroidStyle::~AsteroidStyle()
void AsteroidStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
/* Screwing with the palette is fun! and required in order to make it feel
authentic. -clee */
@@ -124,7 +124,7 @@ void AsteroidStyle::polish(const TQStyleControlElementData &ceData, ControlEleme
}
}
- if (ceData.widgetObjectTypes.contains(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQPushButton")) {
installObjectEventHandler(ceData, elementFlags, ptr, this);
}
else {
@@ -1985,7 +1985,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc,
p->drawRect(hr);
bool draw_skinny_frame = false;
-// if (!ceData.widgetObjectTypes.contains(TQCOMBOBOX_OBJECT_NAME_STRING)) draw_skinny_frame = true;
+// if (!ceData.widgetObjectTypes.contains("TQComboBox")) draw_skinny_frame = true;
if (ceData.comboBoxListBoxFlags & CEF_IsVisible) draw_skinny_frame = true;
if (draw_skinny_frame) {
p->setPen(cg.mid());
@@ -2289,7 +2289,7 @@ int AsteroidStyle::pixelMetric(PixelMetric pm, const TQStyleControlElementData &
}
case PM_DefaultFrameWidth: {
- if (ceData.widgetObjectTypes.contains(TQPOPUPMENU_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQPopupMenu")) {
return 3;
} else {
return TDEStyle::pixelMetric(pm, ceData, elementFlags, w);
@@ -2618,7 +2618,7 @@ bool AsteroidStyle::objectEventHandler( const TQStyleControlElementData &ceData,
/* Win2K has this interesting behaviour where it sets the current
default button to whatever pushbutton the user presses the mouse
on. I _think_ this emulates that properly. -clee */
- if (ceData.widgetObjectTypes.contains(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQPushButton")) {
if (e->type() == TQEvent::MouseButtonPress) {
widgetActionRequest(ceData, elementFlags, source, WAR_SetDefault);
}
diff --git a/tdestyles/highcolor/highcolor.cpp b/tdestyles/highcolor/highcolor.cpp
index d1666406f..6f06a18e4 100644
--- a/tdestyles/highcolor/highcolor.cpp
+++ b/tdestyles/highcolor/highcolor.cpp
@@ -190,19 +190,19 @@ HighColorStyle::~HighColorStyle()
void HighColorStyle::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)) {
+ if (widget->inherits("TQPushButton")) {
installObjectEventHandler(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(TQWidget::NoBackground);
- } else if (type == HighColor && widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) {
+ } else if (type == HighColor && widget->inherits("TQToolBarExtensionWidget")) {
installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) {
widget->setBackgroundMode( NoBackground ); // We paint the whole background.
installObjectEventHandler(ceData, elementFlags, ptr, this);
- } else if (widget->inherits(TQTOOLBOXBUTTON_OBJECT_NAME_STRING)) {
+ } else if (widget->inherits("TQToolBoxButton")) {
TQFont font = widget->font();
font.setBold(true);
widget->setFont(font);
@@ -215,14 +215,14 @@ void HighColorStyle::polish(const TQStyleControlElementData &ceData, ControlElem
void HighColorStyle::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 (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
+ if (widget->inherits("TQPushButton")) {
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(TQWidget::PaletteBackground);
- } else if (type == HighColor && widget->inherits(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING)) {
+ } else if (type == HighColor && widget->inherits("TQToolBarExtensionWidget")) {
removeObjectEventHandler(ceData, elementFlags, ptr, this);
} else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) {
removeObjectEventHandler(ceData, elementFlags, ptr, this);
@@ -1683,7 +1683,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control,
}
else if (!ceData.parentWidgetData.widgetObjectTypes.isEmpty())
{
- if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
+ if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar"))
{
TQToolBar* parent = (TQToolBar*)widget->parent();
TQRect pr = parent->rect();
@@ -1692,7 +1692,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control,
parent->orientation() == Qt::Vertical,
r.x(), r.y(), pr.width()-2, pr.height()-2);
}
- else if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAREXTENSIONWIDGET_OBJECT_NAME_STRING))
+ else if (ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBarExtensionWidget"))
{
TQWidget* parent = (TQWidget*)widget->parent();
TQToolBar* toolbar = (TQToolBar*)parent->parent();
@@ -2016,7 +2016,7 @@ bool HighColorStyle::objectEventHandler( const TQStyleControlElementData &ceData
TQToolBar* toolbar;
- if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING))
+ if (ceData.widgetObjectTypes.contains("TQObject"))
{
TQObject* object = reinterpret_cast<TQObject*>(source);
diff --git a/tdestyles/highcontrast/highcontrast.cpp b/tdestyles/highcontrast/highcontrast.cpp
index 0d67fd94b..fefdb0d9a 100644
--- a/tdestyles/highcontrast/highcontrast.cpp
+++ b/tdestyles/highcontrast/highcontrast.cpp
@@ -154,14 +154,14 @@ void HighContrastStyle::polish( TQPalette& pal )
void HighContrastStyle::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 (widget->inherits (TQBUTTON_OBJECT_NAME_STRING)
- || widget->inherits (TQCOMBOBOX_OBJECT_NAME_STRING)
- || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING)
- || widget->inherits (TQLINEEDIT_OBJECT_NAME_STRING)
- || widget->inherits (TQTEXTEDIT_OBJECT_NAME_STRING))
+ if (widget->inherits ("TQButton")
+ || widget->inherits ("TQComboBox")
+ || widget->inherits ("TQSpinWidget")
+ || widget->inherits ("TQLineEdit")
+ || widget->inherits ("TQTextEdit"))
{
installObjectEventHandler(ceData, elementFlags, ptr, this);
@@ -181,9 +181,9 @@ void HighContrastStyle::polish (const TQStyleControlElementData &ceData, Control
void HighContrastStyle::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 (widget->inherits (TQWIDGET_OBJECT_NAME_STRING) || widget->inherits (TQCOMBOBOX_OBJECT_NAME_STRING) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING) || widget->inherits (TQLINEEDIT_OBJECT_NAME_STRING) || widget->inherits (TQTEXTEDIT_OBJECT_NAME_STRING)) {
+ if (widget->inherits ("TQWidget") || widget->inherits ("TQComboBox") || widget->inherits ("TQSpinWidget") || widget->inherits ("TQLineEdit") || widget->inherits ("TQTextEdit")) {
installObjectEventHandler(ceData, elementFlags, ptr, this);
}
}
@@ -724,7 +724,7 @@ void HighContrastStyle::drawTDEStylePrimitive (TDEStylePrimitive kpe,
case KPE_SliderGroove: {
setColorsText (p, cg, flags);
TQRect r2 (r);
- if (ceData.widgetObjectTypes.contains(TQSLIDER_OBJECT_NAME_STRING))
+ if (ceData.widgetObjectTypes.contains("TQSlider"))
{
if (ceData.orientation == TQt::Horizontal)
{
@@ -1622,7 +1622,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQStyleControlElementDat
}
case PM_DefaultFrameWidth: {
- if (widget && (ceData.widgetObjectTypes.contains (TQLINEEDIT_OBJECT_NAME_STRING) || ceData.widgetObjectTypes.contains (TQTEXTEDIT_OBJECT_NAME_STRING)))
+ if (widget && (ceData.widgetObjectTypes.contains ("TQLineEdit") || ceData.widgetObjectTypes.contains ("TQTextEdit")))
return 2*basicLineWidth;
else
return basicLineWidth;
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;
diff --git a/tdestyles/klegacy/klegacystyle.cpp b/tdestyles/klegacy/klegacystyle.cpp
index 4823a7ecd..b9fe5f688 100644
--- a/tdestyles/klegacy/klegacystyle.cpp
+++ b/tdestyles/klegacy/klegacystyle.cpp
@@ -1896,23 +1896,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;
@@ -1928,7 +1928,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;
@@ -1942,7 +1942,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;
@@ -1966,7 +1966,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);
@@ -2542,7 +2542,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");
@@ -3079,7 +3079,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) {
@@ -3149,7 +3149,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) {
@@ -3189,8 +3189,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) {
@@ -3254,13 +3254,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()) {
@@ -3288,7 +3288,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()) {
@@ -3326,8 +3326,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()) {
@@ -3344,7 +3344,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);
diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp
index a3e83e8f7..899d4681d 100644
--- a/tdestyles/kthemestyle/kthemestyle.cpp
+++ b/tdestyles/kthemestyle/kthemestyle.cpp
@@ -422,7 +422,7 @@ KThemeStyle::~KThemeStyle()
void KThemeStyle::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;
@@ -470,7 +470,7 @@ void KThemeStyle::paletteChanged()
void KThemeStyle::applicationUnPolish( 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);
app->setPalette( oldPalette, true );
}
@@ -478,7 +478,7 @@ void KThemeStyle::applicationUnPolish( const TQStyleControlElementData &ceData,
bool KThemeStyle::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( object->inherits("KActiveLabel"))
@@ -506,7 +506,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
w->setPalette(pal);
}
}
- if (!qstrcmp(object->name(), "tde toolbar widget") && object->inherits(TQLABEL_OBJECT_NAME_STRING))
+ if (!qstrcmp(object->name(), "tde toolbar widget") && object->inherits("TQLabel"))
{
TQWidget* lb = TQT_TQWIDGET(object);
if (lb->backgroundMode() == TQt::PaletteButton)
@@ -520,7 +520,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C
void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
if (::tqqt_cast<TQStatusBar*>(w))
@@ -631,7 +631,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
if (w->backgroundPixmap() && !w->isTopLevel())
diff --git a/tdestyles/light/lightstyle-v2.cpp b/tdestyles/light/lightstyle-v2.cpp
index 35b7cc813..7e0c39076 100644
--- a/tdestyles/light/lightstyle-v2.cpp
+++ b/tdestyles/light/lightstyle-v2.cpp
@@ -298,7 +298,7 @@ void LightStyleV2::drawPrimitive( TQ_PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->parentWidget();
- if (p->inherits(TQDOCKWINDOW_OBJECT_NAME_STRING) && ! p->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
diff --git a/tdestyles/light/lightstyle-v3.cpp b/tdestyles/light/lightstyle-v3.cpp
index 92b0d04da..d7fc2bfd3 100644
--- a/tdestyles/light/lightstyle-v3.cpp
+++ b/tdestyles/light/lightstyle-v3.cpp
@@ -430,7 +430,7 @@ void LightStyleV3::drawPrimitive( TQ_PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->parentWidget();
- if (p->inherits(TQDOCKWINDOW_OBJECT_NAME_STRING) && ! p->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
diff --git a/tdestyles/plastik/plastik.cpp b/tdestyles/plastik/plastik.cpp
index 0db70b8a9..e03a0788b 100644
--- a/tdestyles/plastik/plastik.cpp
+++ b/tdestyles/plastik/plastik.cpp
@@ -225,7 +225,7 @@ PlastikStyle::~PlastikStyle()
void PlastikStyle::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"))
@@ -237,7 +237,7 @@ void PlastikStyle::applicationPolish(const TQStyleControlElementData &ceData, Co
void PlastikStyle::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( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
@@ -250,7 +250,7 @@ void PlastikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
- ::tqqt_cast<TQToolButton*>(widget) || widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
+ ::tqqt_cast<TQToolButton*>(widget) || widget->inherits("TQSplitterHandle") )
{
// widget->setBackgroundMode(PaletteBackground);
installObjectEventHandler(ceData, elementFlags, ptr, this);
@@ -280,7 +280,7 @@ void PlastikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
void PlastikStyle::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( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
@@ -292,7 +292,7 @@ void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) ||
- widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
+ widget->inherits("TQSplitterHandle") )
{
removeObjectEventHandler(ceData, elementFlags, ptr, this);
}
@@ -3497,7 +3497,7 @@ bool PlastikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if (TDEStyle::objectEventHandler(ceData, elementFlags, source, ev) )
return true;
- if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQObject")) {
TQObject* obj = reinterpret_cast<TQObject*>(source);
if (!obj->isWidgetType() ) return false;
diff --git a/tdestyles/web/webstyle.cpp b/tdestyles/web/webstyle.cpp
index 073a46368..f363b9527 100644
--- a/tdestyles/web/webstyle.cpp
+++ b/tdestyles/web/webstyle.cpp
@@ -250,10 +250,10 @@ WebStyle::unPolish(TQApplication *)
void
WebStyle::polish(TQWidget * w)
{
- if (w->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
+ if (w->inherits("TQPushButton"))
w->installEventFilter(this);
- else if (w->inherits(TQGROUPBOX_OBJECT_NAME_STRING) || w->inherits(TQFRAME_OBJECT_NAME_STRING))
+ else if (w->inherits("TQGroupBox") || w->inherits("TQFrame"))
{
TQFrame * f(static_cast<TQFrame *>(w));
@@ -282,7 +282,7 @@ WebStyle::polish(TQWidget * w)
void
WebStyle::unPolish(TQWidget * w)
{
- if (w->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
+ if (w->inherits("TQPushButton"))
w->removeEventFilter(this);
else if (w == _currentFrame)
@@ -1046,7 +1046,7 @@ WebStyle::drawTDEToolBarButton
{
bool toggleAndOn = false;
- if (button->inherits(TQBUTTON_OBJECT_NAME_STRING))
+ if (button->inherits("TQButton"))
{
TQButton * b = static_cast<TQButton *>(button);
toggleAndOn = b->isToggleButton() && b->isOn();