summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kmdichildview.cpp')
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
index 57c0bea4..ba80552a 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
@@ -6,8 +6,8 @@
// begin : 07/1999 by Szymon Stefanek as part of kvirc
// (an IRC application)
// changes : 09/1999 by Falk Brettschneider to create a
-// -06/2000 stand-alone Qt extension set of
-// classes and a Qt-based library
+// -06/2000 stand-alone TQt extension set of
+// classes and a TQt-based library
// 2000-2003 maintained by the KDevelop project
// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
@@ -44,8 +44,8 @@
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, const char* name, WFlags f )
- : TQWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* tqparentWidget, const char* name, WFlags f )
+ : TQWidget( tqparentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -63,7 +63,7 @@ KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, c
m_szCaption = i18n( "Unnamed" );
m_sTabCaption = m_szCaption;
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
installEventFilter( this );
// store the current time
@@ -73,8 +73,8 @@ KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, c
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f )
- : TQWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( TQWidget* tqparentWidget, const char* name, WFlags f )
+ : TQWidget( tqparentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -87,7 +87,7 @@ KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f
setGeometry( 0, 0, 0, 0 ); // reset
m_szCaption = i18n( "Unnamed" );
m_sTabCaption = m_szCaption;
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
installEventFilter( this );
// store the current time
@@ -107,15 +107,15 @@ void KMdiChildView::trackIconAndCaptionChanges( TQWidget *view )
}
-//============== internal geometry ==============//
+//============== internal tqgeometry ==============//
TQRect KMdiChildView::internalGeometry() const
{
if ( mdiParent() )
{ // is attached
// get the client area coordinates inside the MDI child frame
- TQRect posInFrame = geometry();
- // map these values to the parent of the MDI child frame
+ TQRect posInFrame = tqgeometry();
+ // map these values to the tqparent of the MDI child frame
// (this usually is the MDI child area) and return
TQPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
TQSize sz = size();
@@ -123,14 +123,14 @@ TQRect KMdiChildView::internalGeometry() const
}
else
{
- TQRect geo = geometry();
+ TQRect geo = tqgeometry();
TQRect frameGeo = externalGeometry();
return TQRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
- // return geometry();
+ // return tqgeometry();
}
}
-//============== set internal geometry ==============//
+//============== set internal tqgeometry ==============//
void KMdiChildView::setInternalGeometry( const TQRect& newGeometry )
{
@@ -142,18 +142,18 @@ void KMdiChildView::setInternalGeometry( const TQRect& newGeometry )
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the TQWidget::setGeometry() method
- TQRect newGeoQt;
- newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
- newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
+ // create the new tqgeometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoTQt;
+ newGeoTQt.setX( newGeometry.x() - nFrameSizeLeft );
+ newGeoTQt.setY( newGeometry.y() - nFrameSizeTop );
- newGeoQt.setWidth( newGeometry.width() + nFrameSizeLeft + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
- newGeoQt.setHeight( newGeometry.height() + nFrameSizeTop + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
- // newGeoQt.setWidth(newGeometry.width()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
- // newGeoQt.setHeight(newGeometry.height()+mdiParent()->captionHeight()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
+ newGeoTQt.setWidth( newGeometry.width() + nFrameSizeLeft + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
+ newGeoTQt.setHeight( newGeometry.height() + nFrameSizeTop + KMDI_CHILDFRM_DOUBLE_BORDER / 2 );
+ // newGeoTQt.setWidth(newGeometry.width()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
+ // newGeoTQt.setHeight(newGeometry.height()+mdiParent()->captionHeight()+KMDI_MDI_CHILDFRM_DOUBLE_BORDER);
- // set the geometry
- mdiParent()->setGeometry( newGeoQt );
+ // set the tqgeometry
+ mdiParent()->setGeometry( newGeoTQt );
}
else
{
@@ -163,28 +163,28 @@ void KMdiChildView::setInternalGeometry( const TQRect& newGeometry )
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the TQWidget::setGeometry() method
- TQRect newGeoQt;
+ // create the new tqgeometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoTQt;
- newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
- newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
+ newGeoTQt.setX( newGeometry.x() - nFrameSizeLeft );
+ newGeoTQt.setY( newGeometry.y() - nFrameSizeTop );
- newGeoQt.setWidth( newGeometry.width() );
- newGeoQt.setHeight( newGeometry.height() );
+ newGeoTQt.setWidth( newGeometry.width() );
+ newGeoTQt.setHeight( newGeometry.height() );
- // set the geometry
- setGeometry( newGeoQt );
+ // set the tqgeometry
+ setGeometry( newGeoTQt );
}
}
-//============== external geometry ==============//
+//============== external tqgeometry ==============//
TQRect KMdiChildView::externalGeometry() const
{
return mdiParent() ? mdiParent()->frameGeometry() : frameGeometry();
}
-//============== set external geometry ==============//
+//============== set external tqgeometry ==============//
void KMdiChildView::setExternalGeometry( const TQRect& newGeometry )
{
@@ -202,16 +202,16 @@ void KMdiChildView::setExternalGeometry( const TQRect& newGeometry )
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the TQWidget::setGeometry() method
+ // create the new tqgeometry that is accepted by the TQWidget::setGeometry() method
// not attached => the window system makes the frame
- TQRect newGeoQt;
- newGeoQt.setX( newGeometry.x() + nFrameSizeLeft );
- newGeoQt.setY( newGeometry.y() + nFrameSizeTop );
- newGeoQt.setWidth( newGeometry.width() - nTotalFrameWidth );
- newGeoQt.setHeight( newGeometry.height() - nTotalFrameHeight );
-
- // set the geometry
- setGeometry( newGeoQt );
+ TQRect newGeoTQt;
+ newGeoTQt.setX( newGeometry.x() + nFrameSizeLeft );
+ newGeoTQt.setY( newGeometry.y() + nFrameSizeTop );
+ newGeoTQt.setWidth( newGeometry.width() - nTotalFrameWidth );
+ newGeoTQt.setHeight( newGeometry.height() - nTotalFrameHeight );
+
+ // set the tqgeometry
+ setGeometry( newGeoTQt );
}
}
@@ -277,7 +277,7 @@ TQRect KMdiChildView::restoreGeometry()
if ( mdiParent() )
return mdiParent() ->restoreGeometry();
else //FIXME not really supported, may be we must use Windows or X11 funtions
- return geometry();
+ return tqgeometry();
}
//============== setRestoreGeometry ================//
@@ -362,7 +362,7 @@ void KMdiChildView::youAreDetached()
if ( myIconPtr() )
setIcon( *( myIconPtr() ) );
- setFocusPolicy( TQWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
emit isDetachedNow();
}
@@ -375,7 +375,7 @@ void KMdiChildView::setCaption( const TQString& szCaption )
m_szCaption = szCaption;
if ( mdiParent() )
mdiParent() ->setCaption( m_szCaption );
- else //have to call the parent one
+ else //have to call the tqparent one
TQWidget::setCaption( m_szCaption );
emit windowCaptionChanged( m_szCaption );
@@ -491,8 +491,8 @@ void KMdiChildView::slot_childDestroyed()
// do what we do if a child is removed
// if we lost a child we uninstall ourself as event filter for the lost
- // child and its children
- const TQObject * pLostChild = TQObject::sender();
+ // child and its tqchildren
+ const TQObject * pLostChild = TQT_TQOBJECT(TQT_BASE_OBJECT_NAME::sender());
if ( pLostChild && ( pLostChild->isWidgetType() ) )
{
TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( TQWIDGET_OBJECT_NAME_STRING );
@@ -523,11 +523,11 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( e->type() == TQEvent::KeyPress && isAttached() )
{
TQKeyEvent* ke = ( TQKeyEvent* ) e;
- if ( ke->key() == Qt::Key_Tab )
+ if ( ke->key() == TQt::Key_Tab )
{
TQWidget* w = ( TQWidget* ) obj;
- FocusPolicy wfp = w->focusPolicy();
- if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus )
+ TQ_FocusPolicy wfp = w->focusPolicy();
+ if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || w->focusPolicy() == TQ_WheelFocus )
{
if ( m_lastFocusableChildWidget != 0 )
{
@@ -545,7 +545,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( obj->isWidgetType() )
{
TQObjectList * list = queryList( TQWIDGET_OBJECT_NAME_STRING );
- if ( list->find( obj ) != -1 )
+ if ( list->tqfind( obj ) != -1 )
m_focusedChildWidget = ( TQWidget* ) obj;
delete list; // delete the list, not the objects
@@ -564,8 +564,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
else if ( e->type() == TQEvent::ChildRemoved )
{
// if we lost a child we uninstall ourself as event filter for the lost
- // child and its children
- TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child();
+ // child and its tqchildren
+ TQObject * pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child());
if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) )
{
TQObjectList * list = pLostChild->queryList( TQWIDGET_OBJECT_NAME_STRING );
@@ -577,8 +577,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
TQWidget * widg = ( TQWidget* ) o;
++it;
widg->removeEventFilter( this );
- FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
+ TQ_FocusPolicy wfp = widg->focusPolicy();
+ if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus )
{
if ( m_firstFocusableChildWidget == widg )
m_firstFocusableChildWidget = 0L; // reset first widget
@@ -593,13 +593,13 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
else if ( e->type() == TQEvent::ChildInserted )
{
// if we got a new child and we are attached to the MDI system we
- // install ourself as event filter for the new child and its children
+ // install ourself as event filter for the new child and its tqchildren
// (as we did when we were added to the MDI system).
- TQObject * pNewChild = ( ( TQChildEvent* ) e ) ->child();
+ TQObject * pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child());
if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) )
{
TQWidget * pNewWidget = ( TQWidget* ) pNewChild;
- if ( pNewWidget->testWFlags( Qt::WType_Dialog | Qt::WShowModal ) )
+ if ( pNewWidget->testWFlags( TQt::WType_Dialog | TQt::WShowModal ) )
return false;
TQObjectList *list = pNewWidget->queryList( TQWIDGET_OBJECT_NAME_STRING );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
@@ -611,8 +611,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
++it;
widg->installEventFilter( this );
connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) );
- FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
+ TQ_FocusPolicy wfp = widg->focusPolicy();
+ if ( wfp == TQ_StrongFocus || wfp == TQ_TabFocus || widg->focusPolicy() == TQ_WheelFocus )
{
if ( m_firstFocusableChildWidget == 0 )
m_firstFocusableChildWidget = widg; // first widge
@@ -628,14 +628,14 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( e->type() == TQEvent::IconChange )
{
// qDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
- if ( obj == this )
+ if ( TQT_BASE_OBJECT(obj) == this )
iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
- else if ( obj == m_trackChanges )
+ else if ( TQT_BASE_OBJECT(obj) == m_trackChanges )
setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() );
}
if ( e->type() == TQEvent::CaptionChange )
{
- if ( obj == this )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) )
captionUpdated( this, caption() );
}
}
@@ -728,12 +728,12 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh )
if ( mdiParent() && mdiParent()->state() == KMdiChildFrm::Normal )
{
int w = maxw + KMDI_CHILDFRM_DOUBLE_BORDER;
- if ( w > QWIDGETSIZE_MAX )
- w = QWIDGETSIZE_MAX;
+ if ( w > TQWIDGETSIZE_MAX )
+ w = TQWIDGETSIZE_MAX;
int h = maxh + KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR + mdiParent() ->captionHeight();
- if ( h > QWIDGETSIZE_MAX )
- h = QWIDGETSIZE_MAX;
+ if ( h > TQWIDGETSIZE_MAX )
+ h = TQWIDGETSIZE_MAX;
mdiParent()->setMaximumSize( w, h );
}
@@ -770,4 +770,4 @@ void KMdiChildView::raise()
TQWidget::raise();
}
-// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
+// kate: space-indent off; tqreplace-tabs off; indent-mode csands; tab-width 4;