summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp')
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp198
1 files changed, 99 insertions, 99 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
index cf4c094c..a9f5e7f7 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.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 an
-// - 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 ([email protected])
// */2000 by Lars Beikirch ([email protected])
@@ -92,7 +92,7 @@
#include "kde2laptop_closebutton.xpm"
#include "kde2laptop_closebutton_menu.xpm"
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#ifndef NO_KDE
#include <X11/X.h> // schroder
#include <X11/Xlib.h> // schroder
@@ -107,7 +107,7 @@
/* I hate the defines in the X11 header files. Get rid of one of them */
#undef KeyPress
#endif
-#endif // Q_WS_X11 && ! K_WS_QTONLY
+#endif // TQ_WS_X11 && ! K_WS_TQTONLY
using namespace KParts;
@@ -135,8 +135,8 @@ public:
};
//============ constructor ============//
-KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
- : KParts::DockMainWindow( parentWidget, name, flags )
+KMdiMainFrm::KMdiMainFrm( TQWidget* tqparentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
+ : KParts::DockMainWindow( tqparentWidget, name, flags )
, m_mdiMode( KMdi::UndefinedMode )
, m_pMdi( 0L )
, m_pTaskBar( 0L )
@@ -182,8 +182,8 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMod
m_pDocumentViews->setAutoDelete( false );
m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
- // This seems to be needed (re-check it after Qt2.0 comed out)
- setFocusPolicy( ClickFocus );
+ // This seems to be needed (re-check it after TQt2.0 comed out)
+ setFocusPolicy( TQ_ClickFocus );
// create the central widget
createMdiManager();
@@ -217,12 +217,12 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMod
m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" );
d->closeWindowAction = new KAction(i18n("&Close"),
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
CTRL|Key_F4,
#else
0,
#endif
- this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
+ TQT_TQOBJECT(this), TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
// the MDI view taskbar
createTaskBar();
@@ -298,16 +298,16 @@ void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
//============ ~KMdiMainFrm ============//
KMdiMainFrm::~KMdiMainFrm()
{
- //save the children first to a list, as removing invalidates our iterator
- TQValueList<KMdiChildView*> children;
+ //save the tqchildren first to a list, as removing tqinvalidates our iterator
+ TQValueList<KMdiChildView*> tqchildren;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
- children.append( w );
+ tqchildren.append( w );
// safely close the windows so properties are saved...
TQValueListIterator<KMdiChildView*> childIt;
- for ( childIt = children.begin(); childIt != children.end(); ++childIt )
+ for ( childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt )
{
- closeWindow( *childIt, false ); // without re-layout taskbar!
+ closeWindow( *childIt, false ); // without re-tqlayout taskbar!
}
emit lastChildViewClosed();
@@ -345,7 +345,7 @@ void KMdiMainFrm::applyOptions()
TQWidget* childFrame = 0L;
if ( ( *it )->mdiParent() )
{
- kdDebug(760) << k_funcinfo << "using child view's mdi parent for resize hack" << endl;
+ kdDebug(760) << k_funcinfo << "using child view's mdi tqparent for resize hack" << endl;
childFrame = ( *it )->mdiParent();
}
else
@@ -395,7 +395,7 @@ void KMdiMainFrm::slot_toggleTaskBar()
void KMdiMainFrm::resizeEvent( TQResizeEvent *e )
{
- if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !tqparentWidget() )
{
if ( e->oldSize().height() != e->size().height() )
return ;
@@ -410,7 +410,7 @@ void KMdiMainFrm::resizeEvent( TQResizeEvent *e )
void KMdiMainFrm::setMinimumSize( int minw, int minh )
{
- if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !tqparentWidget() )
return ;
DockMainWindow::setMinimumSize( minw, minh );
}
@@ -421,9 +421,9 @@ KMdiChildView* KMdiMainFrm::createWrapper( TQWidget *view, const TQString& name,
{
Q_ASSERT( view ); // if this assert fails, then some part didn't return a widget. Fix the part ;)
- KMdiChildView* pMDICover = new KMdiChildView( name /*caption*/, 0L /*parent*/,
+ KMdiChildView* pMDICover = new KMdiChildView( name /*caption*/, 0L /*tqparent*/,
name.latin1() );
- TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout" );
+ TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "tqlayout" );
view->reparent( pMDICover, TQPoint( 0, 0 ) );
pLayout->addWidget( view );
// pMDICover->setName(name);
@@ -557,7 +557,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd )
{
- if ( m_pToolViews->contains( pWnd ) )
+ if ( m_pToolViews->tqcontains( pWnd ) )
deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
}
@@ -586,7 +586,7 @@ KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( TQWidget* pWnd, KDockWidget::D
pWnd = pDW;
}
- TQRect r = pWnd->geometry();
+ TQRect r = pWnd->tqgeometry();
KMdiToolViewAccessor *mtva = new KMdiToolViewAccessor( this, pWnd, tabToolTip, ( tabCaption == 0 ) ? pWnd->caption() : tabCaption );
m_pToolViews->insert( tvta, mtva );
@@ -594,7 +594,7 @@ KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( TQWidget* pWnd, KDockWidget::D
if ( pos == KDockWidget::DockNone )
{
mtva->d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
- mtva->d->widgetContainer->reparent( this, Qt::WType_TopLevel | Qt::WType_Dialog, r.topLeft(), true ); //pToolView->isVisible());
+ mtva->d->widgetContainer->reparent( this, TQt::WType_TopLevel | TQt::WType_Dialog, r.topLeft(), true ); //pToolView->isVisible());
}
else //add and dock the toolview as a dockwidget view
mtva->place( pos, pTargetWnd, percent );
@@ -614,7 +614,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
TQRect frameGeo = pWnd->frameGeometry();
TQPoint topLeftScreen = pWnd->mapToGlobal( TQPoint( 0, 0 ) );
TQPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
- TQRect childAreaGeo = m_pMdi->geometry();
+ TQRect childAreaGeo = m_pMdi->tqgeometry();
if ( topLeftMdiChildArea.x() < 0 || topLeftMdiChildArea.y() < 0 ||
( topLeftMdiChildArea.x() + frameGeo.width() > childAreaGeo.width() ) ||
( topLeftMdiChildArea.y() + frameGeo.height() > childAreaGeo.height() ) )
@@ -631,7 +631,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
lpC->setClient( pWnd, bAutomaticResize );
lpC->setFocus();
pWnd->youAreAttached( lpC );
- if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !tqparentWidget() )
{
setMinimumHeight( m_oldMainFrmMinHeight );
setMaximumHeight( m_oldMainFrmMaxHeight );
@@ -643,7 +643,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
m_pMdi->manageChild( lpC, false, bCascade );
if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() )
{
- TQRect r = lpC->geometry();
+ TQRect r = lpC->tqgeometry();
lpC->setGeometry( -lpC->m_pClient->x(), -lpC->m_pClient->y(),
m_pMdi->width() + KMDI_CHILDFRM_DOUBLE_BORDER,
m_pMdi->height() + lpC->captionHeight() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
@@ -670,7 +670,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
pWnd->removeEventFilter( this );
pWnd->youAreDetached();
// this is only if it was attached and you want to detach it
- if ( pWnd->parent() )
+ if ( pWnd->tqparent() )
{
KMdiChildFrm * lpC = pWnd->mdiParent();
if ( lpC )
@@ -702,20 +702,20 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
}
}
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if ( mdiMode() == KMdi::ToplevelMode )
{
- XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ XSetTransientForHint( qt_xdisplay(), pWnd->winId(), tqtopLevelWidget() ->winId() );
}
#endif
return ;
}
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if ( mdiMode() == KMdi::ToplevelMode )
{
- XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ XSetTransientForHint( qt_xdisplay(), pWnd->winId(), tqtopLevelWidget() ->winId() );
}
#endif
@@ -776,12 +776,12 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
m_pDockbaseOfTabPage = m_pDockbaseAreaOfDocumentViews;
m_pClose->hide();
}
- KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
+ KDockWidget* pDockW = ( KDockWidget* ) pWnd->tqparentWidget();
pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->tqparentWidget() ->tqparentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -829,7 +829,7 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
}
//============== closeWindow ==============//
-void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
+void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool tqlayoutTaskBar )
{
if ( !pWnd )
return ;
@@ -840,7 +840,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
if ( m_pTaskBar )
{
- m_pTaskBar->removeWinButton( pWnd, layoutTaskBar );
+ m_pTaskBar->removeWinButton( pWnd, tqlayoutTaskBar );
}
if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
@@ -878,12 +878,12 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
m_pClose->hide();
}
#if 0
- KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
+ KDockWidget* pDockW = ( KDockWidget* ) pWnd->tqparentWidget();
pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->tqparentWidget() ->tqparentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -963,13 +963,13 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as )
{
if ( ( as == ToolView ) || ( as == AnyView ) )
{
- if ( m_pToolViews->contains( pWnd ) )
+ if ( m_pToolViews->tqcontains( pWnd ) )
return true;
if ( as == ToolView )
return false;
}
- if ( m_pDocumentViews->findRef( pWnd ) != -1 )
+ if ( m_pDocumentViews->tqfindRef( pWnd ) != -1 )
return true;
return false;
@@ -1212,12 +1212,12 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e )
/** these are quite some assumptions:
* The key combination uses exactly one modifier key
- * The WIN button in KDE is the meta button in Qt
+ * The WIN button in KDE is the meta button in TQt
**/
if ( state != ( ( TQKeyEvent * ) e ) ->stateAfter() &&
- ( ( modFlags & KKey::CTRL ) > 0 ) == ( ( state & Qt::ControlButton ) > 0 ) &&
- ( ( modFlags & KKey::ALT ) > 0 ) == ( ( state & Qt::AltButton ) > 0 ) &&
- ( ( modFlags & KKey::WIN ) > 0 ) == ( ( state & Qt::MetaButton ) > 0 ) )
+ ( ( modFlags & KKey::CTRL ) > 0 ) == ( ( state & TQt::ControlButton ) > 0 ) &&
+ ( ( modFlags & KKey::ALT ) > 0 ) == ( ( state & TQt::AltButton ) > 0 ) &&
+ ( ( modFlags & KKey::WIN ) > 0 ) == ( ( state & TQt::MetaButton ) > 0 ) )
{
activeWindow() ->updateTimeStamp();
setSwitching( false );
@@ -1238,14 +1238,14 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e )
*/
void KMdiMainFrm::closeAllViews()
{
- //save the children first to a list, as removing invalidates our iterator
- TQValueList<KMdiChildView*> children;
+ //save the tqchildren first to a list, as removing tqinvalidates our iterator
+ TQValueList<KMdiChildView*> tqchildren;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
{
- children.append( w );
+ tqchildren.append( w );
}
TQValueListIterator<KMdiChildView *> childIt;
- for ( childIt = children.begin(); childIt != children.end(); ++childIt )
+ for ( childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt )
{
( *childIt )->close();
}
@@ -1273,7 +1273,7 @@ void KMdiMainFrm::closeActiveView()
m_pCurrentWindow->close();
}
-/** find the root dockwidgets and store their geometry */
+/** find the root dockwidgets and store their tqgeometry */
void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetList, TQValueList<TQRect>* positionList )
{
//nothing is valid
@@ -1289,24 +1289,24 @@ void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetLis
pObjList = queryList( "KDockWidget_Compat::KDockWidget" );
TQObjectListIt it( *pObjList );
- // for all dockwidgets (which are children of this mainwindow)
+ // for all dockwidgets (which are tqchildren of this mainwindow)
while ( ( *it ) )
{
KDockWidget* dockWindow = 0L; /* pDockW */
KDockWidget* rootDockWindow = 0L; /* pRootDockWindow */
KDockWidget* undockCandidate = 0L; /* pUndockCandidate */
- TQWidget* pW = static_cast<TQWidget*>( ( *it ) );
+ TQWidget* pW = TQT_TQWIDGET( ( *it ) );
// find the oldest ancestor of the current dockwidget that can be undocked
while ( !pW->isTopLevel() )
{
- if ( ::qt_cast<KDockWidget*>( pW ) || pW->inherits( "KDockWidget_Compat::KDockWidget" ) )
+ if ( ::tqqt_cast<KDockWidget*>( pW ) || pW->inherits( "KDockWidget_Compat::KDockWidget" ) )
{
undockCandidate = static_cast<KDockWidget*>( pW );
if ( undockCandidate->enableDocking() != KDockWidget::DockNone )
rootDockWindow = undockCandidate;
}
- pW = pW->parentWidget();
+ pW = pW->tqparentWidget();
}
if ( rootDockWindow )
@@ -1357,7 +1357,7 @@ void KMdiMainFrm::switchToToplevelMode()
const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
setUndockPositioningOffset( TQPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
- // 1.) select the dockwidgets to be undocked and store their geometry
+ // 1.) select the dockwidgets to be undocked and store their tqgeometry
TQPtrList<KDockWidget> rootDockWidgetList;
TQValueList<TQRect> positionList;
@@ -1399,11 +1399,11 @@ void KMdiMainFrm::switchToToplevelMode()
setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
}
// TQApplication::sendPostedEvents(); //why do we need to empty the event queue?
- if ( !parentWidget() )
+ if ( !tqparentWidget() )
{
- //if we don't have a parent widget ( which i expect we wouldn't )
+ //if we don't have a tqparent widget ( which i expect we wouldn't )
//make sure we take into account the size of the docks provided by
- //QMainWindow
+ //TQMainWindow
int topDockHeight = topDock() ? topDock()->height() : 0;
int bottomDockHeight = bottomDock() ? bottomDock()->height() : 0;
int menuBarHeight = hasMenuBar() ? menuBar()->height() : 0;
@@ -1425,7 +1425,7 @@ void KMdiMainFrm::switchToToplevelMode()
TQPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit )
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
XSetTransientForHint( qt_xdisplay(), ( *kmdicvit )->winId(), winId() );
#endif
( *kmdicvit )->show();
@@ -1470,7 +1470,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( m_mdiMode == KMdi::TabPageMode )
{
kdDebug(760) << k_funcinfo << "finishing tab page mode" << endl;
- // select the dockwidgets to be undocked and store their geometry
+ // select the dockwidgets to be undocked and store their tqgeometry
findRootDockWidgets( &rootDockWidgetList, &positionList );
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
@@ -1490,7 +1490,7 @@ void KMdiMainFrm::switchToChildframeMode()
kdDebug(760) << k_funcinfo << "finishing ideal mode" << endl;
finishIDEAlMode( false );
- // select the dockwidgets to be undocked and store their geometry
+ // select the dockwidgets to be undocked and store their tqgeometry
findRootDockWidgets( &rootDockWidgetList, &positionList );
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
@@ -1560,7 +1560,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( !pView->isToolView() )
pView->show();
}
- if ( ( oldMdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ if ( ( oldMdiMode == KMdi::ToplevelMode ) && !tqparentWidget() )
{
setMinimumHeight( m_oldMainFrmMinHeight );
setMaximumHeight( m_oldMainFrmMaxHeight );
@@ -1663,10 +1663,10 @@ void KMdiMainFrm::finishTabPageMode()
if ( pView->isToolView() )
continue;
kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl;
- TQSize mins = pView->minimumSize();
- TQSize maxs = pView->maximumSize();
+ TQSize mins = pView->tqminimumSize();
+ TQSize maxs = pView->tqmaximumSize();
TQSize sz = pView->size();
- TQWidget* pParent = pView->parentWidget();
+ TQWidget* pParent = pView->tqparentWidget();
TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
m_documentTabWidget->removePage( pView );
pView->reparent( 0, 0, p );
@@ -1692,7 +1692,7 @@ void KMdiMainFrm::finishTabPageMode()
void KMdiMainFrm::setupTabbedDocumentViewSpace()
{
// resize to childframe mode size of the mainwindow if we were in toplevel mode
- if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
+ if ( ( m_mdiMode == KMdi::ToplevelMode ) && !tqparentWidget() )
{
setMinimumHeight( m_oldMainFrmMinHeight );
setMaximumHeight( m_oldMainFrmMaxHeight );
@@ -1787,7 +1787,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
switch ( flag )
{
case KMdi::IconOnly:
- dockWidget->setTabPageLabel( TQString::null );
+ dockWidget->setTabPageLabel( TQString() );
dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) );
break;
case KMdi::TextOnly:
@@ -1875,9 +1875,9 @@ void KMdiMainFrm::switchToIDEAlMode()
}
-void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
+void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToRetqparent, KDockWidget *container )
{
- TQPtrListIterator<KDockWidget> it( widgetsToReparent );
+ TQPtrListIterator<KDockWidget> it( widgetsToRetqparent );
for ( ; ( *it ); ++it )
{
( *it )->manualDock( container, KDockWidget::DockCenter, 20 );
@@ -1888,9 +1888,9 @@ void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsTo
void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
{
KDockWidget* mainDock = getMainDockWidget();
- if ( mainDock->parentDockTabGroup() )
+ if ( mainDock->tqparentDockTabGroup() )
{
- mainDock = dynamic_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
+ mainDock = dynamic_cast<KDockWidget*>( mainDock->tqparentDockTabGroup()->tqparent() );
// FIXME: will likely crash below due to unchecked cast
}
@@ -1901,9 +1901,9 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDock
}
KDockWidget* widget = mainDock->findNearestDockWidget( dprtmw );
- if ( widget && widget->parentDockTabGroup() )
+ if ( widget && widget->tqparentDockTabGroup() )
{
- widget = static_cast<KDockWidget*>( widget->parentDockTabGroup() ->parent() );
+ widget = static_cast<KDockWidget*>( TQT_TQWIDGET(widget->tqparentDockTabGroup() ->tqparent()) );
if ( widget )
{
@@ -1934,21 +1934,21 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
KDockWidget *mainDock = getMainDockWidget();
KDockWidget *w = mainDock;
- if ( mainDock->parentDockTabGroup() )
- w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
+ if ( mainDock->tqparentDockTabGroup() )
+ w = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->tqparentDockTabGroup()->tqparent()) );
- TQPtrList<KDockWidget> leftReparentWidgets;
- TQPtrList<KDockWidget> rightReparentWidgets;
- TQPtrList<KDockWidget> bottomReparentWidgets;
- TQPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftRetqparentWidgets;
+ TQPtrList<KDockWidget> rightRetqparentWidgets;
+ TQPtrList<KDockWidget> bottomRetqparentWidgets;
+ TQPtrList<KDockWidget> topRetqparentWidgets;
- if ( mainDock->parentDockTabGroup() )
- mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
+ if ( mainDock->tqparentDockTabGroup() )
+ mainDock = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->tqparentDockTabGroup() ->tqparent()) );
- findToolViewsDockedToMain( &leftReparentWidgets, KDockWidget::DockLeft );
- findToolViewsDockedToMain( &rightReparentWidgets, KDockWidget::DockRight );
- findToolViewsDockedToMain( &bottomReparentWidgets, KDockWidget::DockBottom );
- findToolViewsDockedToMain( &topReparentWidgets, KDockWidget::DockTop );
+ findToolViewsDockedToMain( &leftRetqparentWidgets, KDockWidget::DockLeft );
+ findToolViewsDockedToMain( &rightRetqparentWidgets, KDockWidget::DockRight );
+ findToolViewsDockedToMain( &bottomRetqparentWidgets, KDockWidget::DockBottom );
+ findToolViewsDockedToMain( &topRetqparentWidgets, KDockWidget::DockTop );
mainDock->setEnableDocking( KDockWidget::DockNone ); //::DockCorner);
mainDock->setDockSite( KDockWidget::DockCorner );
@@ -2000,10 +2000,10 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
m_topContainer->setDockSite( KDockWidget::DockCenter );
m_bottomContainer->setDockSite( KDockWidget::DockCenter );
- dockToolViewsIntoContainers( leftReparentWidgets, m_leftContainer );
- dockToolViewsIntoContainers( rightReparentWidgets, m_rightContainer );
- dockToolViewsIntoContainers( bottomReparentWidgets, m_bottomContainer );
- dockToolViewsIntoContainers( topReparentWidgets, m_topContainer );
+ dockToolViewsIntoContainers( leftRetqparentWidgets, m_leftContainer );
+ dockToolViewsIntoContainers( rightRetqparentWidgets, m_rightContainer );
+ dockToolViewsIntoContainers( bottomRetqparentWidgets, m_bottomContainer );
+ dockToolViewsIntoContainers( topRetqparentWidgets, m_topContainer );
dockManager->setSpecialLeftDockContainer( m_leftContainer );
@@ -2079,10 +2079,10 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
- TQSize mins = pView->minimumSize();
- TQSize maxs = pView->maximumSize();
+ TQSize mins = pView->tqminimumSize();
+ TQSize maxs = pView->tqmaximumSize();
TQSize sz = pView->size();
- TQWidget* pParent = pView->parentWidget();
+ TQWidget* pParent = pView->tqparentWidget();
TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
pView->reparent( 0, 0, p );
pView->reparent( 0, 0, p );
@@ -2105,7 +2105,7 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
}
else
{
- pParent = pParent->parentWidget();
+ pParent = pParent->tqparentWidget();
}
}
while ( pParent && !pDockW );
@@ -2139,9 +2139,9 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockW
Q_UNUSED( size )
KDockWidget * mainDock = getMainDockWidget();
- if ( mainDock->parentDockTabGroup() )
+ if ( mainDock->tqparentDockTabGroup() )
{
- mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
+ mainDock = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->tqparentDockTabGroup() ->tqparent()) );
}
if ( widgetNames.count() > 0 )
@@ -2167,7 +2167,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockW
}
#if 0
- TQWidget *wid = dwpd->parentDockTabGroup();
+ TQWidget *wid = dwpd->tqparentDockTabGroup();
if ( !wid )
wid = dwpd;
wid->setGeometry( 0, 0, 20, 20 );
@@ -2266,10 +2266,10 @@ void KMdiMainFrm::setSysButtonsAtMenuPosition()
{
if ( m_pMainMenuBar == 0L )
return ;
- if ( m_pMainMenuBar->parentWidget() == 0L )
+ if ( m_pMainMenuBar->tqparentWidget() == 0L )
return ;
- int menuW = m_pMainMenuBar->parentWidget() ->width();
+ int menuW = m_pMainMenuBar->tqparentWidget() ->width();
int h;
int y;
if ( frameDecorOfAttachedViews() == KMdi::Win95Look )
@@ -2361,7 +2361,7 @@ void KMdiMainFrm::activateFirstWin()
return ;
TQDateTime current = activeWindow() ->getTimeStamp();
- TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.tqfind( current ) );
TQMap<TQDateTime, KMdiChildView*>::iterator newPos = pos;
if ( pos != m.end() )
{
@@ -2394,7 +2394,7 @@ void KMdiMainFrm::activateLastWin()
return ;
TQDateTime current = activeWindow() ->getTimeStamp();
- TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.tqfind( current ) );
if ( pos != m.begin() )
{
--pos;
@@ -2938,4 +2938,4 @@ KTabWidget * KMdiMainFrm::tabWidget() const
#include "kmdimainfrm.moc"
// vim: ts=2 sw=2 et
-// kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
+// kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands;