summaryrefslogtreecommitdiffstats
path: root/kmdi
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kmdi
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmdi')
-rw-r--r--kmdi/kmdi/dockcontainer.cpp114
-rw-r--r--kmdi/kmdi/dockcontainer.h44
-rw-r--r--kmdi/kmdi/guiclient.cpp50
-rw-r--r--kmdi/kmdi/guiclient.h18
-rw-r--r--kmdi/kmdi/mainwindow.cpp94
-rw-r--r--kmdi/kmdi/mainwindow.h20
-rw-r--r--kmdi/kmdi/tabwidget.cpp68
-rw-r--r--kmdi/kmdi/tabwidget.h24
-rw-r--r--kmdi/kmdi/toolviewaccessor.cpp42
-rw-r--r--kmdi/kmdi/toolviewaccessor.h24
-rw-r--r--kmdi/kmdi/toolviewaccessor_p.h8
-rw-r--r--kmdi/kmdichildarea.cpp84
-rw-r--r--kmdi/kmdichildarea.h42
-rw-r--r--kmdi/kmdichildfrm.cpp384
-rw-r--r--kmdi/kmdichildfrm.h108
-rw-r--r--kmdi/kmdichildfrmcaption.cpp54
-rw-r--r--kmdi/kmdichildfrmcaption.h20
-rw-r--r--kmdi/kmdichildview.cpp196
-rw-r--r--kmdi/kmdichildview.h114
-rw-r--r--kmdi/kmdidefines.h6
-rw-r--r--kmdi/kmdidockcontainer.cpp154
-rw-r--r--kmdi/kmdidockcontainer.h50
-rw-r--r--kmdi/kmdidocumentviewtabwidget.cpp40
-rw-r--r--kmdi/kmdidocumentviewtabwidget.h22
-rw-r--r--kmdi/kmdifocuslist.cpp28
-rw-r--r--kmdi/kmdifocuslist.h14
-rw-r--r--kmdi/kmdiguiclient.cpp62
-rw-r--r--kmdi/kmdiguiclient.h18
-rw-r--r--kmdi/kmdilistiterator.h6
-rw-r--r--kmdi/kmdimainfrm.cpp594
-rw-r--r--kmdi/kmdimainfrm.h114
-rw-r--r--kmdi/kmditaskbar.cpp68
-rw-r--r--kmdi/kmditaskbar.h34
-rw-r--r--kmdi/kmditoolviewaccessor.cpp40
-rw-r--r--kmdi/kmditoolviewaccessor.h24
-rw-r--r--kmdi/kmditoolviewaccessor_p.h10
-rw-r--r--kmdi/test/hello.cpp26
-rw-r--r--kmdi/test/hello.h10
-rw-r--r--kmdi/test/main.cpp14
-rw-r--r--kmdi/test/mainwidget.cpp54
-rw-r--r--kmdi/test/mainwidget.h18
41 files changed, 1457 insertions, 1457 deletions
diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp
index f1012d3dd..3455fe1e8 100644
--- a/kmdi/kmdi/dockcontainer.cpp
+++ b/kmdi/kmdi/dockcontainer.cpp
@@ -24,10 +24,10 @@
#include "kdockwidget_private.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kmultitabbar.h>
#include <kglobalsettings.h>
@@ -52,8 +52,8 @@ namespace KMDI
{
-DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int flags)
-: QWidget(parent),KDockContainer()
+DockContainer::DockContainer(TQWidget *parent, TQWidget *win, int position, int flags)
+: TQWidget(parent),KDockContainer()
{
m_tabSwitching = false;
m_block=false;
@@ -68,13 +68,13 @@ DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int fl
m_startEvent=0;
kdDebug(760)<<"DockContainer created"<<endl;
- QBoxLayout *l;
+ TQBoxLayout *l;
m_vertical=!((position==KDockWidget::DockTop) || (position==KDockWidget::DockBottom));
if (!m_vertical)
- l=new QVBoxLayout(this);
+ l=new TQVBoxLayout(this);
else
- l=new QHBoxLayout(this);
+ l=new TQHBoxLayout(this);
l->setAutoAdd(false);
@@ -88,9 +88,9 @@ DockContainer::DockContainer(QWidget *parent, QWidget *win, int position, int fl
(position==KDockWidget::DockBottom)?KMultiTabBar::Bottom:
(position==KDockWidget::DockTop)?KMultiTabBar::Top:KMultiTabBar::Right);
- m_ws=new QWidgetStack(this);
+ m_ws=new TQWidgetStack(this);
- m_ws->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
+ m_ws->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding));
if ( (position==KDockWidget::DockLeft) || (position==KDockWidget::DockTop))
{
@@ -114,7 +114,7 @@ void DockContainer::setStyle(int style) {
DockContainer::~DockContainer()
{
- QMap<KDockWidget*,int>::iterator it;
+ TQMap<KDockWidget*,int>::iterator it;
while (m_map.count()) {
it = m_map.begin();
KDockWidget *w=it.key();
@@ -160,7 +160,7 @@ KDockWidget *DockContainer::parentDockWidget()
return ((KDockWidget*)parent());
}
-void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QString &text, int &)
+void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int &)
{
KDockWidget* w = (KDockWidget*) dwdg;
int tab;
@@ -193,7 +193,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
- QToolTip::add( btn, i18n("Switch between overlap and side by side mode", "Overlap") );
+ TQToolTip::add( btn, i18n("Switch between overlap and side by side mode", "Overlap") );
btn->setToggleButton( true );
btn->setPixmap( const_cast< const char** >(kmdi_not_close_xpm) );
@@ -201,7 +201,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
m_overlapButtons.insert(w,btn);
btn->setOn(!isOverlapMode());
- connect(btn,SIGNAL(clicked()),this,SLOT(changeOverlapMode()));
+ connect(btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(changeOverlapMode()));
}
m_tb->appendTab(pixmap.isNull()?SmallIcon("misc"):pixmap,tab,w->tabPageLabel());
@@ -210,7 +210,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
//FB m_tb->setTab(tab,true);
- connect(m_tb->tab(tab),SIGNAL(clicked(int)),this,SLOT(tabClicked(int)));
+ connect(m_tb->tab(tab),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int)));
kdDebug(760)<<"DockContainer::insertWidget()"<<endl;
@@ -232,11 +232,11 @@ void DockContainer::insertWidget (KDockWidget *dwdg, QPixmap pixmap, const QStri
}
-bool DockContainer::eventFilter( QObject *obj, QEvent *event )
+bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
{
if (obj==m_tb) {
- if ( (event->type()==QEvent::Resize) && (m_ws->isHidden()) ) {
- QSize size=((QResizeEvent*)event)->size();
+ if ( (event->type()==TQEvent::Resize) && (m_ws->isHidden()) ) {
+ TQSize size=((TQResizeEvent*)event)->size();
if (m_vertical)
parentDockWidget()->setForcedFixedWidth(size.width());
else
@@ -245,7 +245,7 @@ bool DockContainer::eventFilter( QObject *obj, QEvent *event )
}
else
switch ( event->type() ){
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
KDockWidget * w=m_revMap[dynamic_cast<KMultiTabBarTab*>(obj)->id()];
if (!w) {
@@ -266,20 +266,20 @@ bool DockContainer::eventFilter( QObject *obj, QEvent *event )
m_dragPanel=hdr->dragPanel();
if (m_dragPanel) m_movingState=WaitingForMoveStart;
delete m_startEvent;
- m_startEvent=new QMouseEvent(* ((QMouseEvent*)event));
+ m_startEvent=new TQMouseEvent(* ((TQMouseEvent*)event));
}
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if (m_movingState==Moving) {
m_movingState=NotMoving;
- QApplication::postEvent(m_dragPanel,new QMouseEvent(* ( (QMouseEvent*)event)));
+ TQApplication::postEvent(m_dragPanel,new TQMouseEvent(* ( (TQMouseEvent*)event)));
delete m_startEvent;
m_startEvent=0;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if (m_movingState==WaitingForMoveStart) {
- QPoint p( ((QMouseEvent*)event)->pos() - m_startEvent->pos() );
+ 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,event);
@@ -329,7 +329,7 @@ void DockContainer::changeOverlapMode()
deactivateOverlapMode();
}
- for (QMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
+ for (TQMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
it!=m_overlapButtons.end();++it)
it.data()->setOn(!isOverlapMode());
}
@@ -449,12 +449,12 @@ void DockContainer::tabClicked(int t)
m_tabSwitching=false;
}
-void DockContainer::setToolTip (KDockWidget *, QString &s)
+void DockContainer::setToolTip (KDockWidget *, TQString &s)
{
kdDebug(760)<<"***********************************Setting tooltip for a widget: "<<s<<endl;
}
-void DockContainer::setPixmap(KDockWidget* widget ,const QPixmap& pixmap)
+void DockContainer::setPixmap(KDockWidget* widget ,const TQPixmap& pixmap)
{
int id=m_ws->id(widget);
if (id==-1) return;
@@ -462,12 +462,12 @@ void DockContainer::setPixmap(KDockWidget* widget ,const QPixmap& pixmap)
tab->setIcon(pixmap.isNull()?SmallIcon("misc"):pixmap);
}
-void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
+void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
{
// group name
- QString grp=cfg->group();
- cfg->deleteGroup(group_or_prefix+QString("::%1").arg(parent()->name()));
- cfg->setGroup(group_or_prefix+QString("::%1").arg(parent()->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()));
// save overlap mode
cfg->writeEntry("overlapMode",isOverlapMode());
@@ -481,21 +481,21 @@ void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it(*tl);
- QStringList::Iterator it2=itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it(*tl);
+ TQStringList::Iterator it2=itemNames.begin();
int i=0;
for (;it.current()!=0;++it,++it2)
{
-// cfg->writeEntry(QString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
- cfg->writeEntry(QString("widget%1").arg(i),(*it2));
- QString s=tabCaptions[*it2];
+// cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
+ cfg->writeEntry(TQString("widget%1").arg(i),(*it2));
+ TQString s=tabCaptions[*it2];
if (!s.isEmpty()) {
- cfg->writeEntry(QString("widget%1-tabCaption").arg(i),s);
+ cfg->writeEntry(TQString("widget%1-tabCaption").arg(i),s);
}
s=tabTooltips[*it2];
if (!s.isEmpty()) {
- cfg->writeEntry(QString("widget%1-tabTooltip").arg(i),s);
+ cfg->writeEntry(TQString("widget%1-tabTooltip").arg(i),s);
}
// kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl;
if (m_tb->isTabRaised(it.current()->id()))
@@ -506,10 +506,10 @@ void DockContainer::save(KConfig* cfg,const QString& group_or_prefix)
cfg->setGroup(grp);
}
-void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
+void DockContainer::load(KConfig* cfg,const TQString& group_or_prefix)
{
- QString grp=cfg->group();
- cfg->setGroup(group_or_prefix+QString("::%1").arg(parent()->name()));
+ TQString grp=cfg->group();
+ cfg->setGroup(group_or_prefix+TQString("::%1").arg(parent()->name()));
if (cfg->readBoolEntry("overlapMode"))
activateOverlapMode( m_vertical?m_tb->width():m_tb->height() );
@@ -519,20 +519,20 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
m_separatorPos = cfg->readNumEntry( "separatorPosition", 18000 ); // = 18%
int i=0;
- QString raise;
+ TQString raise;
while (true)
{
- QString dwn=cfg->readEntry(QString("widget%1").arg(i));
+ TQString dwn=cfg->readEntry(TQString("widget%1").arg(i));
if (dwn.isEmpty()) break;
kdDebug(760)<<"*************************************************************Configuring dockwidget :"<<dwn<<endl;
KDockWidget *dw=((KDockWidget*)parent())->dockManager()->getDockWidgetFromName(dwn);
if (dw)
{
- QString s=cfg->readEntry(QString("widget%1-tabCaption").arg(i));
+ TQString s=cfg->readEntry(TQString("widget%1-tabCaption").arg(i));
if (!s.isEmpty()) {
dw->setTabPageLabel(s);
}
- s=cfg->readEntry(QString("widget%1-tabTooltip").arg(i));
+ s=cfg->readEntry(TQString("widget%1-tabTooltip").arg(i));
if (!s.isEmpty()) {
dw->setToolTipString(s);
}
@@ -543,8 +543,8 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
}
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1(*tl);
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1(*tl);
m_ws->hide();
if (m_vertical)
parentDockWidget()->setForcedFixedWidth(m_tb->width());
@@ -557,13 +557,13 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
kapp->syncX();
m_delayedRaise=-1;
- for (QMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
+ for (TQMap<KDockWidget*,KDockButton_Private*>::iterator it=m_overlapButtons.begin();
it!=m_overlapButtons.end();++it)
it.data()->setOn(!isOverlapMode());
if (!raise.isEmpty())
{
- for (QMap<KDockWidget*,int>::iterator it=m_map.begin();it!=m_map.end();++it)
+ for (TQMap<KDockWidget*,int>::iterator it=m_map.begin();it!=m_map.end();++it)
{
if (it.key()->name()==raise)
{
@@ -575,14 +575,14 @@ void DockContainer::load(KConfig* cfg,const QString& group_or_prefix)
kapp->syncX();*/
m_delayedRaise=it.data();
- QTimer::singleShot(0,this,SLOT(delayedRaise()));
+ TQTimer::singleShot(0,this,TQT_SLOT(delayedRaise()));
kdDebug(760)<<"************** raising *******: "<<it.key()->name()<<endl;
break;
}
}
}
- if (m_delayedRaise==-1) QTimer::singleShot(0,this,SLOT(init()));
+ if (m_delayedRaise==-1) TQTimer::singleShot(0,this,TQT_SLOT(init()));
cfg->setGroup(grp);
}
@@ -597,8 +597,8 @@ void DockContainer::collapseOverlapped()
{
if (m_tabSwitching) return;
if (isOverlapMode()){
- QPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it(*tl);
+ TQPtrList<KMultiTabBarTab>* tl=m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it(*tl);
for(;it.current();++it) {
if (it.current()->isOn()) {
kdDebug(760)<<"Lowering TAB"<<endl;
@@ -630,7 +630,7 @@ void DockContainer::toggle() {
}
void DockContainer::prevToolView() {
- QPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
int pos=tabs->findRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos--;
@@ -642,7 +642,7 @@ void DockContainer::prevToolView() {
}
void DockContainer::nextToolView() {
- QPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs();
int pos=tabs->findRef(m_tb->tab(oldtab));
if (pos==-1) return;
pos++;
diff --git a/kmdi/kmdi/dockcontainer.h b/kmdi/kmdi/dockcontainer.h
index d301d3c53..74b93968b 100644
--- a/kmdi/kmdi/dockcontainer.h
+++ b/kmdi/kmdi/dockcontainer.h
@@ -20,14 +20,14 @@
#ifndef _KMDI_DOCK_CONTAINER_
#define _KMDI_DOCK_CONTAINER_
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdockwidget.h>
-#include <qmap.h>
+#include <tqmap.h>
# include <kdockwidget_p.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QWidgetStack;
class KMultiTabBar;
@@ -36,12 +36,12 @@ class KDockButton_Private;
namespace KMDI
{
-class DockContainer: public QWidget, public KDockContainer
+class DockContainer: public TQWidget, public KDockContainer
{
Q_OBJECT
public:
- DockContainer(QWidget *parent, QWidget *win, int position, int flags);
+ DockContainer(TQWidget *parent, TQWidget *win, int position, int flags);
virtual ~DockContainer();
/** Get the KDockWidget that is our parent */
@@ -52,7 +52,7 @@ class DockContainer: public QWidget, public KDockContainer
* \param w the KDockWidget object to add
* \todo Remove the extra parameters that we don't use?
*/
- virtual void insertWidget (KDockWidget *w, QPixmap, const QString &, int &);
+ virtual void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &);
/**
* Show a KDockWidget in our DockContainer
@@ -66,14 +66,14 @@ class DockContainer: public QWidget, public KDockContainer
* \todo Actually implement it? Right now, it looks just it
* does exactly nothing
*/
- virtual void setToolTip (KDockWidget *, QString &);
+ virtual void setToolTip (KDockWidget *, TQString &);
/**
* Set a pixmap for one of our dock widgets
* \param widget the KDockWidget to set the pixmap for
* \param pixmap the pixmap you want to give the widget
*/
- virtual void setPixmap(KDockWidget* widget, const QPixmap& pixmap);
+ virtual void setPixmap(KDockWidget* widget, const TQPixmap& pixmap);
/**
* Undock a widget from the container. This function is called
@@ -91,12 +91,12 @@ class DockContainer: public QWidget, public KDockContainer
void hideIfNeeded();
- virtual void save(KConfig *,const QString& group_or_prefix);
- virtual void load(KConfig *,const QString& group_or_prefix);
+ virtual void save(KConfig *,const TQString& group_or_prefix);
+ virtual void load(KConfig *,const TQString& group_or_prefix);
void setStyle(int);
protected:
- bool eventFilter(QObject*,QEvent*);
+ bool eventFilter(TQObject*,TQEvent*);
public slots:
void init();
@@ -109,28 +109,28 @@ class DockContainer: public QWidget, public KDockContainer
void delayedRaise();
void changeOverlapMode();
private:
- QWidget *m_mainWin;
- QWidgetStack *m_ws;
+ TQWidget *m_mainWin;
+ TQWidgetStack *m_ws;
KMultiTabBar *m_tb;
int mTabCnt;
int oldtab;
int m_previousTab;
int m_position;
int m_separatorPos;
- QMap<KDockWidget*,int> m_map;
- QMap<int,KDockWidget*> m_revMap;
- QMap<KDockWidget*,KDockButton_Private*> m_overlapButtons;
- QStringList itemNames;
- QMap<QString,QString> tabCaptions;
- QMap<QString,QString> tabTooltips;
+ TQMap<KDockWidget*,int> m_map;
+ TQMap<int,KDockWidget*> m_revMap;
+ TQMap<KDockWidget*,KDockButton_Private*> m_overlapButtons;
+ TQStringList itemNames;
+ TQMap<TQString,TQString> tabCaptions;
+ TQMap<TQString,TQString> tabTooltips;
int m_inserted;
int m_delayedRaise;
bool m_vertical;
bool m_block;
bool m_tabSwitching;
- QObject *m_dragPanel;
+ TQObject *m_dragPanel;
KDockManager *m_dockManager;
- QMouseEvent *m_startEvent;
+ TQMouseEvent *m_startEvent;
enum MovingState {NotMoving=0,WaitingForMoveStart,MovingInternal,Moving} m_movingState;
signals:
void activated(DockContainer*);
diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp
index 7e146b836..882916f30 100644
--- a/kmdi/kmdi/guiclient.cpp
+++ b/kmdi/kmdi/guiclient.cpp
@@ -21,13 +21,13 @@
#include "guiclient.h"
#include "guiclient.moc"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <ktoolbar.h>
#include <klocale.h>
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kdockwidget.h>
@@ -52,13 +52,13 @@ namespace KMDIPrivate
{
GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
- : QObject ( mdiMainFrm,name )
+ : TQObject ( mdiMainFrm,name )
, KXMLGUIClient ( mdiMainFrm )
{
m_mdiMainFrm=mdiMainFrm;
- connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( mdiMainFrm->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -68,7 +68,7 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
if ( domDocument().documentElement().isNull() )
{
- QString completeDescription = QString::fromLatin1( guiDescription ).arg( actionListName );
+ TQString completeDescription = TQString::fromLatin1( guiDescription ).arg( actionListName );
setXML( completeDescription, false /*merge*/ );
}
@@ -79,18 +79,18 @@ GUIClient::GUIClient (KMDI::MainWindow* mdiMainFrm,const char* name)
m_toolMenu=new KActionMenu(i18n("Tool &Views"),actionCollection(),"kmdi_toolview_menu");
m_gotoToolDockMenu=new KActionMenu(i18n("Tool &Docks"),actionCollection(),"kmdi_tooldock_menu");
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,SIGNAL(toggleTop()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Top Dock"),ALT+CTRL+SHIFT+Key_T,this,TQT_SIGNAL(toggleTop()),
actionCollection(),"kmdi_activate_top"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,SIGNAL(toggleLeft()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Left Dock"),ALT+CTRL+SHIFT+Key_L,this,TQT_SIGNAL(toggleLeft()),
actionCollection(),"kmdi_activate_left"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,SIGNAL(toggleRight()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Switch Right Dock"),ALT+CTRL+SHIFT+Key_R,this,TQT_SIGNAL(toggleRight()),
actionCollection(),"kmdi_activate_right"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Switch Bottom Dock"),ALT+CTRL+SHIFT+Key_B,this,SIGNAL(toggleBottom()),
+ 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,SLOT(prevToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Previous Tool View"),ALT+CTRL+Key_Left,m_mdiMainFrm,TQT_SLOT(prevToolViewInDock()),
actionCollection(),"kmdi_prev_toolview"));
- m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,m_mdiMainFrm,SLOT(nextToolViewInDock()),
+ m_gotoToolDockMenu->insert(new KAction(i18n("Next Tool View"),ALT+CTRL+Key_Right,m_mdiMainFrm,TQT_SLOT(nextToolViewInDock()),
actionCollection(),"kmdi_next_toolview"));
actionCollection()->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -115,7 +115,7 @@ void GUIClient::setupActions()
unplugActionList( actionListName );
- QPtrList<KAction> addList;
+ TQPtrList<KAction> addList;
if (m_toolViewActions.count()<3)
{
for (uint i=0;i<m_toolViewActions.count();i++)
@@ -135,23 +135,23 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
{
kdDebug(760)<<"*****void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)*****"<<endl;
- QString aname = QString("kmdi_toolview_") + mtva->wrappedWidget()->name();
+ TQString aname = TQString("kmdi_toolview_") + mtva->wrappedWidget()->name();
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
- QString _grp = cfg->group();
+ TQString _grp = cfg->group();
cfg->setGroup("Shortcuts");
sc = KShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp );
KAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()),
- /*QString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
+ /*TQString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
m_mdiMainFrm,actionCollection(), aname.latin1() );
((ToggleToolViewAction*)a)->setCheckedState(i18n("Hide %1").arg(mtva->wrappedWidget()->caption()));
- connect(a,SIGNAL(destroyed(QObject*)),this,SLOT(actionDeleted(QObject*)));
+ connect(a,TQT_SIGNAL(destroyed(TQObject*)),this,TQT_SLOT(actionDeleted(TQObject*)));
m_toolViewActions.append(a);
m_toolMenu->insert(a);
@@ -160,7 +160,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
setupActions();
}
-void GUIClient::actionDeleted(QObject* a)
+void GUIClient::actionDeleted(TQObject* a)
{
m_toolViewActions.remove(static_cast<KAction*>(a));
setupActions();
@@ -173,17 +173,17 @@ void GUIClient::clientAdded( KXMLGUIClient *client )
setupActions();
}
-ToggleToolViewAction::ToggleToolViewAction ( const QString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm,
- QObject* parent, const char* name )
+ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut,KDockWidget *dw, KMDI::MainWindow *mdiMainFrm,
+ TQObject* parent, const char* name )
: KToggleAction(text,cut,parent,name)
, m_dw(dw)
, m_mdiMainFrm(mdiMainFrm)
{
if (m_dw)
{
- connect(this,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
- connect(m_dw->dockManager(),SIGNAL(change()),this,SLOT(anDWChanged()));
- connect(m_dw,SIGNAL(destroyed()),this,SLOT(slotWidgetDestroyed()));
+ connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
+ connect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged()));
+ connect(m_dw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotWidgetDestroyed()));
setChecked(m_dw->mayBeHide());
}
@@ -218,8 +218,8 @@ void ToggleToolViewAction::slotToggled(bool t)
void ToggleToolViewAction::slotWidgetDestroyed()
{
- disconnect(m_dw->dockManager(),SIGNAL(change()),this,SLOT(anDWChanged()));
- disconnect(this,SIGNAL(toggled(bool)),0,0);
+ disconnect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged()));
+ disconnect(this,TQT_SIGNAL(toggled(bool)),0,0);
unplugAll();
deleteLater();
diff --git a/kmdi/kmdi/guiclient.h b/kmdi/kmdi/guiclient.h
index 04dd2fbd2..c3784fe6e 100644
--- a/kmdi/kmdi/guiclient.h
+++ b/kmdi/kmdi/guiclient.h
@@ -21,8 +21,8 @@
#ifndef _KMDI_GUICLIENT_H_
#define _KMDI_GUICLIENT_H_
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
#include <kaction.h>
@@ -42,7 +42,7 @@ namespace KMDIPrivate {
class GUIClientPrivate;
-class GUIClient : public QObject, public KXMLGUIClient
+class GUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
@@ -55,7 +55,7 @@ class GUIClient : public QObject, public KXMLGUIClient
private slots:
void clientAdded( KXMLGUIClient *client );
void setupActions();
- void actionDeleted(QObject*);
+ void actionDeleted(TQObject*);
signals:
void toggleTop();
@@ -66,9 +66,9 @@ class GUIClient : public QObject, public KXMLGUIClient
private:
GUIClientPrivate *d;
- QGuardedPtr<KMDI::MainWindow> m_mdiMainFrm;
- QPtrList<KAction> m_toolViewActions;
- QPtrList<KAction> m_documentViewActions;
+ TQGuardedPtr<KMDI::MainWindow> m_mdiMainFrm;
+ TQPtrList<KAction> m_toolViewActions;
+ TQPtrList<KAction> m_documentViewActions;
KActionMenu *m_docMenu;
KActionMenu *m_toolMenu;
@@ -81,8 +81,8 @@ class ToggleToolViewAction:public KToggleAction
Q_OBJECT
public:
- ToggleToolViewAction ( const QString& text, const KShortcut& cut = KShortcut(),
- KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, QObject* parent = 0, const char* name = 0 );
+ ToggleToolViewAction ( const TQString& text, const KShortcut& cut = KShortcut(),
+ KDockWidget *dw=0,KMDI::MainWindow *mdiMainFrm=0, TQObject* parent = 0, const char* name = 0 );
virtual ~ToggleToolViewAction();
diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp
index 048086178..d6e332780 100644
--- a/kmdi/kmdi/mainwindow.cpp
+++ b/kmdi/kmdi/mainwindow.cpp
@@ -45,17 +45,17 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kmenubar.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -63,11 +63,11 @@
#include "mainwindow.moc"
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include "mainwindow.h"
#include "dockcontainer.h"
@@ -97,9 +97,9 @@ namespace KMDI
{
//============ constructor ============//
-MainWindow::MainWindow(QWidget* parentWidget, const char* name)
+MainWindow::MainWindow(TQWidget* parentWidget, const char* name)
: KParts::DockMainWindow( parentWidget, name)
- , m_toolViews (new QMap<QWidget*,KMDI::ToolViewAccessor*>)
+ , m_toolViews (new TQMap<TQWidget*,KMDI::ToolViewAccessor*>)
, d(new KMDIPrivate::MainWindowPrivate())
{
// setup main dock stuff
@@ -125,7 +125,7 @@ MainWindow::~MainWindow()
void MainWindow::setupMainDock ()
{
// cover KMdi's childarea by a dockwidget
- KDockWidget *dw = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover");
+ KDockWidget *dw = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover");
dw->setDockWindowTransient(this,true);
dw->setEnableDocking(KDockWidget::DockNone);
dw->setDockSite(KDockWidget::DockCorner);
@@ -139,7 +139,7 @@ void MainWindow::setupMainDock ()
setMainDockWidget(dw);
// connect signals to collapse sidebars
- connect(m_tabWidget,SIGNAL(focusInEvent()),this,SIGNAL(collapseOverlapContainers()));
+ connect(m_tabWidget,TQT_SIGNAL(focusInEvent()),this,TQT_SIGNAL(collapseOverlapContainers()));
}
void MainWindow::setupToolViews ()
@@ -156,10 +156,10 @@ void MainWindow::setupToolViews ()
w=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
}
- QPtrList<KDockWidget> leftReparentWidgets;
- QPtrList<KDockWidget> rightReparentWidgets;
- QPtrList<KDockWidget> bottomReparentWidgets;
- QPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftReparentWidgets;
+ TQPtrList<KDockWidget> rightReparentWidgets;
+ TQPtrList<KDockWidget> bottomReparentWidgets;
+ TQPtrList<KDockWidget> topReparentWidgets;
if (mainDock->parentDockTabGroup()) {
mainDock=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
@@ -180,40 +180,40 @@ void MainWindow::setupToolViews ()
m_leftContainer->manualDock(mainDock, KDockWidget::DockLeft,20);
tmpDC->init();
- connect (this,SIGNAL(toggleLeft()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleLeft()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_rightContainer->setWidget(tmpDC=new DockContainer(m_rightContainer, this, KDockWidget::DockRight, d->m_styleIDEAlMode));
m_rightContainer->setEnableDocking(KDockWidget::DockRight);
m_rightContainer->manualDock(mainDock, KDockWidget::DockRight,80);
tmpDC->init();
- connect (this,SIGNAL(toggleRight()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleRight()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_topContainer->setWidget(tmpDC=new DockContainer(m_topContainer, this, KDockWidget::DockTop, d->m_styleIDEAlMode));
m_topContainer->setEnableDocking(KDockWidget::DockTop);
m_topContainer->manualDock(mainDock, KDockWidget::DockTop,20);
tmpDC->init();
- connect (this,SIGNAL(toggleTop()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleTop()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_bottomContainer->setWidget(tmpDC=new DockContainer(m_bottomContainer, this, KDockWidget::DockBottom, d->m_styleIDEAlMode));
m_bottomContainer->setEnableDocking(KDockWidget::DockBottom);
m_bottomContainer->manualDock(mainDock, KDockWidget::DockBottom,80);
tmpDC->init();
- connect (this,SIGNAL(toggleBottom()),tmpDC,SLOT(toggle()));
- connect(this,SIGNAL(collapseOverlapContainers()),tmpDC,SLOT(collapseOverlapped()));
- connect(tmpDC,SIGNAL(activated(DockContainer*)),this,SLOT(setActiveToolDock(DockContainer*)));
- connect(tmpDC,SIGNAL(deactivated(DockContainer*)),this,SLOT(removeFromActiveDockList(DockContainer*)));
+ connect (this,TQT_SIGNAL(toggleBottom()),tmpDC,TQT_SLOT(toggle()));
+ connect(this,TQT_SIGNAL(collapseOverlapContainers()),tmpDC,TQT_SLOT(collapseOverlapped()));
+ connect(tmpDC,TQT_SIGNAL(activated(DockContainer*)),this,TQT_SLOT(setActiveToolDock(DockContainer*)));
+ connect(tmpDC,TQT_SIGNAL(deactivated(DockContainer*)),this,TQT_SLOT(removeFromActiveDockList(DockContainer*)));
m_leftContainer->setDockSite( KDockWidget::DockCenter );
m_rightContainer->setDockSite( KDockWidget::DockCenter );
@@ -240,10 +240,10 @@ void MainWindow::setupGUIClient ()
{
m_guiClient = new KMDIPrivate::GUIClient (this);
- connect(m_guiClient,SIGNAL(toggleTop()),this,SIGNAL(toggleTop()));
- connect(m_guiClient,SIGNAL(toggleLeft()),this,SIGNAL(toggleLeft()));
- connect(m_guiClient,SIGNAL(toggleRight()),this,SIGNAL(toggleRight()));
- connect(m_guiClient,SIGNAL(toggleBottom()),this,SIGNAL(toggleBottom()));
+ connect(m_guiClient,TQT_SIGNAL(toggleTop()),this,TQT_SIGNAL(toggleTop()));
+ connect(m_guiClient,TQT_SIGNAL(toggleLeft()),this,TQT_SIGNAL(toggleLeft()));
+ connect(m_guiClient,TQT_SIGNAL(toggleRight()),this,TQT_SIGNAL(toggleRight()));
+ connect(m_guiClient,TQT_SIGNAL(toggleBottom()),this,TQT_SIGNAL(toggleBottom()));
}
TabWidget *MainWindow::tabWidget ()
@@ -256,9 +256,9 @@ ToolViewAccessor *MainWindow::createToolWindow()
return new KMDI::ToolViewAccessor(this);
}
-KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd, int percent, const QString& tabToolTip, const QString& tabCaption)
+KMDI::ToolViewAccessor *MainWindow::addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos, TQWidget* pTargetWnd, int percent, const TQString& tabToolTip, const TQString& tabCaption)
{
- QWidget *tvta=pWnd;
+ TQWidget *tvta=pWnd;
KDockWidget* pDW = dockManager->getDockWidgetFromName(pWnd->name());
if (pDW) {
// probably readDockConfig already created the widgetContainer, use that
@@ -273,7 +273,7 @@ KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::D
pWnd=pDW;
}
- QRect r=pWnd->geometry();
+ TQRect r=pWnd->geometry();
KMDI::ToolViewAccessor *mtva=new KMDI::ToolViewAccessor(this,pWnd,tabToolTip,(tabCaption==0)?pWnd->caption():tabCaption);
m_toolViews->insert(tvta,mtva);
@@ -282,7 +282,7 @@ KMDI::ToolViewAccessor *MainWindow::addToolWindow( QWidget* pWnd, KDockWidget::D
mtva->d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
mtva->d->widgetContainer->reparent(this, Qt::WType_TopLevel | Qt::WType_Dialog, r.topLeft(), isVisible());
} else { // add (and dock) the toolview as DockWidget view
- //const QPixmap& wndIcon = pWnd->icon() ? *(pWnd->icon()) : QPixmap();
+ //const TQPixmap& wndIcon = pWnd->icon() ? *(pWnd->icon()) : TQPixmap();
//KDockWidget *pCover=mtva->d->widgetContainer;
@@ -297,7 +297,7 @@ void MainWindow::deleteToolWindow( KMDI::ToolViewAccessor *accessor)
delete accessor;
}
-void MainWindow::deleteToolWindow( QWidget* pWnd)
+void MainWindow::deleteToolWindow( TQWidget* pWnd)
{
if (!pWnd)
return;
@@ -325,7 +325,7 @@ void MainWindow::setToolViewStyle(int flag)
d->m_toolviewStyle = flag;
bool toolviewExists = false;
- QMap<QWidget*,KMDI::ToolViewAccessor*>::Iterator it;
+ TQMap<TQWidget*,KMDI::ToolViewAccessor*>::Iterator it;
for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) {
KDockWidget *dockWidget = dynamic_cast<KDockWidget*>(it.data()->wrapperWidget());
if (dockWidget) {
@@ -362,7 +362,7 @@ void MainWindow::setToolViewStyle(int flag)
}
}
-void MainWindow::dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container) {
+void MainWindow::dockToolViewsIntoContainers(TQPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container) {
for ( KDockWidget *dw = widgetsToReparent.first(); dw;
dw=widgetsToReparent.next()){
dw->manualDock(container,KDockWidget::DockCenter,20);
@@ -370,7 +370,7 @@ void MainWindow::dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToRep
}
}
-void MainWindow::findToolViewsDockedToMain(QPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) {
+void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) {
KDockWidget *mainDock=getMainDockWidget();
if (mainDock->parentDockTabGroup()) {
mainDock=dynamic_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
diff --git a/kmdi/kmdi/mainwindow.h b/kmdi/kmdi/mainwindow.h
index 391ce8df9..a64cca43d 100644
--- a/kmdi/kmdi/mainwindow.h
+++ b/kmdi/kmdi/mainwindow.h
@@ -46,10 +46,10 @@
#include <kmenubar.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqguardedptr.h>
#include <kmdi/global.h>
@@ -79,7 +79,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
/**
* Constructor.
*/
- MainWindow ( QWidget* parentWidget, const char* name = "");
+ MainWindow ( TQWidget* parentWidget, const char* name = "");
/**
* Destructor.
@@ -113,7 +113,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
* @param tabCaption
* @return created toolview
*/
- KMDI::ToolViewAccessor *addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ KMDI::ToolViewAccessor *addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
/**
* delete the toolview belonging to the given accessor
@@ -125,7 +125,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
* delete the toolview belonging to the given pWnd
* @param pWnd toolview to be deleted
*/
- void deleteToolWindow( QWidget* pWnd);
+ void deleteToolWindow( TQWidget* pWnd);
/**
* Sets the appearance of the toolview tabs.
@@ -141,8 +141,8 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
void collapseOverlapContainers();
protected:
- void findToolViewsDockedToMain(QPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw);
- void dockToolViewsIntoContainers(QPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container);
+ void findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw);
+ void dockToolViewsIntoContainers(TQPtrList<KDockWidget>& widgetsToReparent,KDockWidget *container);
private:
/**
@@ -176,7 +176,7 @@ class KMDI_EXPORT MainWindow : public KParts::DockMainWindow
protected:
KMDIPrivate::GUIClient *m_guiClient;
- QMap <QWidget*, KMDI::ToolViewAccessor*> *m_toolViews;
+ TQMap <TQWidget*, KMDI::ToolViewAccessor*> *m_toolViews;
KDockWidget *m_leftContainer;
KDockWidget *m_rightContainer;
diff --git a/kmdi/kmdi/tabwidget.cpp b/kmdi/kmdi/tabwidget.cpp
index 5d18e3769..0d21bd2ea 100644
--- a/kmdi/kmdi/tabwidget.cpp
+++ b/kmdi/kmdi/tabwidget.cpp
@@ -43,7 +43,7 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include "tabwidget.h"
#include "tabwidget.moc"
@@ -59,7 +59,7 @@ namespace KMDIPrivate
namespace KMDI
{
-TabWidget::TabWidget(QWidget* parent, const char* name)
+TabWidget::TabWidget(TQWidget* parent, const char* name)
: KTabWidget(parent,name)
, m_visibility (KMDI::ShowWhenMoreThanOneTab)
, d (new KMDIPrivate::TabWidgetPrivate())
@@ -70,7 +70,7 @@ TabWidget::TabWidget(QWidget* parent, const char* name)
setHoverCloseButton(true);
- connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*)));
+ connect(this, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*)));
}
TabWidget::~TabWidget()
@@ -79,50 +79,50 @@ TabWidget::~TabWidget()
d = 0;
}
-bool TabWidget::eventFilter(QObject *obj, QEvent *e )
+bool TabWidget::eventFilter(TQObject *obj, TQEvent *e )
{
- if(e->type() == QEvent::FocusIn)
+ if(e->type() == TQEvent::FocusIn)
{
emit focusInEvent ();
}
- else if (e->type() == QEvent::ChildRemoved)
+ else if (e->type() == TQEvent::ChildRemoved)
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject* pLostChild = ((QChildEvent*)e)->child();
+ TQObject* pLostChild = ((TQChildEvent*)e)->child();
if ((pLostChild != 0L) && (pLostChild->isWidgetType())) {
- QObjectList *list = pLostChild->queryList( "QWidget" );
+ TQObjectList *list = pLostChild->queryList( "TQWidget" );
list->insert(0, pLostChild); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * o;
while ( (o=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)o;
+ TQWidget* widg = (TQWidget*)o;
++it;
widg->removeEventFilter(this);
}
delete list; // delete the list, not the objects
}
}
- else if (e->type() == QEvent::ChildInserted)
+ 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
// (as we did when we were added to the MDI system).
- QObject* pNewChild = ((QChildEvent*)e)->child();
+ TQObject* pNewChild = ((TQChildEvent*)e)->child();
if ((pNewChild != 0L) && (pNewChild->isWidgetType()))
{
- QWidget* pNewWidget = (QWidget*)pNewChild;
+ TQWidget* pNewWidget = (TQWidget*)pNewChild;
if (pNewWidget->testWFlags(Qt::WType_Dialog | Qt::WShowModal))
return false;
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert(0, pNewChild); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * o;
while ( (o=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)o;
+ TQWidget* widg = (TQWidget*)o;
++it;
widg->installEventFilter(this);
- connect(widg, SIGNAL(destroyed()), this, SLOT(childDestroyed()));
+ connect(widg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(childDestroyed()));
}
delete list; // delete the list, not the objects
}
@@ -135,15 +135,15 @@ void TabWidget::childDestroyed()
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const QObject* pLostChild = QObject::sender();
+ const TQObject* pLostChild = TQObject::sender();
if ((pLostChild != 0L) && (pLostChild->isWidgetType()))
{
- QObjectList *list = ((QObject*)(pLostChild))->queryList("QWidget");
+ TQObjectList *list = ((TQObject*)(pLostChild))->queryList("TQWidget");
list->insert(0, pLostChild); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * obj;
while ( (obj=it.current()) != 0 ) { // for each found object...
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
++it;
widg->removeEventFilter(this);
}
@@ -151,33 +151,33 @@ void TabWidget::childDestroyed()
}
}
-void TabWidget::closeTab(QWidget* w)
+void TabWidget::closeTab(TQWidget* w)
{
w->close();
}
-void TabWidget::addTab ( QWidget * child, const QString & label )
+void TabWidget::addTab ( TQWidget * child, const TQString & label )
{
KTabWidget::addTab(child,label);
showPage(child);
maybeShow();
}
-void TabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )
+void TabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label )
{
KTabWidget::addTab(child,iconset,label);
showPage(child);
maybeShow();
}
-void TabWidget::addTab ( QWidget * child, QTab * tab )
+void TabWidget::addTab ( TQWidget * child, TQTab * tab )
{
KTabWidget::addTab(child,tab);
showPage(child);
maybeShow();
}
-void TabWidget::insertTab ( QWidget * child, const QString & label, int index)
+void TabWidget::insertTab ( TQWidget * child, const TQString & label, int index)
{
KTabWidget::insertTab(child,label,index);
showPage(child);
@@ -185,7 +185,7 @@ void TabWidget::insertTab ( QWidget * child, const QString & label, int index)
tabBar()->repaint();
}
-void TabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index )
+void TabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index )
{
KTabWidget::insertTab(child,iconset,label,index);
showPage(child);
@@ -193,7 +193,7 @@ void TabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QSt
tabBar()->repaint();
}
-void TabWidget::insertTab ( QWidget * child, QTab * tab, int index)
+void TabWidget::insertTab ( TQWidget * child, TQTab * tab, int index)
{
KTabWidget::insertTab(child,tab,index);
showPage(child);
@@ -201,18 +201,18 @@ void TabWidget::insertTab ( QWidget * child, QTab * tab, int index)
tabBar()->repaint();
}
-void TabWidget::removePage ( QWidget * w )
+void TabWidget::removePage ( TQWidget * w )
{
KTabWidget::removePage(w);
maybeShow();
}
-void TabWidget::updateIconInView( QWidget *w, QPixmap icon )
+void TabWidget::updateIconInView( TQWidget *w, TQPixmap icon )
{
changeTab(w,icon,tabLabel(w));
}
-void TabWidget::updateCaptionInView( QWidget *w, const QString &caption )
+void TabWidget::updateCaptionInView( TQWidget *w, const TQString &caption )
{
changeTab(w, caption);
}
diff --git a/kmdi/kmdi/tabwidget.h b/kmdi/kmdi/tabwidget.h
index 9aa67d2aa..04e8f3c20 100644
--- a/kmdi/kmdi/tabwidget.h
+++ b/kmdi/kmdi/tabwidget.h
@@ -58,35 +58,35 @@ class KMDI_EXPORT TabWidget : public KTabWidget
Q_OBJECT
public:
- TabWidget(QWidget* parent, const char* name=0);
+ TabWidget(TQWidget* parent, const char* name=0);
virtual ~TabWidget();
- virtual void addTab ( QWidget * child, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQString & label );
- virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label );
- virtual void addTab ( QWidget * child, QTab * tab );
+ virtual void addTab ( TQWidget * child, TQTab * tab );
- virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 );
- virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 );
- virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
+ virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 );
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
KMDI::TabWidgetVisibility tabWidgetVisibility() const;
void setTabWidgetVisibility( KMDI::TabWidgetVisibility );
- bool eventFilter(QObject *obj, QEvent *e );
+ bool eventFilter(TQObject *obj, TQEvent *e );
private slots:
- void closeTab(QWidget* w);
+ void closeTab(TQWidget* w);
public slots:
- void updateIconInView(QWidget*,QPixmap);
- void updateCaptionInView(QWidget*,const QString&);
+ void updateIconInView(TQWidget*,TQPixmap);
+ void updateCaptionInView(TQWidget*,const TQString&);
signals:
void focusInEvent ();
diff --git a/kmdi/kmdi/toolviewaccessor.cpp b/kmdi/kmdi/toolviewaccessor.cpp
index 11e1ce4f3..21f621ec5 100644
--- a/kmdi/kmdi/toolviewaccessor.cpp
+++ b/kmdi/kmdi/toolviewaccessor.cpp
@@ -31,8 +31,8 @@
namespace KMDI
{
-ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption)
-: QObject(parent)
+ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption)
+: TQObject(parent)
{
mdiMainFrm=parent;
d=new KMDIPrivate::ToolViewAccessorPrivate();
@@ -41,7 +41,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
d->widget=d->widgetContainer->getWidget();
} else {
d->widget=widgetToWrap;
- QString finalTabCaption;
+ TQString finalTabCaption;
if (tabCaption == 0) {
finalTabCaption = widgetToWrap->caption();
if (finalTabCaption.isEmpty() && !widgetToWrap->icon()) {
@@ -52,7 +52,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
finalTabCaption = tabCaption;
}
d->widgetContainer= parent->createDockWidget( widgetToWrap->name(),
- (widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap()),
+ (widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap()),
0L, // parent
widgetToWrap->caption(),
finalTabCaption);
@@ -67,7 +67,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, QWidget *widgetToW
d->widget->installEventFilter(this);
}
-ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent) : QObject(parent) {
+ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent) : TQObject(parent) {
mdiMainFrm=parent;
d=new KMDIPrivate::ToolViewAccessorPrivate();
}
@@ -79,29 +79,29 @@ ToolViewAccessor::~ToolViewAccessor() {
}
-QWidget *ToolViewAccessor::wrapperWidget() {
+TQWidget *ToolViewAccessor::wrapperWidget() {
if (!d->widgetContainer) {
- d->widgetContainer=mdiMainFrm->createDockWidget( "ToolViewAccessor::null",QPixmap());
- connect(d->widgetContainer,SIGNAL(widgetSet(QWidget*)),this,SLOT(setWidgetToWrap(QWidget*)));
+ d->widgetContainer=mdiMainFrm->createDockWidget( "ToolViewAccessor::null",TQPixmap());
+ connect(d->widgetContainer,TQT_SIGNAL(widgetSet(TQWidget*)),this,TQT_SLOT(setWidgetToWrap(TQWidget*)));
}
return d->widgetContainer;
}
-QWidget *ToolViewAccessor::wrappedWidget() {
+TQWidget *ToolViewAccessor::wrappedWidget() {
return d->widget;
}
-void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption)
+void ToolViewAccessor::setWidgetToWrap(TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption)
{
Q_ASSERT(!(d->widget));
Q_ASSERT(!widgetToWrap->inherits("KDockWidget"));
- disconnect(d->widgetContainer,SIGNAL(widgetSet(QWidget*)),this,SLOT(setWidgetToWrap(QWidget*)));
+ disconnect(d->widgetContainer,TQT_SIGNAL(widgetSet(TQWidget*)),this,TQT_SLOT(setWidgetToWrap(TQWidget*)));
delete d->widget;
d->widget=widgetToWrap;
KDockWidget *tmp=d->widgetContainer;
- QString finalTabCaption;
+ TQString finalTabCaption;
if (tabCaption == 0) {
finalTabCaption = widgetToWrap->caption();
if (finalTabCaption.isEmpty() && !widgetToWrap->icon()) {
@@ -114,7 +114,7 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
if (!tmp) {
tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(),
- widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap(),
+ widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap(),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -126,7 +126,7 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
else {
tmp->setCaption(widgetToWrap->caption());
tmp->setTabPageLabel(finalTabCaption);
- tmp->setPixmap(widgetToWrap->icon()?(*(widgetToWrap->icon())):QPixmap());
+ tmp->setPixmap(widgetToWrap->icon()?(*(widgetToWrap->icon())):TQPixmap());
tmp->setName(widgetToWrap->name());
if (tabToolTip!=0) {
d->widgetContainer->setToolTipString(tabToolTip);
@@ -140,25 +140,25 @@ void ToolViewAccessor::setWidgetToWrap(QWidget *widgetToWrap, const QString& tab
}
-bool ToolViewAccessor::eventFilter(QObject *o, QEvent *e) {
- if (e->type()==QEvent::IconChange) {
- d->widgetContainer->setPixmap(d->widget->icon()?(*d->widget->icon()):QPixmap());
+bool ToolViewAccessor::eventFilter(TQObject *o, TQEvent *e) {
+ if (e->type()==TQEvent::IconChange) {
+ d->widgetContainer->setPixmap(d->widget->icon()?(*d->widget->icon()):TQPixmap());
}
return false;
}
-void ToolViewAccessor::placeAndShow(KDockWidget::DockPosition pos, QWidget* pTargetWnd ,int percent)
+void ToolViewAccessor::placeAndShow(KDockWidget::DockPosition pos, TQWidget* pTargetWnd ,int percent)
{
place(pos,pTargetWnd,percent);
show();
}
-void ToolViewAccessor::place(KDockWidget::DockPosition pos, QWidget* pTargetWnd ,int percent)
+void ToolViewAccessor::place(KDockWidget::DockPosition pos, TQWidget* pTargetWnd ,int percent)
{
Q_ASSERT(d->widgetContainer);
if (!d->widgetContainer) return;
if (pos == KDockWidget::DockNone) {
d->widgetContainer->setEnableDocking(KDockWidget::DockNone);
- d->widgetContainer->reparent(mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, QPoint(0,0), mdiMainFrm->isVisible());
+ d->widgetContainer->reparent(mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint(0,0), mdiMainFrm->isVisible());
}
else { // add (and dock) the toolview as DockWidget view
@@ -181,7 +181,7 @@ void ToolViewAccessor::place(KDockWidget::DockPosition pos, QWidget* pTargetWnd
pTargetDock = mdiMainFrm->getMainDockWidget();
}
}
- // this is not inheriting QWidget*, its plain impossible that this condition is true
+ // this is not inheriting TQWidget*, its plain impossible that this condition is true
//if (pTargetWnd == this) DockToOurself = true;
if (!DockToOurself) if(pTargetWnd != 0L) {
pTargetDock = mdiMainFrm->dockManager->findWidgetParentDock( pTargetWnd);
diff --git a/kmdi/kmdi/toolviewaccessor.h b/kmdi/kmdi/toolviewaccessor.h
index 2a1bd4de2..180ba56a3 100644
--- a/kmdi/kmdi/toolviewaccessor.h
+++ b/kmdi/kmdi/toolviewaccessor.h
@@ -20,11 +20,11 @@
#ifndef _KMDI_TOOLVIEWACCESSOR_H_
#define _KMDI_TOOLVIEWACCESSOR_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include <kdockwidget.h>
@@ -61,24 +61,24 @@ private:
bool m_bFocusInEventIsPending;
private:
- ToolViewAccessor( KMDI::MainWindow *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ ToolViewAccessor( KMDI::MainWindow *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
ToolViewAccessor( KMDI::MainWindow *parent);
public:
~ToolViewAccessor();
- QWidget *wrapperWidget();
- QWidget *wrappedWidget();
- void place(KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L,int percent = 50);
- void placeAndShow(KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L,int percent = 50);
+ TQWidget *wrapperWidget();
+ TQWidget *wrappedWidget();
+ void place(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50);
+ void placeAndShow(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50);
void show();
public slots:
- void setWidgetToWrap(QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0);
+ void setWidgetToWrap(TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0);
void hide();
private:
KMDIPrivate::ToolViewAccessorPrivate *d;
KMDI::MainWindow *mdiMainFrm;
protected:
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
};
}
diff --git a/kmdi/kmdi/toolviewaccessor_p.h b/kmdi/kmdi/toolviewaccessor_p.h
index 3d7b6161a..71ffb286a 100644
--- a/kmdi/kmdi/toolviewaccessor_p.h
+++ b/kmdi/kmdi/toolviewaccessor_p.h
@@ -21,7 +21,7 @@
#define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
#include <kdockwidget.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
namespace KMDIPrivate
@@ -46,9 +46,9 @@ class ToolViewAccessorPrivate
delete (KDockWidget*)widgetContainer;
}
- QGuardedPtr<KDockWidget> widgetContainer;
- QWidget *widget;
- QGuardedPtr<KAction> action;
+ TQGuardedPtr<KDockWidget> widgetContainer;
+ TQWidget *widget;
+ TQGuardedPtr<KAction> action;
};
}
diff --git a/kmdi/kmdichildarea.cpp b/kmdi/kmdichildarea.cpp
index 8074dac41..923b55372 100644
--- a/kmdi/kmdichildarea.cpp
+++ b/kmdi/kmdichildarea.cpp
@@ -36,7 +36,7 @@
#include <kglobalsettings.h>
#include <math.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
///////////////////////////////////////////////////////////////////////////////
@@ -45,21 +45,21 @@
//============ KMdiChildArea ============//
-KMdiChildArea::KMdiChildArea( QWidget *parent )
- : QFrame( parent, "kmdi_childarea" )
+KMdiChildArea::KMdiChildArea( TQWidget *parent )
+ : TQFrame( parent, "kmdi_childarea" )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- m_captionFont = QFont();
- QFontMetrics fm( m_captionFont );
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ m_captionFont = TQFont();
+ TQFontMetrics fm( m_captionFont );
m_captionFontLineSpacing = fm.lineSpacing();
m_captionActiveBackColor = KGlobalSettings::activeTitleColor();
m_captionActiveForeColor = KGlobalSettings::activeTextColor();
m_captionInactiveBackColor = KGlobalSettings::inactiveTitleColor();
m_captionInactiveForeColor = KGlobalSettings::inactiveTextColor();
- m_pZ = new QPtrList<KMdiChildFrm>;
+ m_pZ = new TQPtrList<KMdiChildFrm>;
m_pZ->setAutoDelete( true );
setFocusPolicy( ClickFocus );
- m_defaultChildFrmSize = QSize( 400, 300 );
+ m_defaultChildFrmSize = TQSize( 400, 300 );
}
@@ -77,7 +77,7 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade )
//remove old references. There can be more than one so we remove them all
if ( m_pZ->findRef( child ) != -1 )
{
- //QPtrList::find* moves current() to the found item
+ //TQPtrList::find* moves current() to the found item
m_pZ->take();
while ( m_pZ->findNextRef( 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
- QObject::disconnect( child );
+ TQObject::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
- QObject::disconnect( child );
+ TQObject::disconnect( child );
child->unsetClient();
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@@ -182,7 +182,7 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
m_pZ->setAutoDelete( true );
//disable the labels of all the other children
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
( *it )->m_pCaption->setActive( false );
@@ -218,13 +218,13 @@ void KMdiChildArea::setTopChild( KMdiChildFrm* child, bool /* bSetFocus */ )
else
child->raise();
- QFocusEvent::setReason( QFocusEvent::Other );
+ TQFocusEvent::setReason( TQFocusEvent::Other );
child->m_pClient->setFocus();
}
}
-void KMdiChildArea::resizeEvent( QResizeEvent* e )
+void KMdiChildArea::resizeEvent( TQResizeEvent* e )
{
//If we have a maximized children at the top , adjust its size
KMdiChildFrm* child = topChild();
@@ -241,12 +241,12 @@ void KMdiChildArea::resizeEvent( QResizeEvent* e )
}
layoutMinimizedChildren();
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
//=============== mousePressEvent =============//
-void KMdiChildArea::mousePressEvent( QMouseEvent *e )
+void KMdiChildArea::mousePressEvent( TQMouseEvent *e )
{
//Popup the window menu
if ( e->button() & RightButton )
@@ -255,7 +255,7 @@ void KMdiChildArea::mousePressEvent( QMouseEvent *e )
//=============== getCascadePoint ============//
-QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
+TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
{
if ( indexOfWindow < 0 )
{
@@ -264,10 +264,10 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
<< indexOfWindow << " as new index" << endl;
}
- QPoint pnt( 0, 0 );
+ TQPoint pnt( 0, 0 );
if ( indexOfWindow == 0 )
{
- kdDebug( 760 ) << k_funcinfo << "No windows. Returning QPoint( 0, 0 ) as the cascade point" << endl;
+ kdDebug( 760 ) << k_funcinfo << "No windows. Returning TQPoint( 0, 0 ) as the cascade point" << endl;
return pnt;
}
@@ -282,8 +282,8 @@ QPoint KMdiChildArea::getCascadePoint( int indexOfWindow )
//default values
int step = 20;
- int h = ( topLevelMode ? QApplication::desktop()->height() : height() );
- int w = ( topLevelMode ? QApplication::desktop()->width() : width() );
+ int h = ( topLevelMode ? TQApplication::desktop()->height() : height() );
+ int w = ( topLevelMode ? TQApplication::desktop()->width() : width() );
int availableHeight = h - m_defaultChildFrmSize.height();
int availableWidth = w - m_defaultChildFrmSize.width();
@@ -365,7 +365,7 @@ void KMdiChildArea::focusTopChild()
if ( !lastChild->m_pClient->hasFocus() )
{
//disable the labels of all the other children
- QPtrListIterator<KMdiChildFrm> it ( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it ( *m_pZ );
for ( ; ( *it ); ++it )
{
if ( ( *it ) != lastChild )
@@ -383,7 +383,7 @@ void KMdiChildArea::cascadeWindows()
{
kdDebug( 760 ) << k_funcinfo << "cascading windows but not changing their size" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -405,7 +405,7 @@ void KMdiChildArea::cascadeMaximized()
{
kdDebug( 760 ) << k_funcinfo << "cascading windows. will make sure they are minimum sized" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
@@ -416,9 +416,9 @@ void KMdiChildArea::cascadeMaximized()
if (childFrm->state() == KMdiChildFrm::Maximized )
childFrm->restorePressed();
- QPoint pnt( getCascadePoint( idx ) );
+ TQPoint pnt( getCascadePoint( idx ) );
childFrm->move( pnt );
- QSize curSize( width() - pnt.x(), height() - pnt.y() );
+ TQSize curSize( width() - pnt.x(), height() - pnt.y() );
if ( ( childFrm->minimumSize().width() > curSize.width() ) ||
( childFrm->minimumSize().height() > curSize.height() ) )
@@ -439,7 +439,7 @@ void KMdiChildArea::expandVertical()
{
kdDebug( 760 ) << k_funcinfo << "expanding all child frames vertically" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -461,7 +461,7 @@ void KMdiChildArea::expandHorizontal()
{
kdDebug( 760 ) << k_funcinfo << "expanding all child frames horizontally" << endl;
int idx = 0;
- QPtrList<KMdiChildFrm> list( *m_pZ );
+ TQPtrList<KMdiChildFrm> list( *m_pZ );
list.setAutoDelete( false );
while ( !list.isEmpty() )
{
@@ -482,7 +482,7 @@ void KMdiChildArea::expandHorizontal()
int KMdiChildArea::getVisibleChildCount() const
{
int visibleChildCount = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
if ( ( *it )->state() != KMdiChildFrm::Minimized && ( *it )->isVisible() )
@@ -555,7 +555,7 @@ void KMdiChildArea::tileAllInternal( int maxWnds )
int curCol = 1;
int curWin = 1;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -641,7 +641,7 @@ void KMdiChildArea::tileAnodine()
// it's great when a kick-ass theory works!!! // Pragma :)
int xQuantum = width() / numCols;
int yQuantum = height() / numRows[numCurCol];
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -692,7 +692,7 @@ void KMdiChildArea::tileVertically()
int posX = 0;
int countVisible = 0;
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = ( *it );
@@ -724,7 +724,7 @@ void KMdiChildArea::layoutMinimizedChildren()
{
int posX = 0;
int posY = height();
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
{
KMdiChildFrm* child = *( it );
@@ -744,41 +744,41 @@ void KMdiChildArea::layoutMinimizedChildren()
}
-void KMdiChildArea::setMdiCaptionFont( const QFont& fnt )
+void KMdiChildArea::setMdiCaptionFont( const TQFont& fnt )
{
m_captionFont = fnt;
- QFontMetrics fm( m_captionFont );
+ TQFontMetrics fm( m_captionFont );
m_captionFontLineSpacing = fm.lineSpacing();
- QPtrListIterator<KMdiChildFrm> it( *m_pZ );
+ TQPtrListIterator<KMdiChildFrm> it( *m_pZ );
for ( ; ( *it ); ++it )
( *it )->doResize();
}
-void KMdiChildArea::setMdiCaptionActiveForeColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionActiveForeColor( const TQColor& clr )
{
m_captionActiveForeColor = clr;
}
-void KMdiChildArea::setMdiCaptionActiveBackColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionActiveBackColor( const TQColor& clr )
{
m_captionActiveBackColor = clr;
}
-void KMdiChildArea::setMdiCaptionInactiveForeColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionInactiveForeColor( const TQColor& clr )
{
m_captionInactiveForeColor = clr;
}
-void KMdiChildArea::setMdiCaptionInactiveBackColor( const QColor& clr )
+void KMdiChildArea::setMdiCaptionInactiveBackColor( const TQColor& clr )
{
m_captionInactiveBackColor = clr;
}
//KDE4: remove
-void KMdiChildArea::getCaptionColors( const QPalette& /*pal*/, QColor& activeBG,
- QColor& activeFG, QColor& inactiveBG, QColor& inactiveFG )
+void KMdiChildArea::getCaptionColors( const TQPalette& /*pal*/, TQColor& activeBG,
+ TQColor& activeFG, TQColor& inactiveBG, TQColor& inactiveFG )
{
activeBG = KGlobalSettings::activeTitleColor();
activeFG = KGlobalSettings::activeTextColor();
diff --git a/kmdi/kmdichildarea.h b/kmdi/kmdichildarea.h
index 7bbe07fff..37ce3336f 100644
--- a/kmdi/kmdichildarea.h
+++ b/kmdi/kmdichildarea.h
@@ -28,8 +28,8 @@
#ifndef _KMDI_CHILD_AREA_H_
#define _KMDI_CHILD_AREA_H_
-#include <qframe.h>
-#include <qptrlist.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
#include "kmdichildfrm.h"
#include "kmdichildview.h"
@@ -61,37 +61,37 @@ public:
/**
* Z Order stack of KMdiChildFrm childframe windows (top=last)
*/
- QPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
+ TQPtrList<KMdiChildFrm> *m_pZ; //Auto delete enabled
/**
* the default size of an newly created childframe
*/
- QSize m_defaultChildFrmSize;
+ TQSize m_defaultChildFrmSize;
protected:
/**
* The MDI childframe window caption font
*/
- QFont m_captionFont;
+ TQFont m_captionFont;
/**
* The foreground color of the active MDI childframe window caption
*/
- QColor m_captionActiveBackColor;
+ TQColor m_captionActiveBackColor;
/**
* The background color of the active MDI childframe window captions
*/
- QColor m_captionActiveForeColor;
+ TQColor m_captionActiveForeColor;
/**
* The foreground color of inactive MDI childframe window captions
*/
- QColor m_captionInactiveBackColor;
+ TQColor m_captionInactiveBackColor;
/**
* The background color of inactive MDI childframe window captions
*/
- QColor m_captionInactiveForeColor;
+ TQColor m_captionInactiveForeColor;
int m_captionFontLineSpacing;
@@ -101,7 +101,7 @@ public:
/**
* Consruction. Note: This class needn't to know about KMdiMainFrm .
*/
- KMdiChildArea( QWidget *parent );
+ KMdiChildArea( TQWidget *parent );
/**
* Destructor : THERE should be no child windows anymore...
@@ -150,37 +150,37 @@ public:
* the cascade point is calculated for the window following the last window
* @param indexOfWindow the index of the window in relation the z-ordered window list
*/
- QPoint getCascadePoint( int indexOfWindow = -1 );
+ TQPoint getCascadePoint( int indexOfWindow = -1 );
/**
* Sets the MDI childframe window caption font
* A relayout does not occur when using this function
*/
- void setMdiCaptionFont( const QFont &fnt );
+ void setMdiCaptionFont( const TQFont &fnt );
/**
* Sets the foreground color of the active MDI childframe window caption
* A relayout does not occur when using this function
*/
- void setMdiCaptionActiveForeColor( const QColor &clr );
+ void setMdiCaptionActiveForeColor( const TQColor &clr );
/**
* Sets the background color of the active MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionActiveBackColor( const QColor &clr );
+ void setMdiCaptionActiveBackColor( const TQColor &clr );
/**
* Sets the foreground color of inactive MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionInactiveForeColor( const QColor &clr );
+ void setMdiCaptionInactiveForeColor( const TQColor &clr );
/**
* Sets the background color of inactive MDI childframe window captions
* A relayout does not occur when using this function
*/
- void setMdiCaptionInactiveBackColor( const QColor &clr );
+ void setMdiCaptionInactiveBackColor( const TQColor &clr );
/**
* Gets all caption colors, consistent with current WM settings
@@ -191,8 +191,8 @@ public:
* @deprecated Use KGlobalSettings::activeTitleColor(), KGlobalSettings::activeTextColor(),
* KGlobalSettings::inactiveTitleColor() and KGlobalSettings::inactiveTextColor() instead.
*/
- static void getCaptionColors( const QPalette &pal, QColor &activeBG, QColor &activeFG,
- QColor &inactiveBG, QColor &inactiveFG ) KDE_DEPRECATED;
+ static void getCaptionColors( const TQPalette &pal, TQColor &activeBG, TQColor &activeFG,
+ TQColor &inactiveBG, TQColor &inactiveFG ) KDE_DEPRECATED;
public slots:
/**
@@ -251,12 +251,12 @@ protected:
/**
* Automatically resizes a maximized MDI view and layouts the positions of minimized MDI views.
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Shows the 'Window' popup menu on right mouse button click
*/
- void mousePressEvent( QMouseEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
/**
* Internally used. Actions that are necessary when an MDI view gets minimized
@@ -286,7 +286,7 @@ signals:
* Signals a KMdiMainFrm that the 'Window' popup menu must be shown
* @internal
*/
- void popupWindowMenu( QPoint );
+ void popupWindowMenu( TQPoint );
/**
* Signals that the last attached (docked) MDI view has been closed.
diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp
index da5470410..3c33e1cc5 100644
--- a/kmdi/kmdichildfrm.cpp
+++ b/kmdi/kmdichildfrm.cpp
@@ -35,15 +35,15 @@
#include "kmdichildarea.h"
#include "kmdimainfrm.h"
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qframe.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qnamespace.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqframe.h>
+#include <tqpopupmenu.h>
+#include <tqtoolbutton.h>
+#include <tqnamespace.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -85,13 +85,13 @@
#include "kde2laptop_undockbutton.xpm"
-KMdiWin32IconButton::KMdiWin32IconButton( QWidget* parent, const char* name )
- : QLabel( parent, name )
+KMdiWin32IconButton::KMdiWin32IconButton( TQWidget* parent, const char* name )
+ : TQLabel( parent, name )
{}
//============ mousePressEvent ============//
-void KMdiWin32IconButton::mousePressEvent( QMouseEvent* )
+void KMdiWin32IconButton::mousePressEvent( TQMouseEvent* )
{
//emit pressed();
}
@@ -99,7 +99,7 @@ void KMdiWin32IconButton::mousePressEvent( QMouseEvent* )
//============ KMdiChildFrm ============//
KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
- : QFrame( parent, "kmdi_childfrm" )
+ : TQFrame( parent, "kmdi_childfrm" )
, m_pClient( 0L )
, m_pManager( 0L )
, m_pCaption( 0L )
@@ -125,27 +125,27 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
, m_pSystemMenu( 0L )
, m_oldClientMinSize()
, m_oldClientMaxSize()
- , m_oldLayoutResizeMode( QLayout::Minimum )
+ , m_oldLayoutResizeMode( TQLayout::Minimum )
{
m_pCaption = new KMdiChildFrmCaption( this );
m_pManager = parent;
m_pWinIcon = new KMdiWin32IconButton( m_pCaption, "kmdi_iconbutton_icon" );
- m_pUnixIcon = new QToolButton( m_pCaption, "kmdi_toolbutton_icon" );
- m_pMinimize = new QToolButton( m_pCaption, "kmdi_toolbutton_min" );
- m_pMaximize = new QToolButton( m_pCaption, "kmdi_toolbutton_max" );
- m_pClose = new QToolButton( m_pCaption, "kmdi_toolbutton_close" );
- m_pUndock = new QToolButton( m_pCaption, "kmdi_toolbutton_undock" );
-
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
- QObject::connect( m_pMaximize, SIGNAL( clicked() ), this, SLOT( maximizePressed() ) );
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closePressed() ) );
- QObject::connect( m_pUndock, SIGNAL( clicked() ), this, SLOT( undockPressed() ) );
-
- m_pIconButtonPixmap = new QPixmap( SmallIcon( "filenew" ) );
+ m_pUnixIcon = new TQToolButton( m_pCaption, "kmdi_toolbutton_icon" );
+ m_pMinimize = new TQToolButton( m_pCaption, "kmdi_toolbutton_min" );
+ m_pMaximize = new TQToolButton( m_pCaption, "kmdi_toolbutton_max" );
+ m_pClose = new TQToolButton( m_pCaption, "kmdi_toolbutton_close" );
+ m_pUndock = new TQToolButton( m_pCaption, "kmdi_toolbutton_undock" );
+
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pMaximize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( maximizePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), this, TQT_SLOT( undockPressed() ) );
+
+ m_pIconButtonPixmap = new TQPixmap( SmallIcon( "filenew" ) );
if ( m_pIconButtonPixmap->isNull() )
- * m_pIconButtonPixmap = QPixmap( filenew );
+ * m_pIconButtonPixmap = TQPixmap( filenew );
redecorateButtons();
@@ -156,14 +156,14 @@ KMdiChildFrm::KMdiChildFrm( KMdiChildArea *parent )
m_pMaximize->setFocusPolicy( NoFocus );
m_pUndock->setFocusPolicy( NoFocus );
- setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
setFocusPolicy( NoFocus );
setMouseTracking( true );
setMinimumSize( KMDI_CHILDFRM_MIN_WIDTH, m_pCaption->heightHint() );
- m_pSystemMenu = new QPopupMenu();
+ m_pSystemMenu = new TQPopupMenu();
}
//============ ~KMdiChildFrm ============//
@@ -180,12 +180,12 @@ KMdiChildFrm::~KMdiChildFrm()
}
//============ mousePressEvent =============//
-void KMdiChildFrm::mousePressEvent( QMouseEvent *e )
+void KMdiChildFrm::mousePressEvent( TQMouseEvent *e )
{
if ( m_bResizing )
{
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
m_bResizing = false;
releaseMouse();
@@ -201,24 +201,24 @@ void KMdiChildFrm::mousePressEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmResizeBeginEvent ue( e );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &ue );
+ TQApplication::sendEvent( m_pClient, &ue );
}
}
//============ mouseReleaseEvent ==============//
-void KMdiChildFrm::mouseReleaseEvent( QMouseEvent *e )
+void KMdiChildFrm::mouseReleaseEvent( TQMouseEvent *e )
{
if ( m_bResizing )
{
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
m_bResizing = false;
//notify child view
KMdiChildFrmResizeEndEvent ue( e );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &ue );
+ TQApplication::sendEvent( m_pClient, &ue );
}
}
@@ -233,24 +233,24 @@ void KMdiChildFrm::setResizeCursor( int resizeCorner )
switch ( resizeCorner )
{
case KMDI_NORESIZE:
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
break;
case KMDI_RESIZE_LEFT:
case KMDI_RESIZE_RIGHT:
- QApplication::setOverrideCursor( Qt::sizeHorCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeHorCursor, true );
break;
case KMDI_RESIZE_TOP:
case KMDI_RESIZE_BOTTOM:
- QApplication::setOverrideCursor( Qt::sizeVerCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeVerCursor, true );
break;
case KMDI_RESIZE_TOPLEFT:
case KMDI_RESIZE_BOTTOMRIGHT:
- QApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeFDiagCursor, true );
break;
case KMDI_RESIZE_BOTTOMLEFT:
case KMDI_RESIZE_TOPRIGHT:
- QApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeBDiagCursor, true );
break;
}
}
@@ -263,14 +263,14 @@ void KMdiChildFrm::unsetResizeCursor()
{
m_iResizeCorner = KMDI_NORESIZE;
m_iLastCursorCorner = KMDI_NORESIZE;
- if ( QApplication::overrideCursor() )
- QApplication::restoreOverrideCursor();
+ if ( TQApplication::overrideCursor() )
+ TQApplication::restoreOverrideCursor();
}
}
//============= mouseMoveEvent ===============//
-void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
+void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e )
{
if ( m_state != Normal )
return;
@@ -286,7 +286,7 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
if ( !( e->state() & RightButton ) && !( e->state() & MidButton ) )
{
// same as: if no button or left button pressed
- QPoint p = parentWidget()->mapFromGlobal( e->globalPos() );
+ TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() );
resizeWindow( m_iResizeCorner, p.x(), p.y() );
}
else
@@ -301,24 +301,24 @@ void KMdiChildFrm::mouseMoveEvent( QMouseEvent *e )
//============= moveEvent ===============//
-void KMdiChildFrm::moveEvent( QMoveEvent* me )
+void KMdiChildFrm::moveEvent( TQMoveEvent* me )
{
// give its child view the chance to notify a childframe move
KMdiChildFrmMoveEvent cfme( me );
if ( m_pClient != 0L )
- QApplication::sendEvent( m_pClient, &cfme );
+ TQApplication::sendEvent( m_pClient, &cfme );
}
//=============== leaveEvent ===============//
-void KMdiChildFrm::leaveEvent( QEvent * )
+void KMdiChildFrm::leaveEvent( TQEvent * )
{
unsetResizeCursor();
}
void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
{
- QRect resizeRect( x(), y(), width(), height() );
+ TQRect resizeRect( x(), y(), width(), height() );
// Calculate the minimum width & height
int minWidth = 0;
@@ -349,7 +349,7 @@ void KMdiChildFrm::resizeWindow( int resizeCorner, int xPos, int yPos )
if ( maxHeight > maximumHeight() )
maxHeight = maximumHeight();
- QPoint mousePos( xPos, yPos );
+ TQPoint mousePos( xPos, yPos );
// manipulate width
switch ( resizeCorner )
@@ -511,7 +511,7 @@ void KMdiChildFrm::undockPressed()
void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
{
if ( m_state == Normal ) //save the current rect
- m_restoredRect = QRect( x(), y(), width(), height() );
+ m_restoredRect = TQRect( x(), y(), width(), height() );
switch ( state )
{
@@ -540,8 +540,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
}
m_pMinimize->setPixmap( *m_pMinButtonPixmap );
m_pMaximize->setPixmap( *m_pMaxButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
setGeometry( m_restoredRect );
break;
case Normal:
@@ -566,8 +566,8 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
// reset to maximize-captionbar
m_pMaximize->setPixmap( *m_pRestoreButtonPixmap );
m_pMinimize->setPixmap( *m_pMinButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
m_pCaption->heightHint();
@@ -587,7 +587,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
int nFrameWidth = KMDI_CHILDFRM_DOUBLE_BORDER;
int nFrameHeight = KMDI_CHILDFRM_DOUBLE_BORDER + KMDI_CHILDFRM_SEPARATOR +
m_pCaption->heightHint();
- QRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(),
+ TQRect maximizedFrmRect( -m_pClient->x(), -m_pClient->y(),
m_pManager->width() + nFrameWidth,
m_pManager->height() + nFrameHeight );
if ( geometry() != maximizedFrmRect )
@@ -618,7 +618,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->layout() != 0L )
{
- m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, true );
@@ -638,7 +638,7 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
m_pClient->setMaximumSize( 0, 0 );
if ( m_pClient->layout() != 0L )
{
- m_pClient->layout() ->setResizeMode( QLayout::FreeResize );
+ m_pClient->layout() ->setResizeMode( TQLayout::FreeResize );
}
switchToMinimizeLayout();
m_pManager->childMinimized( this, false );
@@ -670,21 +670,21 @@ void KMdiChildFrm::setState( MdiWindowState state, bool /*bAnimate*/ )
//============== restoreGeometry ================//
-QRect KMdiChildFrm::restoreGeometry() const
+TQRect KMdiChildFrm::restoreGeometry() const
{
return m_restoredRect;
}
//============== setRestoreGeometry ================//
-void KMdiChildFrm::setRestoreGeometry( const QRect& newRestGeo )
+void KMdiChildFrm::setRestoreGeometry( const TQRect& newRestGeo )
{
m_restoredRect = newRestGeo;
}
//============ setCaption ===============//
-void KMdiChildFrm::setCaption( const QString& text )
+void KMdiChildFrm::setCaption( const TQString& text )
{
m_pCaption->setCaption( text );
}
@@ -699,13 +699,13 @@ void KMdiChildFrm::enableClose( bool bEnable )
//============ setIcon ==================//
-void KMdiChildFrm::setIcon( const QPixmap& pxm )
+void KMdiChildFrm::setIcon( const TQPixmap& pxm )
{
- QPixmap p = pxm;
+ TQPixmap p = pxm;
if ( p.width() != 18 || p.height() != 18 )
{
- QImage img = p.convertToImage();
- p = img.smoothScale( 18, 18, QImage::ScaleMin );
+ TQImage img = p.convertToImage();
+ p = img.smoothScale( 18, 18, TQImage::ScaleMin );
}
const bool do_resize = m_pIconButtonPixmap->size() != p.size();
*m_pIconButtonPixmap = p;
@@ -717,7 +717,7 @@ void KMdiChildFrm::setIcon( const QPixmap& pxm )
//============ icon =================//
-QPixmap* KMdiChildFrm::icon() const
+TQPixmap* KMdiChildFrm::icon() const
{
return m_pIconButtonPixmap;
}
@@ -732,7 +732,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
//resize to match the client
int clientYPos = m_pCaption->heightHint() + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_BORDER;
- if ( bAutomaticResize || w->size().isEmpty() || ( w->size() == QSize( 1, 1 ) ) )
+ if ( bAutomaticResize || w->size().isEmpty() || ( w->size() == TQSize( 1, 1 ) ) )
{
if ( m_pManager->topChild() )
{
@@ -750,19 +750,19 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
}
// memorize the focuses in a dictionary because they will get lost during reparenting
- QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
pFocPolDict->setAutoDelete( true );
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over the buttons
- QObject * obj;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject * obj;
int i = 1;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
++it;
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
if ( widg->name( 0 ) == 0 )
{
- QString tmpStr;
+ TQString tmpStr;
tmpStr.setNum( i );
tmpStr = "unnamed" + tmpStr;
widg->setName( tmpStr.latin1() );
@@ -778,9 +778,9 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
if ( w->parent() != this )
{
//reparent to this widget , no flags , point , show it
- QPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
- QSize mincs = w->minimumSize();
- QSize maxcs = w->maximumSize();
+ TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
+ TQSize mincs = w->minimumSize();
+ TQSize maxcs = w->maximumSize();
w->setMinimumSize( 0, 0 );
w->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
@@ -795,7 +795,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
linkChildren( pFocPolDict );
- QObject::connect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+ TQObject::connect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
if ( m_pClient->minimumWidth() > m_pManager->m_defaultChildFrmSize.width() )
setMinimumWidth( m_pClient->minimumSize().width() + KMDI_CHILDFRM_DOUBLE_BORDER );
@@ -809,38 +809,38 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
//============ unsetClient ============//
-void KMdiChildFrm::unsetClient( QPoint positionOffset )
+void KMdiChildFrm::unsetClient( TQPoint positionOffset )
{
if ( !m_pClient )
return ;
- QObject::disconnect( m_pClient, SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, SIGNAL( nowMaximized( bool ) ) );
+ TQObject::disconnect( m_pClient, TQT_SIGNAL( mdiParentNowMaximized( bool ) ), m_pManager, TQT_SIGNAL( nowMaximized( bool ) ) );
//reparent to desktop widget , no flags , point , show it
- QDict<FocusPolicy>* pFocPolDict;
+ TQDict<FocusPolicy>* pFocPolDict;
pFocPolDict = unlinkChildren();
// get name of focused child widget
- QWidget* focusedChildWidget = m_pClient->focusedChildWidget();
+ TQWidget* focusedChildWidget = m_pClient->focusedChildWidget();
const char* nameOfFocusedWidget = "";
if ( focusedChildWidget != 0 )
nameOfFocusedWidget = focusedChildWidget->name();
- QSize mins = m_pClient->minimumSize();
- QSize maxs = m_pClient->maximumSize();
+ TQSize mins = m_pClient->minimumSize();
+ TQSize maxs = m_pClient->maximumSize();
m_pClient->reparent( 0, 0, mapToGlobal( pos() ) - pos() + positionOffset, isVisible() );
m_pClient->setMinimumSize( mins.width(), mins.height() );
m_pClient->setMaximumSize( maxs.width(), maxs.height() );
// remember the focus policies using the dictionary and reset them
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject * obj;
- QWidget* firstFocusableChildWidget = 0;
- QWidget* lastFocusableChildWidget = 0;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject * obj;
+ TQWidget* firstFocusableChildWidget = 0;
+ TQWidget* lastFocusableChildWidget = 0;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol )
@@ -851,7 +851,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
widg->setFocus();
// get first and last focusable widget
- if ( ( widg->focusPolicy() == QWidget::StrongFocus ) || ( widg->focusPolicy() == QWidget::TabFocus ) )
+ if ( ( widg->focusPolicy() == TQWidget::StrongFocus ) || ( widg->focusPolicy() == TQWidget::TabFocus ) )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -860,7 +860,7 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
}
else
{
- if ( widg->focusPolicy() == QWidget::WheelFocus )
+ if ( widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget
@@ -877,29 +877,29 @@ void KMdiChildFrm::unsetClient( QPoint positionOffset )
m_pClient->setLastFocusableChildWidget( lastFocusableChildWidget );
// reset the focus policy of the view
- m_pClient->setFocusPolicy( QWidget::ClickFocus );
+ m_pClient->setFocusPolicy( TQWidget::ClickFocus );
// lose information about the view (because it's undocked now)
m_pClient = 0;
}
//============== linkChildren =============//
-void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
+void KMdiChildFrm::linkChildren( TQDict<FocusPolicy>* pFocPolDict )
{
// reset the focus policies for all widgets in the view (take them from the dictionary)
- QObjectList* list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject* obj;
+ TQObjectList* list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent
if ( pFocPol != 0 )
widg->setFocusPolicy( *pFocPol );
- if ( !( widg->inherits( "QPopupMenu" ) ) )
+ if ( !( widg->inherits( "TQPopupMenu" ) ) )
widg->installEventFilter( this );
}
@@ -907,14 +907,14 @@ void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
delete pFocPolDict;
// reset the focus policies for the rest
- m_pWinIcon->setFocusPolicy( QWidget::NoFocus );
- m_pUnixIcon->setFocusPolicy( QWidget::NoFocus );
- m_pClient->setFocusPolicy( QWidget::ClickFocus );
- m_pCaption->setFocusPolicy( QWidget::NoFocus );
- m_pUndock->setFocusPolicy( QWidget::NoFocus );
- m_pMinimize->setFocusPolicy( QWidget::NoFocus );
- m_pMaximize->setFocusPolicy( QWidget::NoFocus );
- m_pClose->setFocusPolicy( QWidget::NoFocus );
+ 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 );
// install the event filter (catch mouse clicks) for the rest
m_pWinIcon->installEventFilter( this );
@@ -930,24 +930,24 @@ void KMdiChildFrm::linkChildren( QDict<FocusPolicy>* pFocPolDict )
//============== unlinkChildren =============//
-QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
+TQDict<TQWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
{
// memorize the focuses in a dictionary because they will get lost during reparenting
- QDict<FocusPolicy>* pFocPolDict = new QDict<FocusPolicy>;
+ TQDict<FocusPolicy>* pFocPolDict = new TQDict<FocusPolicy>;
pFocPolDict->setAutoDelete( true );
- QObjectList *list = m_pClient->queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets of child frame
- QObject * obj;
+ TQObjectList *list = m_pClient->queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets of child frame
+ TQObject * obj;
int i = 1;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
++it;
- QWidget* w = ( QWidget* ) obj;
+ TQWidget* w = ( TQWidget* ) obj;
// get current widget object name
if ( w->name( 0 ) == 0 )
{
- QString tmpStr;
+ TQString tmpStr;
tmpStr.setNum( i );
tmpStr = "unnamed" + tmpStr;
w->setName( tmpStr.latin1() );
@@ -958,7 +958,7 @@ QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
// memorize focus policy
pFocPolDict->insert( w->name(), pFocPol );
// remove event filter
- ( ( QWidget* ) obj ) ->removeEventFilter( this );
+ ( ( TQWidget* ) obj ) ->removeEventFilter( this );
}
delete list; // delete the list, not the objects
@@ -979,7 +979,7 @@ QDict<QWidget::FocusPolicy>* KMdiChildFrm::unlinkChildren()
//============== resizeEvent ===============//
-void KMdiChildFrm::resizeEvent( QResizeEvent * )
+void KMdiChildFrm::resizeEvent( TQResizeEvent * )
{
doResize(); // an extra method because it can also called directly
}
@@ -1002,7 +1002,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
int frmIconHeight = m_pWinIcon->pixmap() ->height();
int frmIconWidth = m_pWinIcon->pixmap() ->width();
int frmIconOffset = 1;
- QWidget* pIconWidget = m_pWinIcon;
+ TQWidget* pIconWidget = m_pWinIcon;
m_pCaption->setGeometry( KMDI_CHILDFRM_BORDER, KMDI_CHILDFRM_BORDER, captionWidth, captionHeight );
//The buttons are caption children
@@ -1054,7 +1054,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
//Resize the client
if ( !captionOnly && m_pClient )
{
- QSize newClientSize( captionWidth,
+ TQSize newClientSize( captionWidth,
height() - ( KMDI_CHILDFRM_DOUBLE_BORDER + captionHeight + KMDI_CHILDFRM_SEPARATOR ) );
if ( newClientSize != m_pClient->size() )
{
@@ -1065,7 +1065,7 @@ void KMdiChildFrm::doResize( bool captionOnly )
}
}
-static bool hasParent( QObject* par, QObject* o )
+static bool hasParent( TQObject* par, TQObject* o )
{
while ( o && o != par )
o = o->parent();
@@ -1074,15 +1074,15 @@ static bool hasParent( QObject* par, QObject* o )
//============= eventFilter ===============//
-bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
+bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
{
switch ( e->type() )
{
- case QEvent::Enter:
+ case TQEvent::Enter:
{
// check if the receiver is really a child of this frame
bool bIsChild = false;
- QObject* pObj = obj;
+ TQObject* pObj = obj;
while ( ( pObj != 0L ) && !bIsChild )
{
bIsChild = ( pObj == this );
@@ -1093,19 +1093,19 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
unsetResizeCursor();
}
break;
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
if ( !hasParent( m_pClient, obj ) )
{
bool bIsSecondClick = false;
- if ( m_timeMeasure.elapsed() <= QApplication::doubleClickInterval() )
+ if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() )
bIsSecondClick = true; // of a possible double click
if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
{
// in case we didn't click on the icon button
- QFocusEvent focusEvent( QFocusEvent::FocusIn );
- QApplication::sendEvent( qApp->mainWidget(), &focusEvent );
+ TQFocusEvent focusEvent( TQFocusEvent::FocusIn );
+ TQApplication::sendEvent( qApp->mainWidget(), &focusEvent );
if ( m_pClient )
{
m_pClient->updateTimeStamp();
@@ -1114,8 +1114,8 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
{
- QWidget* w = ( QWidget* ) obj;
- if ( ( w->focusPolicy() == QWidget::ClickFocus ) || ( w->focusPolicy() == QWidget::StrongFocus ) )
+ TQWidget* w = ( TQWidget* ) obj;
+ if ( ( w->focusPolicy() == TQWidget::ClickFocus ) || ( w->focusPolicy() == TQWidget::StrongFocus ) )
{
w->setFocus();
}
@@ -1124,7 +1124,7 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
{
// in case we clicked on the icon button
- if ( m_timeMeasure.elapsed() > QApplication::doubleClickInterval() )
+ if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() )
{
showSystemMenu();
m_timeMeasure.start();
@@ -1137,33 +1137,33 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
}
}
break;
- case QEvent::Resize:
+ case TQEvent::Resize:
{
- if ( ( ( QWidget* ) obj == m_pClient ) && ( m_state == Normal ) )
+ if ( ( ( TQWidget* ) obj == m_pClient ) && ( m_state == Normal ) )
{
- QResizeEvent* re = ( QResizeEvent* ) e;
+ TQResizeEvent* re = ( TQResizeEvent* ) e;
int captionHeight = m_pCaption->heightHint();
- QSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER,
+ TQSize newChildFrmSize( re->size().width() + KMDI_CHILDFRM_DOUBLE_BORDER,
re->size().height() + captionHeight + KMDI_CHILDFRM_SEPARATOR + KMDI_CHILDFRM_DOUBLE_BORDER );
if ( newChildFrmSize != size() )
resize( newChildFrmSize );
}
}
break;
- case QEvent::ChildRemoved:
+ case TQEvent::ChildRemoved:
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject* pLostChild = ( ( QChildEvent* ) e )->child();
- if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("QWidget"))*/ )
+ TQObject* pLostChild = ( ( TQChildEvent* ) e )->child();
+ if ( ( pLostChild != 0L ) /*&& (pLostChild->inherits("TQWidget"))*/ )
{
- QObjectList* list = pLostChild->queryList();
+ TQObjectList* list = pLostChild->queryList();
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject* obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
}
@@ -1171,24 +1171,24 @@ bool KMdiChildFrm::eventFilter( QObject *obj, QEvent *e )
}
}
break;
- case QEvent::ChildInserted:
+ case TQEvent::ChildInserted:
{
// 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
- QObject* pNewChild = ( ( QChildEvent* ) e ) ->child();
- if ( ( pNewChild != 0L ) && ::qt_cast<QWidget*>( pNewChild ) )
+ TQObject* pNewChild = ( ( TQChildEvent* ) e ) ->child();
+ if ( ( pNewChild != 0L ) && ::qt_cast<TQWidget*>( pNewChild ) )
{
- QWidget * pNewWidget = static_cast<QWidget*>( pNewChild );
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQWidget * pNewWidget = static_cast<TQWidget*>( pNewChild );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * obj;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
- if ( !::qt_cast<QPopupMenu*>( widg ) )
+ if ( !::qt_cast<TQPopupMenu*>( widg ) )
{
widg->installEventFilter( this );
}
@@ -1216,7 +1216,7 @@ void KMdiChildFrm::raiseAndActivate()
void KMdiChildFrm::setMinimumSize ( int minw, int minh )
{
- QWidget::setMinimumSize( minw, minh );
+ TQWidget::setMinimumSize( minw, minh );
if ( m_state == Maximized )
{
m_pManager->setMinimumSize( minw, minh );
@@ -1225,7 +1225,7 @@ void KMdiChildFrm::setMinimumSize ( int minw, int minh )
//============= systemMenu ===============//
-QPopupMenu* KMdiChildFrm::systemMenu() const
+TQPopupMenu* KMdiChildFrm::systemMenu() const
{
if ( m_pSystemMenu == 0 )
return 0;
@@ -1234,11 +1234,11 @@ QPopupMenu* KMdiChildFrm::systemMenu() const
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
{
- m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
- m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
- m_pSystemMenu->insertItem( i18n( "R&esize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
- m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, SLOT( minimizePressed() ) );
- m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, SLOT( maximizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Move" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "R&esize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "M&inimize" ), this, TQT_SLOT( minimizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "M&aximize" ), this, TQT_SLOT( maximizePressed() ) );
if ( state() == Normal )
m_pSystemMenu->setItemEnabled( m_pSystemMenu->idAt( 0 ), false );
else if ( state() == Maximized )
@@ -1256,20 +1256,20 @@ QPopupMenu* KMdiChildFrm::systemMenu() const
else
{
if ( state() != Normal )
- m_pSystemMenu->insertItem( i18n( "&Restore" ), this, SLOT( restorePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Restore" ), this, TQT_SLOT( restorePressed() ) );
if ( state() != Maximized )
- m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, SLOT( maximizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Maximize" ), this, TQT_SLOT( maximizePressed() ) );
if ( state() != Minimized )
- m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, SLOT( minimizePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Minimize" ), this, TQT_SLOT( minimizePressed() ) );
if ( state() != Maximized )
- m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, SLOT( slot_moveViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "M&ove" ), m_pCaption, TQT_SLOT( slot_moveViaSystemMenu() ) );
if ( state() == Normal )
- m_pSystemMenu->insertItem( i18n( "&Resize" ), this, SLOT( slot_resizeViaSystemMenu() ) );
+ m_pSystemMenu->insertItem( i18n( "&Resize" ), this, TQT_SLOT( slot_resizeViaSystemMenu() ) );
}
- m_pSystemMenu->insertItem( i18n( "&Undock" ), this, SLOT( undockPressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Undock" ), this, TQT_SLOT( undockPressed() ) );
m_pSystemMenu->insertSeparator();
- m_pSystemMenu->insertItem( i18n( "&Close" ), this, SLOT( closePressed() ) );
+ m_pSystemMenu->insertItem( i18n( "&Close" ), this, TQT_SLOT( closePressed() ) );
return m_pSystemMenu;
}
@@ -1280,15 +1280,15 @@ void KMdiChildFrm::showSystemMenu()
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
m_pUnixIcon->setDown( false );
- QPoint popupmenuPosition;
+ TQPoint popupmenuPosition;
- QRect iconGeom;
+ TQRect iconGeom;
if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
iconGeom = m_pWinIcon->geometry();
else
iconGeom = m_pUnixIcon->geometry();
- popupmenuPosition = QPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER );
+ popupmenuPosition = TQPoint( iconGeom.x(), iconGeom.y() + captionHeight() + KMDI_CHILDFRM_BORDER );
systemMenu() ->popup( mapToGlobal( popupmenuPosition ) );
}
@@ -1301,8 +1301,8 @@ void KMdiChildFrm::switchToMinimizeLayout()
// temporary use of minimize button for restore function
m_pMinimize->setPixmap( *m_pRestoreButtonPixmap );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( minimizePressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), this, SLOT( restorePressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( restorePressed() ) );
// resizing
resize( 300, minimumHeight() );
@@ -1329,35 +1329,35 @@ void KMdiChildFrm::redecorateButtons()
if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::Win95Look )
{
- m_pMinButtonPixmap = new QPixmap( win_minbutton );
- m_pMaxButtonPixmap = new QPixmap( win_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( win_closebutton );
- m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( win_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( win_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( win_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( win_undockbutton );
}
else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDE1Look )
{
- m_pMinButtonPixmap = new QPixmap( kde_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde_undockbutton );
}
else if ( KMdiMainFrm::frameDecorOfAttachedViews() == KMdi::KDELook )
{
- m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde2_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde2_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2_undockbutton );
}
else
{ // kde2laptop look
- m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
- m_pMaxButtonPixmap = new QPixmap( kde2laptop_maxbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
- m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton );
+ m_pMaxButtonPixmap = new TQPixmap( kde2laptop_maxbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton );
}
m_pUnixIcon->setAutoRaise( true );
@@ -1392,16 +1392,16 @@ void KMdiChildFrm::redecorateButtons()
m_pUndock->setPixmap( *m_pUndockButtonPixmap );
}
-QRect KMdiChildFrm::mdiAreaContentsRect() const
+TQRect KMdiChildFrm::mdiAreaContentsRect() const
{
- QFrame * p = ( QFrame* ) parentWidget();
+ TQFrame * p = ( TQFrame* ) parentWidget();
if ( p )
{
return p->contentsRect();
}
else
{
- QRect empty;
+ TQRect empty;
return empty;
}
}
diff --git a/kmdi/kmdichildfrm.h b/kmdi/kmdichildfrm.h
index 58959a42a..c6d1a6183 100644
--- a/kmdi/kmdichildfrm.h
+++ b/kmdi/kmdichildfrm.h
@@ -28,14 +28,14 @@
#ifndef _KMDI_CHILD_FRM_H_
#define _KMDI_CHILD_FRM_H_
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qdatetime.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
-#include <qdict.h>
+#include <tqdict.h>
#include "kmdichildfrmcaption.h"
@@ -53,8 +53,8 @@ class KMDI_EXPORT KMdiWin32IconButton : public QLabel
{
Q_OBJECT
public:
- KMdiWin32IconButton( QWidget* parent, const char* name = 0 );
- virtual void mousePressEvent( QMouseEvent* );
+ KMdiWin32IconButton( TQWidget* parent, const char* name = 0 );
+ virtual void mousePressEvent( TQMouseEvent* );
signals:
void pressed();
@@ -65,58 +65,58 @@ signals:
*/
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for move
+ * @short a TQCustomEvent for move
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmMoveEvent : public QCustomEvent
{
public:
- KMdiChildFrmMoveEvent( QMoveEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_Move ) ), e ) {}
+ KMdiChildFrmMoveEvent( TQMoveEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_Move ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for begin of dragging
+ * @short a TQCustomEvent for begin of dragging
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmDragBeginEvent : public QCustomEvent
{
public:
- KMdiChildFrmDragBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragBegin ) ), e ) {}
+ KMdiChildFrmDragBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragBegin ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for end of dragging
+ * @short a TQCustomEvent for end of dragging
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmDragEndEvent : public QCustomEvent
{
public:
- KMdiChildFrmDragEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_DragEnd ) ), e ) {}
+ KMdiChildFrmDragEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_DragEnd ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for begin of resizing
+ * @short a TQCustomEvent for begin of resizing
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmResizeBeginEvent : public QCustomEvent
{
public:
- KMdiChildFrmResizeBeginEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {}
+ KMdiChildFrmResizeBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeBegin ) ), e ) {}
};
//------------------------------------------------------------------------------
/**
- * @short a QCustomEvent for end of resizing
+ * @short a TQCustomEvent for end of resizing
* This special event will be useful, to inform view about child frame event.
*/
class KMDI_EXPORT KMdiChildFrmResizeEndEvent : public QCustomEvent
{
public:
- KMdiChildFrmResizeEndEvent( QMouseEvent *e ) : QCustomEvent( QEvent::Type( QEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {}
+ KMdiChildFrmResizeEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User + int( KMdi::EV_ResizeEnd ) ), e ) {}
};
@@ -144,23 +144,23 @@ protected:
KMdiChildArea* m_pManager;
KMdiChildFrmCaption* m_pCaption;
KMdiWin32IconButton* m_pWinIcon;
- QToolButton* m_pUnixIcon;
- QToolButton* m_pMinimize;
- QToolButton* m_pMaximize;
- QToolButton* m_pClose;
- QToolButton* m_pUndock;
+ TQToolButton* m_pUnixIcon;
+ TQToolButton* m_pMinimize;
+ TQToolButton* m_pMaximize;
+ TQToolButton* m_pClose;
+ TQToolButton* m_pUndock;
MdiWindowState m_state;
- QRect m_restoredRect;
+ TQRect m_restoredRect;
int m_iResizeCorner;
int m_iLastCursorCorner;
bool m_bResizing;
bool m_bDragging;
- QPixmap* m_pIconButtonPixmap;
- QPixmap* m_pMinButtonPixmap;
- QPixmap* m_pMaxButtonPixmap;
- QPixmap* m_pRestoreButtonPixmap;
- QPixmap* m_pCloseButtonPixmap;
- QPixmap* m_pUndockButtonPixmap;
+ TQPixmap* m_pIconButtonPixmap;
+ TQPixmap* m_pMinButtonPixmap;
+ TQPixmap* m_pMaxButtonPixmap;
+ TQPixmap* m_pRestoreButtonPixmap;
+ TQPixmap* m_pCloseButtonPixmap;
+ TQPixmap* m_pUndockButtonPixmap;
/**
* Every child frame window has an temporary ID in the Window menu of the child area.
@@ -170,12 +170,12 @@ protected:
/**
* Imitates a system menu for child frame windows
*/
- QPopupMenu* m_pSystemMenu;
+ TQPopupMenu* m_pSystemMenu;
- QSize m_oldClientMinSize;
- QSize m_oldClientMaxSize;
- QLayout::ResizeMode m_oldLayoutResizeMode;
- QTime m_timeMeasure;
+ TQSize m_oldClientMinSize;
+ TQSize m_oldClientMaxSize;
+ TQLayout::ResizeMode m_oldLayoutResizeMode;
+ TQTime m_timeMeasure;
// methods
public:
@@ -202,17 +202,17 @@ public:
* Reparents the client widget to 0 (desktop), moves with an offset from the original position
* Removes the event filter.
*/
- void unsetClient( QPoint positionOffset = QPoint( 0, 0 ) );
+ void unsetClient( TQPoint positionOffset = TQPoint( 0, 0 ) );
/**
* Sets the window icon pointer.
*/
- void setIcon( const QPixmap &pxm );
+ void setIcon( const TQPixmap &pxm );
/**
* Returns the child frame icon.
*/
- QPixmap* icon() const;
+ TQPixmap* icon() const;
/**
* Enables or disables the close button
@@ -222,12 +222,12 @@ public:
/**
* Sets the caption of this window
*/
- void setCaption( const QString& text );
+ void setCaption( const TQString& text );
/**
* Gets the caption of this mdi child.
*/
- const QString& caption() { return m_pCaption->m_szCaption; }
+ const TQString& caption() { return m_pCaption->m_szCaption; }
/**
* Minimizes, Maximizes, or restores the window.
@@ -242,17 +242,17 @@ public:
/**
* Returns the inner client area of the parent of this (which is KMdiChildArea).
*/
- QRect mdiAreaContentsRect() const;
+ TQRect mdiAreaContentsRect() const;
/**
* Returns the geometry that will be restored by calling restore().
*/
- QRect restoreGeometry() const;
+ TQRect restoreGeometry() const;
/**
* Sets the geometry that will be restored by calling restore().
*/
- void setRestoreGeometry( const QRect& newRestGeo );
+ void setRestoreGeometry( const TQRect& newRestGeo );
/**
* Forces updating the rects of the caption and so...
@@ -263,7 +263,7 @@ public:
/**
* Returns the system menu.
*/
- QPopupMenu* systemMenu() const;
+ TQPopupMenu* systemMenu() const;
/**
* Returns the caption bar height
@@ -309,39 +309,39 @@ protected:
* Resizes the captionbar, relayouts the position of the system buttons,
* and calls resize for its embedded KMdiChildView with the proper size
*/
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Reimplemented from the base class.
* Detects if the mouse is on the edge of window and what resize cursor must be set.
* Calls KMdiChildFrm::resizeWindow if it is in m_bResizing.
*/
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
/**
* Reimplemented from the base class.
* Colours the caption, raises the childfrm widget and
* turns to resize mode if it is on the edge (resize-sensitive area)
*/
- virtual void mousePressEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
/**
* Reimplemented from the base class.
* Sets a normal cursor and leaves the resize mode.
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Reimplemented from the base class.
* give its child view the chance to notify a childframe move... that's why it sends
* a KMdiChildMovedEvent to the embedded KMdiChildView .
*/
- virtual void moveEvent( QMoveEvent* me );
+ virtual void moveEvent( TQMoveEvent* me );
/**
* Reimplemented from the base class. If not in resize mode, it sets the mouse cursor to normal appearance.
*/
- virtual void leaveEvent( QEvent * );
+ virtual void leaveEvent( TQEvent * );
/**
* Reimplemented from the base class.
@@ -349,7 +349,7 @@ protected:
* -the client's mousebutton press events which raises and activates the childframe
* -the client's resize event which resizes this widget as well
*/
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
/**
* Calculates the new geometry from the new mouse position given as parameters
@@ -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( QDict<FocusPolicy>* pFocPolDict );
+ void linkChildren( TQDict<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)
*/
- QDict<QWidget::FocusPolicy>* unlinkChildren();
+ TQDict<TQWidget::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 815d07d44..65d348f30 100644
--- a/kmdi/kmdichildfrmcaption.cpp
+++ b/kmdi/kmdichildfrmcaption.cpp
@@ -28,11 +28,11 @@
#include "kmdichildfrmcaption.h"
#include "kmdichildfrmcaption.moc"
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
#include "kmdidefines.h"
#include "kmdichildfrm.h"
@@ -66,7 +66,7 @@
//============== KMdiChildFrmCaption =============//
KMdiChildFrmCaption::KMdiChildFrmCaption( KMdiChildFrm *parent )
- : QWidget( parent, "kmdi_childfrmcaption" )
+ : TQWidget( parent, "kmdi_childfrmcaption" )
{
m_szCaption = i18n( "Unnamed" );
m_bActive = false;
@@ -83,14 +83,14 @@ KMdiChildFrmCaption::~KMdiChildFrmCaption()
//============= mousePressEvent ==============//
-void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
{
setMouseTracking( false );
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
{
- QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
}
m_pParent->m_bDragging = true;
m_offset = mapToParent( e->pos() );
@@ -103,12 +103,12 @@ void KMdiChildFrmCaption::mousePressEvent( QMouseEvent *e )
//============= mouseReleaseEvent ============//
-void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
{
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
releaseMouse();
if ( m_pParent->m_bDragging )
@@ -119,7 +119,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmDragEndEvent ue( e );
if ( m_pParent->m_pClient != 0L )
- QApplication::sendEvent( m_pParent->m_pClient, &ue );
+ TQApplication::sendEvent( m_pParent->m_pClient, &ue );
m_bChildInDrag = false;
}
@@ -128,7 +128,7 @@ void KMdiChildFrmCaption::mouseReleaseEvent( QMouseEvent *e )
}
//============== mouseMoveEvent =============//
-void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
+void KMdiChildFrmCaption::mouseMoveEvent( TQMouseEvent *e )
{
if ( !m_pParent->m_bDragging )
return ;
@@ -138,12 +138,12 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
//notify child view
KMdiChildFrmDragBeginEvent ue( e );
if ( m_pParent->m_pClient != 0L )
- QApplication::sendEvent( m_pParent->m_pClient, &ue );
+ TQApplication::sendEvent( m_pParent->m_pClient, &ue );
m_bChildInDrag = true;
}
- QPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() );
+ TQPoint relMousePosInChildArea = m_pParent->m_pManager->mapFromGlobal( e->globalPos() );
// mouse out of child area? stop child frame dragging
if ( !m_pParent->m_pManager->rect().contains( relMousePosInChildArea ) )
@@ -160,7 +160,7 @@ void KMdiChildFrmCaption::mouseMoveEvent( QMouseEvent *e )
if ( relMousePosInChildArea.y() > m_pParent->m_pManager->height() )
relMousePosInChildArea.ry() = m_pParent->m_pManager->height();
}
- QPoint mousePosInChildArea = relMousePosInChildArea - m_offset;
+ TQPoint mousePosInChildArea = relMousePosInChildArea - m_offset;
// set new child frame position
parentWidget() ->move( mousePosInChildArea );
@@ -187,7 +187,7 @@ void KMdiChildFrmCaption::setActive( bool bActive )
//=============== setCaption ===============//
-void KMdiChildFrmCaption::setCaption( const QString& text )
+void KMdiChildFrmCaption::setCaption( const TQString& text )
{
m_szCaption = text;
repaint( false );
@@ -224,10 +224,10 @@ int KMdiChildFrmCaption::heightHint()
//=============== paintEvent ==============//
-void KMdiChildFrmCaption::paintEvent( QPaintEvent * )
+void KMdiChildFrmCaption::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QRect r = rect();
+ TQPainter p( this );
+ TQRect r = rect();
p.setFont( m_pParent->m_pManager->m_captionFont );
if ( m_bActive )
@@ -252,15 +252,15 @@ void KMdiChildFrmCaption::paintEvent( QPaintEvent * )
r.setLeft( r.left() + 30 );
int captionWidthForText = width() - 4 * m_pParent->m_pClose->width() - m_pParent->icon() ->width() - 5;
- QString text = abbreviateText( m_szCaption, captionWidthForText );
+ TQString text = abbreviateText( m_szCaption, captionWidthForText );
p.drawText( r, AlignVCenter | AlignLeft | SingleLine, text );
}
-QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
+TQString KMdiChildFrmCaption::abbreviateText( TQString origStr, int maxWidth )
{
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int actualWidth = fm.width( origStr );
int realLetterCount = origStr.length();
@@ -272,7 +272,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
newLetterCount = realLetterCount; // should be 0 anyway
int w = maxWidth + 1;
- QString s = origStr;
+ TQString s = origStr;
if ( newLetterCount <= 0 )
s = "";
@@ -291,7 +291,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
s = origStr.left( 1 );
}
}
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
w = fm.width( s );
newLetterCount--;
}
@@ -300,7 +300,7 @@ QString KMdiChildFrmCaption::abbreviateText( QString origStr, int maxWidth )
//============= mouseDoubleClickEvent ===========//
-void KMdiChildFrmCaption::mouseDoubleClickEvent( QMouseEvent * )
+void KMdiChildFrmCaption::mouseDoubleClickEvent( TQMouseEvent * )
{
m_pParent->maximizePressed();
}
@@ -313,10 +313,10 @@ void KMdiChildFrmCaption::slot_moveViaSystemMenu()
grabMouse();
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
- QApplication::setOverrideCursor( Qt::sizeAllCursor, true );
+ TQApplication::setOverrideCursor( Qt::sizeAllCursor, true );
m_pParent->m_bDragging = true;
- m_offset = mapFromGlobal( QCursor::pos() );
+ m_offset = mapFromGlobal( TQCursor::pos() );
}
// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/kmdi/kmdichildfrmcaption.h b/kmdi/kmdichildfrmcaption.h
index 6100acc02..1bc47ac1f 100644
--- a/kmdi/kmdichildfrmcaption.h
+++ b/kmdi/kmdichildfrmcaption.h
@@ -27,7 +27,7 @@
#ifndef _KMDI_CHILD_FRM_CAPTION_H_
#define _KMDI_CHILD_FRM_CAPTION_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kmdidefines.h"
@@ -63,7 +63,7 @@ public:
/**
* Repaint with a new caption bar title
*/
- void setCaption( const QString& text );
+ void setCaption( const TQString& text );
/**
* Returns the caption bar height depending on the used font
@@ -80,40 +80,40 @@ protected:
/**
* Draws the caption bar and its title using the settings
*/
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
/**
* The same as KMdiChildFrmCaption::slot_moveViaSystemMenu
*/
- virtual void mousePressEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
/**
* Calls maximizePressed of the parent widget ( KMdiChildFrm )
*/
- virtual void mouseDoubleClickEvent( QMouseEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
/**
* Restore the normal mouse cursor, set the state variable back to 'not moving'
*/
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
/**
* Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move
*/
- virtual void mouseMoveEvent( QMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
/**
* Computes a new abbreviated string from a given string depending on a given maximum width
* @todo Replace with a call to a KStringHandler function instead of rolling our own
*/
- QString abbreviateText( QString origStr, int maxWidth );
+ TQString abbreviateText( TQString origStr, int maxWidth );
// attributes
public:
/**
* the title string shown in the caption bar
*/
- QString m_szCaption;
+ TQString m_szCaption;
protected: // Protected attributes
/**
@@ -129,7 +129,7 @@ protected: // Protected attributes
/**
* the position offset related to its parent widget (internally used for translating mouse move positions
*/
- QPoint m_offset;
+ TQPoint m_offset;
/**
* True if the child knows that it is currently being dragged.
diff --git a/kmdi/kmdichildview.cpp b/kmdi/kmdichildview.cpp
index ffe30b652..37414fe0a 100644
--- a/kmdi/kmdichildview.cpp
+++ b/kmdi/kmdichildview.cpp
@@ -32,20 +32,20 @@
#include "kmdichildview.h"
#include "kmdichildview.moc"
-#include <qdatetime.h>
-#include <qobjectlist.h>
+#include <tqdatetime.h>
+#include <tqobjectlist.h>
#include "kmdimainfrm.h"
#include "kmdichildfrm.h"
#include "kmdidefines.h"
#include <kdebug.h>
#include <klocale.h>
-#include <qiconset.h>
+#include <tqiconset.h>
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, const char* name, WFlags f )
- : QWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( const TQString& caption, TQWidget* parentWidget, const char* name, WFlags f )
+ : TQWidget( parentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -73,8 +73,8 @@ KMdiChildView::KMdiChildView( const QString& caption, QWidget* parentWidget, con
//============ KMdiChildView ============//
-KMdiChildView::KMdiChildView( QWidget* parentWidget, const char* name, WFlags f )
- : QWidget( parentWidget, name, f )
+KMdiChildView::KMdiChildView( TQWidget* parentWidget, const char* name, WFlags f )
+ : TQWidget( parentWidget, name, f )
, m_focusedChildWidget( 0L )
, m_firstFocusableChildWidget( 0L )
, m_lastFocusableChildWidget( 0L )
@@ -102,7 +102,7 @@ KMdiChildView::~KMdiChildView()
kdDebug( 760 ) << k_funcinfo << endl;
}
-void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
+void KMdiChildView::trackIconAndCaptionChanges( TQWidget *view )
{
m_trackChanges = view;
}
@@ -110,41 +110,41 @@ void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
//============== internal geometry ==============//
-QRect KMdiChildView::internalGeometry() const
+TQRect KMdiChildView::internalGeometry() const
{
if ( mdiParent() )
{ // is attached
// get the client area coordinates inside the MDI child frame
- QRect posInFrame = geometry();
+ TQRect posInFrame = geometry();
// map these values to the parent of the MDI child frame
// (this usually is the MDI child area) and return
- QPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
- QSize sz = size();
- return QRect( ptTopLeft, sz );
+ TQPoint ptTopLeft = mdiParent() ->mapToParent( posInFrame.topLeft() );
+ TQSize sz = size();
+ return TQRect( ptTopLeft, sz );
}
else
{
- QRect geo = geometry();
- QRect frameGeo = externalGeometry();
- return QRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
+ TQRect geo = geometry();
+ TQRect frameGeo = externalGeometry();
+ return TQRect( frameGeo.x(), frameGeo.y(), geo.width(), geo.height() );
// return geometry();
}
}
//============== set internal geometry ==============//
-void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
+void KMdiChildView::setInternalGeometry( const TQRect& newGeometry )
{
if ( mdiParent() )
{ // is attached
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
- QRect newGeoQt;
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
@@ -159,13 +159,13 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
else
{
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
- QRect newGeoQt;
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() - nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() - nFrameSizeTop );
@@ -180,14 +180,14 @@ void KMdiChildView::setInternalGeometry( const QRect& newGeometry )
//============== external geometry ==============//
-QRect KMdiChildView::externalGeometry() const
+TQRect KMdiChildView::externalGeometry() const
{
return mdiParent() ? mdiParent()->frameGeometry() : frameGeometry();
}
//============== set external geometry ==============//
-void KMdiChildView::setExternalGeometry( const QRect& newGeometry )
+void KMdiChildView::setExternalGeometry( const TQRect& newGeometry )
{
if ( mdiParent() )
{ // is attached
@@ -196,16 +196,16 @@ void KMdiChildView::setExternalGeometry( const QRect& newGeometry )
else
{
// retrieve the frame size
- QRect geo = internalGeometry();
- QRect frameGeo = externalGeometry();
+ TQRect geo = internalGeometry();
+ TQRect frameGeo = externalGeometry();
int nTotalFrameWidth = frameGeo.width() - geo.width();
int nTotalFrameHeight = frameGeo.height() - geo.height();
int nFrameSizeTop = geo.y() - frameGeo.y();
int nFrameSizeLeft = geo.x() - frameGeo.x();
- // create the new geometry that is accepted by the QWidget::setGeometry() method
+ // create the new geometry that is accepted by the TQWidget::setGeometry() method
// not attached => the window system makes the frame
- QRect newGeoQt;
+ TQRect newGeoQt;
newGeoQt.setX( newGeometry.x() + nFrameSizeLeft );
newGeoQt.setY( newGeometry.y() + nFrameSizeTop );
newGeoQt.setWidth( newGeometry.width() - nTotalFrameWidth );
@@ -234,7 +234,7 @@ void KMdiChildView::minimize( bool bAnimate )
void KMdiChildView::showMinimized()
{
emit isMinimizedNow();
- QWidget::showMinimized();
+ TQWidget::showMinimized();
}
//slot:
@@ -262,7 +262,7 @@ void KMdiChildView::maximize( bool bAnimate )
void KMdiChildView::showMaximized()
{
emit isMaximizedNow();
- QWidget::showMaximized();
+ TQWidget::showMaximized();
}
//slot:
@@ -273,7 +273,7 @@ void KMdiChildView::maximize()
//============== restoreGeometry ================//
-QRect KMdiChildView::restoreGeometry()
+TQRect KMdiChildView::restoreGeometry()
{
if ( mdiParent() )
return mdiParent() ->restoreGeometry();
@@ -283,7 +283,7 @@ QRect KMdiChildView::restoreGeometry()
//============== setRestoreGeometry ================//
-void KMdiChildView::setRestoreGeometry( const QRect& newRestGeo )
+void KMdiChildView::setRestoreGeometry( const TQRect& newRestGeo )
{
if ( mdiParent() )
mdiParent()->setRestoreGeometry( newRestGeo );
@@ -310,7 +310,7 @@ bool KMdiChildView::isMinimized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Minimized );
else
- return QWidget::isMinimized();
+ return TQWidget::isMinimized();
}
//============== isMaximized ? ==================//
@@ -320,7 +320,7 @@ bool KMdiChildView::isMaximized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Maximized );
else
- return QWidget::isMaximized();
+ return TQWidget::isMaximized();
}
//============== restore ================//
@@ -342,7 +342,7 @@ void KMdiChildView::restore()
void KMdiChildView::showNormal()
{
emit isRestoredNow();
- QWidget::showNormal();
+ TQWidget::showNormal();
}
//=============== youAreAttached ============//
@@ -363,28 +363,28 @@ void KMdiChildView::youAreDetached()
if ( myIconPtr() )
setIcon( *( myIconPtr() ) );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
emit isDetachedNow();
}
//================ setCaption ================//
// this set the caption of only the window
-void KMdiChildView::setCaption( const QString& szCaption )
+void KMdiChildView::setCaption( const TQString& szCaption )
{
// this will work only for window
m_szCaption = szCaption;
if ( mdiParent() )
mdiParent() ->setCaption( m_szCaption );
else //have to call the parent one
- QWidget::setCaption( m_szCaption );
+ TQWidget::setCaption( m_szCaption );
emit windowCaptionChanged( m_szCaption );
}
//============== closeEvent ================//
-void KMdiChildView::closeEvent( QCloseEvent *e )
+void KMdiChildView::closeEvent( TQCloseEvent *e )
{
e->ignore(); //we ignore the event , and then close later if needed.
emit childWindowCloseRequest( this );
@@ -392,19 +392,19 @@ void KMdiChildView::closeEvent( QCloseEvent *e )
//================ myIconPtr =================//
-QPixmap* KMdiChildView::myIconPtr()
+TQPixmap* KMdiChildView::myIconPtr()
{
return 0;
}
//============= focusInEvent ===============//
-void KMdiChildView::focusInEvent( QFocusEvent *e )
+void KMdiChildView::focusInEvent( TQFocusEvent *e )
{
- QWidget::focusInEvent( e );
+ TQWidget::focusInEvent( e );
// every widget get a focusInEvent when a popup menu is opened!?! -> maybe bug of QT
- if ( e && ( ( e->reason() ) == QFocusEvent::Popup ) )
+ if ( e && ( ( e->reason() ) == TQFocusEvent::Popup ) )
return ;
@@ -457,17 +457,17 @@ void KMdiChildView::activate()
//============= focusOutEvent ===============//
-void KMdiChildView::focusOutEvent( QFocusEvent* e )
+void KMdiChildView::focusOutEvent( TQFocusEvent* e )
{
- QWidget::focusOutEvent( e );
+ TQWidget::focusOutEvent( e );
emit lostFocus( this );
}
//============= resizeEvent ===============//
-void KMdiChildView::resizeEvent( QResizeEvent* e )
+void KMdiChildView::resizeEvent( TQResizeEvent* e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
if ( m_stateChanged )
{
@@ -493,16 +493,16 @@ void KMdiChildView::slot_childDestroyed()
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- const QObject * pLostChild = QObject::sender();
+ const TQObject * pLostChild = TQObject::sender();
if ( pLostChild && ( pLostChild->isWidgetType() ) )
{
- QObjectList* list = ( ( QObject* ) ( pLostChild ) ) ->queryList( "QWidget" );
+ TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" );
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject* obj;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) obj;
+ TQWidget * widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
if ( m_firstFocusableChildWidget == widg )
@@ -519,16 +519,16 @@ void KMdiChildView::slot_childDestroyed()
}
//============= eventFilter ===============//
-bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
+bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress && isAttached() )
+ if ( e->type() == TQEvent::KeyPress && isAttached() )
{
- QKeyEvent* ke = ( QKeyEvent* ) e;
+ TQKeyEvent* ke = ( TQKeyEvent* ) e;
if ( ke->key() == Qt::Key_Tab )
{
- QWidget* w = ( QWidget* ) obj;
+ TQWidget* w = ( TQWidget* ) obj;
FocusPolicy wfp = w->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || w->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || w->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_lastFocusableChildWidget != 0 )
{
@@ -541,13 +541,13 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::FocusIn )
+ else if ( e->type() == TQEvent::FocusIn )
{
if ( obj->isWidgetType() )
{
- QObjectList * list = queryList( "QWidget" );
+ TQObjectList * list = queryList( "TQWidget" );
if ( list->find( obj ) != -1 )
- m_focusedChildWidget = ( QWidget* ) obj;
+ m_focusedChildWidget = ( TQWidget* ) obj;
delete list; // delete the list, not the objects
}
@@ -562,24 +562,24 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::ChildRemoved )
+ else if ( e->type() == TQEvent::ChildRemoved )
{
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
- QObject * pLostChild = ( ( QChildEvent* ) e ) ->child();
+ TQObject * pLostChild = ( ( TQChildEvent* ) e ) ->child();
if ( ( pLostChild != 0L ) && ( pLostChild->isWidgetType() ) )
{
- QObjectList * list = pLostChild->queryList( "QWidget" );
+ TQObjectList * list = pLostChild->queryList( "TQWidget" );
list->insert( 0, pLostChild ); // add the lost child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all lost child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all lost child widgets
+ TQObject * o;
while ( ( o = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) o;
+ TQWidget * widg = ( TQWidget* ) o;
++it;
widg->removeEventFilter( this );
FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_firstFocusableChildWidget == widg )
m_firstFocusableChildWidget = 0L; // reset first widget
@@ -591,29 +591,29 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
delete list; // delete the list, not the objects
}
}
- else if ( e->type() == QEvent::ChildInserted )
+ 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
// (as we did when we were added to the MDI system).
- QObject * pNewChild = ( ( QChildEvent* ) e ) ->child();
+ TQObject * pNewChild = ( ( TQChildEvent* ) e ) ->child();
if ( ( pNewChild != 0L ) && ( pNewChild->isWidgetType() ) )
{
- QWidget * pNewWidget = ( QWidget* ) pNewChild;
+ TQWidget * pNewWidget = ( TQWidget* ) pNewChild;
if ( pNewWidget->testWFlags( Qt::WType_Dialog | Qt::WShowModal ) )
return false;
- QObjectList *list = pNewWidget->queryList( "QWidget" );
+ TQObjectList *list = pNewWidget->queryList( "TQWidget" );
list->insert( 0, pNewChild ); // add the new child to the list too, just to save code
- QObjectListIt it( *list ); // iterate over all new child widgets
- QObject * o;
+ TQObjectListIt it( *list ); // iterate over all new child widgets
+ TQObject * o;
while ( ( o = it.current() ) != 0 )
{ // for each found object...
- QWidget * widg = ( QWidget* ) o;
+ TQWidget * widg = ( TQWidget* ) o;
++it;
widg->installEventFilter( this );
- connect( widg, SIGNAL( destroyed() ), this, SLOT( slot_childDestroyed() ) );
+ connect( widg, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slot_childDestroyed() ) );
FocusPolicy wfp = widg->focusPolicy();
- if ( wfp == QWidget::StrongFocus || wfp == QWidget::TabFocus || widg->focusPolicy() == QWidget::WheelFocus )
+ if ( wfp == TQWidget::StrongFocus || wfp == TQWidget::TabFocus || widg->focusPolicy() == TQWidget::WheelFocus )
{
if ( m_firstFocusableChildWidget == 0 )
m_firstFocusableChildWidget = widg; // first widge
@@ -626,15 +626,15 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
}
else
{
- if ( e->type() == QEvent::IconChange )
+ if ( e->type() == TQEvent::IconChange )
{
- // qDebug("KMDiChildView:: QEvent:IconChange intercepted\n");
+ // qDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
if ( obj == this )
- iconUpdated( this, icon() ? ( *icon() ) : QPixmap() );
+ iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
else if ( obj == m_trackChanges )
- setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : QPixmap() );
+ setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() );
}
- if ( e->type() == QEvent::CaptionChange )
+ if ( e->type() == TQEvent::CaptionChange )
{
if ( obj == this )
captionUpdated( this, caption() );
@@ -647,41 +647,41 @@ bool KMdiChildView::eventFilter( QObject *obj, QEvent *e )
/** Switches interposing in event loop of all current child widgets off. */
void KMdiChildView::removeEventFilterForAllChildren()
{
- QObjectList* list = queryList( "QWidget" );
- QObjectListIt it( *list ); // iterate over all child widgets
- QObject* obj;
+ TQObjectList* list = queryList( "TQWidget" );
+ TQObjectListIt it( *list ); // iterate over all child widgets
+ TQObject* obj;
while ( ( obj = it.current() ) != 0 )
{ // for each found object...
- QWidget* widg = ( QWidget* ) obj;
+ TQWidget* widg = ( TQWidget* ) obj;
++it;
widg->removeEventFilter( this );
}
delete list; // delete the list, not the objects
}
-QWidget* KMdiChildView::focusedChildWidget()
+TQWidget* KMdiChildView::focusedChildWidget()
{
return m_focusedChildWidget;
}
-void KMdiChildView::setFirstFocusableChildWidget( QWidget* firstFocusableChildWidget )
+void KMdiChildView::setFirstFocusableChildWidget( TQWidget* firstFocusableChildWidget )
{
m_firstFocusableChildWidget = firstFocusableChildWidget;
}
-void KMdiChildView::setLastFocusableChildWidget( QWidget* lastFocusableChildWidget )
+void KMdiChildView::setLastFocusableChildWidget( TQWidget* lastFocusableChildWidget )
{
m_lastFocusableChildWidget = lastFocusableChildWidget;
}
/** Set a new value of the task bar button caption */
-void KMdiChildView::setTabCaption ( const QString& stbCaption )
+void KMdiChildView::setTabCaption ( const TQString& stbCaption )
{
m_sTabCaption = stbCaption;
emit tabCaptionChanged( m_sTabCaption );
}
-void KMdiChildView::setMDICaption ( const QString& caption )
+void KMdiChildView::setMDICaption ( const TQString& caption )
{
setCaption( caption );
setTabCaption( caption );
@@ -714,7 +714,7 @@ void KMdiChildView::slot_clickedInDockMenu()
void KMdiChildView::setMinimumSize( int minw, int minh )
{
- QWidget::setMinimumSize( minw, minh );
+ TQWidget::setMinimumSize( minw, minh );
if ( mdiParent() && mdiParent()->state() != KMdiChildFrm::Minimized )
{
mdiParent() ->setMinimumSize( minw + KMDI_CHILDFRM_DOUBLE_BORDER,
@@ -738,7 +738,7 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh )
mdiParent()->setMaximumSize( w, h );
}
- QWidget::setMaximumSize( maxw, maxh );
+ TQWidget::setMaximumSize( maxw, maxh );
}
//============= show ===============//
@@ -748,7 +748,7 @@ void KMdiChildView::show()
if ( mdiParent() )
mdiParent()->show();
- QWidget::show();
+ TQWidget::show();
}
//============= hide ===============//
@@ -758,7 +758,7 @@ void KMdiChildView::hide()
if ( mdiParent() )
mdiParent()->hide();
- QWidget::hide();
+ TQWidget::hide();
}
//============= raise ===============//
@@ -768,7 +768,7 @@ void KMdiChildView::raise()
if ( mdiParent() ) //TODO Check Z-order
mdiParent()->raise();
- QWidget::raise();
+ TQWidget::raise();
}
// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
diff --git a/kmdi/kmdichildview.h b/kmdi/kmdichildview.h
index fda0b95bc..656c17fd7 100644
--- a/kmdi/kmdichildview.h
+++ b/kmdi/kmdichildview.h
@@ -31,11 +31,11 @@
#ifndef _KMDI_CHILD_VIEW_H_
#define _KMDI_CHILD_VIEW_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include "kmdichildfrm.h"
@@ -65,18 +65,18 @@ class KMdiChildViewPrivate;
* or you wrap them by a KMdiChildView somehow like this:
*
* \code
- * void DocViewMan::addKMdiFrame(QWidget* pNewView, bool bShow, const QPixmap& icon)
+ * void DocViewMan::addKMdiFrame(TQWidget* pNewView, bool bShow, const TQPixmap& icon)
* {
* // cover it by a KMdi childview and add that MDI system
* KMdiChildView* pMDICover = new KMdiChildView( pNewView->caption());
* pMDICover->setIcon(icon);
* m_MDICoverList.append( pMDICover);
- * QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout");
- * pNewView->reparent( pMDICover, QPoint(0,0));
+ * TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout");
+ * pNewView->reparent( pMDICover, TQPoint(0,0));
* pLayout->addWidget( pNewView);
* pMDICover->setName( pNewView->name());
* // captions
- * QString shortName = pNewView->caption();
+ * TQString shortName = pNewView->caption();
* int length = shortName.length();
* shortName = shortName.right(length - (shortName.findRev('/') +1));
* pMDICover->setTabCaption( shortName);
@@ -94,7 +94,7 @@ class KMdiChildViewPrivate;
* flags = KMdi::Hide;
* }
* // set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
- * connect( m_pParent, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(initKeyAccel(QWidget*)) );
+ * connect( m_pParent, TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), this, TQT_SLOT(initKeyAccel(TQWidget*)) );
*
* m_pParent->addWindow( pMDICover, flags);
* // correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses)
@@ -116,27 +116,27 @@ protected:
/**
* See KMdiChildView::caption
*/
- QString m_szCaption;
+ TQString m_szCaption;
/**
* See KMdiChildView::tabCaption
*/
- QString m_sTabCaption;
+ TQString m_sTabCaption;
/**
* See KMdiChildView::focusedChildWidget
*/
- QWidget* m_focusedChildWidget;
+ TQWidget* m_focusedChildWidget;
/**
* See KMdiChildView::setFirstFocusableChildWidget
*/
- QWidget* m_firstFocusableChildWidget;
+ TQWidget* m_firstFocusableChildWidget;
/**
* See KMdiChildView::setLastFocusableChildWidget
*/
- QWidget* m_lastFocusableChildWidget;
+ TQWidget* m_lastFocusableChildWidget;
/**
* Every child view window has an temporary ID in the Window menu of the main frame.
@@ -152,7 +152,7 @@ protected:
/**
* Holds the time when this view was activated (not only displayed) for the last time.
*/
- QDateTime m_time;
+ TQDateTime m_time;
private:
/**
@@ -182,13 +182,13 @@ public:
/**
* Constructor
*/
- KMdiChildView( const QString& caption, QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+ KMdiChildView( const TQString& caption, TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
/**
* Constructor
* sets "Unnamed" as default caption
*/
- KMdiChildView( QWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
+ KMdiChildView( TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
/**
* Destructor
@@ -208,17 +208,17 @@ public:
/**
* Memorizes the first focusable child widget of this widget
*/
- void setFirstFocusableChildWidget( QWidget* );
+ void setFirstFocusableChildWidget( TQWidget* );
/**
* Memorizes the last focusable child widget of this widget
*/
- void setLastFocusableChildWidget( QWidget* );
+ void setLastFocusableChildWidget( TQWidget* );
/**
* Returns the current focused child widget of this widget
*/
- QWidget* focusedChildWidget();
+ TQWidget* focusedChildWidget();
/**
* Returns true if the MDI view is a child window within the MDI mainframe widget
@@ -229,28 +229,28 @@ public:
/**
* Returns the caption of the child window (different from the caption on the button in the taskbar)
*/
- const QString& caption() const { return m_szCaption; }
+ const TQString& caption() const { return m_szCaption; }
/**
* Returns the caption of the button on the taskbar
*/
- const QString& tabCaption() const { return m_sTabCaption; }
+ const TQString& tabCaption() const { return m_sTabCaption; }
/**
* Sets the window caption string...
* Calls updateButton on the taskbar button if it has been set.
*/
- virtual void setCaption( const QString& szCaption );
+ virtual void setCaption( const TQString& szCaption );
/**
* Sets the caption of the button referring to this window
*/
- virtual void setTabCaption( const QString& caption );
+ virtual void setTabCaption( const TQString& caption );
/**
* Sets the caption of both the window and the button on the taskbar
*/
- virtual void setMDICaption( const QString &caption );
+ virtual void setMDICaption( const TQString &caption );
/**
* Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
@@ -270,37 +270,37 @@ public:
bool isMaximized() const;
/**
- * Returns the geometry of this MDI child window as QWidget::geometry() does.
+ * Returns the geometry of this MDI child window as TQWidget::geometry() does.
*/
- QRect internalGeometry() const;
+ TQRect internalGeometry() const;
/**
* Sets the geometry of the client area of this MDI child window. The
* top left position of the argument is the position of the top left point
* of the client area in its parent coordinates and the arguments width
* and height is the width and height of the client area. Please note: This
- * differs from the behavior of QWidget::setGeometry()!
+ * differs from the behavior of TQWidget::setGeometry()!
*/
- void setInternalGeometry( const QRect& newGeomety );
+ void setInternalGeometry( const TQRect& newGeomety );
/**
* Returns the frame geometry of this window or of the parent if there is any...
*/
- QRect externalGeometry() const;
+ TQRect externalGeometry() const;
/**
* Sets the geometry of the frame of this MDI child window. The top left
* position of the argument is the position of the top left point of the
* frame in its parent coordinates and the arguments width and height is
* the width and height of the widget frame. Please note: This differs
- * from the behavior of QWidget::setGeometry()!
+ * from the behavior of TQWidget::setGeometry()!
*/
- void setExternalGeometry( const QRect& newGeomety );
+ void setExternalGeometry( const TQRect& newGeomety );
/**
* You should override this function in the derived class.
*/
- virtual QPixmap* myIconPtr();
+ virtual TQPixmap* myIconPtr();
/**
* Minimizes this window when it is attached to the Mdi manager.
@@ -317,12 +317,12 @@ public:
/**
* Returns the geometry that will be restored by calling restore().
*/
- QRect restoreGeometry();
+ TQRect restoreGeometry();
/**
* Sets the geometry that will be restored by calling restore().
*/
- void setRestoreGeometry( const QRect& newRestGeo );
+ void setRestoreGeometry( const TQRect& newRestGeo );
/**
* Switches interposing in event loop of all current child widgets off.
@@ -358,14 +358,14 @@ public:
*/
inline void updateTimeStamp()
{
- m_time.setDate( QDate::currentDate() );
- m_time.setTime( QTime::currentTime() );
+ m_time.setDate( TQDate::currentDate() );
+ m_time.setTime( TQTime::currentTime() );
}
/**
* Recall a previously remembered time, i.e. the value of m_time
*/
- inline const QDateTime& getTimeStamp() const { return m_time; }
+ inline const TQDateTime& getTimeStamp() const { return m_time; }
public slots:
/**
@@ -385,14 +385,14 @@ public slots:
/**
* Mimimizes the MDI view. If attached, the covering childframe widget is minimized (only a mini widget
* showing the caption bar and the system buttons will remain visible). If detached, it will use the
- * minimize of the underlying system ( QWidget::showMinimized ).
+ * minimize of the underlying system ( TQWidget::showMinimized ).
*/
virtual void minimize();
/**
* Maximizes the MDI view. If attached, this widget will fill the whole MDI view area widget. The system buttons
* move to the main menubar (if set by KMdiMainFrm::setMenuForSDIModeSysButtons ).
- * If detached, it will use the minimize of the underlying system ( QWidget::showMaximized ).
+ * If detached, it will use the minimize of the underlying system ( TQWidget::showMaximized ).
*/
virtual void maximize();
@@ -424,17 +424,17 @@ public slots:
virtual void slot_clickedInDockMenu();
/**
- * Calls QWidget::show but also for it's parent widget if attached
+ * Calls TQWidget::show but also for it's parent widget if attached
*/
virtual void show();
/**
- * Calls QWidget::hide() or it's parent widget hide() if attached
+ * Calls TQWidget::hide() or it's parent widget hide() if attached
*/
virtual void hide();
/**
- * Calls QWidget::raise() or it's parent widget raise() if attached
+ * Calls TQWidget::raise() or it's parent widget raise() if attached
*/
virtual void raise();
@@ -462,15 +462,15 @@ protected:
* Ignores the event and calls KMdiMainFrm::childWindowCloseRequest instead. This is because the
* mainframe has control over the views. Therefore the MDI view has to request the mainframe for a close.
*/
- virtual void closeEvent( QCloseEvent *e );
+ virtual void closeEvent( TQCloseEvent *e );
/**
- * It only catches QEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus
+ * It only catches TQEvent::KeyPress events there. If a Qt::Key_Tab is pressed, the internal MDI focus
* handling is called. That means if the last focusable child widget of this is called, it will jump to the
* first focusable child widget of this.
* See KMdiChildView::setFirstFocusableChildWidget and KMdiChildView::lastFirstFocusableChildWidget
*/
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
/**
* If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the
@@ -478,19 +478,19 @@ protected:
* Sends the focusInEventOccurs signal before changing the focus and the
* gotFocus signal after changing the focus.
*/
- virtual void focusInEvent( QFocusEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
/**
* Send the lostFocus signal
*/
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
/**
* Internally used for the minimize/maximize/restore mechanism when in attach mode.
*/
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
- void trackIconAndCaptionChanges( QWidget *view );
+ void trackIconAndCaptionChanges( TQWidget *view );
protected slots:
void slot_childDestroyed();
@@ -544,12 +544,12 @@ signals:
/**
* Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption
*/
- void windowCaptionChanged( const QString& );
+ void windowCaptionChanged( const TQString& );
/**
* Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption
*/
- void tabCaptionChanged( const QString& );
+ void tabCaptionChanged( const TQString& );
/**
* Internally used to send information to the mainframe that this MDI view is maximized now.
@@ -592,18 +592,18 @@ signals:
*/
void isDetachedNow();
- void iconUpdated( QWidget*, QPixmap );
- void captionUpdated( QWidget*, const QString& );
+ void iconUpdated( TQWidget*, TQPixmap );
+ void captionUpdated( TQWidget*, const TQString& );
private:
KMdiChildViewPrivate *d;
- QWidget *m_trackChanges;
+ TQWidget *m_trackChanges;
};
inline KMdiChildFrm *KMdiChildView::mdiParent() const
{
- QWidget * pw = parentWidget();
+ TQWidget * pw = parentWidget();
if ( pw != 0L )
if ( pw->inherits( "KMdiChildFrm" ) )
return ( KMdiChildFrm * ) pw;
diff --git a/kmdi/kmdidefines.h b/kmdi/kmdidefines.h
index 503432352..16be290a6 100644
--- a/kmdi/kmdidefines.h
+++ b/kmdi/kmdidefines.h
@@ -41,10 +41,10 @@
namespace KMdi
{
/** extent Qt events
- @see QCustomEvent, QEvent::User
+ @see TQCustomEvent, TQEvent::User
\code
- bool B_MyWidget::event( QEvent* e) {
- if( e->type() == QEvent::Type(QEvent::User + int(KMdi::EV_Move))) {
+ bool B_MyWidget::event( TQEvent* e) {
+ if( e->type() == TQEvent::Type(TQEvent::User + int(KMdi::EV_Move))) {
...
}
...
diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp
index dd9c32b4d..df82a4e6c 100644
--- a/kmdi/kmdidockcontainer.cpp
+++ b/kmdi/kmdidockcontainer.cpp
@@ -23,10 +23,10 @@
#include "kdockwidget_private.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kmultitabbar.h>
#include <kglobalsettings.h>
@@ -49,8 +49,8 @@ static const char* const kmdi_not_close_xpm[] =
"#####"
};
-KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags )
- : QWidget( parent ), KDockContainer()
+KMdiDockContainer::KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags )
+ : TQWidget( parent ), KDockContainer()
{
m_tabSwitching = false;
m_block = false;
@@ -65,14 +65,14 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio
m_startEvent = 0;
kdDebug( 760 ) << k_funcinfo << endl;
- QBoxLayout *l;
+ TQBoxLayout *l;
m_horizontal = ( ( position == KDockWidget::DockTop ) || ( position == KDockWidget::DockBottom ) );
if ( m_horizontal )
- l = new QVBoxLayout( this ); //vertical layout for top and bottom docks
+ l = new TQVBoxLayout( this ); //vertical layout for top and bottom docks
else
- l = new QHBoxLayout( this ); //horizontal layout for left and right docks
+ l = new TQHBoxLayout( this ); //horizontal layout for left and right docks
l->setAutoAdd( false );
@@ -102,9 +102,9 @@ KMdiDockContainer::KMdiDockContainer( QWidget *parent, QWidget *win, int positio
}
m_tb->setPosition( kmtbPos );
- m_ws = new QWidgetStack( this );
+ m_ws = new TQWidgetStack( this );
- m_ws->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ m_ws->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
//layout the tabbar
if ( position == KDockWidget::DockLeft || position == KDockWidget::DockTop )
@@ -133,7 +133,7 @@ void KMdiDockContainer::setStyle( int style )
KMdiDockContainer::~KMdiDockContainer()
{
- QMap<KDockWidget*, int>::iterator it;
+ TQMap<KDockWidget*, int>::iterator it;
while ( m_map.count() )
{
it = m_map.begin();
@@ -183,7 +183,7 @@ KDockWidget* KMdiDockContainer::parentDockWidget()
return ( ( KDockWidget* ) parent() );
}
-void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const QString &text, int & )
+void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int & )
{
kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl;
KDockWidget* w = dwdg;
@@ -215,7 +215,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
- QToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
+ TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
btn->setToggleButton( true );
btn->setPixmap( const_cast< const char** >( kmdi_not_close_xpm ) );
@@ -223,7 +223,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
m_overlapButtons.insert( w, btn );
btn->setOn( !isOverlapMode() );
- connect( btn, SIGNAL( clicked() ), this, SLOT( changeOverlapMode() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeOverlapMode() ) );
}
m_tb->appendTab( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap, tab, w->tabPageLabel() );
@@ -231,7 +231,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
kdDebug( 760 ) << k_funcinfo << "Added tab with label " << w->tabPageLabel() <<
" to the tabbar" << endl;
- connect( m_tb->tab( tab ), SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) );
+ connect( m_tb->tab( tab ), TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( tabClicked( int ) ) );
mTabCnt++;
m_inserted = tab;
@@ -246,11 +246,11 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, QPixmap pixmap, const
}
-bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event )
+bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
{
switch ( event->type() )
{
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
KMultiTabBarTab* kmtbTab = dynamic_cast<KMultiTabBarTab*>( obj );
if ( !kmtbTab )
@@ -286,21 +286,21 @@ bool KMdiDockContainer::eventFilter( QObject *obj, QEvent *event )
m_movingState = WaitingForMoveStart;
delete m_startEvent;
- m_startEvent = new QMouseEvent( * ( ( QMouseEvent* ) event ) );
+ m_startEvent = new TQMouseEvent( * ( ( TQMouseEvent* ) event ) );
}
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if ( m_movingState == Moving )
{
m_movingState = NotMoving;
- QApplication::postEvent( m_dragPanel, new QMouseEvent( * ( ( QMouseEvent* ) event ) ) );
+ TQApplication::postEvent( m_dragPanel, new TQMouseEvent( * ( ( TQMouseEvent* ) event ) ) );
delete m_startEvent;
m_startEvent = 0;
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( m_movingState == WaitingForMoveStart )
{
- QPoint p( ( ( QMouseEvent* ) event )->pos() - m_startEvent->pos() );
+ TQPoint p( ( ( TQMouseEvent* ) event )->pos() - m_startEvent->pos() );
if ( p.manhattanLength() > KGlobalSettings::dndEventDelay() )
{
m_dockManager->eventFilter( m_dragPanel, m_startEvent );
@@ -352,7 +352,7 @@ void KMdiDockContainer::changeOverlapMode()
deactivateOverlapMode();
}
- QMap<KDockWidget*, KDockButton_Private*>::iterator it;
+ TQMap<KDockWidget*, KDockButton_Private*>::iterator it;
for ( it = m_overlapButtons.begin(); it != m_overlapButtons.end(); ++it )
it.data()->setOn( !isOverlapMode() );
}
@@ -494,16 +494,16 @@ void KMdiDockContainer::tabClicked( int t )
m_tabSwitching = false;
}
-void KMdiDockContainer::setToolTip ( KDockWidget* w, QString &s )
+void KMdiDockContainer::setToolTip ( KDockWidget* w, TQString &s )
{
kdDebug( 760 ) << k_funcinfo << "Setting tooltip '" << s << "' for widget " << w << endl;
int tabId = m_map[w];
KMultiTabBarTab *mbTab = m_tb->tab( tabId );
- QToolTip::remove( mbTab );
- QToolTip::add( mbTab, s );
+ TQToolTip::remove( mbTab );
+ TQToolTip::add( mbTab, s );
}
-void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap )
+void KMdiDockContainer::setPixmap( KDockWidget* widget , const TQPixmap& pixmap )
{
int id = m_ws->id( widget );
if ( id == -1 )
@@ -512,25 +512,25 @@ void KMdiDockContainer::setPixmap( KDockWidget* widget , const QPixmap& pixmap )
tab->setIcon( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap );
}
-void KMdiDockContainer::save( QDomElement& dockEl )
+void KMdiDockContainer::save( TQDomElement& dockEl )
{
- QDomDocument doc = dockEl.ownerDocument();
- QDomElement el;
+ TQDomDocument doc = dockEl.ownerDocument();
+ TQDomElement el;
el = doc.createElement( "name" );
- el.appendChild( doc.createTextNode( QString( "%1" ).arg( parent() ->name() ) ) );
+ el.appendChild( doc.createTextNode( TQString( "%1" ).arg( parent() ->name() ) ) );
dockEl.appendChild( el );
el = doc.createElement( "overlapMode" );
el.appendChild( doc.createTextNode( isOverlapMode() ? "true" : "false" ) );
dockEl.appendChild( el );
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQStringList::Iterator it2 = itemNames.begin();
int i = 0;
for ( ;it.current() != 0;++it, ++it2 )
{
el = doc.createElement( "child" );
- el.setAttribute( "pos", QString( "%1" ).arg( i ) );
- QString s = tabCaptions[ *it2 ];
+ el.setAttribute( "pos", TQString( "%1" ).arg( i ) );
+ TQString s = tabCaptions[ *it2 ];
if ( !s.isEmpty() )
{
el.setAttribute( "tabCaption", s );
@@ -544,7 +544,7 @@ void KMdiDockContainer::save( QDomElement& dockEl )
dockEl.appendChild( el );
if ( m_tb->isTabRaised( it.current() ->id() ) )
{
- QDomElement el2 = doc.createElement( "raised" );
+ TQDomElement el2 = doc.createElement( "raised" );
el2.appendChild( doc.createTextNode( m_ws->widget( it.current() ->id() ) ->name() ) );
el.appendChild( el2 );
}
@@ -554,13 +554,13 @@ void KMdiDockContainer::save( QDomElement& dockEl )
}
-void KMdiDockContainer::load( QDomElement& dockEl )
+void KMdiDockContainer::load( TQDomElement& dockEl )
{
- QString raise;
+ TQString raise;
- for ( QDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() )
+ for ( TQDomNode n = dockEl.firstChild();!n.isNull();n = n.nextSibling() )
{
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
if ( el.isNull() )
continue;
if ( el.tagName() == "overlapMode" )
@@ -588,8 +588,8 @@ void KMdiDockContainer::load( QDomElement& dockEl )
}
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1( *tl );
m_ws->hide();
if ( !m_horizontal )
parentDockWidget()->setForcedFixedWidth( m_tb->width() );
@@ -602,18 +602,18 @@ void KMdiDockContainer::load( QDomElement& dockEl )
kapp->syncX();
m_delayedRaise = -1;
- for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
{
if ( it.key() ->name() == raise )
{
m_delayedRaise = it.data();
- QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) );
kdDebug( 760 ) << k_funcinfo << "raising " << it.key()->name() << endl;
break;
}
@@ -621,14 +621,14 @@ void KMdiDockContainer::load( QDomElement& dockEl )
}
if ( m_delayedRaise == -1 )
- QTimer::singleShot( 0, this, SLOT( init() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( init() ) );
}
-void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
+void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
{
- QString grp = cfg->group();
- cfg->deleteGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
- cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->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() ) );
if ( isOverlapMode() )
cfg->writeEntry( "overlapMode", "true" );
@@ -644,23 +644,23 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
- QStringList::Iterator it2 = itemNames.begin();
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQStringList::Iterator it2 = itemNames.begin();
int i = 0;
for ( ;it.current() != 0;++it, ++it2 )
{
- // cfg->writeEntry(QString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
- cfg->writeEntry( QString( "widget%1" ).arg( i ), ( *it2 ) );
- QString s = tabCaptions[ *it2 ];
+ // cfg->writeEntry(TQString("widget%1").arg(i),m_ws->widget(it.current()->id())->name());
+ cfg->writeEntry( TQString( "widget%1" ).arg( i ), ( *it2 ) );
+ TQString s = tabCaptions[ *it2 ];
if ( !s.isEmpty() )
{
- cfg->writeEntry( QString( "widget%1-tabCaption" ).arg( i ), s );
+ cfg->writeEntry( TQString( "widget%1-tabCaption" ).arg( i ), s );
}
s = tabTooltips[ *it2 ];
if ( !s.isEmpty() )
{
- cfg->writeEntry( QString( "widget%1-tabTooltip" ).arg( i ), s );
+ cfg->writeEntry( TQString( "widget%1-tabTooltip" ).arg( i ), s );
}
// kdDebug(760)<<"****************************************Saving: "<<m_ws->widget(it.current()->id())->name()<<endl;
if ( m_tb->isTabRaised( it.current() ->id() ) )
@@ -672,10 +672,10 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
}
-void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
+void KMdiDockContainer::load( KConfig* cfg, const TQString& group_or_prefix )
{
- QString grp = cfg->group();
- cfg->setGroup( group_or_prefix + QString( "::%1" ).arg( parent() ->name() ) );
+ TQString grp = cfg->group();
+ cfg->setGroup( group_or_prefix + TQString( "::%1" ).arg( parent() ->name() ) );
if ( cfg->readEntry( "overlapMode" ) != "false" )
activateOverlapMode( m_horizontal?m_tb->height():m_tb->width() );
@@ -685,22 +685,22 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
m_separatorPos = cfg->readNumEntry( "separatorPosition", 18000 );
int i = 0;
- QString raise;
+ TQString raise;
while ( true )
{
- QString dwn = cfg->readEntry( QString( "widget%1" ).arg( i ) );
+ TQString dwn = cfg->readEntry( TQString( "widget%1" ).arg( i ) );
if ( dwn.isEmpty() )
break;
kdDebug( 760 ) << k_funcinfo << "configuring dockwidget :" << dwn << endl;
KDockWidget *dw = ( ( KDockWidget* ) parent() ) ->dockManager() ->getDockWidgetFromName( dwn );
if ( dw )
{
- QString s = cfg->readEntry( QString( "widget%1-tabCaption" ).arg( i ) );
+ TQString s = cfg->readEntry( TQString( "widget%1-tabCaption" ).arg( i ) );
if ( !s.isEmpty() )
{
dw->setTabPageLabel( s );
}
- s = cfg->readEntry( QString( "widget%1-tabTooltip" ).arg( i ) );
+ s = cfg->readEntry( TQString( "widget%1-tabTooltip" ).arg( i ) );
if ( !s.isEmpty() )
{
dw->setToolTipString( s );
@@ -713,8 +713,8 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
}
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it1( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it1( *tl );
m_ws->hide();
if ( !m_horizontal )
parentDockWidget() ->setForcedFixedWidth( m_tb->width() );
@@ -727,13 +727,13 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
kapp->syncX();
m_delayedRaise = -1;
- for ( QMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
+ for ( TQMap<KDockWidget*, KDockButton_Private*>::iterator it = m_overlapButtons.begin();
it != m_overlapButtons.end();++it )
it.data() ->setOn( !isOverlapMode() );
if ( !raise.isEmpty() )
{
- for ( QMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
+ for ( TQMap<KDockWidget*, int>::iterator it = m_map.begin();it != m_map.end();++it )
{
if ( it.key() ->name() == raise )
{
@@ -745,7 +745,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
kapp->syncX();*/
m_delayedRaise = it.data();
- QTimer::singleShot( 0, this, SLOT( delayedRaise() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedRaise() ) );
kdDebug( 760 ) << k_funcinfo << "raising" << it.key() ->name() << endl;
break;
}
@@ -753,7 +753,7 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
}
if ( m_delayedRaise == -1 )
- QTimer::singleShot( 0, this, SLOT( init() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( init() ) );
cfg->setGroup( grp );
}
@@ -772,8 +772,8 @@ void KMdiDockContainer::collapseOverlapped()
if ( isOverlapMode() )
{
- QPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
- QPtrListIterator<KMultiTabBarTab> it( *tl );
+ TQPtrList<KMultiTabBarTab>* tl = m_tb->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it( *tl );
for ( ;it.current();++it )
{
if ( it.current()->isOn() )
@@ -817,7 +817,7 @@ void KMdiDockContainer::toggle()
void KMdiDockContainer::prevToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
- QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
int pos = tabs->findRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
@@ -838,7 +838,7 @@ void KMdiDockContainer::prevToolView()
void KMdiDockContainer::nextToolView()
{
kdDebug( 760 ) << k_funcinfo << endl;
- QPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
+ TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs();
int pos = tabs->findRef( m_tb->tab( oldtab ) );
if ( pos == -1 )
diff --git a/kmdi/kmdidockcontainer.h b/kmdi/kmdidockcontainer.h
index 917dac4d0..e13b73712 100644
--- a/kmdi/kmdidockcontainer.h
+++ b/kmdi/kmdidockcontainer.h
@@ -20,26 +20,26 @@
#ifndef _KMDI_DOCK_CONTAINER_
#define _KMDI_DOCK_CONTAINER_
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdockwidget.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdom.h>
# include <kdockwidget_p.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QWidgetStack;
class KMultiTabBar;
class KDockButton_Private;
-class KMDI_EXPORT KMdiDockContainer: public QWidget, public KDockContainer
+class KMDI_EXPORT KMdiDockContainer: public TQWidget, public KDockContainer
{
Q_OBJECT
public:
- KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags );
+ KMdiDockContainer( TQWidget *parent, TQWidget *win, int position, int flags );
virtual ~KMdiDockContainer();
/** Get the KDockWidget that is our parent */
@@ -49,7 +49,7 @@ public:
* Add a widget to this container
* \param w the KDockWidget we are adding
*/
- virtual void insertWidget ( KDockWidget *w, QPixmap, const QString &, int & );
+ virtual void insertWidget ( KDockWidget *w, TQPixmap, const TQString &, int & );
/**
* Show a widget.
@@ -64,12 +64,12 @@ public:
* Set the tooltip for the widget.
* Currently, this method does nothing
*/
- virtual void setToolTip ( KDockWidget *, QString & );
+ virtual void setToolTip ( KDockWidget *, TQString & );
/**
* Set the pixmap for the widget.
*/
- virtual void setPixmap( KDockWidget* widget, const QPixmap& pixmap );
+ virtual void setPixmap( KDockWidget* widget, const TQPixmap& pixmap );
/**
* Undock the widget from the container.
@@ -94,7 +94,7 @@ public:
* dockwidget's name will be the group the configuration is saved in
* \param group_or_prefix the prefix to append to the parent dockwidget's name
*/
- virtual void save( KConfig *, const QString& group_or_prefix );
+ virtual void save( KConfig *, const TQString& group_or_prefix );
/**
* Load the config using a KConfig object
@@ -103,17 +103,17 @@ public:
* dockwidget's name will be the group the configuration is loaded from
* \param group_or_prefix the prefix to append to the parent dockwidget's name
*/
- virtual void load( KConfig *, const QString& group_or_prefix );
+ virtual void load( KConfig *, const TQString& group_or_prefix );
/**
* Save the config to a QDomElement
*/
- virtual void save( QDomElement& );
+ virtual void save( TQDomElement& );
/**
* Load the config from a QDomElement
*/
- virtual void load( QDomElement& );
+ virtual void load( TQDomElement& );
/**
* Set the style for the tabbar
@@ -121,7 +121,7 @@ public:
void setStyle( int );
protected:
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
public slots:
void init();
@@ -134,28 +134,28 @@ protected slots:
void delayedRaise();
void changeOverlapMode();
private:
- QWidget *m_mainWin;
- QWidgetStack *m_ws;
+ TQWidget *m_mainWin;
+ TQWidgetStack *m_ws;
KMultiTabBar *m_tb;
int mTabCnt;
int oldtab;
int m_previousTab;
int m_position;
int m_separatorPos;
- QMap<KDockWidget*, int> m_map;
- QMap<int, KDockWidget*> m_revMap;
- QMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
- QStringList itemNames;
- QMap<QString, QString> tabCaptions;
- QMap<QString, QString> tabTooltips;
+ TQMap<KDockWidget*, int> m_map;
+ TQMap<int, KDockWidget*> m_revMap;
+ TQMap<KDockWidget*, KDockButton_Private*> m_overlapButtons;
+ TQStringList itemNames;
+ TQMap<TQString, TQString> tabCaptions;
+ TQMap<TQString, TQString> tabTooltips;
int m_inserted;
int m_delayedRaise;
bool m_horizontal;
bool m_block;
bool m_tabSwitching;
- QObject *m_dragPanel;
+ TQObject *m_dragPanel;
KDockManager *m_dockManager;
- QMouseEvent *m_startEvent;
+ TQMouseEvent *m_startEvent;
enum MovingState {NotMoving = 0, WaitingForMoveStart, Moving} m_movingState;
signals:
void activated( KMdiDockContainer* );
diff --git a/kmdi/kmdidocumentviewtabwidget.cpp b/kmdi/kmdidocumentviewtabwidget.cpp
index 2e2e9b87e..90b618e47 100644
--- a/kmdi/kmdidocumentviewtabwidget.cpp
+++ b/kmdi/kmdidocumentviewtabwidget.cpp
@@ -7,84 +7,84 @@
//
//----------------------------------------------------------------------------
-#include <qtimer.h>
+#include <tqtimer.h>
#include <ktabbar.h>
#include <kpopupmenu.h>
#include "kmdidocumentviewtabwidget.h"
-KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const char* name ) : KTabWidget( parent, name )
+KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( TQWidget* parent, const char* name ) : KTabWidget( parent, name )
{
m_visibility = KMdi::ShowWhenMoreThanOneTab;
tabBar() ->hide();
setHoverCloseButton( true );
- connect( this, SIGNAL( closeRequest( QWidget* ) ), this, SLOT( closeTab( QWidget* ) ) );
+ connect( this, TQT_SIGNAL( closeRequest( TQWidget* ) ), this, TQT_SLOT( closeTab( TQWidget* ) ) );
}
KMdiDocumentViewTabWidget::~KMdiDocumentViewTabWidget()
{}
-void KMdiDocumentViewTabWidget::closeTab( QWidget* w )
+void KMdiDocumentViewTabWidget::closeTab( TQWidget* w )
{
w->close();
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QString & label )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQString & label )
{
KTabWidget::addTab( child, label );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label )
{
KTabWidget::addTab( child, iconset, label );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, QTab * tab )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, TQTab * tab )
{
KTabWidget::addTab( child, tab );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & label, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQString & label, int index )
{
KTabWidget::insertTab( child, label, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index )
{
KTabWidget::insertTab( child, iconset, label, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int index )
+void KMdiDocumentViewTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index )
{
KTabWidget::insertTab( child, tab, index );
showPage( child );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::removePage ( QWidget * w )
+void KMdiDocumentViewTabWidget::removePage ( TQWidget * w )
{
KTabWidget::removePage( w );
- QTimer::singleShot(0, this, SLOT(maybeShow()));
+ TQTimer::singleShot(0, this, TQT_SLOT(maybeShow()));
}
-void KMdiDocumentViewTabWidget::updateIconInView( QWidget *w, QPixmap icon )
+void KMdiDocumentViewTabWidget::updateIconInView( TQWidget *w, TQPixmap icon )
{
changeTab( w, icon, tabLabel( w ) );
}
-void KMdiDocumentViewTabWidget::updateCaptionInView( QWidget *w, const QString &caption )
+void KMdiDocumentViewTabWidget::updateCaptionInView( TQWidget *w, const TQString &caption )
{
changeTab( w, caption );
}
diff --git a/kmdi/kmdidocumentviewtabwidget.h b/kmdi/kmdidocumentviewtabwidget.h
index ce7ea5e88..d731a9a03 100644
--- a/kmdi/kmdidocumentviewtabwidget.h
+++ b/kmdi/kmdidocumentviewtabwidget.h
@@ -24,7 +24,7 @@ class KMDI_EXPORT KMdiDocumentViewTabWidget:
{
Q_OBJECT
public:
- KMdiDocumentViewTabWidget( QWidget* parent, const char* name = 0 );
+ KMdiDocumentViewTabWidget( TQWidget* parent, const char* name = 0 );
~KMdiDocumentViewTabWidget();
/**
@@ -32,49 +32,49 @@ public:
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQString & label );
/**
* Add a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label );
+ virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label );
/**
* Add a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void addTab ( QWidget * child, QTab * tab );
+ virtual void addTab ( TQWidget * child, TQTab * tab );
/**
* Insert a tab into the tabwidget with a label
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 );
/**
* Inserts a tab into the tabwidget with an icon and label
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 );
+ virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 );
/**
* Inserts a tab into the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 );
+ virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 );
/**
* Removes the tab from the tabwidget
* \sa QTabWidget
* \sa KTabWidget
*/
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
/**
* Set the tab widget's visibility and then make the change
@@ -88,7 +88,7 @@ public:
private slots:
/** Close the tab specified by w */
- void closeTab( QWidget* w );
+ void closeTab( TQWidget* w );
/** Moves a tab. Reimplemented for internal reasons. */
void moveTab( int from, int to );
@@ -96,10 +96,10 @@ private slots:
public slots:
/** Change the icon for the tab */
- void updateIconInView( QWidget*, QPixmap );
+ void updateIconInView( TQWidget*, TQPixmap );
/** Change the caption for the tab */
- void updateCaptionInView( QWidget*, const QString& );
+ void updateCaptionInView( TQWidget*, const TQString& );
private slots:
diff --git a/kmdi/kmdifocuslist.cpp b/kmdi/kmdifocuslist.cpp
index 0f055358a..fe907aab8 100644
--- a/kmdi/kmdifocuslist.cpp
+++ b/kmdi/kmdifocuslist.cpp
@@ -18,32 +18,32 @@
#include "kmdifocuslist.h"
#include "kmdifocuslist.moc"
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
-KMdiFocusList::KMdiFocusList( QObject *parent ) : QObject( parent )
+KMdiFocusList::KMdiFocusList( TQObject *parent ) : TQObject( parent )
{}
KMdiFocusList::~KMdiFocusList()
{}
-void KMdiFocusList::addWidgetTree( QWidget* w )
+void KMdiFocusList::addWidgetTree( TQWidget* w )
{
//this method should never be called twice on the same hierarchy
m_list.insert( w, w->focusPolicy() );
- w->setFocusPolicy( QWidget::ClickFocus );
+ w->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding toplevel" << endl;
- connect( w, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
- QObjectList *l = w->queryList( "QWidget" );
- QObjectListIt it( *l );
- QObject *obj;
+ connect( w, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
+ TQObjectList *l = w->queryList( "TQWidget" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( ( obj = it.current() ) != 0 )
{
- QWidget * wid = ( QWidget* ) obj;
+ TQWidget * wid = ( TQWidget* ) obj;
m_list.insert( wid, wid->focusPolicy() );
- wid->setFocusPolicy( QWidget::ClickFocus );
+ wid->setFocusPolicy( TQWidget::ClickFocus );
kdDebug( 760 ) << "KMdiFocusList::addWidgetTree: adding widget" << endl;
- connect( wid, SIGNAL( destroyed( QObject * ) ), this, SLOT( objectHasBeenDestroyed( QObject* ) ) );
+ connect( wid, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( objectHasBeenDestroyed( TQObject* ) ) );
++it;
}
delete l;
@@ -51,7 +51,7 @@ void KMdiFocusList::addWidgetTree( QWidget* w )
void KMdiFocusList::restore()
{
- for ( QMap<QWidget*, QWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
+ for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::const_iterator it = m_list.constBegin();it != m_list.constEnd();++it )
{
it.key() ->setFocusPolicy( it.data() );
}
@@ -59,11 +59,11 @@ void KMdiFocusList::restore()
}
-void KMdiFocusList::objectHasBeenDestroyed( QObject * o )
+void KMdiFocusList::objectHasBeenDestroyed( TQObject * o )
{
if ( !o || !o->isWidgetType() )
return ;
- QWidget *w = ( QWidget* ) o;
+ TQWidget *w = ( TQWidget* ) o;
m_list.remove( w );
}
diff --git a/kmdi/kmdifocuslist.h b/kmdi/kmdifocuslist.h
index fbc178d1d..71e2f05cb 100644
--- a/kmdi/kmdifocuslist.h
+++ b/kmdi/kmdifocuslist.h
@@ -18,23 +18,23 @@
#ifndef KMDI_FOCUS_LIST
#define KMDI_FOCUS_LIST
-#include <qobject.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
class KMDI_EXPORT KMdiFocusList: public QObject
{
Q_OBJECT
public:
- KMdiFocusList( QObject *parent );
+ KMdiFocusList( TQObject *parent );
~KMdiFocusList();
- void addWidgetTree( QWidget* );
+ void addWidgetTree( TQWidget* );
void restore();
protected slots:
- void objectHasBeenDestroyed( QObject* );
+ void objectHasBeenDestroyed( TQObject* );
private:
- QMap<QWidget*, QWidget::FocusPolicy> m_list;
+ TQMap<TQWidget*, TQWidget::FocusPolicy> m_list;
};
diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp
index ec00ec784..6279253bc 100644
--- a/kmdi/kmdiguiclient.cpp
+++ b/kmdi/kmdiguiclient.cpp
@@ -20,14 +20,14 @@
#include "kmdiguiclient.h"
#include "kmdiguiclient.moc"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <ktoolbar.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <assert.h>
#include <kdebug.h>
#include <kdockwidget.h>
@@ -57,15 +57,15 @@ using namespace KMDIPrivate;
-ToggleToolViewAction::ToggleToolViewAction( const QString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm,
- QObject* parent, const char* name )
+ToggleToolViewAction::ToggleToolViewAction( const TQString& text, const KShortcut& cut, KDockWidget *dw, KMdiMainFrm *mdiMainFrm,
+ TQObject* parent, const char* name )
: KToggleAction( text, cut, parent, name ), m_dw( dw ), m_mdiMainFrm( mdiMainFrm )
{
if ( m_dw )
{
- connect( this, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) );
- connect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
- connect( m_dw, SIGNAL( destroyed() ), this, SLOT( slotWidgetDestroyed() ) );
+ connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggled( bool ) ) );
+ connect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) );
+ connect( m_dw, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotWidgetDestroyed() ) );
setChecked( m_dw->mayBeHide() );
}
}
@@ -104,20 +104,20 @@ void ToggleToolViewAction::slotToggled( bool t )
void ToggleToolViewAction::slotWidgetDestroyed()
{
- disconnect( m_dw->dockManager(), SIGNAL( change() ), this, SLOT( anDWChanged() ) );
- disconnect( this, SIGNAL( toggled( bool ) ), 0, 0 );
+ disconnect( m_dw->dockManager(), TQT_SIGNAL( change() ), this, TQT_SLOT( anDWChanged() ) );
+ disconnect( this, TQT_SIGNAL( toggled( bool ) ), 0, 0 );
unplugAll();
deleteLater();
}
-KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : QObject( mdiMainFrm, name ),
+KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, const char* name ) : TQObject( mdiMainFrm, name ),
KXMLGUIClient( mdiMainFrm )
{
m_mdiMode = KMdi::ChildframeMode;
m_mdiMainFrm = mdiMainFrm;
- connect( mdiMainFrm->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ),
- this, SLOT( clientAdded( KXMLGUIClient * ) ) );
+ connect( mdiMainFrm->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ),
+ this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) );
/* re-use an existing resource file if it exists. can happen if the user launches the
* toolbar editor */
@@ -128,7 +128,7 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c
if ( domDocument().documentElement().isNull() )
{
- QString completeDescription = QString::fromLatin1( guiDescription )
+ TQString completeDescription = TQString::fromLatin1( guiDescription )
.arg( actionListName );
setXML( completeDescription, false /*merge*/ );
@@ -140,30 +140,30 @@ KMDIGUIClient::KMDIGUIClient( KMdiMainFrm* mdiMainFrm, bool showMDIModeAction, c
if ( showMDIModeAction )
{
m_mdiModeAction = new KSelectAction( i18n( "MDI Mode" ), 0, actionCollection() );
- QStringList modes;
+ TQStringList modes;
modes << i18n( "&Toplevel Mode" ) << i18n( "C&hildframe Mode" ) << i18n( "Ta&b Page Mode" ) << i18n( "I&DEAl Mode" );
m_mdiModeAction->setItems( modes );
- connect( m_mdiModeAction, SIGNAL( activated( int ) ), this, SLOT( changeViewMode( int ) ) );
+ connect( m_mdiModeAction, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( changeViewMode( int ) ) );
}
else
m_mdiModeAction = 0;
- connect( m_mdiMainFrm, SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ),
- this, SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) );
+ connect( m_mdiMainFrm, TQT_SIGNAL( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ),
+ this, TQT_SLOT( mdiModeHasBeenChangedTo( KMdi::MdiMode ) ) );
m_gotoToolDockMenu = new KActionMenu( i18n( "Tool &Docks" ), actionCollection(), "kmdi_tooldock_menu" );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, SIGNAL( toggleTop() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Top Dock" ), ALT + CTRL + SHIFT + Key_T, this, TQT_SIGNAL( toggleTop() ),
actionCollection(), "kmdi_activate_top" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, SIGNAL( toggleLeft() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Left Dock" ), ALT + CTRL + SHIFT + Key_L, this, TQT_SIGNAL( toggleLeft() ),
actionCollection(), "kmdi_activate_left" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, SIGNAL( toggleRight() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Right Dock" ), ALT + CTRL + SHIFT + Key_R, this, TQT_SIGNAL( toggleRight() ),
actionCollection(), "kmdi_activate_right" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Switch Bottom Dock" ), ALT + CTRL + SHIFT + Key_B, this, SIGNAL( toggleBottom() ),
+ 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, SLOT( prevToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Previous Tool View" ), ALT + CTRL + Key_Left, m_mdiMainFrm, TQT_SLOT( prevToolViewInDock() ),
actionCollection(), "kmdi_prev_toolview" ) );
- m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, SLOT( nextToolViewInDock() ),
+ m_gotoToolDockMenu->insert( new KAction( i18n( "Next Tool View" ), ALT + CTRL + Key_Right, m_mdiMainFrm, TQT_SLOT( nextToolViewInDock() ),
actionCollection(), "kmdi_next_toolview" ) );
actionCollection() ->readShortcutSettings( "Shortcuts", kapp->config() );
@@ -224,10 +224,10 @@ void KMDIGUIClient::setupActions()
// m_toolBars = builder.toolBars();
- // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", QString::null, 0,
- // this, SLOT(blah()),actionCollection(),"nothing"));
+ // m_toolViewActions.append(new KAction( "TESTKMDIGUICLIENT", TQString::null, 0,
+ // this, TQT_SLOT(blah()),actionCollection(),"nothing"));
- QPtrList<KAction> addList;
+ TQPtrList<KAction> addList;
if ( m_toolViewActions.count() < 3 )
for ( uint i = 0;i < m_toolViewActions.count();i++ )
addList.append( m_toolViewActions.at( i ) );
@@ -247,25 +247,25 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
{
kdDebug( 760 ) << "*****void KMDIGUIClient::addToolView(KMdiToolViewAccessor* mtva)*****" << endl;
// kdDebug()<<"name: "<<mtva->wrappedWidget()->name()<<endl;
- QString aname = QString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name();
+ TQString aname = TQString( "kmdi_toolview_" ) + mtva->wrappedWidget() ->name();
// try to read the action shortcut
KShortcut sc;
KConfig *cfg = kapp->config();
- QString _grp = cfg->group();
+ TQString _grp = cfg->group();
cfg->setGroup( "Shortcuts" );
// if ( cfg->hasKey( aname ) )
sc = KShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp );
KAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ),
- /*QString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
+ /*TQString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
m_mdiMainFrm, actionCollection(), aname.latin1() );
#if KDE_IS_VERSION(3,2,90)
( ( ToggleToolViewAction* ) a ) ->setCheckedState( i18n( "Hide %1" ).arg( mtva->wrappedWidget() ->caption() ) );
#endif
- connect( a, SIGNAL( destroyed( QObject* ) ), this, SLOT( actionDeleted( QObject* ) ) );
+ connect( a, TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( actionDeleted( TQObject* ) ) );
m_toolViewActions.append( a );
m_toolMenu->insert( a );
mtva->d->action = a;
@@ -273,7 +273,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
setupActions();
}
-void KMDIGUIClient::actionDeleted( QObject* a )
+void KMDIGUIClient::actionDeleted( TQObject* a )
{
m_toolViewActions.remove( static_cast<KAction*>( a ) );
/* if (!m_toolMenu.isNull()) m_toolMenu->remove(static_cast<KAction*>(a));*/
diff --git a/kmdi/kmdiguiclient.h b/kmdi/kmdiguiclient.h
index a52db681c..9c9634314 100644
--- a/kmdi/kmdiguiclient.h
+++ b/kmdi/kmdiguiclient.h
@@ -19,8 +19,8 @@
#ifndef KMDIGUICLIENT_H
#define KMDIGUICLIENT_H
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kxmlguiclient.h>
#include <kaction.h>
#include "kmdidefines.h"
@@ -38,7 +38,7 @@ namespace KMDIPrivate
* A class derived from KXMLGUIClient that handles the various
* KMDI modes
*/
-class KMDI_EXPORT KMDIGUIClient : public QObject,
+class KMDI_EXPORT KMDIGUIClient : public TQObject,
public KXMLGUIClient
{
Q_OBJECT
@@ -77,7 +77,7 @@ private slots:
* One of our tool view toggle actions has been deleted. Redo the
* tool views menu
*/
- void actionDeleted( QObject* );
+ void actionDeleted( TQObject* );
/**
* Updates the action that lets the user change the MDI mode to the
@@ -103,9 +103,9 @@ private:
KMDIGUIClientPrivate *d;
KMdi::MdiMode m_mdiMode;
- QGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
- QPtrList<KAction> m_toolViewActions;
- QPtrList<KAction> m_documentViewActions;
+ TQGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
+ TQPtrList<KAction> m_toolViewActions;
+ TQPtrList<KAction> m_documentViewActions;
KActionMenu *m_docMenu;
KActionMenu *m_toolMenu;
@@ -123,8 +123,8 @@ class KMDI_EXPORT ToggleToolViewAction: public KToggleAction
Q_OBJECT
public:
- ToggleToolViewAction( const QString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0,
- QObject* parent = 0, const char* name = 0 );
+ ToggleToolViewAction( const TQString& text, const KShortcut& cut = KShortcut(), KDockWidget *dw = 0, KMdiMainFrm *mdiMainFrm = 0,
+ TQObject* parent = 0, const char* name = 0 );
virtual ~ToggleToolViewAction();
diff --git a/kmdi/kmdilistiterator.h b/kmdi/kmdilistiterator.h
index fe92bfcc2..3f36a116c 100644
--- a/kmdi/kmdilistiterator.h
+++ b/kmdi/kmdilistiterator.h
@@ -38,9 +38,9 @@ template <class Item>
class KMdiListIterator : public KMdiIterator<Item*>
{
public:
- KMdiListIterator( QPtrList<Item>& list )
+ KMdiListIterator( TQPtrList<Item>& list )
{
- m_iterator = new QPtrListIterator<Item>( list );
+ m_iterator = new TQPtrListIterator<Item>( list );
}
virtual void first() { m_iterator->toFirst(); }
@@ -53,7 +53,7 @@ public:
virtual ~KMdiListIterator() { delete m_iterator; }
private:
- QPtrListIterator<Item> *m_iterator;
+ TQPtrListIterator<Item> *m_iterator;
};
#endif // _KMDILISTITERATOR_H_
diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp
index e4afce397..e62b61cb2 100644
--- a/kmdi/kmdimainfrm.cpp
+++ b/kmdi/kmdimainfrm.cpp
@@ -37,17 +37,17 @@
#include <assert.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kmenubar.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kstdaccel.h>
@@ -55,14 +55,14 @@
#include <kmdidockcontainer.h>
-#include <qtoolbutton.h>
-#include <qdockarea.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqtoolbutton.h>
+#include <tqdockarea.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include "kmdimainfrm.h"
#include "kmditaskbar.h"
@@ -136,7 +136,7 @@ public:
};
//============ constructor ============//
-KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
+KMdiMainFrm::KMdiMainFrm( TQWidget* parentWidget, const char* name, KMdi::MdiMode mdiMode, WFlags flags )
: KParts::DockMainWindow( parentWidget, name, flags )
, m_mdiMode( KMdi::UndefinedMode )
, m_pMdi( 0L )
@@ -179,9 +179,9 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
{
kdDebug(760) << k_funcinfo << endl;
// Create the local lists of windows
- m_pDocumentViews = new QPtrList<KMdiChildView>;
+ m_pDocumentViews = new TQPtrList<KMdiChildView>;
m_pDocumentViews->setAutoDelete( false );
- m_pToolViews = new QMap<QWidget*, KMdiToolViewAccessor*>;
+ m_pToolViews = new TQMap<TQWidget*, KMdiToolViewAccessor*>;
// This seems to be needed (re-check it after Qt2.0 comed out)
setFocusPolicy( ClickFocus );
@@ -190,7 +190,7 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
createMdiManager();
// cover KMdi's childarea by a dockwidget
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -202,23 +202,23 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
// Apply options for the MDI manager
applyOptions();
- m_pTaskBarPopup = new QPopupMenu( this, "taskbar_popup_menu" );
- m_pWindowPopup = new QPopupMenu( this, "window_popup_menu" );
+ m_pTaskBarPopup = new TQPopupMenu( this, "taskbar_popup_menu" );
+ m_pWindowPopup = new TQPopupMenu( this, "window_popup_menu" );
- m_pWindowMenu = new QPopupMenu( this, "window_menu" );
+ m_pWindowMenu = new TQPopupMenu( this, "window_menu" );
m_pWindowMenu->setCheckable( true );
- QObject::connect( m_pWindowMenu, SIGNAL( aboutToShow() ), this, SLOT( fillWindowMenu() ) );
+ TQObject::connect( m_pWindowMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fillWindowMenu() ) );
- m_pDockMenu = new QPopupMenu( this, "dock_menu" );
+ m_pDockMenu = new TQPopupMenu( this, "dock_menu" );
m_pDockMenu->setCheckable( true );
- m_pMdiModeMenu = new QPopupMenu( this, "mdimode_menu" );
+ m_pMdiModeMenu = new TQPopupMenu( this, "mdimode_menu" );
m_pMdiModeMenu->setCheckable( true );
- m_pPlacingMenu = new QPopupMenu( this, "placing_menu" );
+ m_pPlacingMenu = new TQPopupMenu( this, "placing_menu" );
d->closeWindowAction = new KAction(i18n("&Close"), KStdAccel::close(),
- this, SLOT(closeActiveView()), actionCollection(), "window_close");
+ this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
// the MDI view taskbar
createTaskBar();
@@ -248,12 +248,12 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
}
// drag end timer
- m_pDragEndTimer = new QTimer();
- connect( m_pDragEndTimer, SIGNAL( timeout() ), this, SLOT( dragEndTimeOut() ) );
- connect( guiFactory(), SIGNAL( clientAdded( KXMLGUIClient* ) ),
- this, SLOT( verifyToplevelHeight() ) );
- connect( guiFactory(), SIGNAL( clientRemoved( KXMLGUIClient* ) ),
- this, SLOT( verifyToplevelHeight() ) );
+ m_pDragEndTimer = new TQTimer();
+ connect( m_pDragEndTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( dragEndTimeOut() ) );
+ connect( guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient* ) ),
+ this, TQT_SLOT( verifyToplevelHeight() ) );
+ connect( guiFactory(), TQT_SIGNAL( clientRemoved( KXMLGUIClient* ) ),
+ this, TQT_SLOT( verifyToplevelHeight() ) );
}
void KMdiMainFrm::verifyToplevelHeight()
@@ -271,21 +271,21 @@ void KMdiMainFrm::verifyToplevelHeight()
void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
{
m_mdiGUIClient = new KMDIPrivate::KMDIGUIClient( this, showModeMenu );
- connect( m_mdiGUIClient, SIGNAL( toggleTop() ), this, SIGNAL( toggleTop() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleLeft() ), this, SIGNAL( toggleLeft() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleRight() ), this, SIGNAL( toggleRight() ) );
- connect( m_mdiGUIClient, SIGNAL( toggleBottom() ), this, SIGNAL( toggleBottom() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleTop() ), this, TQT_SIGNAL( toggleTop() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleLeft() ), this, TQT_SIGNAL( toggleLeft() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleRight() ), this, TQT_SIGNAL( toggleRight() ) );
+ connect( m_mdiGUIClient, TQT_SIGNAL( toggleBottom() ), this, TQT_SIGNAL( toggleBottom() ) );
if ( m_mdiMode == KMdi::IDEAlMode )
{
if ( m_topContainer )
- connect( this, SIGNAL( toggleTop() ), m_topContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleTop() ), m_topContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_leftContainer )
- connect( this, SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleLeft() ), m_leftContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_rightContainer )
- connect( this, SIGNAL( toggleRight() ), m_rightContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleRight() ), m_rightContainer->getWidget(), TQT_SLOT( toggle() ) );
if ( m_bottomContainer )
- connect( this, SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( toggleBottom() ), m_bottomContainer->getWidget(), TQT_SLOT( toggle() ) );
}
emit mdiModeHasBeenChangedTo( m_mdiMode );
@@ -295,12 +295,12 @@ void KMdiMainFrm::setStandardMDIMenuEnabled( bool showModeMenu )
KMdiMainFrm::~KMdiMainFrm()
{
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
children.append( w );
// safely close the windows so properties are saved...
- QValueListIterator<KMdiChildView*> childIt;
+ TQValueListIterator<KMdiChildView*> childIt;
for ( childIt = children.begin(); childIt != children.end(); ++childIt )
{
closeWindow( *childIt, false ); // without re-layout taskbar!
@@ -335,10 +335,10 @@ KMdiMainFrm::~KMdiMainFrm()
//FIXME something wrong with this function. dunno what though
void KMdiMainFrm::applyOptions()
{
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
- QWidget* childFrame = 0L;
+ TQWidget* childFrame = 0L;
if ( ( *it )->mdiParent() )
{
kdDebug(760) << k_funcinfo << "using child view's mdi parent for resize hack" << endl;
@@ -363,22 +363,22 @@ void KMdiMainFrm::createMdiManager()
kdDebug(760) << k_funcinfo << "creating MDI manager" << endl;
m_pMdi = new KMdiChildArea( this );
setCentralWidget( m_pMdi );
- QObject::connect( m_pMdi, SIGNAL( nowMaximized( bool ) ),
- this, SLOT( setEnableMaximizedChildFrmMode( bool ) ) );
- QObject::connect( m_pMdi, SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ),
- this, SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) );
- QObject::connect( m_pMdi, SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ),
- this, SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) );
- QObject::connect( m_pMdi, SIGNAL( popupWindowMenu( QPoint ) ),
- this, SLOT( popupWindowMenu( QPoint ) ) );
- QObject::connect( m_pMdi, SIGNAL( lastChildFrmClosed() ),
- this, SIGNAL( lastChildFrmClosed() ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( nowMaximized( bool ) ),
+ this, TQT_SLOT( setEnableMaximizedChildFrmMode( bool ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( noMaximizedChildFrmLeft( KMdiChildFrm* ) ),
+ this, TQT_SLOT( switchOffMaximizeModeForMenu( KMdiChildFrm* ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( sysButtonConnectionsMustChange( KMdiChildFrm*, KMdiChildFrm* ) ),
+ this, TQT_SLOT( updateSysButtonConnections( KMdiChildFrm*, KMdiChildFrm* ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( popupWindowMenu( TQPoint ) ),
+ this, TQT_SLOT( popupWindowMenu( TQPoint ) ) );
+ TQObject::connect( m_pMdi, TQT_SIGNAL( lastChildFrmClosed() ),
+ this, TQT_SIGNAL( lastChildFrmClosed() ) );
}
//============ createTaskBar ==============//
void KMdiMainFrm::createTaskBar()
{
- m_pTaskBar = new KMdiTaskBar( this, QMainWindow::DockBottom );
+ m_pTaskBar = new KMdiTaskBar( this, TQMainWindow::DockBottom );
m_pTaskBar->installEventFilter( this );
}
@@ -389,7 +389,7 @@ void KMdiMainFrm::slot_toggleTaskBar()
m_pTaskBar->switchOn( !m_pTaskBar->isSwitchedOn() );
}
-void KMdiMainFrm::resizeEvent( QResizeEvent *e )
+void KMdiMainFrm::resizeEvent( TQResizeEvent *e )
{
if ( ( m_mdiMode == KMdi::ToplevelMode ) && !parentWidget() )
{
@@ -413,20 +413,20 @@ void KMdiMainFrm::setMinimumSize( int minw, int minh )
//================ wrapper ===============//
-KMdiChildView* KMdiMainFrm::createWrapper( QWidget *view, const QString& name, const QString& shortName )
+KMdiChildView* KMdiMainFrm::createWrapper( TQWidget *view, const TQString& name, const TQString& shortName )
{
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*/,
name.latin1() );
- QBoxLayout* pLayout = new QHBoxLayout( pMDICover, 0, -1, "layout" );
- view->reparent( pMDICover, QPoint( 0, 0 ) );
+ TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout" );
+ view->reparent( pMDICover, TQPoint( 0, 0 ) );
pLayout->addWidget( view );
// pMDICover->setName(name);
pMDICover->setTabCaption( shortName );
pMDICover->setCaption( name );
- const QPixmap* wndIcon = view->icon();
+ const TQPixmap* wndIcon = view->icon();
if ( wndIcon )
pMDICover->setIcon( *wndIcon );
@@ -458,14 +458,14 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
d->closeWindowAction->setEnabled(true);
// common connections used when under MDI control
- QObject::connect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
- QObject::connect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
- QObject::connect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
- QObject::connect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
- QObject::connect( pWnd, SIGNAL( activated( KMdiChildView* ) ), this, SIGNAL( viewActivated( KMdiChildView* ) ) );
- QObject::connect( pWnd, SIGNAL( deactivated( KMdiChildView* ) ), this, SIGNAL( viewDeactivated( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_SLOT( dockMenuItemActivated( int ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( activated( KMdiChildView* ) ), this, TQT_SIGNAL( viewActivated( KMdiChildView* ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( deactivated( KMdiChildView* ) ), this, TQT_SIGNAL( viewDeactivated( KMdiChildView* ) ) );
if ( index == -1 )
m_pDocumentViews->append( pWnd );
@@ -475,20 +475,20 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
if ( m_pTaskBar )
{
KMdiTaskBarButton* but = m_pTaskBar->addWinButton( pWnd );
- QObject::connect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ TQObject::connect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) );
}
// embed the view depending on the current MDI mode
if ( m_mdiMode == KMdi::TabPageMode || m_mdiMode == KMdi::IDEAlMode )
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( pWnd->icon() )
pixmap = *( pWnd->icon() );
m_documentTabWidget->insertTab( pWnd, pixmap, pWnd->tabCaption(), index );
- connect( pWnd, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
- connect( pWnd, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+ connect( pWnd, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) );
+ connect( pWnd, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) );
}
else
{
@@ -524,7 +524,7 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, int flags, int index )
}
//============ addWindow ============//
-void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags )
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQRect rectNormal, int flags )
{
addWindow( pWnd, flags );
if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
@@ -534,11 +534,11 @@ void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags )
}
//============ addWindow ============//
-void KMdiMainFrm::addWindow( KMdiChildView* pWnd, QPoint pos, int flags )
+void KMdiMainFrm::addWindow( KMdiChildView* pWnd, TQPoint pos, int flags )
{
addWindow( pWnd, flags );
if ( m_bMaximizedChildFrmMode && pWnd->isAttached() )
- pWnd->setRestoreGeometry( QRect( pos, pWnd->restoreGeometry().size() ) );
+ pWnd->setRestoreGeometry( TQRect( pos, pWnd->restoreGeometry().size() ) );
else
pWnd->move( pos );
}
@@ -551,7 +551,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
}
-void KMdiMainFrm::deleteToolWindow( QWidget* pWnd )
+void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd )
{
if ( m_pToolViews->contains( pWnd ) )
deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
@@ -563,10 +563,10 @@ void KMdiMainFrm::deleteToolWindow( KMdiToolViewAccessor *accessor )
}
//============ addWindow ============//
-KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos, QWidget* pTargetWnd,
- int percent, const QString& tabToolTip, const QString& tabCaption )
+KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos, TQWidget* pTargetWnd,
+ int percent, const TQString& tabToolTip, const TQString& tabCaption )
{
- QWidget* tvta = pWnd;
+ TQWidget* tvta = pWnd;
KDockWidget* pDW = dockManager->getDockWidgetFromName( pWnd->name() );
if ( pDW )
{
@@ -582,7 +582,7 @@ KMdiToolViewAccessor *KMdiMainFrm::addToolWindow( QWidget* pWnd, KDockWidget::Do
pWnd = pDW;
}
- QRect r = pWnd->geometry();
+ TQRect r = pWnd->geometry();
KMdiToolViewAccessor *mtva = new KMdiToolViewAccessor( this, pWnd, tabToolTip, ( tabCaption == 0 ) ? pWnd->caption() : tabCaption );
m_pToolViews->insert( tvta, mtva );
@@ -606,11 +606,11 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
// decide whether window shall be cascaded
bool bCascade = false;
- QApplication::sendPostedEvents();
- QRect frameGeo = pWnd->frameGeometry();
- QPoint topLeftScreen = pWnd->mapToGlobal( QPoint( 0, 0 ) );
- QPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
- QRect childAreaGeo = m_pMdi->geometry();
+ TQApplication::sendPostedEvents();
+ TQRect frameGeo = pWnd->frameGeometry();
+ TQPoint topLeftScreen = pWnd->mapToGlobal( TQPoint( 0, 0 ) );
+ TQPoint topLeftMdiChildArea = m_pMdi->mapFromGlobal( topLeftScreen );
+ TQRect childAreaGeo = m_pMdi->geometry();
if ( topLeftMdiChildArea.x() < 0 || topLeftMdiChildArea.y() < 0 ||
( topLeftMdiChildArea.x() + frameGeo.width() > childAreaGeo.width() ) ||
( topLeftMdiChildArea.y() + frameGeo.height() > childAreaGeo.height() ) )
@@ -639,7 +639,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
m_pMdi->manageChild( lpC, false, bCascade );
if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() )
{
- QRect r = lpC->geometry();
+ TQRect r = lpC->geometry();
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 );
@@ -652,8 +652,8 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
}
#undef FocusIn
- QFocusEvent fe( QEvent::FocusIn );
- QApplication::sendEvent( pWnd, &fe );
+ TQFocusEvent fe( TQEvent::FocusIn );
+ TQApplication::sendEvent( pWnd, &fe );
m_pCurrentWindow = pWnd; // required for checking the active item
}
@@ -673,10 +673,10 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
{
if ( lpC->icon() )
{
- QPixmap pixm( *( lpC->icon() ) );
+ TQPixmap pixm( *( lpC->icon() ) );
pWnd->setIcon( pixm );
}
- QString capt( lpC->caption() );
+ TQString capt( lpC->caption() );
if ( !bShow )
lpC->hide();
lpC->unsetClient( m_undockPositioningOffset );
@@ -687,15 +687,15 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
}
else
{
- if ( pWnd->size().isEmpty() || ( pWnd->size() == QSize( 1, 1 ) ) )
+ if ( pWnd->size().isEmpty() || ( pWnd->size() == TQSize( 1, 1 ) ) )
{
if ( m_pCurrentWindow )
{
- pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) );
+ pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), m_pCurrentWindow->size() ) );
}
else
{
- pWnd->setGeometry( QRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
+ pWnd->setGeometry( TQRect( m_pMdi->getCascadePoint( m_pDocumentViews->count() - 1 ), defaultChildFrmSize() ) );
}
}
#ifdef Q_WS_X11
@@ -736,19 +736,19 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
if ( m_pWinList->count() == 0 )
m_pCurrentWindow = 0L;
- QObject::disconnect( pWnd, SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, SLOT( attachWindow( KMdiChildView*, bool ) ) );
- QObject::disconnect( pWnd, SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, SLOT( detachWindow( KMdiChildView*, bool ) ) );
- QObject::disconnect( pWnd, SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, SLOT( activateView( KMdiChildView* ) ) );
- QObject::disconnect( pWnd, SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
- QObject::disconnect( pWnd, SIGNAL( clickedInWindowMenu( int ) ), this, SLOT( windowMenuItemActivated( int ) ) );
- QObject::disconnect( pWnd, SIGNAL( clickedInDockMenu( int ) ), this, SLOT( dockMenuItemActivated( int ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( attachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( attachWindow( KMdiChildView*, bool ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( detachWindow( KMdiChildView*, bool ) ), this, TQT_SLOT( detachWindow( KMdiChildView*, bool ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( focusInEventOccurs( KMdiChildView* ) ), this, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( childWindowCloseRequest( KMdiChildView* ) ), this, TQT_SLOT( childWindowCloseRequest( KMdiChildView* ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInWindowMenu( int ) ), this, TQT_SLOT( windowMenuItemActivated( int ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( clickedInDockMenu( int ) ), this, TQT_SLOT( dockMenuItemActivated( int ) ) );
if ( m_pTaskBar )
{
KMdiTaskBarButton * but = m_pTaskBar->getButton( pWnd );
if ( but != 0L )
{
- QObject::disconnect( pWnd, SIGNAL( tabCaptionChanged( const QString& ) ), but, SLOT( setNewText( const QString& ) ) );
+ TQObject::disconnect( pWnd, TQT_SIGNAL( tabCaptionChanged( const TQString& ) ), but, TQT_SLOT( setNewText( const TQString& ) ) );
}
m_pTaskBar->removeWinButton( pWnd );
}
@@ -759,7 +759,7 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
@@ -773,11 +773,11 @@ void KMdiMainFrm::removeWindowFromMdi( KMdiChildView *pWnd )
m_pClose->hide();
}
KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -845,7 +845,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
return ; //oops
if ( m_pDocumentViews->count() == 0 )
m_pClose->hide();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
kdDebug(760) << "-------- 1" << endl;
if ( m_pDocumentViews->count() == 1 )
{
@@ -858,7 +858,7 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setWidget( m_pMdi );
setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
@@ -875,11 +875,11 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
}
#if 0
KDockWidget* pDockW = ( KDockWidget* ) pWnd->parentWidget();
- pWnd->reparent( 0L, QPoint( 0, 0 ) );
+ pWnd->reparent( 0L, TQPoint( 0, 0 ) );
pDockW->setWidget( 0L );
if ( pDockW == m_pDockbaseOfTabPage )
{
- QTabWidget * pTab = ( QTabWidget* ) pDockW->parentWidget() ->parentWidget();
+ TQTabWidget * pTab = ( TQTabWidget* ) pDockW->parentWidget() ->parentWidget();
int cnt = pTab->count();
m_pDockbaseOfTabPage = ( KDockWidget* ) pTab->page( cnt - 2 );
if ( pDockW == m_pDockbaseOfTabPage )
@@ -937,9 +937,9 @@ void KMdiMainFrm::closeWindow( KMdiChildView *pWnd, bool layoutTaskBar )
}
//================== findWindow =================//
-KMdiChildView* KMdiMainFrm::findWindow( const QString& caption )
+KMdiChildView* KMdiMainFrm::findWindow( const TQString& caption )
{
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
if ( ( *it )->caption() == caption )
@@ -971,7 +971,7 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as )
return false;
}
-QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup )
+TQPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskbarPopup )
{
m_pWindowPopup->clear();
if ( bIncludeTaskbarPopup )
@@ -983,32 +983,32 @@ QPopupMenu * KMdiMainFrm::windowPopup( KMdiChildView * pWnd, bool bIncludeTaskba
}
//================ taskBarPopup =================//
-QPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ )
+TQPopupMenu* KMdiMainFrm::taskBarPopup( KMdiChildView *pWnd, bool /*bIncludeWindowPopup*/ )
{
//returns the g_pTaskBarPopup filled according to the KMdiChildView state
m_pTaskBarPopup->clear();
if ( pWnd->isAttached() )
{
- m_pTaskBarPopup->insertItem( i18n( "Undock" ), pWnd, SLOT( detach() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Undock" ), pWnd, TQT_SLOT( detach() ) );
m_pTaskBarPopup->insertSeparator();
if ( pWnd->isMinimized() || pWnd->isMaximized() )
- m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, SLOT( restore() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Restore" ), pWnd, TQT_SLOT( restore() ) );
if ( !pWnd->isMaximized() )
- m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, SLOT( maximize() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Maximize" ), pWnd, TQT_SLOT( maximize() ) );
if ( !pWnd->isMinimized() )
- m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, SLOT( minimize() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Minimize" ), pWnd, TQT_SLOT( minimize() ) );
}
else
- m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, SLOT( attach() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Dock" ), pWnd, TQT_SLOT( attach() ) );
m_pTaskBarPopup->insertSeparator();
- m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, SLOT( close() ) );
+ m_pTaskBarPopup->insertItem( i18n( "Close" ), pWnd, TQT_SLOT( close() ) );
// the window has a view...get the window popup
m_pTaskBarPopup->insertSeparator();
m_pTaskBarPopup->insertItem( i18n( "Operations" ), windowPopup( pWnd, false ) ); //alvoid recursion
return m_pTaskBarPopup;
}
-void KMdiMainFrm::slotDocCurrentChanged( QWidget* pWidget )
+void KMdiMainFrm::slotDocCurrentChanged( TQWidget* pWidget )
{
KMdiChildView * pWnd = static_cast<KMdiChildView*>( pWidget );
pWnd->m_bMainframesActivateViewIsPending = true;
@@ -1106,19 +1106,19 @@ void KMdiMainFrm::activateView( KMdiChildView* pWnd )
void KMdiMainFrm::taskbarButtonRightClicked( KMdiChildView *pWnd )
{
activateView( pWnd ); // set focus
- //QApplication::sendPostedEvents();
- taskBarPopup( pWnd, true ) ->popup( QCursor::pos() );
+ //TQApplication::sendPostedEvents();
+ taskBarPopup( pWnd, true ) ->popup( TQCursor::pos() );
}
void KMdiMainFrm::childWindowCloseRequest( KMdiChildView *pWnd )
{
KMdiViewCloseEvent * ce = new KMdiViewCloseEvent( pWnd );
- QApplication::postEvent( this, ce );
+ TQApplication::postEvent( this, ce );
}
-bool KMdiMainFrm::event( QEvent* e )
+bool KMdiMainFrm::event( TQEvent* e )
{
- if ( e->type() == QEvent::User )
+ if ( e->type() == TQEvent::User )
{
KMdiChildView * pWnd = ( KMdiChildView* ) ( ( KMdiViewCloseEvent* ) e )->data();
if ( pWnd != 0L )
@@ -1139,7 +1139,7 @@ bool KMdiMainFrm::event( QEvent* e )
// Actually we seem to be lucky that the timer does not elapse while we
// are moving -> so we have no obsolete drag end / begin
}
- else if ( isVisible() && e->type() == QEvent::Move )
+ else if ( isVisible() && e->type() == TQEvent::Move )
{
if ( m_pDragEndTimer->isActive() )
{
@@ -1149,11 +1149,11 @@ bool KMdiMainFrm::event( QEvent* e )
else
{
// this is the first move -> send the drag begin to all concerned views
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildFrmDragBeginEvent dragBeginEvent( 0L );
- QApplication::sendEvent( ( *it ), &dragBeginEvent );
+ TQApplication::sendEvent( ( *it ), &dragBeginEvent );
}
}
m_pDragEndTimer->start( 200, true ); // single shot after 200 ms
@@ -1162,18 +1162,18 @@ bool KMdiMainFrm::event( QEvent* e )
return DockMainWindow::event( e );
}
-bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
+bool KMdiMainFrm::eventFilter( TQObject * /*obj*/, TQEvent *e )
{
- if ( e->type() == QEvent::Resize && m_mdiMode == KMdi::ToplevelMode )
+ if ( e->type() == TQEvent::Resize && m_mdiMode == KMdi::ToplevelMode )
{
verifyToplevelHeight();
return false; //let the rest of the resize magic do its work
}
- if ( e->type() == QEvent::FocusIn )
+ if ( e->type() == TQEvent::FocusIn )
{
- QFocusEvent * pFE = ( QFocusEvent* ) e;
- if ( pFE->reason() == QFocusEvent::ActiveWindow )
+ TQFocusEvent * pFE = ( TQFocusEvent* ) e;
+ if ( pFE->reason() == TQFocusEvent::ActiveWindow )
{
if ( m_pCurrentWindow && !m_pCurrentWindow->isHidden() &&
!m_pCurrentWindow->isAttached() && m_pMdi->topChild() )
@@ -1192,7 +1192,7 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::KeyRelease )
+ else if ( e->type() == TQEvent::KeyRelease )
{
if ( switching() )
{
@@ -1203,14 +1203,14 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
const KKeySequence& seq = cut.seq( 0 );
const KKey& key = seq.key( 0 );
int modFlags = key.modFlags();
- int state = ( ( QKeyEvent * ) e ) ->state();
- KKey key2( ( QKeyEvent * ) e );
+ int state = ( ( TQKeyEvent * ) e ) ->state();
+ KKey key2( ( TQKeyEvent * ) 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
**/
- if ( state != ( ( QKeyEvent * ) e ) ->stateAfter() &&
+ 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 ) )
@@ -1235,12 +1235,12 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
void KMdiMainFrm::closeAllViews()
{
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView*> children;
+ TQValueList<KMdiChildView*> children;
for ( KMdiChildView * w = m_pDocumentViews->first();w;w = m_pDocumentViews->next() )
{
children.append( w );
}
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for ( childIt = children.begin(); childIt != children.end(); ++childIt )
{
( *childIt )->close();
@@ -1254,7 +1254,7 @@ void KMdiMainFrm::closeAllViews()
void KMdiMainFrm::iconifyAllViews()
{
kdDebug(760) << k_funcinfo << "minimizing all the views" << endl;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
( *it )->minimize();
}
@@ -1270,7 +1270,7 @@ void KMdiMainFrm::closeActiveView()
}
/** find the root dockwidgets and store their geometry */
-void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList, QValueList<QRect>* positionList )
+void KMdiMainFrm::findRootDockWidgets( TQPtrList<KDockWidget>* rootDockWidgetList, TQValueList<TQRect>* positionList )
{
//nothing is valid
if ( !rootDockWidgetList && !positionList )
@@ -1280,18 +1280,18 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
const int windowTitleHeight = 10; // @todo: -"-
- QObjectList* pObjList = queryList( "KDockWidget" );
+ TQObjectList* pObjList = queryList( "KDockWidget" );
if ( pObjList->isEmpty() )
pObjList = queryList( "KDockWidget_Compat::KDockWidget" );
- QObjectListIt it( *pObjList );
+ TQObjectListIt it( *pObjList );
// for all dockwidgets (which are children of this mainwindow)
while ( ( *it ) )
{
KDockWidget* dockWindow = 0L; /* pDockW */
KDockWidget* rootDockWindow = 0L; /* pRootDockWindow */
KDockWidget* undockCandidate = 0L; /* pUndockCandidate */
- QWidget* pW = static_cast<QWidget*>( ( *it ) );
+ TQWidget* pW = static_cast<TQWidget*>( ( *it ) );
// find the oldest ancestor of the current dockwidget that can be undocked
while ( !pW->isTopLevel() )
@@ -1311,7 +1311,7 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
bool found = false;
if ( !rootDockWidgetList->isEmpty() )
{
- QPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it2( *rootDockWidgetList );
for ( ; it2.current() && !found; ++it2 )
{
dockWindow = it2.current();
@@ -1325,8 +1325,8 @@ void KMdiMainFrm::findRootDockWidgets( QPtrList<KDockWidget>* rootDockWidgetList
rootDockWidgetList->append( dockWindow );
kdDebug(760) << k_funcinfo << "Appending " << rootDockWindow << " to our list of " <<
"root dock windows" << endl;
- QPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos();
- QRect r( p.x(), p.y() + m_undockPositioningOffset.y(),
+ TQPoint p = rootDockWindow->mapToGlobal( rootDockWindow->pos() ) - rootDockWindow->pos();
+ TQRect r( p.x(), p.y() + m_undockPositioningOffset.y(),
rootDockWindow->width() - windowTitleHeight - frameBorderWidth * 2,
rootDockWindow->height() - windowTitleHeight - frameBorderWidth * 2 );
positionList->append( r );
@@ -1351,11 +1351,11 @@ void KMdiMainFrm::switchToToplevelMode()
KMdi::MdiMode oldMdiMode = m_mdiMode;
const int frameBorderWidth = 7; // @todo: Can we / do we need to ask the window manager?
- setUndockPositioningOffset( QPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
+ setUndockPositioningOffset( TQPoint( 0, ( m_pTaskBar ? m_pTaskBar->height() : 0 ) + frameBorderWidth ) );
// 1.) select the dockwidgets to be undocked and store their geometry
- QPtrList<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> positionList;
// 2.) undock the MDI views of KMDI
switch( oldMdiMode )
@@ -1375,7 +1375,7 @@ void KMdiMainFrm::switchToToplevelMode()
}
// 3.) undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> kdwit( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> kdwit( rootDockWidgetList );
for ( ; ( *kdwit ); ++kdwit )
( *kdwit )->undock();
@@ -1384,7 +1384,7 @@ void KMdiMainFrm::switchToToplevelMode()
{
if ( !m_pDockbaseAreaOfDocumentViews )
{
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -1394,7 +1394,7 @@ void KMdiMainFrm::switchToToplevelMode()
setView( m_pDockbaseAreaOfDocumentViews );
setMainDockWidget( m_pDockbaseAreaOfDocumentViews );
}
- // QApplication::sendPostedEvents(); //why do we need to empty the event queue?
+ // TQApplication::sendPostedEvents(); //why do we need to empty the event queue?
if ( !parentWidget() )
{
//if we don't have a parent widget ( which i expect we wouldn't )
@@ -1418,7 +1418,7 @@ void KMdiMainFrm::switchToToplevelMode()
//FIXME although i don't know what to fix
// 5. show the child views again
- QPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> kmdicvit( *m_pDocumentViews );
for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit )
{
#ifdef Q_WS_X11
@@ -1428,8 +1428,8 @@ void KMdiMainFrm::switchToToplevelMode()
}
// 6.) reset all memorized positions of the undocked ones and show them again
- QValueList<QRect>::Iterator qvlqrit;
- QValueList<QRect>::Iterator qvlEnd = positionList.end();
+ TQValueList<TQRect>::Iterator qvlqrit;
+ TQValueList<TQRect>::Iterator qvlEnd = positionList.end();
for ( kmdicvit.toFirst(), qvlqrit = positionList.begin() ; ( *kmdicvit ) && qvlqrit != qvlEnd; ++kmdicvit, ++qvlqrit )
{
( *kmdicvit )->setGeometry( ( *qvlqrit ) );
@@ -1460,8 +1460,8 @@ void KMdiMainFrm::switchToChildframeMode()
return ;
}
- QPtrList<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> positionList;
if ( m_mdiMode == KMdi::TabPageMode )
{
@@ -1471,7 +1471,7 @@ void KMdiMainFrm::switchToChildframeMode()
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
// undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ) ; ++it )
( *it )->undock();
@@ -1491,7 +1491,7 @@ void KMdiMainFrm::switchToChildframeMode()
kdDebug(760) << k_funcinfo << "Found " << rootDockWidgetList.count() << " widgets to undock" << endl;
// undock all these found oldest ancestors (being KDockWidgets)
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ) ; ++it )
( *it )->undock();
@@ -1503,7 +1503,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( !m_pDockbaseAreaOfDocumentViews )
{
// cover KMdi's childarea by a dockwidget
- m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", QPixmap(), 0L, "mdi_area_cover" );
+ m_pDockbaseAreaOfDocumentViews = createDockWidget( "mdiAreaCover", TQPixmap(), 0L, "mdi_area_cover" );
m_pDockbaseAreaOfDocumentViews->setDockWindowTransient( this, true );
m_pDockbaseAreaOfDocumentViews->setEnableDocking( KDockWidget::DockNone );
m_pDockbaseAreaOfDocumentViews->setDockSite( KDockWidget::DockCorner );
@@ -1526,7 +1526,7 @@ void KMdiMainFrm::switchToChildframeMode()
if ( ( m_mdiMode == KMdi::TabPageMode ) || ( m_mdiMode == KMdi::IDEAlMode ) )
{
kdDebug(760) << k_funcinfo << "trying to dock back the undock toolviews" << endl;
- QPtrListIterator<KDockWidget> it( rootDockWidgetList );
+ TQPtrListIterator<KDockWidget> it( rootDockWidgetList );
for ( ; ( *it ); ++it )
( *it )->dockBack();
}
@@ -1535,7 +1535,7 @@ void KMdiMainFrm::switchToChildframeMode()
{
// restore the old dock scenario which we memorized at the time we switched to toplevel mode
kdDebug(760) << k_funcinfo << "Restoring old dock scenario memorized from toplevel mode" << endl;
- QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
readDockConfig( oldDockState );
}
@@ -1543,7 +1543,7 @@ void KMdiMainFrm::switchToChildframeMode()
m_mdiMode = KMdi::ChildframeMode;
//FIXME although i don't know what to fix.
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildView* pView = ( *it );
@@ -1573,14 +1573,14 @@ void KMdiMainFrm::finishChildframeMode()
// save the old dock scenario of the dockwidget-like tool views to a DOM tree
kdDebug(760) << k_funcinfo << "saving the current dock scenario" << endl;
delete m_pTempDockSession;
- m_pTempDockSession = new QDomDocument( "docksession" );
- QDomElement curDockState = m_pTempDockSession->createElement( "cur_dock_state" );
+ m_pTempDockSession = new TQDomDocument( "docksession" );
+ TQDomElement curDockState = m_pTempDockSession->createElement( "cur_dock_state" );
m_pTempDockSession->appendChild( curDockState );
writeDockConfig( curDockState );
// detach all non-tool-views to toplevel
kdDebug(760) << k_funcinfo << "detaching all document views and moving them to toplevel" << endl;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; ( *it ); ++it )
{
KMdiChildView* pView = ( *it );
@@ -1633,7 +1633,7 @@ void KMdiMainFrm::switchToTabPageMode()
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
if ( m_pDocumentViews->count() > 0 )
m_pClose->show();
}
@@ -1650,20 +1650,20 @@ void KMdiMainFrm::finishTabPageMode()
if ( m_mdiMode == KMdi::TabPageMode )
{
m_pClose->hide();
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
kdDebug(760) << "KMdiMainFrm::finishTabPageMode: in loop" << endl;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ TQSize mins = pView->minimumSize();
+ TQSize maxs = pView->maximumSize();
+ TQSize sz = pView->size();
+ TQWidget* pParent = pView->parentWidget();
+ TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
m_documentTabWidget->removePage( pView );
pView->reparent( 0, 0, p );
// pView->reparent(0,0,p);
@@ -1696,12 +1696,12 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace()
m_oldMainFrmHeight = 0;
//qDebug("TopLevelMode off");
emit leftTopLevelMode();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
// restore the old dock szenario which we memorized at the time we switched to toplevel mode
if ( m_pTempDockSession )
{
- QDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
+ TQDomElement oldDockState = m_pTempDockSession->namedItem( "cur_dock_state" ).toElement();
readDockConfig( oldDockState );
}
}
@@ -1715,20 +1715,20 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace()
#endif
delete m_documentTabWidget;
m_documentTabWidget = new KMdiDocumentViewTabWidget( m_pDockbaseAreaOfDocumentViews );
- connect( m_documentTabWidget, SIGNAL( currentChanged( QWidget* ) ), this, SLOT( slotDocCurrentChanged( QWidget* ) ) );
+ connect( m_documentTabWidget, TQT_SIGNAL( currentChanged( TQWidget* ) ), this, TQT_SLOT( slotDocCurrentChanged( TQWidget* ) ) );
m_pDockbaseAreaOfDocumentViews->setWidget( m_documentTabWidget );
m_documentTabWidget->show();
- QPtrListIterator<KMdiChildView> it4( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it4( *m_pDocumentViews );
for ( ; it4.current(); ++it4 )
{
KMdiChildView* pView = it4.current();
- m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : QPixmap(), pView->tabCaption() );
+ m_documentTabWidget->addTab( pView, pView->icon() ? *( pView->icon() ) : TQPixmap(), pView->tabCaption() );
/*
- connect(pView,SIGNAL(iconOrCaptionUdpated(QWidget*,QPixmap,const QString&)),
- m_documentTabWidget,SLOT(updateView(QWidget*,QPixmap,const QString&)));
+ connect(pView,TQT_SIGNAL(iconOrCaptionUdpated(TQWidget*,TQPixmap,const TQString&)),
+ m_documentTabWidget,TQT_SLOT(updateView(TQWidget*,TQPixmap,const TQString&)));
*/
- connect( pView, SIGNAL( iconUpdated( QWidget*, QPixmap ) ), m_documentTabWidget, SLOT( updateIconInView( QWidget*, QPixmap ) ) );
- connect( pView, SIGNAL( captionUpdated( QWidget*, const QString& ) ), m_documentTabWidget, SLOT( updateCaptionInView( QWidget*, const QString& ) ) );
+ connect( pView, TQT_SIGNAL( iconUpdated( TQWidget*, TQPixmap ) ), m_documentTabWidget, TQT_SLOT( updateIconInView( TQWidget*, TQPixmap ) ) );
+ connect( pView, TQT_SIGNAL( captionUpdated( TQWidget*, const TQString& ) ), m_documentTabWidget, TQT_SLOT( updateCaptionInView( TQWidget*, const TQString& ) ) );
}
}
@@ -1774,7 +1774,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
}
d->m_toolviewStyle = flag;
bool toolviewExists = false;
- QMap<QWidget*, KMdiToolViewAccessor*>::Iterator it;
+ TQMap<TQWidget*, KMdiToolViewAccessor*>::Iterator it;
for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it )
{
KDockWidget *dockWidget = dynamic_cast<KDockWidget*>( it.data()->wrapperWidget() );
@@ -1783,7 +1783,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
switch ( flag )
{
case KMdi::IconOnly:
- dockWidget->setTabPageLabel( QString::null );
+ dockWidget->setTabPageLabel( TQString::null );
dockWidget->setPixmap( *( it.data()->wrappedWidget()->icon() ) );
break;
case KMdi::TextOnly:
@@ -1858,7 +1858,7 @@ void KMdiMainFrm::switchToIDEAlMode()
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
if ( m_pDocumentViews->count() > 0 )
m_pClose->show();
}
@@ -1871,9 +1871,9 @@ void KMdiMainFrm::switchToIDEAlMode()
}
-void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
+void KMdiMainFrm::dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container )
{
- QPtrListIterator<KDockWidget> it( widgetsToReparent );
+ TQPtrListIterator<KDockWidget> it( widgetsToReparent );
for ( ; ( *it ); ++it )
{
( *it )->manualDock( container, KDockWidget::DockCenter, 20 );
@@ -1881,7 +1881,7 @@ void KMdiMainFrm::dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToR
}
}
-void KMdiMainFrm::findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
+void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw )
{
KDockWidget* mainDock = getMainDockWidget();
if ( mainDock->parentDockTabGroup() )
@@ -1933,10 +1933,10 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
if ( mainDock->parentDockTabGroup() )
w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
- QPtrList<KDockWidget> leftReparentWidgets;
- QPtrList<KDockWidget> rightReparentWidgets;
- QPtrList<KDockWidget> bottomReparentWidgets;
- QPtrList<KDockWidget> topReparentWidgets;
+ TQPtrList<KDockWidget> leftReparentWidgets;
+ TQPtrList<KDockWidget> rightReparentWidgets;
+ TQPtrList<KDockWidget> bottomReparentWidgets;
+ TQPtrList<KDockWidget> topReparentWidgets;
if ( mainDock->parentDockTabGroup() )
mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
@@ -1956,40 +1956,40 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
m_leftContainer->manualDock( mainDock, KDockWidget::DockLeft, 20 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleLeft() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleLeft() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_rightContainer->setWidget( tmpDC = new KMdiDockContainer( m_rightContainer, this, KDockWidget::DockRight, d->m_styleIDEAlMode ) );
m_rightContainer->setEnableDocking( KDockWidget::DockRight );
m_rightContainer->manualDock( mainDock, KDockWidget::DockRight, 80 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleRight() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleRight() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_topContainer->setWidget( tmpDC = new KMdiDockContainer( m_topContainer, this, KDockWidget::DockTop, d->m_styleIDEAlMode ) );
m_topContainer->setEnableDocking( KDockWidget::DockTop );
m_topContainer->manualDock( mainDock, KDockWidget::DockTop, 20 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleTop() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleTop() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_bottomContainer->setWidget( tmpDC = new KMdiDockContainer( m_bottomContainer, this, KDockWidget::DockBottom, d->m_styleIDEAlMode ) );
m_bottomContainer->setEnableDocking( KDockWidget::DockBottom );
m_bottomContainer->manualDock( mainDock, KDockWidget::DockBottom, 80 );
tmpDC->init();
if ( m_mdiGUIClient )
- connect ( this, SIGNAL( toggleBottom() ), tmpDC, SLOT( toggle() ) );
- connect( this, SIGNAL( collapseOverlapContainers() ), tmpDC, SLOT( collapseOverlapped() ) );
- connect( tmpDC, SIGNAL( activated( KMdiDockContainer* ) ), this, SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
- connect( tmpDC, SIGNAL( deactivated( KMdiDockContainer* ) ), this, SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
+ connect ( this, TQT_SIGNAL( toggleBottom() ), tmpDC, TQT_SLOT( toggle() ) );
+ connect( this, TQT_SIGNAL( collapseOverlapContainers() ), tmpDC, TQT_SLOT( collapseOverlapped() ) );
+ connect( tmpDC, TQT_SIGNAL( activated( KMdiDockContainer* ) ), this, TQT_SLOT( setActiveToolDock( KMdiDockContainer* ) ) );
+ connect( tmpDC, TQT_SIGNAL( deactivated( KMdiDockContainer* ) ), this, TQT_SLOT( removeFromActiveDockList( KMdiDockContainer* ) ) );
m_leftContainer->setDockSite( KDockWidget::DockCenter );
m_rightContainer->setDockSite( KDockWidget::DockCenter );
@@ -2024,22 +2024,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
{
assert( m_pClose );
m_pClose->hide();
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), this, SLOT( closeViewButtonPressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeViewButtonPressed() ) );
- QStringList leftNames;
+ TQStringList leftNames;
leftNames = prepareIdealToTabs( m_leftContainer );
int leftWidth = m_leftContainer->width();
- QStringList rightNames;
+ TQStringList rightNames;
rightNames = prepareIdealToTabs( m_rightContainer );
int rightWidth = m_rightContainer->width();
- QStringList topNames;
+ TQStringList topNames;
topNames = prepareIdealToTabs( m_topContainer );
int topHeight = m_topContainer->height();
- QStringList bottomNames;
+ TQStringList bottomNames;
bottomNames = prepareIdealToTabs( m_bottomContainer );
int bottomHeight = m_bottomContainer->height();
@@ -2064,22 +2064,22 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
idealToolViewsToStandardTabs( rightNames, KDockWidget::DockRight, rightWidth );
idealToolViewsToStandardTabs( topNames, KDockWidget::DockTop, topHeight );
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
if ( !full )
return ;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
if ( pView->isToolView() )
continue;
- QSize mins = pView->minimumSize();
- QSize maxs = pView->maximumSize();
- QSize sz = pView->size();
- QWidget* pParent = pView->parentWidget();
- QPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
+ TQSize mins = pView->minimumSize();
+ TQSize maxs = pView->maximumSize();
+ TQSize sz = pView->size();
+ TQWidget* pParent = pView->parentWidget();
+ TQPoint p( pParent->mapToGlobal( pParent->pos() ) - pParent->pos() + m_undockPositioningOffset );
pView->reparent( 0, 0, p );
pView->reparent( 0, 0, p );
pView->resize( sz );
@@ -2116,11 +2116,11 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
}
-QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
+TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
{
KDockContainer * pDW = dynamic_cast<KDockContainer*>( container->getWidget() );
- QStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
- for ( QStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
+ TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
+ for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
{
KDockWidget* dw = ( KDockWidget* ) manager() ->getDockWidgetFromName( *it );
dw->undock();
@@ -2130,7 +2130,7 @@ QStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
return widgetNames;
}
-void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int size )
+void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int size )
{
Q_UNUSED( size )
@@ -2142,7 +2142,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi
if ( widgetNames.count() > 0 )
{
- QStringList::iterator it = widgetNames.begin();
+ TQStringList::iterator it = widgetNames.begin();
KDockWidget *dwpd = manager() ->getDockWidgetFromName( *it );
if ( !dwpd )
{
@@ -2163,7 +2163,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( QStringList widgetNames, KDockWi
}
#if 0
- QWidget *wid = dwpd->parentDockTabGroup();
+ TQWidget *wid = dwpd->parentDockTabGroup();
if ( !wid )
wid = dwpd;
wid->setGeometry( 0, 0, 20, 20 );
@@ -2195,13 +2195,13 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
return ; // use setMenuForSDIModeSysButtons( 0L) for unsetting the external main menu!
if ( !m_pUndock )
- m_pUndock = new QToolButton( pMenuBar );
+ m_pUndock = new TQToolButton( pMenuBar );
if ( !m_pRestore )
- m_pRestore = new QToolButton( pMenuBar );
+ m_pRestore = new TQToolButton( pMenuBar );
if ( !m_pMinimize )
- m_pMinimize = new QToolButton( pMenuBar );
+ m_pMinimize = new TQToolButton( pMenuBar );
if ( !m_pClose )
- m_pClose = new QToolButton( pMenuBar );
+ m_pClose = new TQToolButton( pMenuBar );
m_pUndock->setAutoRaise( false );
m_pMinimize->setAutoRaise( false );
m_pRestore->setAutoRaise( false );
@@ -2216,17 +2216,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
// create the decoration pixmaps
if ( frameDecorOfAttachedViews() == KMdi::Win95Look )
{
- m_pUndockButtonPixmap = new QPixmap( win_undockbutton );
- m_pMinButtonPixmap = new QPixmap( win_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( win_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( win_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( win_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( win_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( win_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( win_closebutton );
}
else if ( frameDecorOfAttachedViews() == KMdi::KDE1Look )
{
- m_pUndockButtonPixmap = new QPixmap( kde_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde_closebutton );
m_pUndock->setAutoRaise( true );
m_pMinimize->setAutoRaise( true );
m_pRestore->setAutoRaise( true );
@@ -2234,17 +2234,17 @@ void KMdiMainFrm::setMenuForSDIModeSysButtons( KMenuBar* pMenuBar )
}
else if ( frameDecorOfAttachedViews() == KMdi::KDELook )
{
- m_pUndockButtonPixmap = new QPixmap( kde2_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde2_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2_closebutton );
}
else
{ // kde2laptop look
- m_pUndockButtonPixmap = new QPixmap( kde2laptop_undockbutton );
- m_pMinButtonPixmap = new QPixmap( kde2laptop_minbutton );
- m_pRestoreButtonPixmap = new QPixmap( kde2laptop_restorebutton );
- m_pCloseButtonPixmap = new QPixmap( kde2laptop_closebutton );
+ m_pUndockButtonPixmap = new TQPixmap( kde2laptop_undockbutton );
+ m_pMinButtonPixmap = new TQPixmap( kde2laptop_minbutton );
+ m_pRestoreButtonPixmap = new TQPixmap( kde2laptop_restorebutton );
+ m_pCloseButtonPixmap = new TQPixmap( kde2laptop_closebutton );
}
m_pUndock->hide();
@@ -2347,7 +2347,7 @@ void KMdiMainFrm::activateFirstWin()
{
m_bSwitching= true; // flag that we are currently switching between windows
KMdiIterator<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> m;
for ( it->first(); !it->isDone(); it->next() )
{
m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
@@ -2356,9 +2356,9 @@ void KMdiMainFrm::activateFirstWin()
if ( !activeWindow() )
return ;
- QDateTime current = activeWindow() ->getTimeStamp();
- QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
- QMap<QDateTime, KMdiChildView*>::iterator newPos = pos;
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQMap<TQDateTime, KMdiChildView*>::iterator newPos = pos;
if ( pos != m.end() )
{
++newPos;
@@ -2380,7 +2380,7 @@ void KMdiMainFrm::activateLastWin()
{
m_bSwitching= true; // flag that we are currently switching between windows
KMdiIterator<KMdiChildView*>* it = createIterator();
- QMap<QDateTime, KMdiChildView*> m;
+ TQMap<TQDateTime, KMdiChildView*> m;
for ( it->first(); !it->isDone(); it->next() )
{
m.insert( it->currentItem() ->getTimeStamp(), it->currentItem() );
@@ -2389,8 +2389,8 @@ void KMdiMainFrm::activateLastWin()
if ( !activeWindow() )
return ;
- QDateTime current = activeWindow() ->getTimeStamp();
- QMap<QDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
+ TQDateTime current = activeWindow() ->getTimeStamp();
+ TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) );
if ( pos != m.begin() )
{
--pos;
@@ -2432,23 +2432,23 @@ void KMdiMainFrm::setEnableMaximizedChildFrmMode( bool enableMaxChildFrameMode )
if ( !pCurrentChild || !m_pMainMenuBar )
return ;
- QObject::connect( m_pUndock, SIGNAL( clicked() ), pCurrentChild, SLOT( undockPressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), pCurrentChild, SLOT( minimizePressed() ) );
- QObject::connect( m_pRestore, SIGNAL( clicked() ), pCurrentChild, SLOT( maximizePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( undockPressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( maximizePressed() ) );
m_pMinimize->show();
m_pUndock->show();
m_pRestore->show();
if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
{
- m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), SLOT( closePressed() ), 0, -1, 0 );
+ m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), m_pMdi->topChild(), TQT_SLOT( closePressed() ), 0, -1, 0 );
}
else
{
m_pMainMenuBar->insertItem( *pCurrentChild->icon(), pCurrentChild->systemMenu(), -1, 0 );
if ( m_pClose )
{
- QObject::connect( m_pClose, SIGNAL( clicked() ), pCurrentChild, SLOT( closePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), pCurrentChild, TQT_SLOT( closePressed() ) );
m_pClose->show();
}
else
@@ -2484,10 +2484,10 @@ void KMdiMainFrm::switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild )
if ( oldChild )
{
Q_ASSERT( m_pClose );
- QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
- QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( closePressed() ) );
}
m_pUndock->hide();
m_pMinimize->hide();
@@ -2506,7 +2506,7 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF
if ( newChild )
{
if ( frameDecorOfAttachedViews() == KMdi::KDELaptopLook )
- m_pMainMenuBar->insertItem( QPixmap( kde2laptop_closebutton_menu ), newChild, SLOT( closePressed() ), 0, -1, 0 );
+ m_pMainMenuBar->insertItem( TQPixmap( kde2laptop_closebutton_menu ), newChild, TQT_SLOT( closePressed() ), 0, -1, 0 );
else
m_pMainMenuBar->insertItem( *newChild->icon(), newChild->systemMenu(), -1, 0 );
}
@@ -2515,18 +2515,18 @@ void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildF
{
m_pMainMenuBar->removeItem( m_pMainMenuBar->idAt( 1 ) );
Q_ASSERT( m_pClose );
- QObject::disconnect( m_pUndock, SIGNAL( clicked() ), oldChild, SLOT( undockPressed() ) );
- QObject::disconnect( m_pMinimize, SIGNAL( clicked() ), oldChild, SLOT( minimizePressed() ) );
- QObject::disconnect( m_pRestore, SIGNAL( clicked() ), oldChild, SLOT( maximizePressed() ) );
- QObject::disconnect( m_pClose, SIGNAL( clicked() ), oldChild, SLOT( closePressed() ) );
+ TQObject::disconnect( m_pUndock, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( undockPressed() ) );
+ TQObject::disconnect( m_pMinimize, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::disconnect( m_pRestore, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::disconnect( m_pClose, TQT_SIGNAL( clicked() ), oldChild, TQT_SLOT( closePressed() ) );
}
if ( newChild )
{
Q_ASSERT( m_pClose );
- QObject::connect( m_pUndock, SIGNAL( clicked() ), newChild, SLOT( undockPressed() ) );
- QObject::connect( m_pMinimize, SIGNAL( clicked() ), newChild, SLOT( minimizePressed() ) );
- QObject::connect( m_pRestore, SIGNAL( clicked() ), newChild, SLOT( maximizePressed() ) );
- QObject::connect( m_pClose, SIGNAL( clicked() ), newChild, SLOT( closePressed() ) );
+ TQObject::connect( m_pUndock, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( undockPressed() ) );
+ TQObject::connect( m_pMinimize, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( minimizePressed() ) );
+ TQObject::connect( m_pRestore, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( maximizePressed() ) );
+ TQObject::connect( m_pClose, TQT_SIGNAL( clicked() ), newChild, TQT_SLOT( closePressed() ) );
}
}
@@ -2574,7 +2574,7 @@ void KMdiMainFrm::fillWindowMenu()
d->closeWindowAction->plug(m_pWindowMenu);
- int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, SLOT( closeAllViews() ) );
+ int closeAllId = m_pWindowMenu->insertItem( i18n( "Close &All" ), this, TQT_SLOT( closeAllViews() ) );
if ( noViewOpened )
{
d->closeWindowAction->setEnabled(false);
@@ -2583,7 +2583,7 @@ void KMdiMainFrm::fillWindowMenu()
if ( !tabPageMode && !IDEAlMode )
{
- int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, SLOT( iconifyAllViews() ) );
+ int iconifyId = m_pWindowMenu->insertItem( i18n( "&Minimize All" ), this, TQT_SLOT( iconifyAllViews() ) );
if ( noViewOpened )
m_pWindowMenu->setItemEnabled( iconifyId, false );
}
@@ -2591,10 +2591,10 @@ void KMdiMainFrm::fillWindowMenu()
m_pWindowMenu->insertSeparator();
m_pWindowMenu->insertItem( i18n( "&MDI Mode" ), m_pMdiModeMenu );
m_pMdiModeMenu->clear();
- m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, SLOT( switchToToplevelMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, SLOT( switchToChildframeMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, SLOT( switchToTabPageMode() ) );
- m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, SLOT( switchToIDEAlMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "&Toplevel Mode" ), this, TQT_SLOT( switchToToplevelMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "C&hildframe Mode" ), this, TQT_SLOT( switchToChildframeMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "Ta&b Page Mode" ), this, TQT_SLOT( switchToTabPageMode() ) );
+ m_pMdiModeMenu->insertItem( i18n( "I&DEAl Mode" ), this, TQT_SLOT( switchToIDEAlMode() ) );
switch ( m_mdiMode )
{
case KMdi::ToplevelMode:
@@ -2618,13 +2618,13 @@ void KMdiMainFrm::fillWindowMenu()
{
int placMenuId = m_pWindowMenu->insertItem( i18n( "&Tile" ), m_pPlacingMenu );
m_pPlacingMenu->clear();
- m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, SLOT( cascadeWindows() ) );
- m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, SLOT( cascadeMaximized() ) );
- m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, SLOT( expandVertical() ) );
- m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, SLOT( expandHorizontal() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, SLOT( tileAnodine() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, SLOT( tilePragma() ) );
- m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, SLOT( tileVertically() ) );
+ m_pPlacingMenu->insertItem( i18n( "Ca&scade Windows" ), m_pMdi, TQT_SLOT( cascadeWindows() ) );
+ m_pPlacingMenu->insertItem( i18n( "Cascade &Maximized" ), m_pMdi, TQT_SLOT( cascadeMaximized() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Vertically" ), m_pMdi, TQT_SLOT( expandVertical() ) );
+ m_pPlacingMenu->insertItem( i18n( "Expand &Horizontally" ), m_pMdi, TQT_SLOT( expandHorizontal() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile &Non-Overlapped" ), m_pMdi, TQT_SLOT( tileAnodine() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile Overla&pped" ), m_pMdi, TQT_SLOT( tilePragma() ) );
+ m_pPlacingMenu->insertItem( i18n( "Tile V&ertically" ), m_pMdi, TQT_SLOT( tileVertically() ) );
if ( m_mdiMode == KMdi::ToplevelMode )
{
m_pWindowMenu->setItemEnabled( placMenuId, false );
@@ -2644,19 +2644,19 @@ void KMdiMainFrm::fillWindowMenu()
// for all child frame windows: give an ID to every window and connect them in the end with windowMenuItemActivated()
int i = 100;
KMdiChildView* pView = 0L;
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
- QValueList<QDateTime> timeStamps;
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQValueList<TQDateTime> timeStamps;
for ( ; it.current(); ++it )
{
pView = it.current();
- QDateTime timeStamp( pView->getTimeStamp() );
+ TQDateTime timeStamp( pView->getTimeStamp() );
if ( pView->isToolView() )
{
continue;
}
- QString item;
+ TQString item;
// set titles of minimized windows in brackets
if ( pView->isMinimized() )
{
@@ -2674,8 +2674,8 @@ void KMdiMainFrm::fillWindowMenu()
unsigned int indx;
unsigned int windowItemCount = m_pWindowMenu->count() - entryCount;
bool inserted = false;
- QString tmpString;
- QValueList<QDateTime>::iterator timeStampIterator = timeStamps.begin();
+ TQString tmpString;
+ TQValueList<TQDateTime>::iterator timeStampIterator = timeStamps.begin();
for ( indx = 0; indx <= windowItemCount; indx++, ++timeStampIterator )
{
bool putHere = false;
@@ -2686,7 +2686,7 @@ void KMdiMainFrm::fillWindowMenu()
}
if ( putHere )
{
- m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount );
+ m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, indx + entryCount );
if ( pView == m_pCurrentWindow )
{
m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( indx + entryCount ), true );
@@ -2694,7 +2694,7 @@ void KMdiMainFrm::fillWindowMenu()
pView->setWindowMenuID( i );
if ( !tabPageMode )
{
- m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, indx );
+ m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, indx );
if ( pView->isAttached() )
{
m_pDockMenu->setItemChecked( m_pDockMenu->idAt( indx ), true );
@@ -2707,7 +2707,7 @@ void KMdiMainFrm::fillWindowMenu()
}
if ( !inserted )
{ // append it
- m_pWindowMenu->insertItem( item, pView, SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount );
+ m_pWindowMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInWindowMenu() ), 0, -1, windowItemCount + entryCount );
if ( pView == m_pCurrentWindow )
{
m_pWindowMenu->setItemChecked( m_pWindowMenu->idAt( windowItemCount + entryCount ), true );
@@ -2715,7 +2715,7 @@ void KMdiMainFrm::fillWindowMenu()
pView->setWindowMenuID( i );
if ( !tabPageMode )
{
- m_pDockMenu->insertItem( item, pView, SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount );
+ m_pDockMenu->insertItem( item, pView, TQT_SLOT( slot_clickedInDockMenu() ), 0, -1, windowItemCount );
if ( pView->isAttached() )
{
m_pDockMenu->setItemChecked( m_pDockMenu->idAt( windowItemCount ), true );
@@ -2776,7 +2776,7 @@ void KMdiMainFrm::dockMenuItemActivated( int id )
//================ popupWindowMenu ===============//
-void KMdiMainFrm::popupWindowMenu( QPoint p )
+void KMdiMainFrm::popupWindowMenu( TQPoint p )
{
if ( !isFakingSDIApplication() )
{
@@ -2792,7 +2792,7 @@ void KMdiMainFrm::dragEndTimeOut()
for ( m_pDocumentViews->first(); ( pView = m_pDocumentViews->current() ) != 0L; m_pDocumentViews->next() )
{
KMdiChildFrmDragEndEvent dragEndEvent( 0L );
- QApplication::sendEvent( pView, &dragEndEvent );
+ TQApplication::sendEvent( pView, &dragEndEvent );
}
}
@@ -2819,7 +2819,7 @@ void KMdiMainFrm::setFrameDecorOfAttachedViews( int frameDecor )
break;
}
setMenuForSDIModeSysButtons( m_pMainMenuBar );
- QPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
+ TQPtrListIterator<KMdiChildView> it( *m_pDocumentViews );
for ( ; it.current(); ++it )
{
KMdiChildView* pView = it.current();
diff --git a/kmdi/kmdimainfrm.h b/kmdi/kmdimainfrm.h
index a72a654d3..9ef050200 100644
--- a/kmdi/kmdimainfrm.h
+++ b/kmdi/kmdimainfrm.h
@@ -35,11 +35,11 @@
#include <kmenubar.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include "kmditaskbar.h"
#include "kmdichildarea.h"
@@ -72,7 +72,7 @@ class KMdiMainFrmPrivate;
class KMDI_EXPORT KMdiViewCloseEvent : public QCustomEvent
{
public:
- KMdiViewCloseEvent( KMdiChildView* pWnd ) : QCustomEvent( QEvent::User, pWnd ) {}
+ KMdiViewCloseEvent( KMdiChildView* pWnd ) : TQCustomEvent( TQEvent::User, pWnd ) {}
};
/**
@@ -123,7 +123,7 @@ public:
* setMenuForSDIModeSysButtons( menuBar() );
* }
* ...
- * void B_MainModuleWidget::resizeEvent ( QResizeEvent *e )
+ * void B_MainModuleWidget::resizeEvent ( TQResizeEvent *e )
* {
* KMdiMainFrm::resizeEvent( e );
* setSysButtonsAtMenuPosition();
@@ -230,7 +230,7 @@ public:
* }
* else
* {
- * m_pMdiMainFrm->addWindow( pWnd, QPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
+ * m_pMdiMainFrm->addWindow( pWnd, TQPoint(20, 20), KMdi::AddWindowFlags(mdiFlags));
* return;
* }
* m_pMdiMainFrm->addWindow( pWnd, KMdi::AddWindowFlags(mdiFlags));
@@ -248,27 +248,27 @@ protected:
KMdi::MdiMode m_mdiMode;
KMdiChildArea *m_pMdi;
KMdiTaskBar *m_pTaskBar;
- QPtrList<KMdiChildView> *m_pDocumentViews;
- QMap<QWidget*, KMdiToolViewAccessor*> *m_pToolViews;
+ TQPtrList<KMdiChildView> *m_pDocumentViews;
+ TQMap<TQWidget*, KMdiToolViewAccessor*> *m_pToolViews;
KMdiChildView *m_pCurrentWindow;
- QPopupMenu *m_pWindowPopup;
- QPopupMenu *m_pTaskBarPopup;
- QPopupMenu *m_pWindowMenu;
- QPopupMenu *m_pDockMenu;
- QPopupMenu *m_pMdiModeMenu;
- QPopupMenu *m_pPlacingMenu;
+ TQPopupMenu *m_pWindowPopup;
+ TQPopupMenu *m_pTaskBarPopup;
+ TQPopupMenu *m_pWindowMenu;
+ TQPopupMenu *m_pDockMenu;
+ TQPopupMenu *m_pMdiModeMenu;
+ TQPopupMenu *m_pPlacingMenu;
KMenuBar *m_pMainMenuBar;
- QPixmap *m_pUndockButtonPixmap;
- QPixmap *m_pMinButtonPixmap;
- QPixmap *m_pRestoreButtonPixmap;
- QPixmap *m_pCloseButtonPixmap;
+ TQPixmap *m_pUndockButtonPixmap;
+ TQPixmap *m_pMinButtonPixmap;
+ TQPixmap *m_pRestoreButtonPixmap;
+ TQPixmap *m_pCloseButtonPixmap;
- QToolButton *m_pUndock;
- QToolButton *m_pMinimize;
- QToolButton *m_pRestore;
- QToolButton *m_pClose;
- QPoint m_undockPositioningOffset;
+ TQToolButton *m_pUndock;
+ TQToolButton *m_pMinimize;
+ TQToolButton *m_pRestore;
+ TQToolButton *m_pClose;
+ TQPoint m_undockPositioningOffset;
bool m_bMaximizedChildFrmMode;
int m_oldMainFrmHeight;
int m_oldMainFrmMinHeight;
@@ -276,10 +276,10 @@ protected:
static KMdi::FrameDecor m_frameDecoration;
bool m_bSDIApplication;
KDockWidget* m_pDockbaseAreaOfDocumentViews;
- QDomDocument* m_pTempDockSession;
+ TQDomDocument* m_pTempDockSession;
bool m_bClearingOfWindowMenuBlocked;
- QTimer* m_pDragEndTimer;
+ TQTimer* m_pDragEndTimer;
bool m_bSwitching;
@@ -296,7 +296,7 @@ private:
// methods
public:
- KMdiMainFrm( QWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
+ KMdiMainFrm( TQWidget* parentWidget, const char* name = "", KMdi::MdiMode mdiMode = KMdi::ChildframeMode, WFlags flags = WType_TopLevel | WDestructiveClose );
virtual ~KMdiMainFrm();
/**
@@ -329,13 +329,13 @@ public:
* Undock/Dock, Restore/Maximize/Minimize, Close and an empty sub-popup ( windowPopup() )
* menu called Operations.
*/
- virtual QPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false );
+ virtual TQPopupMenu * taskBarPopup( KMdiChildView *pWnd, bool bIncludeWindowPopup = false );
/**
* Returns a popup menu with only a title "Window". You can fill it with own operations entries
* on the MDI view. This popup menu is inserted as last menu item in taskBarPopup() .
*/
- virtual QPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true );
+ virtual TQPopupMenu * windowPopup( KMdiChildView *pWnd, bool bIncludeTaskbarPopup = true );
/**
* Called in the constructor (forces a resize of all MDI views)
@@ -345,7 +345,7 @@ public:
/**
* Returns the KMdiChildView belonging to the given caption string.
*/
- KMdiChildView * findWindow( const QString& caption );
+ KMdiChildView * findWindow( const TQString& caption );
enum ExistsAs {DocumentView, ToolView, AnyView};
/**
@@ -363,9 +363,9 @@ public:
* It is necessary that the main frame has to start an MDI view close action because it must
* remove the MDI view from MDI control, additionally.
*
- * This method calls QMainWindow::event , additionally.
+ * This method calls TQMainWindow::event , additionally.
*/
- virtual bool event( QEvent* e );
+ virtual bool event( TQEvent* e );
/**
* If there's a main menubar given, it will create the 4 maximize mode buttons there (undock, minimize, restore, close).
@@ -381,7 +381,7 @@ public:
* Sets an offset value that is used on detachWindow() . The undocked window
* is visually moved on the desktop by this offset.
*/
- virtual void setUndockPositioningOffset( QPoint offset ) { m_undockPositioningOffset = offset; }
+ virtual void setUndockPositioningOffset( TQPoint offset ) { m_undockPositioningOffset = offset; }
/**
* If you don't want to know about the inner structure of the KMdi system, you can use
@@ -415,28 +415,28 @@ public:
* Additionally, this menu provides some placing actions for these views.
* Usually, you insert this popup menu in your main menubar as "Window" menu.
*/
- QPopupMenu* windowMenu() const { return m_pWindowMenu; };
+ TQPopupMenu* windowMenu() const { return m_pWindowMenu; };
/**
* Sets a background color for the MDI view area widget.
*/
- virtual void setBackgroundColor( const QColor &c ) { m_pMdi->setBackgroundColor( c ); }
+ virtual void setBackgroundColor( const TQColor &c ) { m_pMdi->setBackgroundColor( c ); }
/**
* Sets a background pixmap for the MDI view area widget.
*/
- virtual void setBackgroundPixmap( const QPixmap &pm ) { m_pMdi->setBackgroundPixmap( pm ); }
+ virtual void setBackgroundPixmap( const TQPixmap &pm ) { m_pMdi->setBackgroundPixmap( pm ); }
/**
* Sets a size that is used as the default size for a newly to the MDI system added KMdiChildView .
* By default this size is 600x400. So all non-resized added MDI views appear in that size.
*/
- void setDefaultChildFrmSize( const QSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; }
+ void setDefaultChildFrmSize( const TQSize& sz ) { m_pMdi->m_defaultChildFrmSize = sz; }
/**
* Returns the default size for a newly added KMdiChildView. See setDefaultChildFrmSize() .
*/
- QSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; }
+ TQSize defaultChildFrmSize() { return m_pMdi->m_defaultChildFrmSize; }
/**
* Do nothing when in Toplevel mode
@@ -473,8 +473,8 @@ public:
*/
bool isFakingSDIApplication() const { return m_bSDIApplication; }
- virtual bool eventFilter( QObject *obj, QEvent *e );
- void findRootDockWidgets( QPtrList<KDockWidget>* pRootDockWidgetList, QValueList<QRect>* pPositionList );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
+ void findRootDockWidgets( TQPtrList<KDockWidget>* pRootDockWidgetList, TQValueList<TQRect>* pPositionList );
/** We're switching something.*/
void setSwitching( const bool switching ) { m_bSwitching = switching; }
@@ -482,10 +482,10 @@ public:
public slots:
/**
- * addWindow demands a KMdiChildView. This method wraps every QWidget in such an object and
+ * addWindow demands a KMdiChildView. This method wraps every TQWidget in such an object and
* this way you can put every widget under MDI control.
*/
- KMdiChildView* createWrapper( QWidget *view, const QString& name, const QString& shortName );
+ KMdiChildView* createWrapper( TQWidget *view, const TQString& name, const TQString& shortName );
/**
* Adds a KMdiChildView to the MDI system. The main frame takes control of it.
@@ -527,7 +527,7 @@ public slots:
* \li whether the view should be added as tool view (stay-on-top and toplevel) or
* added as document-type view.
*/
- virtual void addWindow( KMdiChildView* pWnd, QPoint pos, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pWnd, TQPoint pos, int flags = KMdi::StandardAdd );
/**
* Adds a KMdiChildView to the MDI system. The main frame takes control of it.
@@ -540,17 +540,17 @@ public slots:
* \li whether the view should be added as tool view (stay-on-top and toplevel) or
* added as document-type view.
*/
- virtual void addWindow( KMdiChildView* pWnd, QRect rectNormal, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pWnd, TQRect rectNormal, int flags = KMdi::StandardAdd );
/**
* Usually called from addWindow() when adding a tool view window. It reparents the given widget
* as toplevel and stay-on-top on the application's main widget.
*/
- virtual KMdiToolViewAccessor *addToolWindow( QWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone,
- QWidget* pTargetWnd = 0L, int percent = 50, const QString& tabToolTip = 0,
- const QString& tabCaption = 0 );
+ virtual KMdiToolViewAccessor *addToolWindow( TQWidget* pWnd, KDockWidget::DockPosition pos = KDockWidget::DockNone,
+ TQWidget* pTargetWnd = 0L, int percent = 50, const TQString& tabToolTip = 0,
+ const TQString& tabCaption = 0 );
- virtual void deleteToolWindow( QWidget* pWnd );
+ virtual void deleteToolWindow( TQWidget* pWnd );
virtual void deleteToolWindow( KMdiToolViewAccessor *accessor );
/**
@@ -745,7 +745,7 @@ private:
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Creates a new MDI taskbar (showing the MDI views as taskbar entries) and shows it.
@@ -763,10 +763,10 @@ protected:
*/
void blockClearingOfWindowMenu( bool bBlocked ) { m_bClearingOfWindowMenuBlocked = bBlocked; }
- void findToolViewsDockedToMain( QPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
- void dockToolViewsIntoContainers( QPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
- QStringList prepareIdealToTabs( KDockWidget* container );
- void idealToolViewsToStandardTabs( QStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
+ void findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDockWidget::DockPosition dprtmw );
+ void dockToolViewsIntoContainers( TQPtrList<KDockWidget>& widgetsToReparent, KDockWidget *container );
+ TQStringList prepareIdealToTabs( KDockWidget* container );
+ void idealToolViewsToStandardTabs( TQStringList widgetNames, KDockWidget::DockPosition pos, int sizee );
/** Get tabwidget visibility */
KMdi::TabWidgetVisibility tabWidgetVisibility();
@@ -813,7 +813,7 @@ protected slots: // Protected slots
/**
* Popups the "Window" menu. See also windowPopup() .
*/
- void popupWindowMenu( QPoint p );
+ void popupWindowMenu( TQPoint p );
/**
* The timer for main widget moving has elapsed -> send drag end to all concerned views.
@@ -844,7 +844,7 @@ signals:
/**
* Signals that a child view has been detached (undocked to desktop)
*/
- void childViewIsDetachedNow( QWidget* );
+ void childViewIsDetachedNow( TQWidget* );
/** Signals we need to collapse the overlapped containers */
void collapseOverlapContainers();
@@ -862,7 +862,7 @@ public slots:
private slots:
void setActiveToolDock( KMdiDockContainer* );
void removeFromActiveDockList( KMdiDockContainer* );
- void slotDocCurrentChanged( QWidget* );
+ void slotDocCurrentChanged( TQWidget* );
void verifyToplevelHeight();
#define protected public
signals:
diff --git a/kmdi/kmditaskbar.cpp b/kmdi/kmditaskbar.cpp
index 2b86c0c85..71c3de454 100644
--- a/kmdi/kmditaskbar.cpp
+++ b/kmdi/kmditaskbar.cpp
@@ -33,12 +33,12 @@
#include "kmdichildview.h"
#include "kmdidefines.h"
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qstyle.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqstyle.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
/*
@quickhelp: KMdiTaskBar
@@ -56,12 +56,12 @@
//
//####################################################################
KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_ptr )
- : QPushButton( pTaskBar ),
+ : TQPushButton( pTaskBar ),
m_actualText( "" )
{
setToggleButton( true );
m_pWindow = win_ptr;
- QToolTip::add
+ TQToolTip::add
( this, win_ptr->caption() );
setFocusPolicy( NoFocus );
}
@@ -69,14 +69,14 @@ KMdiTaskBarButton::KMdiTaskBarButton( KMdiTaskBar *pTaskBar, KMdiChildView *win_
KMdiTaskBarButton::~KMdiTaskBarButton()
{}
-void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e )
+void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e )
{
switch ( e->button() )
{
- case QMouseEvent::LeftButton:
+ case TQMouseEvent::LeftButton:
emit leftMouseButtonClicked( m_pWindow );
break;
- case QMouseEvent::RightButton:
+ case TQMouseEvent::RightButton:
emit rightMouseButtonClicked( m_pWindow );
break;
default:
@@ -86,27 +86,27 @@ void KMdiTaskBarButton::mousePressEvent( QMouseEvent* e )
}
/** slot version of setText */
-void KMdiTaskBarButton::setNewText( const QString& s )
+void KMdiTaskBarButton::setNewText( const TQString& s )
{
setText( s );
emit buttonTextChanged( 0 );
}
-void KMdiTaskBarButton::setText( const QString& s )
+void KMdiTaskBarButton::setText( const TQString& s )
{
m_actualText = s;
- QButton::setText( s );
+ TQButton::setText( s );
}
-void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth )
+void KMdiTaskBarButton::fitText( const TQString& origStr, int newWidth )
{
- QButton::setText( m_actualText );
+ TQButton::setText( m_actualText );
int actualWidth = sizeHint().width();
int realLetterCount = origStr.length();
int newLetterCount = ( newWidth * realLetterCount ) / actualWidth;
int w = newWidth + 1;
- QString s = origStr;
+ TQString s = origStr;
while ( ( w > newWidth ) && ( newLetterCount >= 1 ) )
{
if ( newLetterCount < realLetterCount )
@@ -121,15 +121,15 @@ void KMdiTaskBarButton::fitText( const QString& origStr, int newWidth )
s = origStr.left( 1 );
}
}
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
w = fm.width( s );
newLetterCount--;
}
- QButton::setText( s );
+ TQButton::setText( s );
}
-QString KMdiTaskBarButton::actualText() const
+TQString KMdiTaskBarButton::actualText() const
{
return m_actualText;
}
@@ -140,7 +140,7 @@ QString KMdiTaskBarButton::actualText() const
//
//####################################################################
-KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock )
+KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock )
: KToolBar( parent, "KMdiTaskBar", /*honor_style*/ false, /*readConfig*/ true )
, m_pCurrentFocusedWindow( 0 )
, m_pStretchSpace( 0 )
@@ -148,9 +148,9 @@ KMdiTaskBar::KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock )
, m_bSwitchedOn( false )
{
m_pFrm = parent;
- m_pButtonList = new QPtrList<KMdiTaskBarButton>;
+ m_pButtonList = new TQPtrList<KMdiTaskBarButton>;
m_pButtonList->setAutoDelete( true );
- //QT30 setFontPropagation(QWidget::SameFont);
+ //QT30 setFontPropagation(TQWidget::SameFont);
setMinimumWidth( 1 );
setFocusPolicy( NoFocus );
parent->moveToolBar( this, dock ); //XXX obsolete!
@@ -171,18 +171,18 @@ KMdiTaskBarButton * KMdiTaskBar::addWinButton( KMdiChildView *win_ptr )
}
KMdiTaskBarButton *b = new KMdiTaskBarButton( this, win_ptr );
- QObject::connect( b, SIGNAL( clicked() ), win_ptr, SLOT( setFocus() ) );
- QObject::connect( b, SIGNAL( clicked( KMdiChildView* ) ), this, SLOT( setActiveButton( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( activateView( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) );
- QObject::connect( b, SIGNAL( buttonTextChanged( int ) ), this, SLOT( layoutTaskBar( int ) ) );
+ TQObject::connect( b, TQT_SIGNAL( clicked() ), win_ptr, TQT_SLOT( setFocus() ) );
+ TQObject::connect( b, TQT_SIGNAL( clicked( KMdiChildView* ) ), this, TQT_SLOT( setActiveButton( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( leftMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( activateView( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( rightMouseButtonClicked( KMdiChildView* ) ), m_pFrm, TQT_SLOT( taskbarButtonRightClicked( KMdiChildView* ) ) );
+ TQObject::connect( b, TQT_SIGNAL( buttonTextChanged( int ) ), this, TQT_SLOT( layoutTaskBar( int ) ) );
m_pButtonList->append( b );
b->setToggleButton( true );
b->setText( win_ptr->tabCaption() );
layoutTaskBar();
- m_pStretchSpace = new QLabel( this, "empty" );
+ m_pStretchSpace = new TQLabel( this, "empty" );
m_pStretchSpace->setText( "" );
setStretchableWidget( m_pStretchSpace );
m_pStretchSpace->show();
@@ -325,9 +325,9 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
int allButtonsWidthHint = 0;
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
{
- QFontMetrics fm = b->fontMetrics();
- QString s = b->actualText();
- QSize sz = fm.size( ShowPrefix, s );
+ TQFontMetrics fm = b->fontMetrics();
+ TQString s = b->actualText();
+ TQSize sz = fm.size( ShowPrefix, s );
int w = sz.width() + 6;
int h = sz.height() + sz.height() / 8 + 10;
w += h;
@@ -337,8 +337,8 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
// if there's enough space, use actual width
int buttonCount = m_pButtonList->count();
int tbHandlePixel;
- tbHandlePixel = style().pixelMetric( QStyle::PM_DockWindowHandleExtent, this );
- int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) - 5;
+ tbHandlePixel = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this );
+ int buttonAreaWidth = taskBarWidth - tbHandlePixel - style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) - 5;
if ( ( ( allButtonsWidthHint ) <= buttonAreaWidth ) || ( width() < parentWidget() ->width() ) )
{
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )
@@ -375,7 +375,7 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
m_layoutIsPending = false;
}
-void KMdiTaskBar::resizeEvent( QResizeEvent* rse )
+void KMdiTaskBar::resizeEvent( TQResizeEvent* rse )
{
if ( !m_layoutIsPending )
{
diff --git a/kmdi/kmditaskbar.h b/kmdi/kmditaskbar.h
index f485fb864..39c4efa2e 100644
--- a/kmdi/kmditaskbar.h
+++ b/kmdi/kmditaskbar.h
@@ -29,10 +29,10 @@
#define _KMDITASKBAR_H_
#include <ktoolbar.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "kmdidefines.h"
@@ -45,7 +45,7 @@ class KMdiTaskBarButtonPrivate;
/**
* @short Internal class.
*
- * It's a special kind of QPushButton catching mouse clicks.
+ * It's a special kind of TQPushButton catching mouse clicks.
* And you have the ability to abbreviate the text that it fits in the button.
*/
class KMDI_EXPORT KMdiTaskBarButton : public QPushButton
@@ -64,15 +64,15 @@ public:
/**
* text() returns the possibly abbreviated text including the dots in it. But actualText() returns the full text.
*/
- QString actualText() const;
+ TQString actualText() const;
/**
* Given the parameter newWidth this function possibly abbreviates the parameter string and sets a new button text.
*/
- void fitText( const QString&, int newWidth );
+ void fitText( const TQString&, int newWidth );
/**
* Sets the text and avoids any abbreviation. Memorizes that text in m_actualText, too.
*/
- void setText( const QString& );
+ void setText( const TQString& );
signals:
/**
* Emitted when the button has been clicked. Internally connected to setFocus of the according MDI view.
@@ -94,12 +94,12 @@ public slots:
/**
* A slot version of setText
*/
- void setNewText( const QString& );
+ void setNewText( const TQString& );
protected slots:
/**
* Reimplemented from its base class to catch right and left mouse button clicks
*/
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
// attributes
public:
@@ -111,7 +111,7 @@ protected:
/**
* Internally we must remember the real text because the button text can be abbreviated.
*/
- QString m_actualText;
+ TQString m_actualText;
private:
KMdiTaskBarButtonPrivate *d;
@@ -122,7 +122,7 @@ class KMdiTaskBarPrivate;
/**
* @short Internal class.
*
- * It's a special kind of QToolBar that acts as taskbar for child views.
+ * It's a special kind of TQToolBar that acts as taskbar for child views.
* KMdiTaskBarButtons can be added or removed dynamically.<br>
* The button sizes are adjusted dynamically, as well.
*/
@@ -131,9 +131,9 @@ class KMDI_EXPORT KMdiTaskBar : public KToolBar
Q_OBJECT
public:
/**
- * Constructor (NoFocus, minimum width = 1, an internal QPtrList of taskbar buttons (autodelete))
+ * Constructor (NoFocus, minimum width = 1, an internal TQPtrList of taskbar buttons (autodelete))
*/
- KMdiTaskBar( KMdiMainFrm *parent, QMainWindow::ToolBarDock dock );
+ KMdiTaskBar( KMdiMainFrm *parent, TQMainWindow::ToolBarDock dock );
/**
* Destructor (deletes the taskbar button list)
*/
@@ -173,7 +173,7 @@ protected:
/**
* Reimplemented from its base class to call layoutTaskBar, additionally.
*/
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
protected slots:
/**
* Checks if all buttons fits into this. If not, it recalculates all button widths
@@ -194,7 +194,7 @@ protected:
* A list of taskbar buttons.
* Note: Each button stands for one MDI view (toolviews doesn't have got a taskbar button).
*/
- QPtrList<KMdiTaskBarButton>* m_pButtonList;
+ TQPtrList<KMdiTaskBarButton>* m_pButtonList;
/**
* The belonging MDI mainframe (parent widget of this)
*/
@@ -206,7 +206,7 @@ protected:
/**
* A stretchable widget used as 'space' at the end of a half filled taskbar
*/
- QLabel* m_pStretchSpace;
+ TQLabel* m_pStretchSpace;
bool m_layoutIsPending;
bool m_bSwitchedOn;
diff --git a/kmdi/kmditoolviewaccessor.cpp b/kmdi/kmditoolviewaccessor.cpp
index f9921e18c..1d2cce946 100644
--- a/kmdi/kmditoolviewaccessor.cpp
+++ b/kmdi/kmditoolviewaccessor.cpp
@@ -29,8 +29,8 @@
#include "kmditoolviewaccessor.h"
#include "kmditoolviewaccessor_p.h"
-KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
- : QObject( parent )
+KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption )
+ : TQObject( parent )
{
mdiMainFrm = parent;
d = new KMdiToolViewAccessorPrivate();
@@ -42,7 +42,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget
else
{
d->widget = widgetToWrap;
- QString finalTabCaption;
+ TQString finalTabCaption;
if ( tabCaption == 0 )
{
finalTabCaption = widgetToWrap->caption();
@@ -56,7 +56,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, QWidget *widget
finalTabCaption = tabCaption;
}
d->widgetContainer = parent->createDockWidget( widgetToWrap->name(),
- ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() ),
+ ( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() ),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -90,32 +90,32 @@ KMdiToolViewAccessor::~KMdiToolViewAccessor()
}
-QWidget *KMdiToolViewAccessor::wrapperWidget()
+TQWidget *KMdiToolViewAccessor::wrapperWidget()
{
if ( !d->widgetContainer )
{
- d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", QPixmap() );
- connect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ d->widgetContainer = mdiMainFrm->createDockWidget( "KMdiToolViewAccessor::null", TQPixmap() );
+ connect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) );
}
return d->widgetContainer;
}
-QWidget *KMdiToolViewAccessor::wrappedWidget()
+TQWidget *KMdiToolViewAccessor::wrappedWidget()
{
return d->widget;
}
-void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString& tabToolTip, const QString& tabCaption )
+void KMdiToolViewAccessor::setWidgetToWrap( TQWidget *widgetToWrap, const TQString& tabToolTip, const TQString& tabCaption )
{
Q_ASSERT( !( d->widget ) );
Q_ASSERT( !widgetToWrap->inherits( "KDockWidget" ) );
- disconnect( d->widgetContainer, SIGNAL( widgetSet( QWidget* ) ), this, SLOT( setWidgetToWrap( QWidget* ) ) );
+ disconnect( d->widgetContainer, TQT_SIGNAL( widgetSet( TQWidget* ) ), this, TQT_SLOT( setWidgetToWrap( TQWidget* ) ) );
delete d->widget;
d->widget = widgetToWrap;
KDockWidget *tmp = d->widgetContainer;
- QString finalTabCaption;
+ TQString finalTabCaption;
if ( tabCaption == 0 )
{
finalTabCaption = widgetToWrap->caption();
@@ -132,7 +132,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
if ( !tmp )
{
tmp = mdiMainFrm->createDockWidget( widgetToWrap->name(),
- widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap(),
+ widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap(),
0L, // parent
widgetToWrap->caption(),
finalTabCaption );
@@ -146,7 +146,7 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
{
tmp->setCaption( widgetToWrap->caption() );
tmp->setTabPageLabel( finalTabCaption );
- tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : QPixmap() );
+ tmp->setPixmap( widgetToWrap->icon() ? ( *( widgetToWrap->icon() ) ) : TQPixmap() );
tmp->setName( widgetToWrap->name() );
if ( tabToolTip != 0 )
{
@@ -164,21 +164,21 @@ void KMdiToolViewAccessor::setWidgetToWrap( QWidget *widgetToWrap, const QString
}
-bool KMdiToolViewAccessor::eventFilter( QObject *, QEvent *e )
+bool KMdiToolViewAccessor::eventFilter( TQObject *, TQEvent *e )
{
- if ( e->type() == QEvent::IconChange )
+ if ( e->type() == TQEvent::IconChange )
{
- d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : QPixmap() );
+ d->widgetContainer->setPixmap( d->widget->icon() ? ( *d->widget->icon() ) : TQPixmap() );
}
return false;
}
-void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+void KMdiToolViewAccessor::placeAndShow( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent )
{
place( pos, pTargetWnd, percent );
show();
}
-void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTargetWnd , int percent )
+void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, TQWidget* pTargetWnd , int percent )
{
Q_ASSERT( d->widgetContainer );
if ( !d->widgetContainer )
@@ -186,7 +186,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge
if ( pos == KDockWidget::DockNone )
{
d->widgetContainer->setEnableDocking( KDockWidget::DockNone );
- d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, QPoint( 0, 0 ), true ); //pToolView->isVisible());
+ d->widgetContainer->reparent( mdiMainFrm, Qt::WType_TopLevel | Qt::WType_Dialog, TQPoint( 0, 0 ), true ); //pToolView->isVisible());
}
else
{ // add (and dock) the toolview as DockWidget view
@@ -214,7 +214,7 @@ void KMdiToolViewAccessor::place( KDockWidget::DockPosition pos, QWidget* pTarge
pTargetDock = mdiMainFrm->m_pDockbaseAreaOfDocumentViews;
}
}
- // this is not inheriting QWidget*, its plain impossible that this condition is true
+ // this is not inheriting TQWidget*, its plain impossible that this condition is true
//if (pTargetWnd == this) DockToOurself = true;
if ( !DockToOurself )
if ( pTargetWnd != 0L )
diff --git a/kmdi/kmditoolviewaccessor.h b/kmdi/kmditoolviewaccessor.h
index d5bd49a74..28241ea3b 100644
--- a/kmdi/kmditoolviewaccessor.h
+++ b/kmdi/kmditoolviewaccessor.h
@@ -21,11 +21,11 @@
#ifndef _KMDITOOLVIEWACCESSOR_H_
#define _KMDITOOLVIEWACCESSOR_H_
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qapplication.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
#include <kdockwidget.h>
@@ -60,24 +60,24 @@ private:
bool m_bFocusInEventIsPending;
private:
- KMdiToolViewAccessor( class KMdiMainFrm *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ KMdiToolViewAccessor( class KMdiMainFrm *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0 );
KMdiToolViewAccessor( class KMdiMainFrm *parent );
public:
~KMdiToolViewAccessor();
- QWidget *wrapperWidget();
- QWidget *wrappedWidget();
- void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
- void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
+ TQWidget *wrapperWidget();
+ TQWidget *wrappedWidget();
+ void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 );
+ void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L, int percent = 50 );
void show();
public slots:
- void setWidgetToWrap( QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
+ void setWidgetToWrap( TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0 );
void hide();
private:
class KMdiToolViewAccessorPrivate *d;
class KMdiMainFrm *mdiMainFrm;
protected:
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
};
diff --git a/kmdi/kmditoolviewaccessor_p.h b/kmdi/kmditoolviewaccessor_p.h
index 913b88541..ecbaa76a3 100644
--- a/kmdi/kmditoolviewaccessor_p.h
+++ b/kmdi/kmditoolviewaccessor_p.h
@@ -24,9 +24,9 @@
#define KMDI_TOOLVIEW_ACCESSOR_PRIVATE_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdockwidget.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
class KMDI_EXPORT KMdiToolViewAccessorPrivate {
@@ -40,9 +40,9 @@ public:
if (!widgetContainer.isNull()) widgetContainer->undock();
delete (KDockWidget*)widgetContainer;
}
- QGuardedPtr<KDockWidget> widgetContainer;
- QWidget* widget;
- QGuardedPtr<KAction> action;
+ TQGuardedPtr<KDockWidget> widgetContainer;
+ TQWidget* widget;
+ TQGuardedPtr<KAction> action;
};
diff --git a/kmdi/test/hello.cpp b/kmdi/test/hello.cpp
index f3a10f65c..d92233ea6 100644
--- a/kmdi/test/hello.cpp
+++ b/kmdi/test/hello.cpp
@@ -9,20 +9,20 @@
*****************************************************************************/
#include "hello.h"
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
/*
Constructs a Hello widget. Starts a 40 ms animation timer.
*/
-Hello::Hello( const char *title, const char *text, QWidget *parentWidget )
+Hello::Hello( const char *title, const char *text, TQWidget *parentWidget )
: KMdiChildView(title, parentWidget), t(text), b(0)
{
- QTimer *timer = new QTimer(this);
- QObject::connect( timer, SIGNAL(timeout()), SLOT(animate()) );
+ TQTimer *timer = new TQTimer(this);
+ TQObject::connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(animate()) );
timer->start( 40 );
resize( 260, 130 );
@@ -47,7 +47,7 @@ void Hello::animate()
the widget.
*/
-void Hello::mouseReleaseEvent( QMouseEvent *e )
+void Hello::mouseReleaseEvent( TQMouseEvent *e )
{
if ( rect().contains( e->pos() ) )
emit clicked();
@@ -61,7 +61,7 @@ void Hello::mouseReleaseEvent( QMouseEvent *e )
pixmap is then blt'ed to the screen.
*/
-void Hello::paintEvent( QPaintEvent * )
+void Hello::paintEvent( TQPaintEvent * )
{
static int sin_tbl[16] = {
0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38};
@@ -70,18 +70,18 @@ void Hello::paintEvent( QPaintEvent * )
return;
// 1: Compute some sizes, positions etc.
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int w = fm.width(t) + 20;
int h = fm.height() * 2;
int pmx = width()/2 - w/2;
int pmy = height()/2 - h/2;
// 2: Create the pixmap and fill it with the widget's background
- QPixmap pm( w, h );
+ TQPixmap pm( w, h );
pm.fill( this, pmx, pmy );
// 3: Paint the pixmap. Cool wave effect
- QPainter p;
+ TQPainter p;
int x = 10;
int y = h/2 + fm.descent();
int i = 0;
@@ -89,7 +89,7 @@ void Hello::paintEvent( QPaintEvent * )
p.setFont( font() );
while ( !t[i].isNull() ) {
int i16 = (b+i) & 15;
- p.setPen( QColor((15-i16)*16,255,255,QColor::Hsv) );
+ p.setPen( TQColor((15-i16)*16,255,255,TQColor::Hsv) );
p.drawText( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 );
x += fm.width( t[i] );
i++;
diff --git a/kmdi/test/hello.h b/kmdi/test/hello.h
index 59c18f3f2..bf57d5e04 100644
--- a/kmdi/test/hello.h
+++ b/kmdi/test/hello.h
@@ -11,7 +11,7 @@
#ifndef HELLO_H
#define HELLO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kmdichildview.h>
class QWidget;
@@ -22,16 +22,16 @@ class Hello : public KMdiChildView
{
Q_OBJECT
public:
- Hello( const char *title, const char *text, QWidget* parentWidget = 0 );
+ Hello( const char *title, const char *text, TQWidget* parentWidget = 0 );
signals:
void clicked();
protected:
- void mouseReleaseEvent( QMouseEvent * );
- void paintEvent( QPaintEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void paintEvent( TQPaintEvent * );
private slots:
void animate();
private:
- QString t;
+ TQString t;
int b;
};
diff --git a/kmdi/test/main.cpp b/kmdi/test/main.cpp
index 95d9c2f83..768fd087b 100644
--- a/kmdi/test/main.cpp
+++ b/kmdi/test/main.cpp
@@ -29,8 +29,8 @@
# include <kapplication.h>
KApplication* theApp;
#else
-# include <qapplication.h>
- QApplication* theApp;
+# include <tqapplication.h>
+ TQApplication* theApp;
#endif
//#include <iostream.h>
@@ -44,7 +44,7 @@ int main( int argc, char **argv )
#ifndef NO_KDE
KApplication a(argc,argv,"KFourChildren");
#else
- QApplication a(argc,argv);
+ TQApplication a(argc,argv);
#endif
theApp = &a;
@@ -59,7 +59,7 @@ int main( int argc, char **argv )
// SHOW(h1->caption());
// SHOW(h1->tabCaption());
- QWidget* w = new QWidget(mainWdg);
+ TQWidget* w = new TQWidget(mainWdg);
KMdiChildView* h2 = mainWdg->createWrapper(w, "I'm a common but wrapped QWidget!", "Hello2");
mainWdg->addWindow( h2 );
// SHOW(h2->caption());
@@ -67,20 +67,20 @@ int main( int argc, char **argv )
Hello* h3 = new Hello( "Hello3", "Dock me using the taskbar button context menu!", 0);
h3->setBackgroundColor( Qt::white );
- h3->setFont( QFont("times",20,QFont::Bold) );
+ h3->setFont( TQFont("times",20,TQFont::Bold) );
mainWdg->addWindow( h3, KMdi::Detach ); // undock this!
h3->setGeometry( 20, 20, 400, 100);
Hello* h4 = new Hello( "Hello4", "Hello world!", mainWdg);
h4->setMDICaption("Hello4 both changed");
- h4->setFont( QFont("times",32,QFont::Bold) );
+ h4->setFont( TQFont("times",32,TQFont::Bold) );
mainWdg->addWindow( h4);
// SHOW(h4->caption());
// SHOW(h4->tabCaption());
Hello* h5 = new Hello( "Hello5", "I'm not a MDI widget :-(");
h5->setGeometry(40, 40, 400, 100);
- h5->setFont( QFont("times",20,QFont::Bold) );
+ h5->setFont( TQFont("times",20,TQFont::Bold) );
h5->setCaption("MDI Test Application");
h5->show();
diff --git a/kmdi/test/mainwidget.cpp b/kmdi/test/mainwidget.cpp
index 872f9df27..b7ac2d31d 100644
--- a/kmdi/test/mainwidget.cpp
+++ b/kmdi/test/mainwidget.cpp
@@ -15,18 +15,18 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qmenubar.h>
-#include <qtoolbar.h>
-#include <qmultilineedit.h>
-#include <qlistview.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqmenubar.h>
+#include <tqtoolbar.h>
+#include <tqmultilineedit.h>
+#include <tqlistview.h>
+#include <tqfile.h>
#include <kmdimainfrm.h>
#include <kmditoolviewaccessor.h>
#include "mainwidget.h"
-MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
+MainWidget::MainWidget(TQDomElement& dockConfig,KMdi::MdiMode mode)
: KMdiMainFrm(0L, "theMDIMainFrm",mode)
,m_dockConfig(dockConfig)
{
@@ -39,43 +39,43 @@ MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
readDockConfig(m_dockConfig);
}
- QMultiLineEdit* mle = new QMultiLineEdit(0L,"theMultiLineEditWidget");
- mle->setText("This is a QMultiLineEdit widget.");
+ TQMultiLineEdit* mle = new TQMultiLineEdit(0L,"theMultiLineEditWidget");
+ mle->setText("This is a TQMultiLineEdit widget.");
addToolWindow( mle, KDockWidget::DockBottom, m_pMdi, 70);
- QMultiLineEdit* mle2 = new QMultiLineEdit(0L,"theMultiLineEditWidget2");
+ TQMultiLineEdit* mle2 = new TQMultiLineEdit(0L,"theMultiLineEditWidget2");
addToolWindow( mle2, KDockWidget::DockCenter, mle, 70);
- QMultiLineEdit* mle3 = new QMultiLineEdit(0L,"theMultiLineEditWidget3");
+ TQMultiLineEdit* mle3 = new TQMultiLineEdit(0L,"theMultiLineEditWidget3");
addToolWindow( mle3, KDockWidget::DockCenter, mle, 70);
- QMultiLineEdit* mle4 = new QMultiLineEdit(0L,"theMultiLineEditWidget4");
+ TQMultiLineEdit* mle4 = new TQMultiLineEdit(0L,"theMultiLineEditWidget4");
addToolWindow( mle4, KDockWidget::DockCenter, mle, 70);
KMdiToolViewAccessor *tva=createToolWindow();
- tva->setWidgetToWrap(new QMultiLineEdit(tva->wrapperWidget(),"theMultiLineEditWidget5"));
+ tva->setWidgetToWrap(new TQMultiLineEdit(tva->wrapperWidget(),"theMultiLineEditWidget5"));
tva->placeAndShow(KDockWidget::DockCenter,mle,70);
- QListView* lv = new QListView(0L,"theListViewWidget");
+ TQListView* lv = new TQListView(0L,"theListViewWidget");
#include "../res/filenew.xpm"
lv->setIcon(filenew);
lv->addColumn("Test", 50);
lv->addColumn("KMDI", 70);
- new QListViewItem(lv,QString("test"),QString("test"));
+ new TQListViewItem(lv,TQString("test"),TQString("test"));
addToolWindow( lv, KDockWidget::DockLeft, m_pMdi, 35, "1");
- QListView* lv2 = new QListView(0L,"theListViewWidget2");
+ TQListView* lv2 = new TQListView(0L,"theListViewWidget2");
lv2->setIcon(filenew);
lv2->addColumn("Test2", 50);
lv2->addColumn("KMDI2", 70);
- new QListViewItem(lv,QString("test2"),QString("test2"));
+ new TQListViewItem(lv,TQString("test2"),TQString("test2"));
addToolWindow( lv2, KDockWidget::DockCenter, lv, 35, "2");
- QListView* lv3 = new QListView(0L,"theListViewWidget3");
+ TQListView* lv3 = new TQListView(0L,"theListViewWidget3");
lv3->setIcon(filenew);
lv3->addColumn("Test3", 50);
lv3->addColumn("KMDI3", 70);
- new QListViewItem(lv,QString("test3"),QString("test3"));
+ new TQListViewItem(lv,TQString("test3"),TQString("test3"));
addToolWindow( lv3, KDockWidget::DockCenter, lv, 35, "3");
dockManager->finishReadDockConfig();
@@ -86,9 +86,9 @@ MainWidget::MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode)
MainWidget::~MainWidget()
{
writeDockConfig(m_dockConfig);
- QDomDocument doc = m_dockConfig.ownerDocument();
- QString s = doc.toString();
- QFile f("/tmp/dc.txt");
+ TQDomDocument doc = m_dockConfig.ownerDocument();
+ TQString s = doc.toString();
+ TQFile f("/tmp/dc.txt");
f.open(IO_ReadWrite);
f.writeBlock(s.latin1(), s.length());
f.close();
@@ -101,7 +101,7 @@ void MainWidget::initMenu()
}
/** additionally fit the system menu button position to the menu position */
-void MainWidget::resizeEvent( QResizeEvent *pRSE)
+void MainWidget::resizeEvent( TQResizeEvent *pRSE)
{
KMdiMainFrm::resizeEvent( pRSE);
setSysButtonsAtMenuPosition();
@@ -110,11 +110,11 @@ void MainWidget::resizeEvent( QResizeEvent *pRSE)
RestartWidget::RestartWidget():KMainWindow()
{
mdimode=KMdi::ChildframeMode;
- QVBoxLayout* bl = new QVBoxLayout(this);
- QLabel* l = new QLabel("This is for the testing of\nKMdiMainFrm::read/writeDockConfig().\n", this);
- QCheckBox* b1 = new QCheckBox("KMdiMainFrm close/restart", this);
+ TQVBoxLayout* bl = new TQVBoxLayout(this);
+ TQLabel* l = new TQLabel("This is for the testing of\nKMdiMainFrm::read/writeDockConfig().\n", this);
+ TQCheckBox* b1 = new TQCheckBox("KMdiMainFrm close/restart", this);
b1->toggle();
- QObject::connect(b1, SIGNAL(stateChanged(int)), this, SLOT(onStateChanged(int)));
+ TQObject::connect(b1, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(onStateChanged(int)));
bl->add(l);
bl->add(b1);
bl->setMargin(10);
diff --git a/kmdi/test/mainwidget.h b/kmdi/test/mainwidget.h
index d8f61c1cb..022a3b361 100644
--- a/kmdi/test/mainwidget.h
+++ b/kmdi/test/mainwidget.h
@@ -18,10 +18,10 @@
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdom.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdom.h>
#include <kmdimainfrm.h>
/**
@@ -31,14 +31,14 @@ class MainWidget : public KMdiMainFrm
{
Q_OBJECT
public:
- MainWidget(QDomElement& dockConfig,KMdi::MdiMode mode);
+ MainWidget(TQDomElement& dockConfig,KMdi::MdiMode mode);
virtual ~MainWidget();
void initMenu();
protected: // Protected methods
- virtual void resizeEvent( QResizeEvent *pRSE);
+ virtual void resizeEvent( TQResizeEvent *pRSE);
private:
- QDomElement m_dockConfig;
+ TQDomElement m_dockConfig;
};
@@ -61,8 +61,8 @@ private slots:
// attributes
public:
- QDomDocument domDoc;
- QDomElement dockConfig;
+ TQDomDocument domDoc;
+ TQDomElement dockConfig;
KMdi::MdiMode mdimode;
private:
MainWidget *m_w;