Replaced various '#define' with actual strings - part 4

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/10/head
Michele Calgaro 1 year ago
parent a0900be665
commit 8688de253f
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -247,7 +247,7 @@ void LipstikStyle::updateProgressPos()
bool visible = false; bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter) for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{ {
if ( !::tqqt_cast<TQProgressBar*>(iter.key()) ) if ( !::tqt_cast<TQProgressBar*>(iter.key()) )
continue; continue;
pb = dynamic_cast<TQProgressBar*>(iter.key()); pb = dynamic_cast<TQProgressBar*>(iter.key());
@ -298,30 +298,30 @@ void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
// use tqt_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() // performance compared to TQObject::inherits()
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) || if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) ::tqt_cast<TQToolButton*>(widget)
) )
{ {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQTabBar*>(widget)) { } else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true); widget->setMouseTracking(true);
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQPopupMenu*>(widget)) { } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground ); widget->setBackgroundMode( NoBackground );
} else if(::tqqt_cast<TQScrollBar*>(widget)) { } else if(::tqt_cast<TQScrollBar*>(widget)) {
widget->setMouseTracking(true); widget->setMouseTracking(true);
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (widget->inherits("TQSplitterHandle") || widget->inherits("TQDockWindowHandle") ) { } else if (widget->inherits("TQSplitterHandle") || widget->inherits("TQDockWindowHandle") ) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQLineEdit*>(widget)) { } else if (::tqt_cast<TQLineEdit*>(widget)) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
} }
if( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget) ) { if( _animateProgressBar && ::tqt_cast<TQProgressBar*>(widget) ) {
installObjectEventHandler(ceData, elementFlags, ptr, this); installObjectEventHandler(ceData, elementFlags, ptr, this);
progAnimWidgets[widget] = 0; progAnimWidgets[widget] = 0;
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(progressBarDestroyed(TQObject*))); connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(progressBarDestroyed(TQObject*)));
@ -353,27 +353,27 @@ void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
} }
// use tqt_cast to check if the widget inheits one of the classes. // use tqt_cast to check if the widget inheits one of the classes.
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) || if ( ::tqt_cast<TQPushButton*>(widget) || ::tqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqt_cast<TQSpinWidget*>(widget) || ::tqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqt_cast<TQCheckBox*>(widget) || ::tqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) || ::tqt_cast<TQToolButton*>(widget) || ::tqt_cast<TQLineEdit*>(widget) ||
widget->inherits("TQSplitterHandle") ) widget->inherits("TQSplitterHandle") )
{ {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
else if (::tqqt_cast<TQTabBar*>(widget)) { else if (::tqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQScrollBar*>(widget)) { } else if (::tqt_cast<TQScrollBar*>(widget)) {
widget->setMouseTracking(false); widget->setMouseTracking(false);
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} else if (::tqqt_cast<TQPopupMenu*>(widget)) { } else if (::tqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground ); widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
} }
if ( ::tqqt_cast<TQProgressBar*>(widget) ) { if ( ::tqt_cast<TQProgressBar*>(widget) ) {
progAnimWidgets.remove(widget); progAnimWidgets.remove(widget);
} else if( widget->inherits("KonqFrameStatusBar") ) { } else if( widget->inherits("KonqFrameStatusBar") ) {
removeObjectEventHandler(ceData, elementFlags, ptr, this); removeObjectEventHandler(ceData, elementFlags, ptr, this);
@ -3822,7 +3822,7 @@ int LipstikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce
return 1; return 1;
case PM_DefaultFrameWidth: { case PM_DefaultFrameWidth: {
if(widget && ::tqqt_cast<TQPopupMenu*>(widget)) if(widget && ::tqt_cast<TQPopupMenu*>(widget))
return 1; return 1;
else else
return 2; return 2;
@ -3976,10 +3976,10 @@ bool LipstikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
if (!obj->isWidgetType() ) return false; if (!obj->isWidgetType() ) return false;
// focus highlight // focus highlight
if ( ::tqqt_cast<TQLineEdit*>(obj) ) { if ( ::tqt_cast<TQLineEdit*>(obj) ) {
TQWidget* widget = TQT_TQWIDGET(obj); TQWidget* widget = TQT_TQWIDGET(obj);
if ( ::tqqt_cast<TQSpinWidget*>(widget->parentWidget()) ) if ( ::tqt_cast<TQSpinWidget*>(widget->parentWidget()) )
{ {
TQWidget* spinbox = widget->parentWidget(); TQWidget* spinbox = widget->parentWidget();
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
@ -3997,7 +3997,7 @@ bool LipstikStyle::objectEventHandler( const TQStyleControlElementData &ceData,
} }
// Track show events for progress bars // 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()) if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{ {

Loading…
Cancel
Save