summaryrefslogtreecommitdiffstats
path: root/tdeparts/partmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeparts/partmanager.cpp')
-rw-r--r--tdeparts/partmanager.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/tdeparts/partmanager.cpp b/tdeparts/partmanager.cpp
index 0f6f59561..1ca3f9dab 100644
--- a/tdeparts/partmanager.cpp
+++ b/tdeparts/partmanager.cpp
@@ -1,4 +1,3 @@
-// -*- mode: c++; c-basic-offset: 2 -*-
/* This file is part of the KDE project
Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
(C) 1999 David Faure <faure@kde.org>
@@ -46,7 +45,7 @@ public:
m_selectedWidget = 0;
m_bAllowNestedParts = false;
m_bIgnoreScrollBars = false;
- m_activationButtonMask = Qt::LeftButton | Qt::MidButton | Qt::RightButton;
+ m_activationButtonMask = TQt::LeftButton | TQt::MidButton | TQt::RightButton;
m_reason = PartManager::NoReason;
}
~PartManagerPrivate()
@@ -56,16 +55,16 @@ public:
switch( ev->type() ) {
case TQEvent::MouseButtonPress:
case TQEvent::MouseButtonDblClick: {
- TQMouseEvent* mev = TQT_TQMOUSEEVENT( ev );
- m_reason = mev->button() == Qt::LeftButton
+ TQMouseEvent* mev = static_cast<TQMouseEvent*>( ev );
+ m_reason = mev->button() == TQt::LeftButton
? PartManager::ReasonLeftClick
- : ( mev->button() == Qt::MidButton
+ : ( mev->button() == TQt::MidButton
? PartManager::ReasonMidClick
: PartManager::ReasonRightClick );
break;
}
case TQEvent::FocusIn:
- m_reason = TQT_TQFOCUSEVENT( ev )->reason();
+ m_reason = static_cast<TQFocusEvent*>( ev )->reason();
break;
default:
kdWarning(1000) << "PartManagerPrivate::setReason got unexpected ev type " << ev->type() << endl;
@@ -120,8 +119,8 @@ PartManager::~PartManager()
{
for ( TQPtrListIterator<TQWidget> it( d->m_managedTopLevelWidgets );
it.current(); ++it )
- disconnect( it.current(), TQT_SIGNAL( destroyed() ),
- this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ disconnect( it.current(), TQ_SIGNAL( destroyed() ),
+ this, TQ_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
for ( TQPtrListIterator<Part> it( d->m_parts ); it.current(); ++it )
{
@@ -184,7 +183,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
if ( !obj->isWidgetType() )
return false;
- TQWidget *w = TQT_TQWIDGET( obj );
+ TQWidget *w = static_cast<TQWidget*>( obj );
if ( ( w->testWFlags( WType_Dialog ) && w->isModal() ) ||
w->testWFlags( WType_Popup ) || w->testWFlags( WStyle_Tool ) )
@@ -193,7 +192,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
TQMouseEvent* mev = 0L;
if ( ev->type() == TQEvent::MouseButtonPress || ev->type() == TQEvent::MouseButtonDblClick )
{
- mev = TQT_TQMOUSEEVENT( ev );
+ mev = static_cast<TQMouseEvent*>( ev );
#ifdef DEBUG_PARTMANAGER
kdDebug(1000) << "PartManager::eventFilter button: " << mev->button() << " " << "d->m_activationButtonMask=" << d->m_activationButtonMask << endl;
#endif
@@ -209,7 +208,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev )
if ( !d->m_managedTopLevelWidgets.containsRef( w->topLevelWidget() ) )
return false;
- if ( d->m_bIgnoreScrollBars && w->inherits( TQSCROLLBAR_OBJECT_NAME_STRING ) )
+ if ( d->m_bIgnoreScrollBars && w->inherits( "TQScrollBar" ) )
return false;
if ( mev ) // mouse press or mouse double-click event
@@ -352,11 +351,11 @@ void PartManager::addPart( Part *part, bool setActive )
}
// Prevent focus problems
- if ( part->widget() && part->widget()->focusPolicy() == TQ_NoFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::NoFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
- if ( part->widget() && part->widget()->focusPolicy() == TQ_TabFocus )
+ if ( part->widget() && part->widget()->focusPolicy() == TQWidget::TabFocus )
{
kdWarning(1000) << "Part '" << part->name() << "' has a widget " << part->widget()->name() << " with a focus policy of TabFocus. It should have at least a ClickFocus policy, for part activation to work well." << endl;
}
@@ -420,7 +419,7 @@ void PartManager::setActivePart( Part *part, TQWidget *widget )
//tree recursively (Simon)
if ( part && !d->m_bAllowNestedParts )
{
- TQObject *parentPart = TQT_TQOBJECT(part->parent()); // ### this relies on people using KParts::Factory!
+ TQObject *parentPart = part->parent(); // ### this relies on people using KParts::Factory!
if ( parentPart && parentPart->inherits( "KParts::Part" ) )
{
KParts::Part *parPart = static_cast<KParts::Part *>( parentPart );
@@ -456,8 +455,8 @@ void PartManager::setActivePart( Part *part, TQWidget *widget )
TQApplication::sendEvent( oldActivePart, &ev );
if ( oldActiveWidget )
{
- disconnect( oldActiveWidget, TQT_SIGNAL( destroyed() ),
- this, TQT_SLOT( slotWidgetDestroyed() ) );
+ disconnect( oldActiveWidget, TQ_SIGNAL( destroyed() ),
+ this, TQ_SLOT( slotWidgetDestroyed() ) );
TQApplication::sendEvent( oldActiveWidget, &ev );
}
@@ -474,8 +473,8 @@ void PartManager::setActivePart( Part *part, TQWidget *widget )
TQApplication::sendEvent( d->m_activePart, &ev );
if ( d->m_activeWidget )
{
- connect( d->m_activeWidget, TQT_SIGNAL( destroyed() ),
- this, TQT_SLOT( slotWidgetDestroyed() ) );
+ connect( d->m_activeWidget, TQ_SIGNAL( destroyed() ),
+ this, TQ_SLOT( slotWidgetDestroyed() ) );
TQApplication::sendEvent( d->m_activeWidget, &ev );
}
}
@@ -569,8 +568,8 @@ void PartManager::addManagedTopLevelWidget( const TQWidget *topLevel )
return;
d->m_managedTopLevelWidgets.append( topLevel );
- connect( topLevel, TQT_SIGNAL( destroyed() ),
- this, TQT_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
+ connect( topLevel, TQ_SIGNAL( destroyed() ),
+ this, TQ_SLOT( slotManagedTopLevelWidgetDestroyed() ) );
}
void PartManager::removeManagedTopLevelWidget( const TQWidget *topLevel )