summaryrefslogtreecommitdiffstats
path: root/tdestyles
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-26 02:32:50 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-26 02:32:50 +0900
commit138bb80efac020c7e78871d3f05127eb37f18274 (patch)
tree511cf17073aacacc4e752395839e84c6bbcab3bb /tdestyles
parent8d79c40791fa0bcac4d4ce1dc7385b19e523ba08 (diff)
downloadtdelibs-138bb80efac020c7e78871d3f05127eb37f18274.tar.gz
tdelibs-138bb80efac020c7e78871d3f05127eb37f18274.zip
Replaced various '#define' with actual strings - part 4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdestyles')
-rw-r--r--tdestyles/keramik/keramik.cpp16
-rw-r--r--tdestyles/kthemestyle/kthemestyle.cpp20
-rw-r--r--tdestyles/plastik/plastik.cpp42
3 files changed, 39 insertions, 39 deletions
diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp
index 918a96c14..d09fd6f58 100644
--- a/tdestyles/keramik/keramik.cpp
+++ b/tdestyles/keramik/keramik.cpp
@@ -369,7 +369,7 @@ void KeramikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
installObjectEventHandler(ceData, elementFlags, ptr, this);
}
- if (animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget))
+ if (animateProgressBar && ::tqt_cast<TQProgressBar*>(widget))
{
installObjectEventHandler(ceData, elementFlags, ptr, this);
progAnimWidgets[static_cast<TQProgressBar*>(widget)] = 0;
@@ -412,7 +412,7 @@ void KeramikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
widget->setBackgroundMode( PaletteBackground );
removeObjectEventHandler(ceData, elementFlags, ptr, this);
}
- else if ( ::tqqt_cast<TQProgressBar*>(widget) )
+ else if ( ::tqt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(static_cast<TQProgressBar*>(widget));
}
@@ -1107,7 +1107,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device());
TQToolBar* parent = 0;
if (paintWidget)
- parent = ::tqqt_cast<TQToolBar*>(paintWidget->parentWidget());
+ parent = ::tqt_cast<TQToolBar*>(paintWidget->parentWidget());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) );
if ( !(flags & Style_Horizontal) )
@@ -2801,7 +2801,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if ( !object->isWidgetType() ) return false;
//Combo line edits get special frames
- if ( event->type() == TQEvent::Paint && ::tqqt_cast<TQLineEdit*>(object) )
+ if ( event->type() == TQEvent::Paint && ::tqt_cast<TQLineEdit*>(object) )
{
static bool recursion = false;
if (recursion )
@@ -2817,7 +2817,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
recursion = false;
return true;
}
- else if ( ::tqqt_cast<TQListBox*>(object) )
+ else if ( ::tqt_cast<TQListBox*>(object) )
{
//Handle combobox drop downs
switch (event->type())
@@ -2926,8 +2926,8 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
#if 0 // FIXME
// This does not work on modern systems
// Rather than resorting to hacks like this, which can stop working at any time, the required functionality should simply be added to TQt3!
- else if (event->type() == TQEvent::Paint && object->parent() && ::tqqt_cast<TQToolBar*>(object->parent())
- && !::tqqt_cast<TQPopupMenu*>(object) )
+ else if (event->type() == TQEvent::Paint && object->parent() && ::tqt_cast<TQToolBar*>(object->parent())
+ && !::tqt_cast<TQPopupMenu*>(object) )
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
@@ -2961,7 +2961,7 @@ bool KeramikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
}
#endif
// Track show events for progress bars
- if ( animateProgressBar && ::tqqt_cast<TQProgressBar*>(object) )
+ if ( animateProgressBar && ::tqt_cast<TQProgressBar*>(object) )
{
if ((event->type() == TQEvent::Show) && !animationTimer->isActive())
{
diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp
index f9f2c81c4..a55a200de 100644
--- a/tdestyles/kthemestyle/kthemestyle.cpp
+++ b/tdestyles/kthemestyle/kthemestyle.cpp
@@ -523,10 +523,10 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget *w = reinterpret_cast<TQWidget*>(ptr);
- if (::tqqt_cast<TQStatusBar*>(w))
+ if (::tqt_cast<TQStatusBar*>(w))
w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Active, TQColorGroup::Background));
- if (::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
+ if (::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
installObjectEventHandler(ceData, elementFlags, ptr, this);
if (w->backgroundPixmap() && !w->isTopLevel() &&
@@ -565,7 +565,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
return ;
}
- if ( ::tqqt_cast<TQMenuBar*>(w) )
+ if ( ::tqt_cast<TQMenuBar*>(w) )
{
w->setBackgroundMode( TQWidget::NoBackground );
}
@@ -573,7 +573,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
{
w->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( ::tqqt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqt_cast<TQPopupMenu*>(w) )
{
popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
@@ -593,7 +593,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setBackgroundMode( TQWidget::NoBackground );
}
- else if ( ::tqqt_cast<TQCheckBox*>(w) )
+ else if ( ::tqt_cast<TQCheckBox*>(w) )
{
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{
@@ -608,7 +608,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setPalette( newPal );
}
}
- else if ( ::tqqt_cast<TQRadioButton*>(w) )
+ else if ( ::tqt_cast<TQRadioButton*>(w) )
{
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{
@@ -644,21 +644,21 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem
}
//Toolbar labels should nornally be PaletteButton
- if ( ::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
+ if ( ::tqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "tde toolbar widget"))
w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus
- else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQPopupMenu*>(w) )
w->setBackgroundMode( TQWidget::PaletteButton );
- //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class)
+ //For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class)
else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch
//Drop some custom palettes. ### this really should check the serial number to be 100% correct.
- if ( ::tqqt_cast<TQPopupMenu*>(w) || ::tqqt_cast<TQCheckBox*>(w) || ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQStatusBar*>(w) )
+ if ( ::tqt_cast<TQPopupMenu*>(w) || ::tqt_cast<TQCheckBox*>(w) || ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQStatusBar*>(w) )
w->unsetPalette();
}
diff --git a/tdestyles/plastik/plastik.cpp b/tdestyles/plastik/plastik.cpp
index 01026122f..d08b36deb 100644
--- a/tdestyles/plastik/plastik.cpp
+++ b/tdestyles/plastik/plastik.cpp
@@ -197,7 +197,7 @@ void PlastikStyle::updateProgressPos()
bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{
- if ( !::tqqt_cast<TQProgressBar*>(iter.key()) )
+ if ( !::tqt_cast<TQProgressBar*>(iter.key()) )
continue;
pb = dynamic_cast<TQProgressBar*>(iter.key());
@@ -245,27 +245,27 @@ void PlastikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(tdehtmlWidgetDestroyed(TQObject*)));
}
- // use tqqt_cast where possible to check if the widget inheits one of the classes. might improve
+ // use tqt_cast where possible to check if the widget inheits one of the classes. might improve
// performance compared to TQObject::inherits()
- 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") )
+ if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
+ ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
+ ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
+ ::tqt_cast<TQToolButton*>(widget) || widget->inherits("TQSplitterHandle") )
{
// widget->setBackgroundMode(PaletteBackground);
installObjectEventHandler(ceData, elementFlags, ptr, this);
- } else if (::tqqt_cast<TQLineEdit*>(widget)) {
+ } else if (::tqt_cast<TQLineEdit*>(widget)) {
installObjectEventHandler(ceData, elementFlags, ptr, this);
- } else if (::tqqt_cast<TQTabBar*>(widget)) {
+ } else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true);
installObjectEventHandler(ceData, elementFlags, ptr, this);
- } else if (::tqqt_cast<TQPopupMenu*>(widget)) {
+ } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
installObjectEventHandler(ceData, elementFlags, ptr, this);
}
- if( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget) )
+ if( _animateProgressBar && ::tqt_cast<TQProgressBar*>(widget) )
{
installObjectEventHandler(ceData, elementFlags, ptr, this);
progAnimWidgets[widget] = 0;
@@ -287,25 +287,25 @@ void PlastikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
tdehtmlWidgets.remove(widget);
}
- // use tqqt_cast to check if the widget inheits one of the classes.
- 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) || ::tqqt_cast<TQLineEdit*>(widget) ||
+ // use tqt_cast to check if the widget inheits one of the classes.
+ if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
+ ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
+ ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
+ ::tqt_cast<TQToolButton*>(widget) || ::tqt_cast<TQLineEdit*>(widget) ||
widget->inherits("TQSplitterHandle") )
{
removeObjectEventHandler(ceData, elementFlags, ptr, this);
}
- else if (::tqqt_cast<TQTabBar*>(widget)) {
+ else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this);
- } else if (::tqqt_cast<TQPopupMenu*>(widget)) {
+ } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
removeObjectEventHandler(ceData, elementFlags, ptr, this);
}
- if ( ::tqqt_cast<TQProgressBar*>(widget) )
+ if ( ::tqt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(widget);
}
@@ -3346,7 +3346,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce
return 1;
case PM_DefaultFrameWidth: {
- if(widget && ::tqqt_cast<TQPopupMenu*>(widget))
+ if(widget && ::tqt_cast<TQPopupMenu*>(widget))
return 1;
else
return 2;
@@ -3452,7 +3452,7 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
case CT_ToolButton:
{
- if(widget->parent() && ::tqqt_cast<TQToolBar*>(widget->parent()) )
+ if(widget->parent() && ::tqt_cast<TQToolBar*>(widget->parent()) )
return TQSize( s.width()+2*4, s.height()+2*4 );
else
return TDEStyle::sizeFromContents (t, ceData, elementFlags, s, opt, widget);
@@ -3503,7 +3503,7 @@ bool PlastikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if (!obj->isWidgetType() ) return false;
// Track show events for progress bars
- if ( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(obj) )
+ if ( _animateProgressBar && ::tqt_cast<TQProgressBar*>(obj) )
{
if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{