Change most kdelibs inherits() functions to use the new object name define system

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1226839 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 1c4e273a42
commit b5fb39eb73

@ -69,29 +69,29 @@ void KConfigDialogManager::init(bool trackChanges)
if(trackChanges) if(trackChanges)
{ {
// QT // QT
changedMap.insert("QButton", TQT_SIGNAL(stateChanged(int))); changedMap.insert(TQBUTTON_OBJECT_NAME_STRING, TQT_SIGNAL(stateChanged(int)));
changedMap.insert("QCheckBox", TQT_SIGNAL(stateChanged(int))); changedMap.insert(TQCHECKBOX_OBJECT_NAME_STRING, TQT_SIGNAL(stateChanged(int)));
changedMap.insert("QPushButton", TQT_SIGNAL(stateChanged(int))); changedMap.insert(TQPUSHBUTTON_OBJECT_NAME_STRING, TQT_SIGNAL(stateChanged(int)));
changedMap.insert("QRadioButton", TQT_SIGNAL(stateChanged(int))); changedMap.insert(TQRADIOBUTTON_OBJECT_NAME_STRING, TQT_SIGNAL(stateChanged(int)));
// We can only store one thing, so you can't have // We can only store one thing, so you can't have
// a ButtonGroup that is checkable. // a ButtonGroup that is checkable.
changedMap.insert("QButtonGroup", TQT_SIGNAL(clicked(int))); changedMap.insert(TQBUTTONGROUP_OBJECT_NAME_STRING, TQT_SIGNAL(clicked(int)));
changedMap.insert("QGroupBox", TQT_SIGNAL(toggled(bool))); changedMap.insert(TQGROUPBOX_OBJECT_NAME_STRING, TQT_SIGNAL(toggled(bool)));
changedMap.insert("QComboBox", TQT_SIGNAL(activated (int))); changedMap.insert(TQCOMBOBOX_OBJECT_NAME_STRING, TQT_SIGNAL(activated (int)));
//qsqlproperty map doesn't store the text, but the value! //qsqlproperty map doesn't store the text, but the value!
//changedMap.insert("QComboBox", TQT_SIGNAL(textChanged(const TQString &))); //changedMap.insert("QComboBox", TQT_SIGNAL(textChanged(const TQString &)));
changedMap.insert("QDateEdit", TQT_SIGNAL(valueChanged(const TQDate &))); changedMap.insert(TQDATEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(const TQDate &)));
changedMap.insert("QDateTimeEdit", TQT_SIGNAL(valueChanged(const TQDateTime &))); changedMap.insert(TQDATETIMEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(const TQDateTime &)));
changedMap.insert("QDial", TQT_SIGNAL(valueChanged (int))); changedMap.insert(TQDIAL_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged (int)));
changedMap.insert("QLineEdit", TQT_SIGNAL(textChanged(const TQString &))); changedMap.insert(TQLINEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(textChanged(const TQString &)));
changedMap.insert("QSlider", TQT_SIGNAL(valueChanged(int))); changedMap.insert(TQSLIDER_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(int)));
changedMap.insert("QSpinBox", TQT_SIGNAL(valueChanged(int))); changedMap.insert(TQSPINBOX_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(int)));
changedMap.insert("QTimeEdit", TQT_SIGNAL(valueChanged(const TQTime &))); changedMap.insert(TQTIMEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(valueChanged(const TQTime &)));
changedMap.insert("QTextEdit", TQT_SIGNAL(textChanged())); changedMap.insert(TQTEXTEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(textChanged()));
changedMap.insert("QTextBrowser", TQT_SIGNAL(sourceChanged(const TQString &))); changedMap.insert(TQTEXTBROWSER_OBJECT_NAME_STRING, TQT_SIGNAL(sourceChanged(const TQString &)));
changedMap.insert("QMultiLineEdit", TQT_SIGNAL(textChanged())); changedMap.insert(TQMULTILINEEDIT_OBJECT_NAME_STRING, TQT_SIGNAL(textChanged()));
changedMap.insert("QListBox", TQT_SIGNAL(selectionChanged())); changedMap.insert(TQLISTBOX_OBJECT_NAME_STRING, TQT_SIGNAL(selectionChanged()));
changedMap.insert("QTabWidget", TQT_SIGNAL(currentChanged(TQWidget *))); changedMap.insert(TQTABWIDGET_OBJECT_NAME_STRING, TQT_SIGNAL(currentChanged(TQWidget *)));
// KDE // KDE
changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int))); changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int)));
@ -218,7 +218,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
kdWarning(178) << "A widget named '" << widgetName << "' was found but there is no setting named '" << configId << "'" << endl; kdWarning(178) << "A widget named '" << widgetName << "' was found but there is no setting named '" << configId << "'" << endl;
} }
} }
else if (childWidget->inherits("QLabel")) else if (childWidget->inherits(TQLABEL_OBJECT_NAME_STRING))
{ {
TQLabel *label = static_cast<TQLabel *>(childWidget); TQLabel *label = static_cast<TQLabel *>(childWidget);
TQWidget *buddy = label->buddy(); TQWidget *buddy = label->buddy();
@ -238,8 +238,8 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className()); TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className());
if (changedIt != changedMap.end()) if (changedIt != changedMap.end())
{ {
if ((!d->insideGroupBox || !childWidget->inherits("QRadioButton")) && if ((!d->insideGroupBox || !childWidget->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) &&
!childWidget->inherits("QGroupBox")) !childWidget->inherits(TQGROUPBOX_OBJECT_NAME_STRING))
kdDebug(178) << "Widget '" << widgetName << "' (" << childWidget->className() << ") remains unmanaged." << endl; kdDebug(178) << "Widget '" << widgetName << "' (" << childWidget->className() << ") remains unmanaged." << endl;
} }
} }

@ -392,7 +392,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
} }
return true; return true;
} }
else if ( o->inherits( "QListBox" ) ) else if ( o->inherits( TQLISTBOX_OBJECT_NAME_STRING ) )
{ {
switch ( ((TQKeyEvent*)e)->key() ) switch ( ((TQKeyEvent*)e)->key() )
{ {

@ -343,7 +343,7 @@ TQRect KCompletionBox::calculateGeometry() const
// to adjust it. Do that here as well, for consistency // to adjust it. Do that here as well, for consistency
const TQObject* combo; const TQObject* combo;
if ( d->m_parent && (combo = d->m_parent->tqparent() ) && if ( d->m_parent && (combo = d->m_parent->tqparent() ) &&
combo->inherits("QComboBox") ) combo->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) )
{ {
const TQComboBox* cb = static_cast<const TQComboBox*>(TQT_TQWIDGET_CONST(combo)); const TQComboBox* cb = static_cast<const TQComboBox*>(TQT_TQWIDGET_CONST(combo));

@ -1699,7 +1699,7 @@ void KDockManager::activate()
obj->show(); obj->show();
} }
} }
if ( !main->inherits("QDialog") ) main->show(); if ( !main->inherits(TQDIALOG_OBJECT_NAME_STRING) ) main->show();
} }
bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
@ -3105,7 +3105,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize)
#ifndef NO_KDE2 #ifndef NO_KDE2
// kdDebug(282)<<"KDockArea::resize"<<endl; // kdDebug(282)<<"KDockArea::resize"<<endl;
#endif #endif
TQObjectList *list=queryList("QWidget",0,false); TQObjectList *list=queryList(TQWIDGET_OBJECT_NAME_STRING,0,false);
TQObjectListIt it( *list ); // iterate over the buttons TQObjectListIt it( *list ); // iterate over the buttons
TQObject *obj; TQObject *obj;

@ -2236,7 +2236,7 @@ void KToolBar::slotContextAboutToHide()
TQPtrListIterator<TQWidget> it( widgets ); TQPtrListIterator<TQWidget> it( widgets );
TQWidget *wdg; TQWidget *wdg;
while ( ( wdg = it.current() ) != 0 ) { while ( ( wdg = it.current() ) != 0 ) {
if ( wdg->inherits( "QToolButton" ) ) if ( wdg->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
static_cast<TQToolButton*>( wdg )->setDown( false ); static_cast<TQToolButton*>( wdg )->setDown( false );
++it; ++it;
} }

@ -298,7 +298,7 @@ void KToolBarButton::setIconSet( const TQIconSet &iconset )
// remove? // remove?
void KToolBarButton::setPixmap( const TQPixmap &pixmap ) void KToolBarButton::setPixmap( const TQPixmap &pixmap )
{ {
if( pixmap.isNull()) // called by QToolButton if( pixmap.isNull()) // called by TQToolButton
{ {
TQToolButton::setPixmap( pixmap ); TQToolButton::setPixmap( pixmap );
return; return;

@ -964,7 +964,7 @@ class FocusHandleWidget : public TQWidget
{ {
public: public:
void focusNextPrev(bool n) { void focusNextPrev(bool n) {
if (!focusNextPrevChild(n) && inherits("QTextEdit")) if (!focusNextPrevChild(n) && inherits(TQTEXTEDIT_OBJECT_NAME_STRING))
TQWidget::focusNextPrevChild(n); TQWidget::focusNextPrevChild(n);
} }
}; };

@ -115,7 +115,7 @@ void KHTMLPartBrowserExtension::editableWidgetFocused( TQWidget *widget )
connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ),
this, TQT_SLOT( updateEditActions() ) ); this, TQT_SLOT( updateEditActions() ) );
if ( m_editableFormWidget->inherits( "QLineEdit" ) || m_editableFormWidget->inherits( "QTextEdit" ) ) if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) || m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
connect( m_editableFormWidget, TQT_SIGNAL( selectionChanged() ), connect( m_editableFormWidget, TQT_SIGNAL( selectionChanged() ),
this, TQT_SLOT( updateEditActions() ) ); this, TQT_SLOT( updateEditActions() ) );
@ -140,7 +140,7 @@ void KHTMLPartBrowserExtension::editableWidgetBlurred( TQWidget * /*widget*/ )
if ( oldWidget ) if ( oldWidget )
{ {
if ( oldWidget->inherits( "QLineEdit" ) || oldWidget->inherits( "QTextEdit" ) ) if ( oldWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) || oldWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
disconnect( oldWidget, TQT_SIGNAL( selectionChanged() ), disconnect( oldWidget, TQT_SIGNAL( selectionChanged() ),
this, TQT_SLOT( updateEditActions() ) ); this, TQT_SLOT( updateEditActions() ) );
} }
@ -201,9 +201,9 @@ void KHTMLPartBrowserExtension::cut()
if ( !m_editableFormWidget ) if ( !m_editableFormWidget )
return; return;
if ( m_editableFormWidget->inherits( "QLineEdit" ) ) if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->cut(); static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->cut();
else if ( m_editableFormWidget->inherits( "QTextEdit" ) ) else if ( m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->cut(); static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->cut();
} }
@ -254,9 +254,9 @@ void KHTMLPartBrowserExtension::copy()
} }
else else
{ {
if ( m_editableFormWidget->inherits( "QLineEdit" ) ) if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->copy(); static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->copy();
else if ( m_editableFormWidget->inherits( "QTextEdit" ) ) else if ( m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->copy(); static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->copy();
} }
} }
@ -304,9 +304,9 @@ void KHTMLPartBrowserExtension::paste()
if ( !m_editableFormWidget ) if ( !m_editableFormWidget )
return; return;
if ( m_editableFormWidget->inherits( "QLineEdit" ) ) if ( m_editableFormWidget->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) )
static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->paste(); static_cast<TQLineEdit *>( &(*m_editableFormWidget) )->paste();
else if ( m_editableFormWidget->inherits( "QTextEdit" ) ) else if ( m_editableFormWidget->inherits( TQTEXTEDIT_OBJECT_NAME_STRING ) )
static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->paste(); static_cast<TQTextEdit *>( &(*m_editableFormWidget) )->paste();
} }

@ -6871,7 +6871,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
return; return;
} }
// kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl; // kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl;
if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "QFrame" ) ) if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( TQFRAME_OBJECT_NAME_STRING ) )
{ {
TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() ); TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
if (frame->frameStyle() != TQFrame::NoFrame) if (frame->frameStyle() != TQFrame::NoFrame)
@ -6899,7 +6899,7 @@ void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
d->m_activeFrame = part; d->m_activeFrame = part;
if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "QFrame" ) ) if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( TQFRAME_OBJECT_NAME_STRING ) )
{ {
TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() ); TQFrame *frame = static_cast<TQFrame *>( d->m_activeFrame->widget() );
if (frame->frameStyle() != TQFrame::NoFrame) if (frame->frameStyle() != TQFrame::NoFrame)

@ -674,7 +674,7 @@ RenderFrame::RenderFrame( DOM::HTMLFrameElementImpl *frame )
void RenderFrame::slotViewCleared() void RenderFrame::slotViewCleared()
{ {
if(m_widget->inherits("QScrollView")) { if(m_widget->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING)) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
kdDebug(6031) << "frame is a scrollview!" << endl; kdDebug(6031) << "frame is a scrollview!" << endl;
#endif #endif
@ -989,7 +989,7 @@ void RenderPartObject::layout( )
void RenderPartObject::slotViewCleared() void RenderPartObject::slotViewCleared()
{ {
if(m_widget->inherits("QScrollView") ) { if(m_widget->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING) ) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
kdDebug(6031) << "iframe is a scrollview!" << endl; kdDebug(6031) << "iframe is a scrollview!" << endl;
#endif #endif

@ -899,7 +899,7 @@ void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict )
if ( pFocPol != 0 ) if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol ); widg->setFocusPolicy( *pFocPol );
if ( !( widg->inherits( "QPopupMenu" ) ) ) if ( !( widg->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) )
widg->installEventFilter( this ); widg->installEventFilter( this );
} }
@ -1155,7 +1155,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
// if we lost a child we uninstall ourself as event filter for the lost // if we lost a child we uninstall ourself as event filter for the lost
// child and its children // child and its children
TQObject* pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e )->child()); TQObject* pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e )->child());
if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ ) if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits(TQWIDGET_OBJECT_NAME_STRING))*/ )
{ {
TQObjectList* list = pLostChild->queryList(); TQObjectList* list = pLostChild->queryList();
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code

@ -209,7 +209,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
if ( !d->m_managedTopLevelWidgets.tqcontainsRef( w->tqtopLevelWidget() ) ) if ( !d->m_managedTopLevelWidgets.tqcontainsRef( w->tqtopLevelWidget() ) )
return false; return false;
if ( d->m_bIgnoreScrollBars && w->inherits( "QScrollBar" ) ) if ( d->m_bIgnoreScrollBars && w->inherits( TQSCROLLBAR_OBJECT_NAME_STRING ) )
return false; return false;
if ( mev ) // mouse press or mouse double-click event if ( mev ) // mouse press or mouse double-click event

@ -192,16 +192,16 @@ HighColorStyle::~HighColorStyle()
void HighColorStyle::polish(TQWidget* widget) void HighColorStyle::polish(TQWidget* widget)
{ {
// Put in order of highest occurrence to maximise hit rate // Put in order of highest occurrence to maximise hit rate
if (widget->inherits("QPushButton")) { if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
widget->installEventFilter(this); widget->installEventFilter(this);
} else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) { } else if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING) || widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
widget->setBackgroundMode(TQWidget::NoBackground); widget->setBackgroundMode(TQWidget::NoBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) { } else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->installEventFilter(this); widget->installEventFilter(this);
} else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) { } else if ( !qstrcmp( widget->name(), kdeToolbarWidget) ) {
widget->setBackgroundMode( NoBackground ); // We paint the whole background. widget->setBackgroundMode( NoBackground ); // We paint the whole background.
widget->installEventFilter(this); widget->installEventFilter(this);
} else if (widget->inherits("QToolBoxButton")) { } else if (widget->inherits(TQTOOLBOXBUTTON_OBJECT_NAME_STRING)) {
TQFont font = widget->font(); TQFont font = widget->font();
font.setBold(true); font.setBold(true);
widget->setFont(font); widget->setFont(font);
@ -213,10 +213,10 @@ void HighColorStyle::polish(TQWidget* widget)
void HighColorStyle::unPolish(TQWidget* widget) void HighColorStyle::unPolish(TQWidget* widget)
{ {
if (widget->inherits("QPushButton")) { if (widget->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING)) {
widget->removeEventFilter(this); widget->removeEventFilter(this);
} }
else if (widget->inherits("QMenuBar") || widget->inherits("QPopupMenu")) { else if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING) || widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
widget->setBackgroundMode(TQWidget::PaletteBackground); widget->setBackgroundMode(TQWidget::PaletteBackground);
} else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) { } else if (type == HighColor && widget->inherits("QToolBarExtensionWidget")) {
widget->removeEventFilter(this); widget->removeEventFilter(this);
@ -1651,7 +1651,7 @@ void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control,
} }
else if (widget->parent()) else if (widget->parent())
{ {
if (widget->parent()->inherits("QToolBar")) if (widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
{ {
TQToolBar* parent = (TQToolBar*)widget->parent(); TQToolBar* parent = (TQToolBar*)widget->parent();
TQRect pr = parent->rect(); TQRect pr = parent->rect();

@ -155,11 +155,11 @@ void HighContrastStyle::polish( TQPalette& pal )
void HighContrastStyle::polish (TQWidget* widget) void HighContrastStyle::polish (TQWidget* widget)
{ {
if (widget->inherits ("QButton") if (widget->inherits (TQBUTTON_OBJECT_NAME_STRING)
|| widget->inherits ("QComboBox") || widget->inherits (TQCOMBOBOX_OBJECT_NAME_STRING)
|| widget->inherits ("QSpinWidget") || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING)
|| widget->inherits ("QLineEdit") || widget->inherits (TQLINEEDIT_OBJECT_NAME_STRING)
|| widget->inherits ("QTextEdit")) || widget->inherits (TQTEXTEDIT_OBJECT_NAME_STRING))
{ {
widget->installEventFilter (this); widget->installEventFilter (this);
@ -174,7 +174,7 @@ void HighContrastStyle::polish (TQWidget* widget)
void HighContrastStyle::unPolish (TQWidget* widget) void HighContrastStyle::unPolish (TQWidget* widget)
{ {
if (widget->inherits ("QWidget") || widget->inherits ("QComboBox") || widget->inherits ("QSpinWidget") || widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit")) 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))
widget->removeEventFilter (this); widget->removeEventFilter (this);
KStyle::unPolish (widget); KStyle::unPolish (widget);
} }
@ -1595,7 +1595,7 @@ int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) cons
} }
case PM_DefaultFrameWidth: { case PM_DefaultFrameWidth: {
if (widget && (widget->inherits ("QLineEdit") || widget->inherits ("QTextEdit"))) if (widget && (widget->inherits (TQLINEEDIT_OBJECT_NAME_STRING) || widget->inherits (TQTEXTEDIT_OBJECT_NAME_STRING)))
return 2*basicLineWidth; return 2*basicLineWidth;
else else
return basicLineWidth; return basicLineWidth;
@ -1805,17 +1805,17 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{ {
// Handle hover effects. // Handle hover effects.
if (event->type() == TQEvent::Enter if (event->type() == TQEvent::Enter
&& (widget->inherits ("QButton") && (widget->inherits (TQBUTTON_OBJECT_NAME_STRING)
|| widget->inherits ("QComboBox") || widget->inherits (TQCOMBOBOX_OBJECT_NAME_STRING)
|| widget->inherits ("QSpinWidget"))) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING)))
{ {
hoverWidget = widget; hoverWidget = widget;
widget->tqrepaint (false); widget->tqrepaint (false);
} }
else if (event->type() == TQEvent::Leave else if (event->type() == TQEvent::Leave
&& (widget->inherits ("QButton") && (widget->inherits (TQBUTTON_OBJECT_NAME_STRING)
|| widget->inherits ("QComboBox") || widget->inherits (TQCOMBOBOX_OBJECT_NAME_STRING)
|| widget->inherits ("QSpinWidget"))) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING)))
{ {
if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget))
hoverWidget = 0L; hoverWidget = 0L;
@ -1826,8 +1826,8 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{ {
TQWidget* widgetparent = dynamic_cast<TQWidget*>(widget->parent()); TQWidget* widgetparent = dynamic_cast<TQWidget*>(widget->parent());
while (widgetparent while (widgetparent
&& ! widgetparent->inherits ("QComboBox") && ! widgetparent->inherits (TQCOMBOBOX_OBJECT_NAME_STRING)
&& ! widgetparent->inherits ("QSpinWidget")) && ! widgetparent->inherits (TQSPINWIDGET_OBJECT_NAME_STRING))
{ {
widgetparent = dynamic_cast<TQWidget*>(widgetparent->parent()); widgetparent = dynamic_cast<TQWidget*>(widgetparent->parent());
} }

@ -338,17 +338,17 @@ void KeramikStyle::polish(TQApplication* app)
void KeramikStyle::polish(TQWidget* widget) void KeramikStyle::polish(TQWidget* widget)
{ {
// Put in order of highest occurrence to maximise hit rate // Put in order of highest occurrence to maximise hit rate
if ( widget->inherits( "QPushButton" ) || widget->inherits( "QComboBox" ) || widget->inherits("QToolButton") ) if ( widget->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) || widget->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) )
{ {
widget->installEventFilter(this); widget->installEventFilter(this);
if ( widget->inherits( "QComboBox" ) ) if ( widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) )
widget->setBackgroundMode( NoBackground ); widget->setBackgroundMode( NoBackground );
} }
else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) ) else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) || widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
widget->setBackgroundMode( NoBackground ); widget->setBackgroundMode( NoBackground );
else if ( widget->tqparentWidget() && else if ( widget->tqparentWidget() &&
( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) || ( ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) && widget->tqparentWidget()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) ||
widget->inherits( "KCompletionBox" ) ) ) { widget->inherits( "KCompletionBox" ) ) ) {
TQListBox* listbox = (TQListBox*) widget; TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 4 ); listbox->setLineWidth( 4 );
@ -379,17 +379,17 @@ void KeramikStyle::polish(TQWidget* widget)
void KeramikStyle::unPolish(TQWidget* widget) void KeramikStyle::unPolish(TQWidget* widget)
{ {
//### TODO: This needs major cleanup (and so does polish() ) //### TODO: This needs major cleanup (and so does polish() )
if ( widget->inherits( "QPushButton" ) || widget->inherits( "QComboBox" ) ) if ( widget->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) )
{ {
if ( widget->inherits( "QComboBox" ) ) if ( widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) )
widget->setBackgroundMode( PaletteButton ); widget->setBackgroundMode( PaletteButton );
widget->removeEventFilter(this); widget->removeEventFilter(this);
} }
else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) ) else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) || widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
widget->setBackgroundMode( PaletteBackground ); widget->setBackgroundMode( PaletteBackground );
else if ( widget->tqparentWidget() && else if ( widget->tqparentWidget() &&
( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) || ( ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) && widget->tqparentWidget()->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) ||
widget->inherits( "KCompletionBox" ) ) ) { widget->inherits( "KCompletionBox" ) ) ) {
TQListBox* listbox = (TQListBox*) widget; TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 ); listbox->setLineWidth( 1 );
@ -1231,7 +1231,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
TQToolBar* parent = 0; TQToolBar* parent = 0;
if (widget && widget->parent() && widget->parent()->inherits("QToolBar")) if (widget && widget->parent() && widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
parent = static_cast<TQToolBar*>(widget->parent()); parent = static_cast<TQToolBar*>(widget->parent());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal)); renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal));
@ -1359,7 +1359,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element,
} }
else else
{ {
if (widget->parent() && widget->parent()->inherits("QToolBar")) if (widget->parent() && widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
toolbarBlendWidget = widget; toolbarBlendWidget = widget;
tqdrawPrimitive( PE_ButtonCommand, p, r, cg, flags ); tqdrawPrimitive( PE_ButtonCommand, p, r, cg, flags );
@ -1466,7 +1466,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element,
case CE_ToolButtonLabel: case CE_ToolButtonLabel:
{ {
//const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget); //const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget);
bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING );
TQRect nr = r; TQRect nr = r;
if (!onToolbar) if (!onToolbar)
@ -1537,7 +1537,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element,
case CE_DockWindowEmptyArea: case CE_DockWindowEmptyArea:
{ {
TQRect pr = r; TQRect pr = r;
if (widget && widget->inherits("QToolBar")) if (widget && widget->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
{ {
const TQToolBar* tb = static_cast<const TQToolBar*>(widget); const TQToolBar* tb = static_cast<const TQToolBar*>(widget);
if (tb->place() == TQDockWindow::OutsideDock) if (tb->place() == TQDockWindow::OutsideDock)
@ -1976,7 +1976,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control,
{ {
//Double-buffer only when we are in the slower full-blend mode //Double-buffer only when we are in the slower full-blend mode
if (widget->parent() && if (widget->parent() &&
( widget->tqparent()->inherits("QToolBar")|| !qstrcmp(widget->tqparent()->name(), kdeToolbarWidget) ) ) ( widget->tqparent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING)|| !qstrcmp(widget->tqparent()->name(), kdeToolbarWidget) ) )
{ {
buf = new TQPixmap( r.width(), r.height() ); buf = new TQPixmap( r.width(), r.height() );
br.setX(0); br.setX(0);
@ -2209,10 +2209,10 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control,
// ------------------------------------------------------------------- // -------------------------------------------------------------------
case CC_ToolButton: { case CC_ToolButton: {
const TQToolButton *toolbutton = (const TQToolButton *) widget; const TQToolButton *toolbutton = (const TQToolButton *) widget;
bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING );
bool onExtender = !onToolbar && bool onExtender = !onToolbar &&
widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBarExtensionWidget") && widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBarExtensionWidget") &&
widget->tqparentWidget()->tqparentWidget()->inherits( "QToolBar" ); widget->tqparentWidget()->tqparentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING );
bool onControlButtons = false; bool onControlButtons = false;
if (!onToolbar && !onExtender && widget->tqparentWidget() && if (!onToolbar && !onExtender && widget->tqparentWidget() &&
@ -2441,7 +2441,7 @@ TQSize KeramikStyle::tqsizeFromContents( ContentsType contents,
case CT_ToolButton: case CT_ToolButton:
{ {
bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( TQTOOLBAR_OBJECT_NAME_STRING );
if (!onToolbar) //Behaves like a button, so scale appropriately to the border if (!onToolbar) //Behaves like a button, so scale appropriately to the border
{ {
int w = contentSize.width(); int w = contentSize.width();

@ -1898,23 +1898,23 @@ void KLegacyStyle::polish(TQWidget *widget) {
bool immediateRender = false; bool immediateRender = false;
bool bgPixmap = false; bool bgPixmap = false;
if (widget->inherits("QButton")) { if (widget->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
metaobject = TQButton::staticMetaObject(); metaobject = TQButton::staticMetaObject();
eventFilter = true; eventFilter = true;
} }
if (widget->inherits("QComboBox")) { if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) {
metaobject = TQComboBox::staticMetaObject(); metaobject = TQComboBox::staticMetaObject();
eventFilter = true; eventFilter = true;
} }
if (widget->inherits("QScrollBar")) { if (widget->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) {
metaobject = TQScrollBar::staticMetaObject(); metaobject = TQScrollBar::staticMetaObject();
eventFilter = true; eventFilter = true;
mouseTrack = true; mouseTrack = true;
} }
if (widget->inherits("QMenuBar")) { if (widget->inherits(TQMENUBAR_OBJECT_NAME_STRING)) {
eventFilter = true; eventFilter = true;
immediateRender = true; immediateRender = true;
@ -1930,7 +1930,7 @@ void KLegacyStyle::polish(TQWidget *widget) {
widget->setBackgroundMode(TQWidget::PaletteBackground); widget->setBackgroundMode(TQWidget::PaletteBackground);
} }
if (widget->inherits("QToolBar")) { if (widget->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
metaobject = TQToolBar::staticMetaObject(); metaobject = TQToolBar::staticMetaObject();
eventFilter = true; eventFilter = true;
@ -1944,7 +1944,7 @@ void KLegacyStyle::polish(TQWidget *widget) {
widget->setBackgroundMode(TQWidget::PaletteBackground); widget->setBackgroundMode(TQWidget::PaletteBackground);
} }
if (widget->inherits("QLineEdit")) { if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) {
metaobject = TQLineEdit::staticMetaObject(); metaobject = TQLineEdit::staticMetaObject();
eventFilter = true; eventFilter = true;
@ -1968,7 +1968,7 @@ void KLegacyStyle::polish(TQWidget *widget) {
detail = "base"; detail = "base";
} }
if (widget->inherits("QPopupMenu")) { if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
qDebug("polishing popup '%s'", widget->className()); qDebug("polishing popup '%s'", widget->className());
metaobject = TQPopupMenu::staticMetaObject(); metaobject = TQPopupMenu::staticMetaObject();
widget->setBackgroundMode(TQWidget::PaletteBackground); 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.state = KLegacy::Normal;
key.data.shadow = KLegacy::Out; key.data.shadow = KLegacy::Out;
if (priv->lastWidget && priv->lastWidget->inherits("QComboBox")) if (priv->lastWidget && priv->lastWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
key.data.state = KLegacy::Prelight; key.data.state = KLegacy::Prelight;
TQPixmap *pix = gobj->draw(key, w, h, "optionmenu"); TQPixmap *pix = gobj->draw(key, w, h, "optionmenu");
@ -3081,7 +3081,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
{ {
TQWidget *w = (TQWidget *) obj; TQWidget *w = (TQWidget *) obj;
if (w->inherits("QPopupMenu") && w->width() < 700) { if (w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) && w->width() < 700) {
GtkObject *gobj = priv->gtkDict.tqfind(TQPopupMenu::staticMetaObject()); GtkObject *gobj = priv->gtkDict.tqfind(TQPopupMenu::staticMetaObject());
if (gobj) { if (gobj) {
@ -3151,7 +3151,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (p && (! p->isNull())) if (p && (! p->isNull()))
w->setBackgroundPixmap(*p); w->setBackgroundPixmap(*p);
} }
} else if (w->inherits("QLineEdit")) { } else if (w->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) {
GtkObject *gobj = priv->gtkDict.tqfind(TQLineEdit::staticMetaObject()); GtkObject *gobj = priv->gtkDict.tqfind(TQLineEdit::staticMetaObject());
if (gobj) { if (gobj) {
@ -3191,8 +3191,8 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
w->setPalette(pal); w->setPalette(pal);
} }
} }
} else if (w->inherits("QMenuBar") || } else if (w->inherits(TQMENUBAR_OBJECT_NAME_STRING) ||
w->inherits("QToolBar")) { w->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
GtkObject *gobj = priv->gtkDict.tqfind(TQMenuBar::staticMetaObject()); GtkObject *gobj = priv->gtkDict.tqfind(TQMenuBar::staticMetaObject());
if (gobj) { if (gobj) {
@ -3256,13 +3256,13 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
case TQEvent::Enter: case TQEvent::Enter:
{ {
if (obj->inherits("QPushButton") || if (obj->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING) ||
obj->inherits("QComboBox") || obj->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ||
obj->inherits("QSlider") || obj->inherits(TQSLIDER_OBJECT_NAME_STRING) ||
obj->inherits("QScrollbar")) { obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) {
priv->lastWidget = (TQWidget *) obj; priv->lastWidget = (TQWidget *) obj;
priv->lastWidget->tqrepaint(false); priv->lastWidget->tqrepaint(false);
} else if (obj->inherits("QRadioButton")) { } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) {
TQWidget *w = (TQWidget *) obj; TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) { if (! w->isTopLevel() && w->isEnabled()) {
@ -3290,7 +3290,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
} }
} }
} }
} else if (obj->inherits("QCheckBox")) { } else if (obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) {
TQWidget *w = (TQWidget *) obj; TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) { if (! w->isTopLevel() && w->isEnabled()) {
@ -3328,8 +3328,8 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (obj == priv->lastWidget) { if (obj == priv->lastWidget) {
priv->lastWidget = 0; priv->lastWidget = 0;
((TQWidget *) obj)->tqrepaint(false); ((TQWidget *) obj)->tqrepaint(false);
} else if (obj->inherits("QRadioButton") || } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) ||
obj->inherits("QCheckBox")) { obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) {
TQWidget *w = (TQWidget *) obj; TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel()) { if (! w->isTopLevel()) {
@ -3346,7 +3346,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
{ {
TQMouseEvent *me = (TQMouseEvent *) e; TQMouseEvent *me = (TQMouseEvent *) e;
priv->mousePos = me->pos(); priv->mousePos = me->pos();
if (obj->inherits("QScrollBar") && if (obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING) &&
(! (me->state() & (LeftButton | MidButton | RightButton)))) { (! (me->state() & (LeftButton | MidButton | RightButton)))) {
priv->hovering = true; priv->hovering = true;
((TQWidget *) obj)->tqrepaint(false); ((TQWidget *) obj)->tqrepaint(false);

@ -295,7 +295,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) { if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device(); TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->tqparentWidget(); TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) { if (p->inherits(TQDOCKWINDOW_OBJECT_NAME_STRING) && ! p->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
drawTitle = true; drawTitle = true;
title = p->caption(); title = p->caption();
} }

@ -427,7 +427,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe,
if ( p && p->device()->devType() == TQInternal::Widget ) { if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device(); TQWidget *w = (TQWidget *) p->device();
TQWidget *p = w->tqparentWidget(); TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) { if (p->inherits(TQDOCKWINDOW_OBJECT_NAME_STRING) && ! p->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) {
drawTitle = true; drawTitle = true;
title = p->caption(); title = p->caption();
} }

@ -247,7 +247,7 @@ void PlastikStyle::polish(TQWidget* widget)
if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) || if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ||
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || widget->inherits("QSplitterHandle") ) ::tqqt_cast<TQToolButton*>(widget) || widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
{ {
// widget->setBackgroundMode(PaletteBackground); // widget->setBackgroundMode(PaletteBackground);
widget->installEventFilter(this); widget->installEventFilter(this);
@ -285,7 +285,7 @@ void PlastikStyle::unPolish(TQWidget* widget)
::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) || ::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) || ::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) || ::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) ||
widget->inherits("QSplitterHandle") ) widget->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
{ {
widget->removeEventFilter(this); widget->removeEventFilter(this);
} }
@ -3478,7 +3478,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
//Hover highlight... use tqqt_cast to check if the widget inheits one of the classes. //Hover highlight... use tqqt_cast to check if the widget inheits one of the classes.
if ( ::tqqt_cast<TQPushButton*>(obj) || ::tqqt_cast<TQComboBox*>(obj) || if ( ::tqqt_cast<TQPushButton*>(obj) || ::tqqt_cast<TQComboBox*>(obj) ||
::tqqt_cast<TQSpinWidget*>(obj) || ::tqqt_cast<TQCheckBox*>(obj) || ::tqqt_cast<TQSpinWidget*>(obj) || ::tqqt_cast<TQCheckBox*>(obj) ||
::tqqt_cast<TQRadioButton*>(obj) || ::tqqt_cast<TQToolButton*>(obj) || obj->inherits("QSplitterHandle") ) ::tqqt_cast<TQRadioButton*>(obj) || ::tqqt_cast<TQToolButton*>(obj) || obj->inherits(TQSPLITTERHANDLE_OBJECT_NAME_STRING) )
{ {
if ((ev->type() == TQEvent::Enter) && TQT_TQWIDGET(obj)->isEnabled()) if ((ev->type() == TQEvent::Enter) && TQT_TQWIDGET(obj)->isEnabled())
{ {

@ -250,10 +250,10 @@ WebStyle::unPolish(TQApplication *)
void void
WebStyle::polish(TQWidget * w) WebStyle::polish(TQWidget * w)
{ {
if (w->inherits("QPushButton")) if (w->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
w->installEventFilter(this); w->installEventFilter(this);
else if (w->inherits("QGroupBox") || w->inherits("QFrame")) else if (w->inherits(TQGROUPBOX_OBJECT_NAME_STRING) || w->inherits(TQFRAME_OBJECT_NAME_STRING))
{ {
TQFrame * f(static_cast<TQFrame *>(w)); TQFrame * f(static_cast<TQFrame *>(w));
@ -282,7 +282,7 @@ WebStyle::polish(TQWidget * w)
void void
WebStyle::unPolish(TQWidget * w) WebStyle::unPolish(TQWidget * w)
{ {
if (w->inherits("QPushButton")) if (w->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
w->removeEventFilter(this); w->removeEventFilter(this);
else if (w == _currentFrame) else if (w == _currentFrame)
@ -1046,7 +1046,7 @@ WebStyle::drawKToolBarButton
{ {
bool toggleAndOn = false; bool toggleAndOn = false;
if (button->inherits("QButton")) if (button->inherits(TQBUTTON_OBJECT_NAME_STRING))
{ {
TQButton * b = static_cast<TQButton *>(button); TQButton * b = static_cast<TQButton *>(button);
toggleAndOn = b->isToggleButton() && b->isOn(); toggleAndOn = b->isToggleButton() && b->isOn();

Loading…
Cancel
Save