summaryrefslogtreecommitdiffstats
path: root/kmdi
diff options
context:
space:
mode:
Diffstat (limited to 'kmdi')
-rw-r--r--kmdi/kmdi/dockcontainer.cpp34
-rw-r--r--kmdi/kmdi/guiclient.cpp8
-rw-r--r--kmdi/kmdi/mainwindow.cpp4
-rw-r--r--kmdi/kmdi/tabwidget.cpp20
-rw-r--r--kmdi/kmdi/toolviewaccessor.cpp2
-rw-r--r--kmdi/kmdichildarea.cpp18
-rw-r--r--kmdi/kmdichildfrm.cpp112
-rw-r--r--kmdi/kmdichildfrm.h4
-rw-r--r--kmdi/kmdichildfrmcaption.cpp12
-rw-r--r--kmdi/kmdichildview.cpp34
-rw-r--r--kmdi/kmdichildview.h2
-rw-r--r--kmdi/kmdidockcontainer.cpp40
-rw-r--r--kmdi/kmdifocuslist.cpp6
-rw-r--r--kmdi/kmdifocuslist.h2
-rw-r--r--kmdi/kmdiguiclient.cpp8
-rw-r--r--kmdi/kmdimainfrm.cpp20
-rw-r--r--kmdi/kmdimainfrm.h2
-rw-r--r--kmdi/kmditaskbar.cpp16
-rw-r--r--kmdi/kmditoolviewaccessor.cpp2
19 files changed, 177 insertions, 169 deletions
diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp
index 7e09ae100..926728927 100644
--- a/kmdi/kmdi/dockcontainer.cpp
+++ b/kmdi/kmdi/dockcontainer.cpp
@@ -118,7 +118,7 @@ DockContainer::~DockContainer()
while (m_map.count()) {
it = m_map.begin();
KDockWidget *w=it.key();
- if (m_overlapButtons.contains(w)) {
+ if (m_overlapButtons.tqcontains(w)) {
(static_cast<KDockWidgetHeader*>(w->getHeader()->tqqt_cast("KDockWidgetHeader")))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w);
}
@@ -149,7 +149,7 @@ void DockContainer::init()
if ( parentDockWidget() && parentDockWidget()->parent() )
{
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- parent()->tqqt_cast("KDockSplitter"));
+ tqparent()->tqqt_cast("KDockSplitter"));
if ( sp )
sp->setSeparatorPosX( m_separatorPos );
}
@@ -164,7 +164,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
{
KDockWidget* w = (KDockWidget*) dwdg;
int tab;
- bool alreadyThere=m_map.contains(w);
+ bool alreadyThere=m_map.tqcontains(w);
if (alreadyThere)
{
@@ -234,7 +234,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
{
- if (obj==m_tb) {
+ if (TQT_BASE_OBJECT(obj)==TQT_BASE_OBJECT(m_tb)) {
if ( (event->type()==TQEvent::Resize) && (m_ws->isHidden()) ) {
TQSize size=((TQResizeEvent*)event)->size();
if (m_vertical)
@@ -263,7 +263,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
break;
}
m_dockManager=w->dockManager();
- m_dragPanel=hdr->dragPanel();
+ m_dragPanel=TQT_TQOBJECT(hdr->dragPanel());
if (m_dragPanel) m_movingState=WaitingForMoveStart;
delete m_startEvent;
m_startEvent=new TQMouseEvent(* ((TQMouseEvent*)event));
@@ -281,7 +281,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
if (m_movingState==WaitingForMoveStart) {
TQPoint p( ((TQMouseEvent*)event)->pos() - m_startEvent->pos() );
if( p.manhattanLength() > KGlobalSettings::dndEventDelay()) {
- m_dockManager->eventFilter(m_dragPanel,m_startEvent);
+ m_dockManager->eventFilter(m_dragPanel,TQT_TQEVENT(m_startEvent));
m_dockManager->eventFilter(m_dragPanel,event);
m_movingState=Moving;
}
@@ -298,7 +298,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
}
void DockContainer::showWidget(KDockWidget *w) {
- if (!m_map.contains(w)) return;
+ if (!m_map.tqcontains(w)) return;
kdDebug()<<"KMDI::DockContainer::<showWidget"<<endl;
int id=m_map[w];
@@ -343,7 +343,7 @@ void DockContainer::hideIfNeeded() {
void DockContainer::removeWidget(KDockWidget* dwdg)
{
KDockWidget* w = (KDockWidget*) dwdg;
- if (!m_map.contains(w)) return;
+ if (!m_map.tqcontains(w)) return;
int id=m_map[w];
if (m_tb->isTabRaised(id)) {
//why do we hide the tab if we're just going
@@ -356,7 +356,7 @@ void DockContainer::removeWidget(KDockWidget* dwdg)
m_ws->removeWidget(w);
m_map.remove(w);
m_revMap.remove(id);
- if (m_overlapButtons.contains(w)) {
+ if (m_overlapButtons.tqcontains(w)) {
(static_cast<KDockWidgetHeader*>(w->getHeader()->tqqt_cast("KDockWidgetHeader")))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w);
}
@@ -372,7 +372,7 @@ void DockContainer::undockWidget(KDockWidget *dwdg)
{
KDockWidget* w = (KDockWidget*) dwdg;
- if (!m_map.contains(w))
+ if (!m_map.tqcontains(w))
return;
int id=m_map[w];
@@ -423,7 +423,7 @@ void DockContainer::tabClicked(int t)
if ( parentDockWidget() && parentDockWidget()->parent() )
{
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- parent()->tqqt_cast("KDockSplitter"));
+ tqparent()->tqqt_cast("KDockSplitter"));
if ( sp )
m_separatorPos = sp->separatorPos();
}
@@ -466,8 +466,8 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
{
// group name
TQString grp=cfg->group();
- cfg->deleteGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
- cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
+ cfg->deleteGroup(group_or_prefix+TQString("::%1").arg(tqparent()->name()));
+ cfg->setGroup(group_or_prefix+TQString("::%1").arg(tqparent()->name()));
// save overlap mode
cfg->writeEntry("overlapMode",isOverlapMode());
@@ -476,7 +476,7 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
if ( parentDockWidget() && parentDockWidget()->parent() )
{
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- parent()->tqqt_cast("KDockSplitter"));
+ tqparent()->tqqt_cast("KDockSplitter"));
if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
@@ -509,7 +509,7 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
void DockContainer::load(KConfig* cfg,const TQString& group_or_prefix)
{
TQString grp=cfg->group();
- cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
+ cfg->setGroup(group_or_prefix+TQString("::%1").arg(tqparent()->name()));
if (cfg->readBoolEntry("overlapMode"))
activateOverlapMode( m_vertical?m_tb->width():m_tb->height() );
@@ -631,7 +631,7 @@ void DockContainer::toggle() {
void DockContainer::prevToolView() {
TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
- int pos=tabs->findRef(m_tb->tab(oldtab));
+ int pos=tabs->tqfindRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos--;
if (pos<0) pos=tabs->count()-1;
@@ -643,7 +643,7 @@ void DockContainer::prevToolView() {
void DockContainer::nextToolView() {
TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
- int pos=tabs->findRef(m_tb->tab(oldtab));
+ int pos=tabs->tqfindRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos++;
if (pos>=(int)tabs->count()) pos=0;
diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp
index 0522d78a1..54e8fc26a 100644
--- a/kmdi/kmdi/guiclient.cpp
+++ b/kmdi/kmdi/guiclient.cpp
@@ -88,9 +88,9 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,TQT_SIGNAL(toggleBottom()),
actionCollection(),"kmdi_activate_bottom"));
m_gotoToolDockMenu->insert(new KActionSeparator(actionCollection(),"kmdi_goto_menu_separator"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,m_mdiMainFrm,TQT_SLOT(prevToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(prevToolViewInDock()),
actionCollection(),"kmdi_prev_toolview"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,m_mdiMainFrm,TQT_SLOT(nextToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,TQT_TQOBJECT(m_mdiMainFrm),TQT_SLOT(nextToolViewInDock()),
actionCollection(),"kmdi_next_toolview"));
actionCollection()->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -149,7 +149,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
/*TQString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
m_mdiMainFrm,actionCollection(), aname.latin1() );
- ((ToggleToolViewAction*)a)->setCheckedState(i18n("Hide %1").arg(mtva->wrappedWidget()->caption()));
+ ((ToggleToolViewAction*)a)->setCheckedState(TQString(i18n("Hide %1").arg(mtva->wrappedWidget()->caption())));
connect(a,TQT_SIGNAL(destroyed(TQObject*)),this,TQT_SLOT(actionDeleted(TQObject*)));
@@ -202,7 +202,7 @@ void ToggleToolViewAction::anDWChanged()
setChecked(true);
else if (isChecked() && (m_dw->parentDockTabGroup() &&
((static_cast<KDockWidget*>(m_dw->parentDockTabGroup()->
- parent()->tqqt_cast("KDockWidget")))->mayBeShow())))
+ tqparent()->tqqt_cast("KDockWidget")))->mayBeShow())))
setChecked(false);
}
diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp
index 912ad3a1d..be38a3f48 100644
--- a/kmdi/kmdi/mainwindow.cpp
+++ b/kmdi/kmdi/mainwindow.cpp
@@ -280,7 +280,7 @@ KMDI::ToolViewAccessor *MainWindow::addToolWindow( TQWidget* pWnd, KDockWidget::
if (pos == KDockWidget::DockNone) {
mtva->d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
- mtva->d->widgetContainer->reparent(this, Qt::WType_TopLevel | Qt::WType_Dialog, r.topLeft(), isVisible());
+ mtva->d->widgetContainer->reparent(this, (WFlags)(WType_TopLevel | WType_Dialog), r.topLeft(), isVisible());
} else { // add (and dock) the toolview as DockWidget view
//const TQPixmap& wndIcon = pWnd->icon() ? *(pWnd->icon()) : TQPixmap();
@@ -302,7 +302,7 @@ void MainWindow::deleteToolWindow( TQWidget* pWnd)
if (!pWnd)
return;
- if (m_toolViews->contains(pWnd)) {
+ if (m_toolViews->tqcontains(pWnd)) {
deleteToolWindow((*m_toolViews)[pWnd]);
}
}
diff --git a/kmdi/kmdi/tabwidget.cpp b/kmdi/kmdi/tabwidget.cpp
index d4a369b47..b1d88e6b8 100644
--- a/kmdi/kmdi/tabwidget.cpp
+++ b/kmdi/kmdi/tabwidget.cpp
@@ -89,7 +89,7 @@ bool TabWidget::eventFilter(TQObject *obj, TQEvent *e )
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- TQObject* pLostChild = ((TQChildEvent*)e)->child();
+ TQObject* pLostChild = TQT_TQOBJECT(((TQChildEvent*)e)->child());
if ((pLostChild != 0L) && (pLostChild->isWidgetType())) {
TQObjectList *list = pLostChild->queryList( "TQWidget" );
list->insert(0, pLostChild); // add the lost child to the list too, just to save code
@@ -108,11 +108,11 @@ bool TabWidget::eventFilter(TQObject *obj, TQEvent *e )
// 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
// (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((WFlags)(WType_Dialog | WShowModal)))
return false;
TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert(0, pNewChild); // add the new child to the list too, just to save code
@@ -135,7 +135,7 @@ void TabWidget::childDestroyed()
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const TQObject* pLostChild = TQObject::sender();
+ const TQObject* pLostChild = TQT_TQOBJECT_CONST(sender());
if ((pLostChild != 0L) && (pLostChild->isWidgetType()))
{
TQObjectList *list = ((TQObject*)(pLostChild))->queryList("TQWidget");
@@ -253,18 +253,18 @@ void TabWidget::maybeShow()
void TabWidget::setCornerWidgetVisibility(bool visible) {
// there are two corner widgets: on TopLeft and on TopTight!
- if (cornerWidget(Qt::TopLeft) ) {
+ if (cornerWidget(TQt::TopLeft) ) {
if (visible)
- cornerWidget(Qt::TopLeft)->show();
+ cornerWidget(TQt::TopLeft)->show();
else
- cornerWidget(Qt::TopLeft)->hide();
+ cornerWidget(TQt::TopLeft)->hide();
}
- if (cornerWidget(Qt::TopRight) ) {
+ if (cornerWidget(TQt::TopRight) ) {
if (visible)
- cornerWidget(Qt::TopRight)->show();
+ cornerWidget(TQt::TopRight)->show();
else
- cornerWidget(Qt::TopRight)->hide();
+ cornerWidget(TQt::TopRight)->hide();
}
}
diff --git a/kmdi/kmdi/toolviewaccessor.cpp b/kmdi/kmdi/toolviewaccessor.cpp
index e2707941b..2ff4f972a 100644
--- a/kmdi/kmdi/toolviewaccessor.cpp
+++ b/kmdi/kmdi/toolviewaccessor.cpp
@@ -158,7 +158,7 @@ void ToolViewAccessor::place(KDockWidget::DockPosition pos, TQWidget* pTargetWnd
if (!d->widgetContainer) return;
if (pos == KDockWidget::DockNone) {
d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
- d->widgetContainer->reparent(mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint(0,0), mdiMainFrm->isVisible());
+ d->widgetContainer->reparent(mdiMainFrm, (WFlags)(WType_TopLevel | WType_Dialog), TQPoint(0,0), mdiMainFrm->isVisible());
}
else { // add (and dock) the toolview as DockWidget view
diff --git a/kmdi/kmdichildarea.cpp b/kmdi/kmdichildarea.cpp
index c4a94597b..3360a0e60 100644
--- a/kmdi/kmdichildarea.cpp
+++ b/kmdi/kmdichildarea.cpp
@@ -58,7 +58,7 @@ KMdiChildArea::KMdiChildArea( TQWidget *parent )
m_captionInactiveForeColor = KGlobalSettings::inactiveTextColor();
m_pZ = new TQPtrList<KMdiChildFrm>;
m_pZ->setAutoDelete( true );
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
m_defaultChildFrmSize = TQSize( 400, 300 );
}
@@ -75,11 +75,11 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade )
KMdiChildFrm* top = topChild();
//remove old references. There can be more than one so we remove them all
- if ( m_pZ->findRef( child ) != -1 )
+ if ( m_pZ->tqfindRef( child ) != -1 )
{
//TQPtrList::find* moves current() to the found item
m_pZ->take();
- while ( m_pZ->findNextRef( child ) != -1 )
+ while ( m_pZ->tqfindNextRef( child ) != -1 )
m_pZ->take();
}
@@ -112,7 +112,7 @@ void KMdiChildArea::destroyChild( KMdiChildFrm *child, bool focusTop )
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
- TQObject::disconnect( child );
+ disconnect( child );
child->blockSignals( true );
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@@ -144,7 +144,7 @@ void KMdiChildArea::destroyChildButNotItsView( KMdiChildFrm* child, bool focusTo
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
- TQObject::disconnect( child );
+ disconnect( child );
child->unsetClient();
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@@ -218,8 +218,12 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
else
child->raise();
+#ifdef USE_QT4
+ child->m_pClient->setFocus();
+#else // USE_QT4
TQFocusEvent::setReason( TQFocusEvent::Other );
child->m_pClient->setFocus();
+#endif // USE_QT4
}
}
@@ -249,7 +253,7 @@ void KMdiChildArea::resizeEvent( TQResizeEvent* e )
void KMdiChildArea::mousePressEvent( TQMouseEvent *e )
{
//Popup the window menu
- if ( e->button() & RightButton )
+ if ( e->button() & Qt::RightButton )
emit popupWindowMenu( mapToGlobal( e->pos() ) );
}
@@ -319,7 +323,7 @@ TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
void KMdiChildArea::childMinimized( KMdiChildFrm *minimizedChild, bool wasMaximized )
{
//can't find the child in our list, so we don't care.
- if ( m_pZ->findRef( minimizedChild ) == -1 )
+ if ( m_pZ->tqfindRef( minimizedChild ) == -1 )
{
kdDebug( 760 ) << k_funcinfo << "child was minimized but wasn't in our list!" << endl;
return;
diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp
index 162837b2b..ac0a4facd 100644
--- a/kmdi/kmdichildfrm.cpp
+++ b/kmdi/kmdichildfrm.cpp
@@ -149,15 +149,15 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
redecorateButtons();
- m_pWinIcon->setFocusPolicy( NoFocus );
- m_pUnixIcon->setFocusPolicy( NoFocus );
- m_pClose->setFocusPolicy( NoFocus );
- m_pMinimize->setFocusPolicy( NoFocus );
- m_pMaximize->setFocusPolicy( NoFocus );
- m_pUndock->setFocusPolicy( NoFocus );
+ m_pWinIcon->setFocusPolicy( TQ_NoFocus );
+ m_pUnixIcon->setFocusPolicy( TQ_NoFocus );
+ m_pClose->setFocusPolicy( TQ_NoFocus );
+ m_pMinimize->setFocusPolicy( TQ_NoFocus );
+ m_pMaximize->setFocusPolicy( TQ_NoFocus );
+ m_pUndock->setFocusPolicy( TQ_NoFocus );
setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
setMouseTracking( true );
@@ -238,19 +238,19 @@ void KMdiChildFrm::setResizeCursor( int resizeCorner )
break;
case KMDI_RESIZE_LEFT:
case KMDI_RESIZE_RIGHT:
- TQApplication::setOverrideCursor( Qt::sizeHorCursor, true );
+ TQApplication::setOverrideCursor( tqsizeHorCursor, true );
break;
case KMDI_RESIZE_TOP:
case KMDI_RESIZE_BOTTOM:
- TQApplication::setOverrideCursor( Qt::sizeVerCursor, true );
+ TQApplication::setOverrideCursor( tqsizeVerCursor, true );
break;
case KMDI_RESIZE_TOPLEFT:
case KMDI_RESIZE_BOTTOMRIGHT:
- TQApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
+ TQApplication::setOverrideCursor( tqsizeFDiagCursor, true );
break;
case KMDI_RESIZE_BOTTOMLEFT:
case KMDI_RESIZE_TOPRIGHT:
- TQApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
+ TQApplication::setOverrideCursor( tqsizeBDiagCursor, true );
break;
}
}
@@ -283,7 +283,7 @@ void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e )
if ( m_bResizing )
{
- if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) )
+ if ( !( e->state() & Qt::RightButton ) && !( e->state() & Qt::MidButton ) )
{
// same as: if no button or left button pressed
TQPoint p = tqparentWidget()->mapFromGlobal( e->globalPos() );
@@ -534,9 +534,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// restore client min / max size / layout behavior
m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
+ m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode );
}
m_pMinimize->setPixmap( *m_pMinButtonPixmap );
m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
@@ -558,9 +558,9 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// restore client min / max size / layout behavior
m_pClient->setMinimumSize( m_oldClientMinSize.width(), m_oldClientMinSize.height() );
m_pClient->setMaximumSize( m_oldClientMaxSize.width(), m_oldClientMaxSize.height() );
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_pClient->layout() ->setResizeMode( m_oldLayoutResizeMode );
+ m_pClient->tqlayout() ->setResizeMode( m_oldLayoutResizeMode );
}
setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
// reset to maximize-captionbar
@@ -610,15 +610,15 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// save client min / max size / layout behavior
m_oldClientMinSize = m_pClient->tqminimumSize();
m_oldClientMaxSize = m_pClient->tqmaximumSize();
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
+ m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode();
}
m_pClient->setMinimumSize( 0, 0 );
m_pClient->setMaximumSize( 0, 0 );
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
+ m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, true );
@@ -629,16 +629,16 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// save client min / max size / layout behavior
m_oldClientMinSize = m_pClient->tqminimumSize();
m_oldClientMaxSize = m_pClient->tqmaximumSize();
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_oldLayoutResizeMode = m_pClient->layout() ->resizeMode();
+ m_oldLayoutResizeMode = m_pClient->tqlayout() ->tqresizeMode();
}
m_restoredRect = geometry();
m_pClient->setMinimumSize( 0, 0 );
m_pClient->setMaximumSize( 0, 0 );
- if ( m_pClient->layout() != 0L )
+ if ( m_pClient->tqlayout() != 0L )
{
- m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
+ m_pClient->tqlayout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, false );
@@ -705,7 +705,7 @@ void KMdiChildFrm::setIcon( const TQPixmap& pxm )
if ( p.width() != 18 || p.height() != 18 )
{
TQImage img = p.convertToImage();
- p = img.smoothScale( 18, 18, TQImage::ScaleMin );
+ p = img.smoothScale( 18, 18, TQ_ScaleMin );
}
const bool do_resize = m_pIconButtonPixmap->size() != p.size();
*m_pIconButtonPixmap = p;
@@ -750,7 +750,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
}
// memorize the focuses in a dictionary because they will get lost during reparenting
- TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
+ TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>;
pFocPolDict->setAutoDelete( true );
TQObjectList *list = m_pClient->queryList( "TQWidget" );
TQObjectListIt it( *list ); // iterate over the buttons
@@ -768,7 +768,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
widg->setName( tmpStr.latin1() );
i++;
}
- FocusPolicy* pFocPol = new FocusPolicy;
+ TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy;
*pFocPol = widg->focusPolicy();
pFocPolDict->insert( widg->name(), pFocPol );
}
@@ -817,7 +817,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
//reparent to desktop widget , no flags , point , show it
- TQDict<FocusPolicy>* pFocPolDict;
+ TQDict<TQ_FocusPolicy>* pFocPolDict;
pFocPolDict = unlinkChildren();
// get name of focused child widget
@@ -842,7 +842,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
{ // for each found object...
TQWidget * widg = ( TQWidget* ) obj;
++it;
- FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
+ TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol )
widg->setFocusPolicy( *pFocPol );
@@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
widg->setFocus();
// get first and last focusable widget
- if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) )
+ if ( ( widg->focusPolicy() == TQ_StrongFocus ) || ( widg->focusPolicy() == TQ_TabFocus ) )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
}
else
{
- if ( widg->focusPolicy() == TQWidget::WheelFocus )
+ if ( widg->focusPolicy() == TQ_WheelFocus )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -877,14 +877,14 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget );
// reset the focus policy of the view
- m_pClient->setFocusPolicy( TQWidget::ClickFocus );
+ m_pClient->setFocusPolicy( TQ_ClickFocus );
// lose information about the view (because it's undocked now)
m_pClient = 0;
}
//============== linkChildren =============//
-void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
+void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict )
{
// reset the focus policies for all widgets in the view (take them from the dictionary)
TQObjectList* list = m_pClient->queryList( "TQWidget" );
@@ -894,7 +894,7 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
{ // for each found object...
TQWidget* widg = ( TQWidget* ) obj;
++it;
- FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
+ TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol );
@@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
delete pFocPolDict;
// reset the focus policies for the rest
- m_pWinIcon->setFocusPolicy( TQWidget::NoFocus );
- m_pUnixIcon->setFocusPolicy( TQWidget::NoFocus );
- m_pClient->setFocusPolicy( TQWidget::ClickFocus );
- m_pCaption->setFocusPolicy( TQWidget::NoFocus );
- m_pUndock->setFocusPolicy( TQWidget::NoFocus );
- m_pMinimize->setFocusPolicy( TQWidget::NoFocus );
- m_pMaximize->setFocusPolicy( TQWidget::NoFocus );
- m_pClose->setFocusPolicy( TQWidget::NoFocus );
+ m_pWinIcon->setFocusPolicy( TQ_NoFocus );
+ m_pUnixIcon->setFocusPolicy( TQ_NoFocus );
+ m_pClient->setFocusPolicy( TQ_ClickFocus );
+ m_pCaption->setFocusPolicy( TQ_NoFocus );
+ m_pUndock->setFocusPolicy( TQ_NoFocus );
+ m_pMinimize->setFocusPolicy( TQ_NoFocus );
+ m_pMaximize->setFocusPolicy( TQ_NoFocus );
+ m_pClose->setFocusPolicy( TQ_NoFocus );
// install the event filter (catch mouse clicks) for the rest
m_pWinIcon->installEventFilter( this );
@@ -930,10 +930,10 @@ void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
//============== unlinkChildren =============//
-TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
+TQDict<TQ_FocusPolicy>* KMdiChildFrm::unlinkChildren()
{
// memorize the focuses in a dictionary because they will get lost during reparenting
- TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
+ TQDict<TQ_FocusPolicy>* pFocPolDict = new TQDict<TQ_FocusPolicy>;
pFocPolDict->setAutoDelete( true );
TQObjectList *list = m_pClient->queryList( "TQWidget" );
@@ -953,7 +953,7 @@ TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
w->setName( tmpStr.latin1() );
i++;
}
- FocusPolicy* pFocPol = new FocusPolicy;
+ TQ_FocusPolicy* pFocPol = new TQ_FocusPolicy;
*pFocPol = w->focusPolicy();
// memorize focus policy
pFocPolDict->insert( w->name(), pFocPol );
@@ -1068,7 +1068,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
static bool hasParent( TQObject* par, TQObject* o )
{
while ( o && o != par )
- o = o->parent();
+ o = o->tqparent();
return o == par;
}
@@ -1085,8 +1085,8 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
TQObject* pObj = obj;
while ( ( pObj != 0L ) && !bIsChild )
{
- bIsChild = ( pObj == this );
- pObj = pObj->parent();
+ bIsChild = ( TQT_BASE_OBJECT(pObj) == TQT_BASE_OBJECT(this) );
+ pObj = pObj->tqparent();
}
// unset the resize cursor if the cursor moved from the frame into a inner widget
if ( bIsChild )
@@ -1095,13 +1095,13 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
break;
case TQEvent::MouseButtonPress:
{
- if ( !hasParent( m_pClient, obj ) )
+ if ( !hasParent( TQT_TQOBJECT(m_pClient), obj ) )
{
bool bIsSecondClick = false;
if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() )
bIsSecondClick = true; // of a possible double click
- if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
+ if ( !( ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pUnixIcon) ) ) && bIsSecondClick ) )
{
// in case we didn't click on the icon button
TQFocusEvent focusEvent( TQFocusEvent::FocusIn );
@@ -1112,16 +1112,16 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
m_pClient->activate();
}
- if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
+ if ( ( TQT_BASE_OBJECT(obj->tqparent()) != TQT_BASE_OBJECT(m_pCaption) ) && ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(m_pCaption) ) )
{
TQWidget* w = ( TQWidget* ) obj;
- if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) )
+ if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) )
{
w->setFocus();
}
}
}
- if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
+ if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pUnixIcon) ) )
{
// in case we clicked on the icon button
if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() )
@@ -1154,7 +1154,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- TQObject* pLostChild = ( ( TQChildEvent* ) e )->child();
+ TQObject* pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e )->child());
if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ )
{
TQObjectList* list = pLostChild->queryList();
@@ -1176,10 +1176,10 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
// if we got a new child we install ourself as event filter for the new
// child and its children (as we did when we got our client).
// XXX see linkChildren() and focus policy stuff
- TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child();
+ TQObject* pNewChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child());
if ( ( pNewChild != 0L ) && ::tqqt_cast<TQWidget*>( pNewChild ) )
{
- TQWidget * pNewWidget = static_cast<TQWidget*>( pNewChild );
+ TQWidget * pNewWidget = TQT_TQWIDGET( pNewChild );
TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
TQObjectListIt it( *list ); // iterate over all new child widgets
diff --git a/kmdi/kmdichildfrm.h b/kmdi/kmdichildfrm.h
index d9e3ed922..4d5f6b3bc 100644
--- a/kmdi/kmdichildfrm.h
+++ b/kmdi/kmdichildfrm.h
@@ -422,13 +422,13 @@ protected:
* Restore the focus policies for _all_ widgets in the view using the list given as parameter.
* Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/
- void linkChildren( TQDict<FocusPolicy>* pFocPolDict );
+ void linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict );
/**
* Backups all focus policies of _all_ child widgets in the MDI childview since they get lost during a reparent.
* Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)
*/
- TQDict<TQWidget::FocusPolicy>* unlinkChildren();
+ TQDict<TQ_FocusPolicy>* unlinkChildren();
/**
* Calculates the corner id for the resize cursor. The return value can be tested for:
diff --git a/kmdi/kmdichildfrmcaption.cpp b/kmdi/kmdichildfrmcaption.cpp
index b92eda26e..eb64c9395 100644
--- a/kmdi/kmdichildfrmcaption.cpp
+++ b/kmdi/kmdichildfrmcaption.cpp
@@ -72,7 +72,7 @@ KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent )
m_bActive = false;
m_pParent = parent;
setBackgroundMode( NoBackground );
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
m_bChildInDrag = false;
}
@@ -85,17 +85,17 @@ KMdiChildFrmCaption::~KMdiChildFrmCaption()
void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
{
setMouseTracking( false );
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
{
- TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( tqsizeAllCursor, true );
}
m_pParent->m_bDragging = true;
m_offset = mapToParent( e->pos() );
}
- else if ( e->button() == RightButton )
+ else if ( e->button() == Qt::RightButton )
{
m_pParent->systemMenu()->popup( mapToGlobal( e->pos() ) );
}
@@ -105,7 +105,7 @@ void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e )
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
{
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
TQApplication::restoreOverrideCursor();
@@ -313,7 +313,7 @@ void KMdiChildFrmCaption::slot_moveViaSystemMenu()
grabMouse();
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
- TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( tqsizeAllCursor, true );
m_pParent->m_bDragging = true;
m_offset = mapFromGlobal( TQCursor::pos() );
diff --git a/kmdi/kmdichildview.cpp b/kmdi/kmdichildview.cpp
index 1aad3c36f..05347d74e 100644
--- a/kmdi/kmdichildview.cpp
+++ b/kmdi/kmdichildview.cpp
@@ -63,7 +63,7 @@ KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* tqparentWidget,
m_szCaption = i18n( "Unnamed" );
m_sTabCaption = m_szCaption;
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
installEventFilter( this );
// store the current time
@@ -88,7 +88,7 @@ KMdiChildView::KMdiChildView( TQWidget* tqparentWidget, const char* name, WFlags
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
@@ -363,7 +363,7 @@ void KMdiChildView::youAreDetached()
if ( myIconPtr() )
setIcon( *( myIconPtr() ) );
- setFocusPolicy( TQWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
emit isDetachedNow();
}
@@ -493,7 +493,7 @@ void KMdiChildView::slot_childDestroyed()
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const TQObject * pLostChild = TQObject::sender();
+ const TQObject * pLostChild = TQT_TQOBJECT_CONST(sender());
if ( pLostChild && ( pLostChild->isWidgetType() ) )
{
TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" );
@@ -527,8 +527,8 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( ke->key() == Qt::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 )
{
@@ -546,7 +546,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( obj->isWidgetType() )
{
TQObjectList * list = queryList( "TQWidget" );
- if ( list->find( obj ) != -1 )
+ if ( list->tqfind( obj ) != -1 )
m_focusedChildWidget = ( TQWidget* ) obj;
delete list; // delete the list, not the objects
@@ -566,7 +566,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child();
+ TQObject * pLostChild = TQT_TQOBJECT(( ( TQChildEvent* ) e ) ->child());
if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) )
{
TQObjectList * list = pLostChild->queryList( "TQWidget" );
@@ -578,8 +578,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
@@ -596,11 +596,11 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
// 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
// (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( (WFlags)(WType_Dialog | WShowModal) ) )
return false;
TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
@@ -612,8 +612,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
@@ -629,14 +629,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) == TQT_BASE_OBJECT(this) )
iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
- else if ( obj == m_trackChanges )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(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() );
}
}
diff --git a/kmdi/kmdichildview.h b/kmdi/kmdichildview.h
index 75b05bb74..e02325e79 100644
--- a/kmdi/kmdichildview.h
+++ b/kmdi/kmdichildview.h
@@ -358,7 +358,7 @@ public:
*/
inline void updateTimeStamp()
{
- m_time.setDate( TQDate::tqcurrentDate() );
+ m_time.setDate( TQDate::currentDate() );
m_time.setTime( TQTime::currentTime() );
}
diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp
index 8304aa168..f8169a8b9 100644
--- a/kmdi/kmdidockcontainer.cpp
+++ b/kmdi/kmdidockcontainer.cpp
@@ -138,7 +138,7 @@ KMdiDockContainer::~KMdiDockContainer()
{
it = m_map.begin();
KDockWidget *w = it.key();
- if ( m_overlapButtons.contains( w ) )
+ if ( m_overlapButtons.tqcontains( w ) )
{
( static_cast<KDockWidgetHeader*>( w->getHeader()->tqqt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] );
m_overlapButtons.remove( w );
@@ -170,9 +170,9 @@ void KMdiDockContainer::init()
if (!overlap) deactivateOverlapMode();
// try to restore splitter size
- if ( parentDockWidget() && parentDockWidget()->parent() )
+ if ( parentDockWidget() && parentDockWidget()->tqparent() )
{
- KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->tqqt_cast( "KDockSplitter" ) );
+ KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->tqqt_cast( "KDockSplitter" ) );
if ( sp )
sp->setSeparatorPosX( m_separatorPos );
}
@@ -188,7 +188,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const
kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl;
KDockWidget* w = dwdg;
int tab;
- bool alreadyThere = m_map.contains( w );
+ bool alreadyThere = m_map.tqcontains( w );
if ( alreadyThere )
{
@@ -280,7 +280,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
}
m_dockManager = w->dockManager();
- m_dragPanel = hdr->dragPanel();
+ m_dragPanel = TQT_TQOBJECT(hdr->dragPanel());
if ( m_dragPanel )
m_movingState = WaitingForMoveStart;
@@ -303,7 +303,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() );
if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
{
- m_dockManager->eventFilter( m_dragPanel, m_startEvent );
+ m_dockManager->eventFilter( m_dragPanel, TQT_TQEVENT(m_startEvent) );
m_dockManager->eventFilter( m_dragPanel, event );
m_movingState = Moving;
}
@@ -322,7 +322,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
void KMdiDockContainer::showWidget( KDockWidget *w )
{
- if ( !m_map.contains( w ) )
+ if ( !m_map.tqcontains( w ) )
return ;
int id = m_map[ w ];
@@ -369,7 +369,7 @@ void KMdiDockContainer::hideIfNeeded()
void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
{
KDockWidget * w = dwdg;
- if ( !m_map.contains( w ) )
+ if ( !m_map.tqcontains( w ) )
return; //we don't have this widget in our container
kdDebug( 760 ) << k_funcinfo << endl;
@@ -385,7 +385,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
m_ws->removeWidget( w );
m_map.remove( w );
m_revMap.remove( id );
- if ( m_overlapButtons.contains( w ) )
+ if ( m_overlapButtons.tqcontains( w ) )
{
( static_cast<KDockWidgetHeader*>( w->getHeader() ->tqqt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] );
m_overlapButtons.remove( w );
@@ -401,7 +401,7 @@ void KMdiDockContainer::undockWidget( KDockWidget *dwdg )
{
KDockWidget * w = dwdg;
- if ( !m_map.contains( w ) )
+ if ( !m_map.tqcontains( w ) )
return ;
int id = m_map[ w ];
@@ -465,9 +465,9 @@ void KMdiDockContainer::tabClicked( int t )
{
kdDebug( 760 ) << k_funcinfo << "Tab " << t << " was just deactiviated" << endl;
// try save splitter position
- if ( parentDockWidget() && parentDockWidget()->parent() )
+ if ( parentDockWidget() && parentDockWidget()->tqparent() )
{
- KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->parent()->tqqt_cast( "KDockSplitter" ) );
+ KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->tqqt_cast( "KDockSplitter" ) );
if ( sp )
m_separatorPos = sp->separatorPos();
}
@@ -517,7 +517,7 @@ void KMdiDockContainer::save( TQDomElement& dockEl )
TQDomDocument doc = dockEl.ownerDocument();
TQDomElement el;
el = doc.createElement( "name" );
- el.appendChild( doc.createTextNode( TQString( "%1" ).arg( parent() ->name() ) ) );
+ el.appendChild( doc.createTextNode( TQString( "%1" ).arg( tqparent() ->name() ) ) );
dockEl.appendChild( el );
el = doc.createElement( "overlapMode" );
el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) );
@@ -627,8 +627,8 @@ void KMdiDockContainer::load( TQDomElement& dockEl )
void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
{
TQString grp = cfg->group();
- cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
- cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
+ cfg->deleteGroup( group_or_prefix + TQString( "::%1" ).arg( tqparent() ->name() ) );
+ cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( tqparent() ->name() ) );
if ( isOverlapMode() )
cfg->writeEntry( "overlapMode", "true" );
@@ -636,10 +636,10 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
cfg->writeEntry( "overlapMode", "false" );
// try to save the splitter position
- if ( parentDockWidget() && parentDockWidget() ->parent() )
+ if ( parentDockWidget() && parentDockWidget() ->tqparent() )
{
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() ->
- parent() ->tqqt_cast( "KDockSplitter" ) );
+ tqparent() ->tqqt_cast( "KDockSplitter" ) );
if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
@@ -675,7 +675,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix )
{
TQString grp = cfg->group();
- cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
+ cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( tqparent() ->name() ) );
if ( cfg->readEntry( "overlapMode" ) != "false" )
activateOverlapMode( m_horizontal?m_tb->height():m_tb->width() );
@@ -818,7 +818,7 @@ void KMdiDockContainer::prevToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
- int pos = tabs->findRef( m_tb->tab( oldtab ) );
+ int pos = tabs->tqfindRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
return ;
@@ -839,7 +839,7 @@ void KMdiDockContainer::nextToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
- int pos = tabs->findRef( m_tb->tab( oldtab ) );
+ int pos = tabs->tqfindRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
return ;
diff --git a/kmdi/kmdifocuslist.cpp b/kmdi/kmdifocuslist.cpp
index fe907aab8..eeb0810d9 100644
--- a/kmdi/kmdifocuslist.cpp
+++ b/kmdi/kmdifocuslist.cpp
@@ -31,7 +31,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
{
//this method should never be called twice on the same hierarchy
m_list.insert( w, w->focusPolicy() );
- w->setFocusPolicy( TQWidget::ClickFocus );
+ w->setFocusPolicy( TQ_ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl;
connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
TQObjectList *l = w->queryList( "TQWidget" );
@@ -41,7 +41,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
{
TQWidget * wid = ( TQWidget* ) obj;
m_list.insert( wid, wid->focusPolicy() );
- wid->setFocusPolicy( TQWidget::ClickFocus );
+ wid->setFocusPolicy( TQ_ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl;
connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
++it;
@@ -51,7 +51,7 @@ void KMdiFocusList::addWidgetTree( TQWidget* w )
void KMdiFocusList::restore()
{
- for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
+ for ( TQMap<TQWidget*, TQ_FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
{
it.key() ->setFocusPolicy( it.data() );
}
diff --git a/kmdi/kmdifocuslist.h b/kmdi/kmdifocuslist.h
index 37c98e8db..aafb70953 100644
--- a/kmdi/kmdifocuslist.h
+++ b/kmdi/kmdifocuslist.h
@@ -34,7 +34,7 @@ public:
protected slots:
void objectHasBeenDestroyed( TQObject* );
private:
- TQMap<TQWidget*, TQWidget::FocusPolicy> m_list;
+ TQMap<TQWidget*, TQ_FocusPolicy> m_list;
};
diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp
index c94f2488f..3eb559496 100644
--- a/kmdi/kmdiguiclient.cpp
+++ b/kmdi/kmdiguiclient.cpp
@@ -84,7 +84,7 @@ void ToggleToolViewAction::anDWChanged()
setChecked( true );
else if ( isChecked() && ( m_dw->parentDockTabGroup() &&
( ( static_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
- parent() ->tqqt_cast( "KDockWidget" ) ) ) ->mayBeShow() ) ) )
+ tqparent() ->tqqt_cast( "KDockWidget" ) ) ) ->mayBeShow() ) ) )
setChecked( false );
}
@@ -161,9 +161,9 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c
m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, TQT_SIGNAL( toggleBottom() ),
actionCollection(), "kmdi_activate_bottom" ) );
m_gotoToolDockMenu->insert( new KActionSeparator( actionCollection(), "kmdi_goto_menu_separator" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, TQT_SLOT( prevToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( prevToolViewInDock() ),
actionCollection(), "kmdi_prev_toolview" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, TQT_SLOT( nextToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, TQT_TQOBJECT(m_mdiMainFrm), TQT_SLOT( nextToolViewInDock() ),
actionCollection(), "kmdi_next_toolview" ) );
actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -262,7 +262,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
m_mdiMainFrm, actionCollection(), aname.latin1() );
#if KDE_IS_VERSION(3,2,90)
- ( ( ToggleToolViewAction* ) a ) ->setCheckedState( i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() ) );
+ ( ( ToggleToolViewAction* ) a ) ->setCheckedState( TQString(i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() )) );
#endif
connect( a, TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( actionDeleted( TQObject* ) ) );
diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp
index 942919230..7afc6c32a 100644
--- a/kmdi/kmdimainfrm.cpp
+++ b/kmdi/kmdimainfrm.cpp
@@ -184,7 +184,7 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* tqparentWidget, const char* name, KMdi::MdiM
m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
// This seems to be needed (re-check it after Qt2.0 comed out)
- setFocusPolicy( ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
// create the central widget
createMdiManager();
@@ -218,7 +218,7 @@ KMdiMainFrm::KMdiMainFrm( TQWidget* tqparentWidget, const char* name, KMdi::MdiM
m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" );
d->closeWindowAction = new KAction(i18n("&Close"), KStdAccel::close(),
- this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
+ TQT_TQOBJECT(this), TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
// the MDI view taskbar
createTaskBar();
@@ -553,7 +553,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd )
{
- if ( m_pToolViews->contains( pWnd ) )
+ if ( m_pToolViews->tqcontains( pWnd ) )
deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
}
@@ -590,7 +590,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, (WFlags)(WType_TopLevel | WType_Dialog), r.topLeft(), true ); //pToolView->isVisible());
}
else //add and dock the toolview as a dockwidget view
mtva->place( pos, pTargetWnd, percent );
@@ -959,13 +959,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;
@@ -1211,9 +1211,9 @@ bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e )
* The WIN button in KDE is the meta button in Qt
**/
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 );
@@ -1291,7 +1291,7 @@ void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetLis
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() )
diff --git a/kmdi/kmdimainfrm.h b/kmdi/kmdimainfrm.h
index 772ecc779..e38797d75 100644
--- a/kmdi/kmdimainfrm.h
+++ b/kmdi/kmdimainfrm.h
@@ -296,7 +296,7 @@ private:
// methods
public:
- KMdiMainFrm( TQWidget* tqparentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
+ KMdiMainFrm( TQWidget* tqparentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = (WFlags)(WType_TopLevel | WDestructiveClose) );
virtual ~KMdiMainFrm();
/**
diff --git a/kmdi/kmditaskbar.cpp b/kmdi/kmditaskbar.cpp
index ae8ae0a09..9a412acb5 100644
--- a/kmdi/kmditaskbar.cpp
+++ b/kmdi/kmditaskbar.cpp
@@ -26,6 +26,10 @@
//
//----------------------------------------------------------------------------
+#ifdef None
+#undef None
+#endif
+
#include "kmditaskbar.h"
#include "kmditaskbar.moc"
@@ -63,7 +67,7 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_
m_pWindow = win_ptr;
TQToolTip::add
( this, win_ptr->caption() );
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
}
KMdiTaskBarButton::~KMdiTaskBarButton()
@@ -73,10 +77,10 @@ void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e )
{
switch ( e->button() )
{
- case TQMouseEvent::LeftButton:
+ case Qt::LeftButton:
emit leftMouseButtonClicked( m_pWindow );
break;
- case TQMouseEvent::RightButton:
+ case Qt::RightButton:
emit rightMouseButtonClicked( m_pWindow );
break;
default:
@@ -152,7 +156,7 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock )
m_pButtonList->setAutoDelete( true );
//QT30 setFontPropagation(TQWidget::SameFont);
setMinimumWidth( 1 );
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
parent->moveToolBar( this, dock ); //XXX obsolete!
}
@@ -337,8 +341,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
// if there's enough space, use actual width
int buttonCount = m_pButtonList->count();
int tbHandlePixel;
- tbHandlePixel = style().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this );
- int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5;
+ tbHandlePixel = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this );
+ int buttonAreaWidth = taskBarWidth - tbHandlePixel - tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5;
if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < tqparentWidget() ->width() ) )
{
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
diff --git a/kmdi/kmditoolviewaccessor.cpp b/kmdi/kmditoolviewaccessor.cpp
index 3de517d6c..954ca3e4a 100644
--- a/kmdi/kmditoolviewaccessor.cpp
+++ b/kmdi/kmditoolviewaccessor.cpp
@@ -186,7 +186,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, TQWidget* pTarg
if ( pos == KDockWidget::DockNone )
{
d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
- d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint( 0, 0 ), true ); //pToolView->isVisible());
+ d->widgetContainer->reparent( mdiMainFrm, (WFlags)(WType_TopLevel | WType_Dialog), TQPoint( 0, 0 ), true ); //pToolView->isVisible());
}
else
{ // add (and dock) the toolview as DockWidget view