summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 09:58:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 09:58:34 +0900
commitcd1f0752e84b82fee6f7a574dc79e51a39a6584f (patch)
treec5cdf2570e88b1d4f143539339382af115b78bd6
parent19a904f8825409fd72f60652271087bcf7941f4c (diff)
downloadtde-style-qtcurve-cd1f0752e84b82fee6f7a574dc79e51a39a6584f.tar.gz
tde-style-qtcurve-cd1f0752e84b82fee6f7a574dc79e51a39a6584f.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>
-rw-r--r--style/qtc_tdestyle.cpp18
-rw-r--r--style/qtcurve.cpp44
2 files changed, 31 insertions, 31 deletions
diff --git a/style/qtc_tdestyle.cpp b/style/qtc_tdestyle.cpp
index 5981f8f..1686705 100644
--- a/style/qtc_tdestyle.cpp
+++ b/style/qtc_tdestyle.cpp
@@ -121,7 +121,7 @@ TQString TQtCTDEStyle::defaultStyle()
void TQtCTDEStyle::polish( 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 ( d->useFilledFrameWorkaround )
@@ -138,7 +138,7 @@ void TQtCTDEStyle::polish( TQStyleControlElementData ceData, ControlElementFlags
void TQtCTDEStyle::unPolish( 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 ( d->useFilledFrameWorkaround )
@@ -415,13 +415,13 @@ void TQtCTDEStyle::drawPrimitive( PrimitiveElement pe,
// Check if we are a normal toolbar or a hidden dockwidget.
if ( parent &&
- (parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING) || // Normal toolbar
- (parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) )) // Collapsed dock
+ (parent->inherits("TQToolBar") || // Normal toolbar
+ (parent->inherits("TQMainWindow")) )) // Collapsed dock
// Draw a toolbar handle
drawTDEStylePrimitive( KPE_ToolBarHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
- else if ( widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
+ else if ( widget->inherits("TQDockWindowHandle") )
// Draw a dock window handle
drawTDEStylePrimitive( KPE_DockWindowHandle, p, ceData, elementFlags, r, cg, flags, opt, widget );
@@ -779,9 +779,9 @@ int TQtCTDEStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, C
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
if (widget && (parent = widget->parentWidget() )
- && !parent->inherits(TQTOOLBAR_OBJECT_NAME_STRING)
- && !parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)
- && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
+ && !parent->inherits("TQToolBar")
+ && !parent->inherits("TQMainWindow")
+ && widget->inherits("TQDockWindowHandle") )
return widget->fontMetrics().lineSpacing();
else
return TQCommonStyle::pixelMetric(m, ceData, elementFlags, widget);
@@ -1682,7 +1682,7 @@ int TQtCTDEStyle::styleHint( StyleHint sh, TQStyleControlElementData ceData, Con
bool TQtCTDEStyle::objectEventHandler( 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 ( d->useFilledFrameWorkaround )
diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp
index e8c07ca..054b24d 100644
--- a/style/qtcurve.cpp
+++ b/style/qtcurve.cpp
@@ -717,7 +717,7 @@ static void drawDots(TQPainter *p, const TQRect &r, bool horiz, int nLines, int
static bool onToolBar(TQWidget *widget, int l=0)
{
return l<3 && widget && widget->parentWidget()
- ? widget->parentWidget()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) ||
+ ? widget->parentWidget()->inherits("TQToolBar") ||
onToolBar(widget->parentWidget(), ++l)
: false;
}
@@ -1206,7 +1206,7 @@ inline void addEventFilter(TQObject *object, TQObject *filter)
void QtCurveStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
- if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQApplication")) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
TQString appName(getFile(app->argv()[0]));
@@ -1304,7 +1304,7 @@ void QtCurveStyle::applicationPolish(const TQStyleControlElementData &ceData, Co
void QtCurveStyle::applicationUnPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{
- if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
+ if (ceData.widgetObjectTypes.contains("TQApplication")) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
if(opts.hideShortcutUnderline)
app->removeEventFilter(itsShortcutHandler);
@@ -1552,7 +1552,7 @@ static const char * kdeToolbarWidget="tde toolbar widget";
void QtCurveStyle::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);
bool enableFilter(opts.highlightFactor || opts.coloredMouseOver);
@@ -1771,7 +1771,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
::tqqt_cast<TQFrame *>(widget))
((TQFrame *)widget)->setLineWidth(0);
}
- else if (ceData.widgetObjectTypes.contains(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
+ else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
{
if(enableFilter)
installObjectEventHandler(ceData, elementFlags, ptr, this);
@@ -1788,7 +1788,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
}
}
- if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
+ if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame"))
{
installObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(NoBackground); // We paint whole background.
@@ -1909,7 +1909,7 @@ void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
void QtCurveStyle::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(isFormWidget(widget))
@@ -1998,7 +1998,7 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
}
else if (::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQTextEdit*>(widget))
removeObjectEventHandler(ceData, elementFlags, ptr, this);
- else if (ceData.widgetObjectTypes.contains(TQSPLITTERHANDLE_OBJECT_NAME_STRING) || ceData.widgetObjectTypes.contains(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
+ else if (ceData.widgetObjectTypes.contains("TQSplitterHandle") || ceData.widgetObjectTypes.contains("TQDockWindowHandle") || ceData.widgetObjectTypes.contains("TQDockWindowResizeHandle"))
removeObjectEventHandler(ceData, elementFlags, ptr, this);
else if (::tqqt_cast<TQProgressBar*>(widget))
{
@@ -2012,7 +2012,7 @@ void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
removeObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(PaletteBackground);
}
- if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), TQFRAME_OBJECT_NAME_STRING))
+ if (widget->parentWidget() && ::tqqt_cast<TQMenuBar *>(widget->parentWidget()) && !qstrcmp(widget->className(), "TQFrame"))
{
removeObjectEventHandler(ceData, elementFlags, ptr, this);
widget->setBackgroundMode(PaletteBackground); // We paint whole background.
@@ -2065,7 +2065,7 @@ bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
bool QtCurveStyle::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(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget) && (TQEvent::Destroy==event->type() || TQEvent::Hide==event->type()))
@@ -5347,7 +5347,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQSty
drawMenuOrToolBarBackground(p, r, cg);
break;
case CE_DockWindowEmptyArea:
- if(widget && ceData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
+ if(widget && ceData.widgetObjectTypes.contains("TQToolBar"))
{
drawMenuOrToolBarBackground(p, r, cg, false, TQt::Horizontal==ceData.orientation);
}
@@ -5767,7 +5767,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
::tqqt_cast<TQToolBar *>(widget->parentWidget()->parentWidget())),
isDWClose(!tb && !onExtender &&
(elementFlags & CEF_HasParentWidget) &&
- ceData.parentWidgetData.widgetObjectTypes.contains( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING));
+ ceData.parentWidgetData.widgetObjectTypes.contains( "TQDockWindowHandle"));
if(isDWClose)
{
@@ -6146,7 +6146,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
flags-=Style_MouseOver;
if(opts.unifySpin)
- drawEntryField(p, all, cg, flags, ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) && flags&Style_Enabled
+ drawEntryField(p, all, cg, flags, ceData.widgetObjectTypes.contains("TQSpinWidget") && flags&Style_Enabled
? flags&Style_MouseOver || hw
? ENTRY_MOUSE_OVER
: flags&Style_HasFocus || (elementFlags & CEF_HasFocus)
@@ -6161,7 +6161,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
frame.setWidth(frame.width()+1);
drawEntryField(p, frame, cg, flags,
- ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) && flags&Style_Enabled
+ ceData.widgetObjectTypes.contains("TQSpinWidget") && flags&Style_Enabled
? flags&Style_MouseOver || hw
? ENTRY_MOUSE_OVER
: flags&Style_HasFocus || (elementFlags & CEF_HasFocus)
@@ -6208,7 +6208,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
pe=PE_SpinWidgetPlus;
if(!ceData.spinWidgetData.upEnabled)
upflags&=~Style_Enabled;
- drawPrimitive(pe, p, ceData, elementFlags, up, !(upflags&Style_Enabled) && ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) ? ceData.palette.disabled() : cg,
+ drawPrimitive(pe, p, ceData, elementFlags, up, !(upflags&Style_Enabled) && ceData.widgetObjectTypes.contains("TQSpinWidget") ? ceData.palette.disabled() : cg,
upflags |((active==SC_SpinWidgetUp)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -6224,7 +6224,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
pe=PE_SpinWidgetMinus;
if(!ceData.spinWidgetData.downEnabled)
downflags&=~Style_Enabled;
- drawPrimitive(pe, p, ceData, elementFlags, down, !(downflags&Style_Enabled) && ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) ? ceData.palette.disabled() : cg,
+ drawPrimitive(pe, p, ceData, elementFlags, down, !(downflags&Style_Enabled) && ceData.widgetObjectTypes.contains("TQSpinWidget") ? ceData.palette.disabled() : cg,
downflags |((active==SC_SpinWidgetDown)
? Style_On | Style_Sunken : Style_Raised));
}
@@ -6235,7 +6235,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
{
frame.setWidth(frame.width()+1);
drawEntryField(p, frame, cg, flags,
- ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) && flags&Style_Enabled
+ ceData.widgetObjectTypes.contains("TQSpinWidget") && flags&Style_Enabled
? flags&Style_MouseOver || hw
? ENTRY_MOUSE_OVER
: flags&Style_HasFocus || (elementFlags & CEF_HasFocus)
@@ -6246,7 +6246,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, cons
}
if(doEtch)
- drawEtch(p, ceData.widgetObjectTypes.contains(TQSPINWIDGET_OBJECT_NAME_STRING) ? TQT_TQRECT_OBJECT(ceData.rect) : r, cg, false, (opts.square&SQUARE_ENTRY));
+ drawEtch(p, ceData.widgetObjectTypes.contains("TQSpinWidget") ? TQT_TQRECT_OBJECT(ceData.rect) : r, cg, false, (opts.square&SQUARE_ENTRY));
}
itsFormMode=false;
break;
@@ -6943,7 +6943,7 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementDat
return 3;
case PM_TabBarTabShiftVertical:
{
- return (ceData.widgetObjectTypes.contains(TQTABBAR_OBJECT_NAME_STRING))
+ return (ceData.widgetObjectTypes.contains("TQTabBar"))
? TQTabBar::RoundedAbove==ceData.tabBarData.shape || TQTabBar::TriangularAbove==ceData.tabBarData.shape
? 1
: -1
@@ -7134,7 +7134,7 @@ TQSize QtCurveStyle::sizeFromContents(ContentsType contents, const TQStyleContro
return size;
}
case CT_ToolButton:
- if(ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
+ if(ceData.parentWidgetData.widgetObjectTypes.contains("TQToolBar"))
return TQSize(contentsSize.width()+8, contentsSize.height()+8);
default:
break; // Remove compiler warnings...
@@ -8892,7 +8892,7 @@ bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
(//qobject_cast<TQDialog*>(o) ||
(::tqqt_cast<TQMenuBar*>(o) && (pos.isNull() || !((TQtcMenuBar *)o)->itemUnderPos(pos)))
//|| qobject_cast<TQGroupBox*>(o)
- //|| (o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !TQT_TQWIDGET(o)->isEnabled())
+ //|| (o->inherits("TQToolButton") && !TQT_TQWIDGET(o)->isEnabled())
// || qobject_cast<TQToolBar*>(o)
//|| qobject_cast<TQDockWidget*>(o)
@@ -8900,7 +8900,7 @@ bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
// || ((*appType == Hacks::Dragon) && o->inherits(DragonVideoWidget))
// || o->inherits("TQStatusBar")
-// || (o->inherits(TQLABEL_OBJECT_NAME_STRING) && o->parent() && o->parent()->inherits("TQStatusBar"))
+// || (o->inherits("TQLabel") && o->parent() && o->parent()->inherits("TQStatusBar"))
);
}