summaryrefslogtreecommitdiffstats
path: root/ksirc/displayMgrMDI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/displayMgrMDI.cpp')
-rw-r--r--ksirc/displayMgrMDI.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/ksirc/displayMgrMDI.cpp b/ksirc/displayMgrMDI.cpp
index ae1e5b39..f8286ed6 100644
--- a/ksirc/displayMgrMDI.cpp
+++ b/ksirc/displayMgrMDI.cpp
@@ -4,7 +4,7 @@
#include <unistd.h>
#include <assert.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kwin.h>
#include <kaccel.h>
#include <kaction.h>
@@ -31,24 +31,24 @@ DisplayMgrMDI::~DisplayMgrMDI()
#define DMM_MOVEL_ID 51
#define DMM_MOVER_ID 52
-void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
+void DisplayMgrMDI::newTopLevel( TQWidget *w, bool show )
{
topLevel()->addWidget( w, show );
if(w->inherits("KSircTopLevel")){
KSircTopLevel *t = static_cast<KSircTopLevel *>(w);
- connect(m_topLevel->tabWidget(), SIGNAL(currentChanged(QWidget *)), t, SLOT(focusChange(QWidget *)));
+ connect(m_topLevel->tabWidget(), TQT_SIGNAL(currentChanged(TQWidget *)), t, TQT_SLOT(focusChange(TQWidget *)));
}
if(w->inherits("KMainWindow")){
KMainWindow *t = static_cast<KMainWindow *>(w);
- QMenuBar *cmenu = t->menuBar();
+ TQMenuBar *cmenu = t->menuBar();
if(cmenu){
- QPopupMenu *m = new QPopupMenu(t, QCString(t->name()) + "_popup_MDI");
+ TQPopupMenu *m = new TQPopupMenu(t, TQCString(t->name()) + "_popup_MDI");
m->setCheckable(true);
- m->insertItem(i18n("Detach Window"), this, SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0);
+ m->insertItem(i18n("Detach Window"), this, TQT_SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0);
m->insertSeparator(0);
- m->insertItem(i18n("Move Tab Left"), this, SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0);
- m->insertItem(i18n("Move Tab Right"), this, SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0);
+ m->insertItem(i18n("Move Tab Left"), this, TQT_SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0);
+ m->insertItem(i18n("Move Tab Right"), this, TQT_SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0);
/*
* By using an posisiton of 4 this works for KSircTopLevel
* and DCCTopLevel but will cause problems when we have
@@ -58,23 +58,23 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
cmenu->insertItem(i18n("&Window"), m, DMM_MDI_ID, 4);
cmenu->setAccel(Key_M, DMM_MDI_ID);
- QPopupMenu *sm = new QPopupMenu(t, "settings" );
+ TQPopupMenu *sm = new TQPopupMenu(t, "settings" );
KToggleAction *showmenu = KStdAction::showMenubar( 0, 0, t->actionCollection() );
showmenu->plug( sm );
- connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) );
+ connect( showmenu, TQT_SIGNAL(toggled(bool)), cmenu, TQT_SLOT(setShown(bool)) );
KSelectAction *selectTabbar = new KSelectAction(i18n("&Tab Bar"), 0, this, "tabbar" );
- QStringList tabbaritems;
+ TQStringList tabbaritems;
tabbaritems << i18n("&Top") << i18n("&Bottom");
selectTabbar->setItems(tabbaritems);
selectTabbar->setCurrentItem(1);
selectTabbar->plug( sm );
- connect( selectTabbar, SIGNAL(activated(int)), this, SLOT(setTabPosition(int)) );
+ connect( selectTabbar, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTabPosition(int)) );
KToggleAction *showfull = KStdAction::fullScreen( 0, 0, t->actionCollection(), t );
showfull->plug( sm );
- connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) );
+ connect( showfull, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFullScreen(bool)) );
cmenu->insertItem( i18n("&Settings"), sm, -1, 5 );
}
@@ -82,7 +82,7 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show )
topLevel()->show();
}
-void DisplayMgrMDI::removeTopLevel(QWidget *w )
+void DisplayMgrMDI::removeTopLevel(TQWidget *w )
{
if ( !m_topLevel )
return;
@@ -106,7 +106,7 @@ void DisplayMgrMDI::removeTopLevel(QWidget *w )
}
}
-void DisplayMgrMDI::show(QWidget *w)
+void DisplayMgrMDI::show(TQWidget *w)
{
if ( !m_topLevel )
return;
@@ -115,7 +115,7 @@ void DisplayMgrMDI::show(QWidget *w)
m_topLevel->show();
}
-void DisplayMgrMDI::hide(QWidget *w)
+void DisplayMgrMDI::hide(TQWidget *w)
{
if ( !m_topLevel )
return;
@@ -126,7 +126,7 @@ void DisplayMgrMDI::hide(QWidget *w)
}
}
-void DisplayMgrMDI::raise(QWidget *w, bool takefocus)
+void DisplayMgrMDI::raise(TQWidget *w, bool takefocus)
{
assert( m_topLevel );
if(takefocus){
@@ -145,13 +145,13 @@ void DisplayMgrMDI::raise(QWidget *w, bool takefocus)
}
-void DisplayMgrMDI::setCaption(QWidget *w, const QString& cap)
+void DisplayMgrMDI::setCaption(TQWidget *w, const TQString& cap)
{
assert( m_topLevel );
w->setCaption(cap);
- QString esc = cap;
+ TQString esc = cap;
esc.replace("&", "&&");
kdDebug(5008) << "Set caption: " << esc << endl;
@@ -178,8 +178,8 @@ void DisplayMgrMDI::reparentReq()
{
kdDebug(5008) << "got reparent" << endl;
- QWidget *o = kapp->focusWidget();
- QWidget *s;
+ TQWidget *o = kapp->focusWidget();
+ TQWidget *s;
if(o == NULL){
kdDebug(5008) << "Kapp says no widget has focus!" << endl;
@@ -192,7 +192,7 @@ void DisplayMgrMDI::reparentReq()
}
else {
- kdDebug(5008) << "QWidget is: " << o->className() << " name: " << o->name("none give") << endl;
+ kdDebug(5008) << "TQWidget is: " << o->className() << " name: " << o->name("none give") << endl;
s = o;
@@ -206,24 +206,24 @@ void DisplayMgrMDI::reparentReq()
}
-// QWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach
+// TQWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach
if(s){
KMainWindow *kst = static_cast<KMainWindow *>(s);
kdDebug(5008) << "Top is: " << kst->name("none give") <<endl;
- QMenuData *tmenu = kst->menuBar();
+ TQMenuData *tmenu = kst->menuBar();
if(tmenu){
- QMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
+ TQMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
if(menui){
- QMenuData *cmenu = menui->popup();
+ TQMenuData *cmenu = menui->popup();
if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){
- kst->reparent( topLevel()->tabWidget(), 0, QPoint( 0, 0 ), true );
+ kst->reparent( topLevel()->tabWidget(), 0, TQPoint( 0, 0 ), true );
show(kst);
cmenu->setItemChecked(DMM_DEATCH_ID, false);
}
else {
hide(kst);
- kst->reparent( 0, QPoint(0,0), true );
+ kst->reparent( 0, TQPoint(0,0), true );
cmenu->setItemChecked(DMM_DEATCH_ID, true);
}
}
@@ -239,8 +239,8 @@ MDITopLevel *DisplayMgrMDI::topLevel()
m_topLevel->show();
KAccel *a = new KAccel( m_topLevel );
- a->insert( "cycle left", i18n("Cycle left"), QString::null, ALT+Key_Left, ALT+Key_Left, this, SLOT(slotCycleTabsLeft()) );
- a->insert( "cycle right", i18n("Cycle right"), QString::null, ALT+Key_Right, ALT+Key_Right, this, SLOT(slotCycleTabsRight()) );
+ a->insert( "cycle left", i18n("Cycle left"), TQString::null, ALT+Key_Left, ALT+Key_Left, this, TQT_SLOT(slotCycleTabsLeft()) );
+ a->insert( "cycle right", i18n("Cycle right"), TQString::null, ALT+Key_Right, ALT+Key_Right, this, TQT_SLOT(slotCycleTabsRight()) );
}
return m_topLevel;
@@ -250,10 +250,10 @@ void DisplayMgrMDI::setTabPosition( int idx ) {
switch ( idx ) {
case 0:
- m_topLevel->tabWidget()->setTabPosition(QTabWidget::Top);
+ m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Top);
break;
case 1:
- m_topLevel->tabWidget()->setTabPosition(QTabWidget::Bottom);
+ m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Bottom);
break;
}
}
@@ -282,7 +282,7 @@ void DisplayMgrMDI::moveWindow(int step)
return;
}
- QWidget *w = m_topLevel->tabWidget()->currentPage();
+ TQWidget *w = m_topLevel->tabWidget()->currentPage();
if(w != 0x0){
int index = m_topLevel->tabWidget()->currentPageIndex();
index += step;
@@ -294,7 +294,7 @@ void DisplayMgrMDI::moveWindow(int step)
m_topLevel->setUpdatesEnabled(false);
m_topLevel->hideWidget(w);
int space = w->caption().find(" ");
- QString esc = space < 1 ? w->caption():w->caption().left(space);
+ TQString esc = space < 1 ? w->caption():w->caption().left(space);
esc.replace("&", "&&");
kdDebug(5008) << "Insert tab: " << esc << endl;
m_topLevel->tabWidget()->insertTab( w, esc, index );