summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi')
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdelibs_export.h2
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.cpp784
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.h194
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_p.h26
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp82
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget_private.h52
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp84
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildarea.h42
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp384
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrm.h108
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp54
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h20
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.cpp196
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdichildview.h114
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidefines.h6
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp154
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h50
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp24
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h22
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp30
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdifocuslist.h14
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp62
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdiguiclient.h18
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdilistiterator.h6
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp594
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmdimainfrm.h114
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp68
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditaskbar.h34
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp40
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h24
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h10
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp244
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar.h64
-rw-r--r--lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h24
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.cpp154
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabbar.h44
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.cpp162
-rw-r--r--lib/compatibility/kmdi/qextmdi/ktabwidget.h72
38 files changed, 2088 insertions, 2088 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kdelibs_export.h b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h
index d6244357..0ca49784 100644
--- a/lib/compatibility/kmdi/qextmdi/kdelibs_export.h
+++ b/lib/compatibility/kmdi/qextmdi/kdelibs_export.h
@@ -24,7 +24,7 @@
#include <kdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
#include <kdelibs_export_win.h>
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
index 1a1e56ae..89417231 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
@@ -21,16 +21,16 @@
#include "kdockwidget_private.h"
#include "kdockwidget_p.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qcursor.h>
-#include <qwidgetlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqcursor.h>
+#include <tqwidgetlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#ifndef NO_KDE2
#include <kconfig.h>
@@ -49,8 +49,8 @@
#endif
#else
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#endif
#include <stdlib.h>
@@ -99,10 +99,10 @@ static const char* const not_close_xpm[]={
*
* @author Max Judin.
*/
-KDockMainWindow::KDockMainWindow( QWidget* parent, const char *name, WFlags f)
+KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f)
:KMainWindow( parent, name, f )
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -119,7 +119,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
dockManager->setMainDockWidget2(mdw);
}
-void KDockMainWindow::setView( QWidget *view )
+void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
@@ -128,11 +128,11 @@ void KDockMainWindow::setView( QWidget *view )
#ifndef NO_KDE2
KMainWindow::setCentralWidget(view);
#else
- QMainWindow::setCentralWidget(view);
+ TQMainWindow::setCentralWidget(view);
#endif
}
-KDockWidget* KDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -149,28 +149,28 @@ void KDockMainWindow::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockMainWindow::makeWidgetDockVisible( QWidget* widget )
+void KDockMainWindow::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockMainWindow::writeDockConfig(QDomElement &base)
+void KDockMainWindow::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockMainWindow::readDockConfig(QDomElement &base)
+void KDockMainWindow::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
#ifndef NO_KDE2
-void KDockMainWindow::writeDockConfig( KConfig* c, QString group )
+void KDockMainWindow::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockMainWindow::readDockConfig( KConfig* c, QString group )
+void KDockMainWindow::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -178,7 +178,7 @@ void KDockMainWindow::readDockConfig( KConfig* c, QString group )
void KDockMainWindow::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
@@ -186,7 +186,7 @@ void KDockMainWindow::slotDockWidgetUndocked()
/*************************************************************************/
KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
@@ -197,19 +197,19 @@ KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent,
{
}
-void KDockWidgetHeaderDrag::paintEvent( QPaintEvent* )
+void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
{
- QPainter paint;
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
/*************************************************************************/
KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
}
/*************************************************************************/
@@ -217,44 +217,44 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
:KDockWidgetAbstractHeader( parent, name )
{
#ifdef BORDERLESS_WINDOWS
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
d = new KDockWidgetHeaderPrivate( this );
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
drag = new KDockWidgetHeaderDrag( this, parent );
closeButton = new KDockButton_Private( this, "DockCloseButton" );
- QToolTip::add( closeButton, i18n("Close") );
- closeButton->setPixmap( style().stylePixmap (QStyle::SP_TitleBarCloseButton , this));
+ TQToolTip::add( closeButton, i18n("Close") );
+ closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
- connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
stayButton = new KDockButton_Private( this, "DockStayButton" );
- QToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
+ TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
stayButton->setToggleButton( true );
stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked()));
+ connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked()));
dockbackButton = new KDockButton_Private( this, "DockbackButton" );
- QToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
+ TQToolTip::add( dockbackButton, i18n("Dock this window", "Dock") );
dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
- QToolTip::add( d->toDesktopButton, i18n("Detach") );
+ TQToolTip::add( d->toDesktopButton, i18n("Detach") );
d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm));
d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( d->toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop()));
+ connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
stayButton->hide();
- d->dummy = new QWidget( this );
+ d->dummy = new TQWidget( this );
d->dummy->setFixedSize( 1,closeButton->pixmap()->height() );
@@ -296,7 +296,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
@@ -319,13 +319,13 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
if ( !nd ) return;
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
delete drag;
drag = nd;
if (drag->parentWidget()!=this) {
- drag->reparent(this,QPoint(0,0));
+ drag->reparent(this,TQPoint(0,0));
}
@@ -337,7 +337,7 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -355,7 +355,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
if (!btn) return;
if (btn->parentWidget()!=this) {
- btn->reparent(this,QPoint(0,0));
+ btn->reparent(this,TQPoint(0,0));
}
btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
if (!d->btns.containsRef(btn)) d->btns.append(btn);
@@ -363,8 +363,8 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
btn->show();
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( drag );
layout->addWidget( dockbackButton );
@@ -374,7 +374,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
- for (QPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
+ for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
layout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
@@ -425,12 +425,12 @@ void KDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void KDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
}
void KDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
}
#endif
@@ -442,12 +442,12 @@ public:
/**
* This rectangle is used to highlight the current dockposition. It stores global screen coordinates.
*/
- QRect dragRect;
+ TQRect dragRect;
/**
* This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates.
*/
- QRect oldDragRect;
+ TQRect oldDragRect;
/**
* This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event.
@@ -457,7 +457,7 @@ public:
/**
* This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget.
*/
- QPoint dragOffset;
+ TQPoint dragOffset;
/**
* These flags store information about the splitter behavior
@@ -466,30 +466,30 @@ public:
bool splitterKeepSize;
bool splitterHighResolution;
- QGuardedPtr<KDockWidget> mainDockWidget;
+ TQGuardedPtr<KDockWidget> mainDockWidget;
- QObjectList containerDocks;
+ TQObjectList containerDocks;
- QGuardedPtr<KDockWidget> leftContainer;
- QGuardedPtr<KDockWidget> topContainer;
- QGuardedPtr<KDockWidget> rightContainer;
- QGuardedPtr<KDockWidget> bottomContainer;
+ TQGuardedPtr<KDockWidget> leftContainer;
+ TQGuardedPtr<KDockWidget> topContainer;
+ TQGuardedPtr<KDockWidget> rightContainer;
+ TQGuardedPtr<KDockWidget> bottomContainer;
int m_readDockConfigMode;
};
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
#ifdef BORDERLESS_WINDOWS
-: QWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
#else
-: QWidget( parent, name, f )
+: TQWidget( parent, name, f )
#endif
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
,formerDockPos(DockNone)
,widget(0L)
- ,pix(new QPixmap(pixmap))
+ ,pix(new TQPixmap(pixmap))
,prevSideDockPosBeforeDrag(DockNone)
,isGroup(false)
{
@@ -497,8 +497,8 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
d->_parent = parent;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
manager = dockManager;
manager->childDock->append( this );
@@ -525,18 +525,18 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const QPi
setIcon( pixmap);
widget = 0L;
- QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) );
- applyToWidget( parent, QPoint(0,0) );
+ TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
+ applyToWidget( parent, TQPoint(0,0) );
}
-void KDockWidget::setPixmap(const QPixmap& pixmap) {
+void KDockWidget::setPixmap(const TQPixmap& pixmap) {
delete pix;
- pix=new QPixmap(pixmap);
+ pix=new TQPixmap(pixmap);
setIcon(*pix);
KDockTabGroup *dtg=parentDockTabGroup();
if (dtg)
dtg->changeTab(this,pixmap,dtg->tabLabel(this));
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
if (contWid) {
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
@@ -545,7 +545,7 @@ void KDockWidget::setPixmap(const QPixmap& pixmap) {
}
}
-const QPixmap& KDockWidget::pixmap() const {
+const TQPixmap& KDockWidget::pixmap() const {
return *pix;
}
@@ -572,25 +572,25 @@ KDockWidget::~KDockWidget()
d=0;
}
-void KDockWidget::paintEvent(QPaintEvent* pe)
+void KDockWidget::paintEvent(TQPaintEvent* pe)
{
- QWidget::paintEvent(pe);
- QPainter paint;
+ TQWidget::paintEvent(pe);
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_Panel, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
-void KDockWidget::leaveEvent(QEvent *e)
+void KDockWidget::leaveEvent(TQEvent *e)
{
- QWidget::leaveEvent(e);
+ TQWidget::leaveEvent(e);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
-// setCursor(QCursor(ArrowCursor));
+// setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::mousePressEvent(QMouseEvent* mme)
+void KDockWidget::mousePressEvent(TQMouseEvent* mme)
{
#ifdef BORDERLESS_WINDOWS
if (!parent())
@@ -602,9 +602,9 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -616,52 +616,52 @@ void KDockWidget::mousePressEvent(QMouseEvent* mme)
if (btop)
{
d->resizeMode=KDockWidgetPrivate::ResizeTopRight;
- d->resizePos=QPoint(width(),0)-mme->pos();
+ d->resizePos=TQPoint(width(),0)-mme->pos();
}
else
{
- d->resizePos=QPoint(width(),height())-mme->pos();
+ d->resizePos=TQPoint(width(),height())-mme->pos();
if (bbottom) d->resizeMode=KDockWidgetPrivate::ResizeBottomRight;
else d->resizeMode=KDockWidgetPrivate::ResizeRight;
}
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
if (bbottom)
{
d->resizeMode=KDockWidgetPrivate::ResizeBottom;
- d->resizePos=QPoint(0,height())-mme->pos();
+ d->resizePos=TQPoint(0,height())-mme->pos();
}
else
- if (btop) setCursor(QCursor(SizeVerCursor));
+ if (btop) setCursor(TQCursor(SizeVerCursor));
else d->resizing=false;
if (d->resizing) grabMouse(cursor());
}
#endif
- QWidget::mousePressEvent(mme);
+ TQWidget::mousePressEvent(mme);
}
-void KDockWidget::mouseReleaseEvent(QMouseEvent* ev)
+void KDockWidget::mouseReleaseEvent(TQMouseEvent* ev)
{
#ifdef BORDERLESS_WINDOWS
d->resizing=false;
releaseMouse();
#endif
- QWidget::mouseReleaseEvent(ev);
+ TQWidget::mouseReleaseEvent(ev);
}
-void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
+void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
{
- QWidget::mouseMoveEvent(mme);
+ TQWidget::mouseMoveEvent(mme);
#ifdef BORDERLESS_WINDOWS
if (parent()) return;
@@ -690,9 +690,9 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
bool bright;
bool btop;
int styleheight;
- QPoint mp;
+ TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -700,25 +700,25 @@ void KDockWidget::mouseMoveEvent(QMouseEvent* mme)
kdDebug(282)<<"mousemovevent"<<endl;
if (bright)
{
- if (btop) setCursor(QCursor(SizeBDiagCursor));
+ if (btop) setCursor(TQCursor(SizeBDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeFDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeFDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else if (bleft)
{
- if (btop) setCursor(QCursor(SizeFDiagCursor));
+ if (btop) setCursor(TQCursor(SizeFDiagCursor));
else
- if (bbottom) setCursor(QCursor(SizeBDiagCursor));
- else setCursor(QCursor(SizeHorCursor));
+ if (bbottom) setCursor(TQCursor(SizeBDiagCursor));
+ else setCursor(TQCursor(SizeHorCursor));
}
else
- if (bbottom || btop) setCursor(QCursor(SizeVerCursor));
- else setCursor(QCursor(ArrowCursor));
+ if (bbottom || btop) setCursor(TQCursor(SizeVerCursor));
+ else setCursor(TQCursor(ArrowCursor));
#endif
}
-void KDockWidget::setLatestKDockContainer(QWidget* container)
+void KDockWidget::setLatestKDockContainer(TQWidget* container)
{
if (container)
{
@@ -729,7 +729,7 @@ void KDockWidget::setLatestKDockContainer(QWidget* container)
}
}
-QWidget* KDockWidget::latestKDockContainer()
+TQWidget* KDockWidget::latestKDockContainer()
{
if (!(d->container)) return 0;
if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container;
@@ -750,8 +750,8 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h )
delete header;
delete layout;
header = h;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( header );
setWidget( widget );
} else {
@@ -776,7 +776,7 @@ void KDockWidget::updateHeader()
#ifdef BORDERLESS_WINDOWS
layout->setMargin(0);
setMouseTracking(false);
- setCursor(QCursor(ArrowCursor));
+ setCursor(TQCursor(ArrowCursor));
#endif
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
@@ -792,18 +792,18 @@ void KDockWidget::updateHeader()
header->setTopLevel( true );
header->show();
#ifdef BORDERLESS_WINDOWS
- layout->setMargin(2*style().pixelMetric(QStyle::PM_DefaultFrameWidth,this));
+ layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this));
setMouseTracking(true);
#endif
}
}
-void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
+void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( parent() != s )
{
hide();
- reparent(s, 0, QPoint(0,0), false);
+ reparent(s, 0, TQPoint(0,0), false);
}
if ( s && s->inherits("KDockMainWindow") ){
@@ -811,7 +811,7 @@ void KDockWidget::applyToWidget( QWidget* s, const QPoint& p )
}
if ( manager && s == manager->main ){
- setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) );
+ setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
}
if ( !s )
@@ -847,10 +847,10 @@ void KDockWidget::show()
if ( parent() ){
makeDockVisible();
} else {
- QWidget::show();
+ TQWidget::show();
}
} else {
- QWidget::show();
+ TQWidget::show();
}
}
@@ -859,46 +859,46 @@ void KDockWidget::show()
void KDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
#endif
-void KDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled)
+void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
{
d->_parent = parent;
d->transient = transientEnabled;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
-QWidget *KDockWidget::transientTo() {
+TQWidget *KDockWidget::transientTo() {
if (d->transient && d->_parent) return d->_parent; else return 0;
}
-bool KDockWidget::event( QEvent *event )
+bool KDockWidget::event( TQEvent *event )
{
switch ( event->type() )
{
#undef FocusIn
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if (widget && !d->pendingFocusInEvent) {
d->pendingFocusInEvent = true;
widget->setFocus();
}
d->pendingFocusInEvent = false;
break;
- case QEvent::ChildRemoved:
- if ( widget == ((QChildEvent*)event)->child() ) widget = 0L;
+ case TQEvent::ChildRemoved:
+ if ( widget == ((TQChildEvent*)event)->child() ) widget = 0L;
break;
- case QEvent::Show:
+ case TQEvent::Show:
if ( widget ) widget->show();
emit manager->change();
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if ( widget ) widget->hide();
emit manager->change();
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
if ( parentWidget() ){
if ( parent()->inherits("KDockSplitter") ){
((KDockSplitter*)(parent()))->updateName();
@@ -909,13 +909,13 @@ bool KDockWidget::event( QEvent *event )
}
}
break;
- case QEvent::Close:
+ case TQEvent::Close:
emit iMBeingClosed();
break;
default:
break;
}
- return QWidget::event( event );
+ return TQWidget::event( event );
}
KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
@@ -945,7 +945,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
}
-KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex )
+KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex )
{
if (this == target)
return 0L; // docking to itself not possible
@@ -1025,10 +1025,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( parentTab ){
// add to existing TabGroup
applyToWidget( parentTab );
- parentTab->insertTab( this, icon() ? *icon() : QPixmap(),
+ parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
setDockTabName( parentTab );
@@ -1042,7 +1042,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
else
{
// kdDebug(282)<<"Looking for KDockContainer"<<endl;
- QWidget *contWid=target->parentDockContainer();
+ TQWidget *contWid=target->parentDockContainer();
if (!contWid) contWid=target->widget;
if (contWid)
{
@@ -1057,7 +1057,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// kdDebug(282)<<"KDockContainerFound"<<endl;
applyToWidget( contWid );
- cont->insertWidget( this, icon() ? *icon() : QPixmap(),
+ cont->insertWidget( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setLatestKDockContainer(contWid);
// setDockTabName( parentTab );
@@ -1073,8 +1073,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// create a new dockwidget that will contain the target and this
- QWidget* parentDock = target->parentWidget();
- KDockWidget* newDock = new KDockWidget( manager, "tempName", QPixmap(""), parentDock );
+ TQWidget* parentDock = target->parentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == KDockWidget::DockCenter ){
@@ -1106,14 +1106,14 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if ( dockPos == KDockWidget::DockCenter )
{
KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab");
- QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*)));
+ TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*)));
newDock->setWidget( tab );
target->applyToWidget( tab );
applyToWidget( tab );
- tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(),
+ tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(),
target->tabPageLabel() );
@@ -1121,11 +1121,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if( !target->toolTipString().isEmpty())
tab->setTabToolTip( target, target->toolTipString());
- tab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- QRect geom=newDock->geometry();
- QWidget *wantTransient=tab->transientTo();
+ TQRect geom=newDock->geometry();
+ TQWidget *wantTransient=tab->transientTo();
newDock->setDockWindowTransient(wantTransient,wantTransient);
newDock->setGeometry(geom);
@@ -1200,15 +1200,15 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
KDockTabGroup* KDockWidget::parentDockTabGroup() const
{
if ( !parent() ) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
}
-QWidget *KDockWidget::parentDockContainer() const
+TQWidget *KDockWidget::parentDockContainer() const
{
if (!parent()) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
}
@@ -1256,7 +1256,7 @@ void KDockWidget::restoreFromForcedFixedSize()
void KDockWidget::toDesktop()
{
- QPoint p = mapToGlobal( QPoint( -30, -30 ) );
+ TQPoint p = mapToGlobal( TQPoint( -30, -30 ) );
if( p.x( ) < 0 )
p.setX( 0 );
if( p.y( ) < 0 )
@@ -1273,10 +1273,10 @@ void KDockWidget::undock()
{
// kdDebug(282)<<"KDockWidget::undock()"<<endl;
- manager->d->dragRect = QRect ();
+ manager->d->dragRect = TQRect ();
manager->drawDragRectangle ();
- QWidget* parentW = parentWidget();
+ TQWidget* parentW = parentWidget();
if ( !parentW ){
hide();
if (!d->blockHasUndockedSignal)
@@ -1298,7 +1298,7 @@ void KDockWidget::undock()
d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
parentTab->removePage( this );
/*
- QWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
*/
setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
@@ -1308,7 +1308,7 @@ void KDockWidget::undock()
// last subdock widget in the tab control
KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
parentTab->removePage( lastTab );
-/* QWidget *wantTransient=parentTab->transientTo();
+/* TQWidget *wantTransient=parentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);*/
lastTab->applyToWidget( 0L );
@@ -1318,7 +1318,7 @@ void KDockWidget::undock()
KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
delete parentTab; // KDockTabGroup
- QWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
if ( !parentOfDockWidget ){
if ( isV ) lastTab->show();
} else {
@@ -1357,7 +1357,7 @@ void KDockWidget::undock()
}
} else {
/*********************************************************************************************/
- //QWidget* containerWidget = (QWidget*)parent();
+ //TQWidget* containerWidget = (TQWidget*)parent();
bool undockedFromContainer=false;
if (d->container)
{
@@ -1386,7 +1386,7 @@ void KDockWidget::undock()
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- QWidget* obj = group->parentWidget();
+ TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("KDockSplitter") ){
KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
@@ -1426,22 +1426,22 @@ void KDockWidget::undock()
emit hasUndocked();
}
-void KDockWidget::setWidget( QWidget* mw )
+void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( mw->parent() != this ){
- mw->reparent(this, 0, QPoint(0,0), false);
+ mw->reparent(this, 0, TQPoint(0,0), false);
}
#ifdef BORDERLESS_WINDOWS
- if (!mw->ownCursor()) mw->setCursor(QCursor(ArrowCursor));
+ if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor));
#endif
widget = mw;
delete layout;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
if (dc)
@@ -1465,10 +1465,10 @@ void KDockWidget::setWidget( QWidget* mw )
void KDockWidget::setDockTabName( KDockTabGroup* tab )
{
- QString listOfName;
- QString listOfCaption;
+ TQString listOfName;
+ TQString listOfCaption;
for ( int i = 0; i < tab->count(); ++i ) {
- QWidget *w = tab->page( i );
+ TQWidget *w = tab->page( i );
listOfCaption.append( w->caption() ).append(",");
listOfName.append( w->name() ).append(",");
}
@@ -1518,7 +1518,7 @@ void KDockWidget::makeDockVisible()
parentDockTabGroup()->showPage( this );
}
if (parentDockContainer()) {
- QWidget *contWid=parentDockContainer();
+ TQWidget *contWid=parentDockContainer();
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
x->showWidget(this);
@@ -1526,7 +1526,7 @@ void KDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- QWidget* p = parentWidget();
+ TQWidget* p = parentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
@@ -1541,15 +1541,15 @@ void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget)
{
formerBrotherDockWidget = dockWidget;
if( formerBrotherDockWidget )
- QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
}
void KDockWidget::loseFormerBrotherDockWidget()
{
if( formerBrotherDockWidget )
- QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L;
repaint();
}
@@ -1559,12 +1559,12 @@ void KDockWidget::dockBack()
if( formerBrotherDockWidget) {
// search all children if it tries to dock back to a child
bool found = false;
- QObjectList* cl = queryList("KDockWidget");
- QObjectListIt it( *cl );
- QObject * obj;
+ TQObjectList* cl = queryList("KDockWidget");
+ TQObjectListIt it( *cl );
+ TQObject * obj;
while ( !found && (obj=it.current()) != 0 ) {
++it;
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
if( widg == formerBrotherDockWidget)
found = true;
}
@@ -1572,7 +1572,7 @@ void KDockWidget::dockBack()
if( !found) {
// can dock back to the former brother dockwidget
- manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
makeDockVisible();
return;
@@ -1580,7 +1580,7 @@ void KDockWidget::dockBack()
}
// else dockback to the dockmainwindow (default behavior)
- manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
if (parent())
makeDockVisible();
@@ -1597,8 +1597,8 @@ bool KDockWidget::isDockBackPossible() const
/**************************************************************************************/
-KDockManager::KDockManager( QWidget* mainWindow , const char* name )
-:QObject( mainWindow, name )
+KDockManager::KDockManager( TQWidget* mainWindow , const char* name )
+:TQObject( mainWindow, name )
,main(mainWindow)
,currentDragWidget(0L)
,currentMoveWidget(0L)
@@ -1629,20 +1629,20 @@ KDockManager::KDockManager( QWidget* mainWindow , const char* name )
undockProcess = false;
- menuData = new QPtrList<MenuDockData>;
+ menuData = new TQPtrList<MenuDockData>;
menuData->setAutoDelete( true );
menuData->setAutoDelete( true );
#ifndef NO_KDE2
menu = new KPopupMenu();
#else
- menu = new QPopupMenu();
+ menu = new TQPopupMenu();
#endif
- connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
- connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) );
+ connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) );
+ connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) );
- childDock = new QObjectList();
+ childDock = new TQObjectList();
childDock->setAutoDelete( false );
}
@@ -1657,7 +1657,7 @@ KDockManager::~KDockManager()
delete menuData;
delete menu;
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1670,7 +1670,7 @@ KDockManager::~KDockManager()
void KDockManager::activate()
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
@@ -1680,17 +1680,17 @@ void KDockManager::activate()
obj->show();
}
}
- if ( !main->inherits("QDialog") ) main->show();
+ if ( !main->inherits("TQDialog") ) main->show();
}
-bool KDockManager::eventFilter( QObject *obj, QEvent *event )
+bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
{
if ( obj->inherits("KDockWidgetAbstractHeaderDrag") ){
KDockWidget* pDockWdgAtCursor = 0L;
KDockWidget* curdw = ((KDockWidgetAbstractHeaderDrag*)obj)->dockWidget();
switch ( event->type() ){
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (curdw->currentDockPos == KDockWidget::DockDesktop) curdw->dockBack();
else
{
@@ -1699,8 +1699,8 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
break;
- case QEvent::MouseButtonPress:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonPress:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( curdw->eDocking != (int)KDockWidget::DockNone ){
dropCancel = true;
curdw->setFocus();
@@ -1708,24 +1708,24 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
currentDragWidget = curdw;
currentMoveWidget = 0L;
- childDockWidgetList = new QWidgetList();
+ childDockWidgetList = new TQWidgetList();
childDockWidgetList->append( curdw );
findChildDockWidget( curdw, childDockWidgetList );
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
d->readyToDrag = true;
- d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0));
+ d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0));
}
}
break;
- case QEvent::MouseButtonRelease:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonRelease:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( dragging ){
if ( !dropCancel )
drop();
@@ -1734,9 +1734,9 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
}
if (d->readyToDrag) {
d->readyToDrag = false;
- //d->oldDragRect = QRect(); should fix rectangle not erased problem
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ //d->oldDragRect = TQRect(); should fix rectangle not erased problem
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
currentDragWidget = 0L;
@@ -1747,7 +1747,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
dropCancel = true;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( dragging ) {
#ifdef BORDERLESS_WINDOWS
@@ -1755,31 +1755,31 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
KDockWidget *oldMoveWidget;
if (!curdw->parent())
{
- curdw->move(QCursor::pos()-d->dragOffset);
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos()-QPoint(0,d->dragOffset.y()+3) );
+ curdw->move(TQCursor::pos()-d->dragOffset);
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) );
oldMoveWidget = currentMoveWidget;
}
else
{
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
oldMoveWidget = currentMoveWidget;
}
//END TEST
#else
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
KDockWidget* oldMoveWidget = currentMoveWidget;
#endif
if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move
- dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) );
+ dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) );
break;
} else {
if (dropCancel && curdw) {
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
}else
- d->dragRect = QRect();
+ d->dragRect = TQRect();
drawDragRectangle();
}
@@ -1803,7 +1803,7 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
}
- if ( (((QMouseEvent*)event)->state() == LeftButton) &&
+ if ( (((TQMouseEvent*)event)->state() == LeftButton) &&
(curdw->eDocking != (int)KDockWidget::DockNone) ) {
startDrag( curdw);
}
@@ -1813,10 +1813,10 @@ bool KDockManager::eventFilter( QObject *obj, QEvent *event )
break;
}
}
- return QObject::eventFilter( obj, event );
+ return TQObject::eventFilter( obj, event );
}
-KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
+KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
{
dropCancel = true;
@@ -1825,7 +1825,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
if (currentDragWidget->eDocking == (int)KDockWidget::DockNone ) return 0L;
- QWidget* p = QApplication::widgetAt( pos );
+ TQWidget* p = TQApplication::widgetAt( pos );
if ( !p ) {
dropCancel = false;
return 0L;
@@ -1833,7 +1833,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
p = p->topLevelWidget();
#endif
- QWidget* w = 0L;
+ TQWidget* w = 0L;
findChildDockWidget( w, p, p->mapFromGlobal(pos) );
if ( !w ){
if ( !p->inherits("KDockWidget") ) {
@@ -1855,7 +1855,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return 0L;
KDockWidget::DockPosition curPos = KDockWidget::DockDesktop;
- QPoint cpos = www->mapFromGlobal( pos );
+ TQPoint cpos = www->mapFromGlobal( pos );
int ww = www->widget->width() / 3;
int hh = www->widget->height() / 3;
@@ -1882,15 +1882,15 @@ KDockWidget* KDockManager::findDockWidgetAt( const QPoint& pos )
return www;
}
-void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos )
+void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() && w->geometry().contains(pos) ) {
if ( w->inherits("KDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) );
@@ -1903,15 +1903,15 @@ void KDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QP
return;
}
-void KDockManager::findChildDockWidget( const QWidget* p, QWidgetList*& list )
+void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() ) {
if ( w->inherits("KDockWidget") ) list->append( w );
findChildDockWidget( w, list );
@@ -1938,15 +1938,15 @@ void KDockManager::startDrag( KDockWidget* w )
curPos = KDockWidget::DockDesktop;
dragging = true;
- QApplication::setOverrideCursor(QCursor(sizeAllCursor));
+ TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
}
-void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
+void KDockManager::dragMove( KDockWidget* dw, TQPoint pos )
{
- QPoint p = dw->mapToGlobal( dw->widget->pos() );
+ TQPoint p = dw->mapToGlobal( dw->widget->pos() );
KDockWidget::DockPosition oldPos = curPos;
- QSize r = dw->widget->size();
+ TQSize r = dw->widget->size();
if ( dw->parentDockTabGroup() ){
curPos = KDockWidget::DockCenter;
if ( oldPos != curPos ) {
@@ -1991,34 +1991,34 @@ void KDockManager::dragMove( KDockWidget* dw, QPoint pos )
void KDockManager::cancelDrop()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
}
void KDockManager::drop()
{
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
if ( dropCancel ) return;
if ( !currentMoveWidget && (!(currentDragWidget->eDocking & (int)KDockWidget::DockDesktop)) ) {
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
return;
}
if ( !currentMoveWidget && !currentDragWidget->parent() ) {
- currentDragWidget->move( QCursor::pos() - d->dragOffset );
+ currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
int splitPos = currentDragWidget->d->splitPosInPercent;
@@ -2032,63 +2032,63 @@ void KDockManager::drop()
default: break;
}
}
- currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset );
+ currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset );
currentDragWidget->makeDockVisible();
}
}
-static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str)
+static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
el.appendChild(doc.createTextNode(str));
return el;
}
-static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b)
+static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b)
{
- return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false"));
+ return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false"));
}
-static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n)
+static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n)
{
- return createStringEntry(doc, tagName, QString::number(n));
+ return createStringEntry(doc, tagName, TQString::number(n));
}
-static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect)
+static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QDomElement xel = doc.createElement("x");
- xel.appendChild(doc.createTextNode(QString::number(rect.x())));
+ TQDomElement xel = doc.createElement("x");
+ xel.appendChild(doc.createTextNode(TQString::number(rect.x())));
el.appendChild(xel);
- QDomElement yel = doc.createElement("y");
- yel.appendChild(doc.createTextNode(QString::number(rect.y())));
+ TQDomElement yel = doc.createElement("y");
+ yel.appendChild(doc.createTextNode(TQString::number(rect.y())));
el.appendChild(yel);
- QDomElement wel = doc.createElement("width");
- wel.appendChild(doc.createTextNode(QString::number(rect.width())));
+ TQDomElement wel = doc.createElement("width");
+ wel.appendChild(doc.createTextNode(TQString::number(rect.width())));
el.appendChild(wel);
- QDomElement hel = doc.createElement("height");
- hel.appendChild(doc.createTextNode(QString::number(rect.height())));
+ TQDomElement hel = doc.createElement("height");
+ hel.appendChild(doc.createTextNode(TQString::number(rect.height())));
el.appendChild(hel);
return el;
}
-static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
- const QString &subTagName, const QStrList &list)
+static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName,
+ const TQString &subTagName, const TQStrList &list)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QStrListIterator it(list);
+ TQStrListIterator it(list);
for (; it.current(); ++it) {
- QDomElement subel = doc.createElement(subTagName);
- subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current())));
+ TQDomElement subel = doc.createElement(subTagName);
+ subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current())));
el.appendChild(subel);
}
@@ -2096,44 +2096,44 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
}
-static QString stringEntry(QDomElement &base, const QString &tagName)
+static TQString stringEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data();
}
-static bool boolEntry(QDomElement &base, const QString &tagName)
+static bool boolEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data() == "true";
}
-static int numberEntry(QDomElement &base, const QString &tagName)
+static int numberEntry(TQDomElement &base, const TQString &tagName)
{
return stringEntry(base, tagName).toInt();
}
-static QRect rectEntry(QDomElement &base, const QString &tagName)
+static TQRect rectEntry(TQDomElement &base, const TQString &tagName)
{
- QDomElement el = base.namedItem(tagName).toElement();
+ TQDomElement el = base.namedItem(tagName).toElement();
int x = numberEntry(el, "x");
int y = numberEntry(el, "y");
int width = numberEntry(el, "width");
int height = numberEntry(el, "height");
- return QRect(x, y, width, height);
+ return TQRect(x, y, width, height);
}
-static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName)
+static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName)
{
- QStrList list;
+ TQStrList list;
- for( QDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.namedItem(tagName).firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement subel = n.toElement();
+ TQDomElement subel = n.toElement();
if (subel.tagName() == subTagName)
list.append(subel.firstChild().toText().data().latin1());
}
@@ -2142,28 +2142,28 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri
}
-void KDockManager::writeConfig(QDomElement &base)
+void KDockManager::writeConfig(TQDomElement &base)
{
// First of all, clear the tree under base
while (!base.firstChild().isNull())
base.removeChild(base.firstChild());
- QDomDocument doc = base.ownerDocument();
+ TQDomDocument doc = base.ownerDocument();
- QStrList nameList;
- QString mainWidgetStr;
+ TQStrList nameList;
+ TQString mainWidgetStr;
// collect widget names
- QStringList nList;
- QObjectListIt it(*childDock);
+ TQStringList nList;
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( obj1->parent() == main )
- mainWidgetStr = QString::fromLatin1(obj1->name());
+ mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name());
++it;
}
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
@@ -2171,7 +2171,7 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ) {
KDockWidget *obj = getDockWidgetFromName( *nListIt);
if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1
@@ -2183,7 +2183,7 @@ void KDockManager::writeConfig(QDomElement &base)
continue;
}
- QDomElement groupEl;
+ TQDomElement groupEl;
if (obj->d->isContainer) {
KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
if (x) {
@@ -2203,7 +2203,7 @@ void KDockManager::writeConfig(QDomElement &base)
//// Save a tab group
groupEl = doc.createElement("tabGroup");
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
@@ -2223,10 +2223,10 @@ void KDockManager::writeConfig(QDomElement &base)
}
}
- groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name())));
+ groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name())));
groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
if ( !obj->parent() ) {
- groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
if (obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2242,19 +2242,19 @@ void KDockManager::writeConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
+ TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr));
- QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
+ TQString mainDockWidgetStr = TQString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr));
} else {
base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr));
}
- base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
}
-void KDockManager::readConfig(QDomElement &base)
+void KDockManager::readConfig(TQDomElement &base)
{
if (base.namedItem("group").isNull()
&& base.namedItem("tabgroup").isNull()
@@ -2264,13 +2264,13 @@ void KDockManager::readConfig(QDomElement &base)
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
main->hide();
- QObjectListIt it(*childDock);
+ TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
@@ -2283,9 +2283,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// firstly, recreate all common dockwidgets
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock") continue;
// Read an ordinary dock widget
@@ -2294,12 +2294,12 @@ void KDockManager::readConfig(QDomElement &base)
obj->setToolTipString(stringEntry(childEl, "tabToolTip"));
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2309,9 +2309,9 @@ void KDockManager::readConfig(QDomElement &base)
}
// secondly, now iterate again and create the groups and tabwidgets, apply the dockwidgets to them
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.isNull()) continue;
KDockWidget *obj = 0;
@@ -2335,9 +2335,9 @@ void KDockManager::readConfig(QDomElement &base)
else
if (childEl.tagName() == "splitGroup") {
// Read a group
- QString name = stringEntry(childEl, "name");
- QString firstName = stringEntry(childEl, "firstName");
- QString secondName = stringEntry(childEl, "secondName");
+ TQString name = stringEntry(childEl, "name");
+ TQString firstName = stringEntry(childEl, "firstName");
+ TQString secondName = stringEntry(childEl, "secondName");
int orientation = numberEntry(childEl, "orientation");
int separatorPos = numberEntry(childEl, "separatorPos");
@@ -2352,8 +2352,8 @@ void KDockManager::readConfig(QDomElement &base)
}
} else if (childEl.tagName() == "tabGroup") {
// Read a tab group
- QString name = stringEntry(childEl, "name");
- QStrList list = listEntry(childEl, "tabs", "tab");
+ TQString name = stringEntry(childEl, "name");
+ TQStrList list = listEntry(childEl, "tabs", "tab");
KDockWidget *d1 = getDockWidgetFromName( list.first() );
list.next();
@@ -2378,12 +2378,12 @@ void KDockManager::readConfig(QDomElement &base)
}
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("KDockWidgetHeader")) {
@@ -2394,9 +2394,9 @@ void KDockManager::readConfig(QDomElement &base)
// thirdly, now that all ordinary dockwidgets are created,
// iterate them again and link them with their corresponding dockwidget for the dockback action
- for( QDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for( TQDomNode n = base.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement childEl = n.toElement();
+ TQDomElement childEl = n.toElement();
if (childEl.tagName() != "dock" && childEl.tagName() != "tabGroup")
continue;
@@ -2406,7 +2406,7 @@ void KDockManager::readConfig(QDomElement &base)
if (!boolEntry(childEl, "hasParent")) {
// Read a common toplevel dock widget
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
- QString name = stringEntry(childEl, "dockBackTo");
+ TQString name = stringEntry(childEl, "dockBackTo");
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName(name));
}
@@ -2418,20 +2418,20 @@ void KDockManager::readConfig(QDomElement &base)
if (main->inherits("KDockMainWindow")) {
KDockMainWindow *dmain = (KDockMainWindow*)main;
- QString mv = stringEntry(base, "centralWidget");
+ TQString mv = stringEntry(base, "centralWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv) ) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(dmain);
mvd->show();
dmain->setCentralWidget(mvd);
}
- QString md = stringEntry(base, "mainDockWidget");
+ TQString md = stringEntry(base, "mainDockWidget");
if (!md.isEmpty() && getDockWidgetFromName(md)) {
KDockWidget *mvd = getDockWidgetFromName(md);
dmain->setMainDockWidget(mvd);
}
} else {
- QString mv = stringEntry(base, "mainWidget");
+ TQString mv = stringEntry(base, "mainWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv)) {
KDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(main);
@@ -2439,7 +2439,7 @@ void KDockManager::readConfig(QDomElement &base)
}
// only resize + move non-mainwindows
- QRect mr = rectEntry(base, "geometry");
+ TQRect mr = rectEntry(base, "geometry");
main->move(mr.topLeft());
main->resize(mr.size());
}
@@ -2472,7 +2472,7 @@ void KDockManager::setReadDockConfigMode(int mode)
}
#ifndef NO_KDE2
-void KDockManager::writeConfig( KConfig* c, QString group )
+void KDockManager::writeConfig( KConfig* c, TQString group )
{
//debug("BEGIN Write Config");
if ( !c ) c = KGlobal::config();
@@ -2481,13 +2481,13 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->setGroup( group );
c->writeEntry( "Version", DOCK_CONFIG_VERSION );
- QStringList nameList;
- QStringList findList;
- QObjectListIt it( *childDock );
+ TQStringList nameList;
+ TQStringList findList;
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
// collect KDockWidget's name
- QStringList nList;
+ TQStringList nList;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
//debug(" +Add subdock %s", obj->name());
@@ -2496,21 +2496,21 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( "Main:view", obj->name() );
}
-// kdDebug(282)<<QString("list size: %1").arg(nList.count())<<endl;
- for (QObjectListIt it(d->containerDocks);it.current();++it)
+// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
+ for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) {
dc->prepareSave(nList);
}
}
-// kdDebug(282)<<QString("new list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("new list size: %1").arg(nList.count())<<endl;
- QStringList::Iterator nListIt=nList.begin();
+ TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ){
//debug(" -Try to save %s", nList.current());
obj = getDockWidgetFromName( *nListIt );
- QString cname = obj->name();
+ TQString cname = obj->name();
if ( obj->header ){
obj->header->saveConfig( c );
}
@@ -2527,7 +2527,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":parent", "yes");
@@ -2559,14 +2559,14 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "TAB_GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
} else {
c->writeEntry( cname+":parent", "yes");
}
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
c->writeEntry( cname+":tabNames", list );
@@ -2583,7 +2583,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":tabToolTip", obj->toolTipString());
if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
c->writeEntry( cname+":dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : "");
c->writeEntry( cname+":dockBackToPos", obj->formerDockPos);
@@ -2600,7 +2600,7 @@ void KDockManager::writeConfig( KConfig* c, QString group )
}
c->writeEntry( "NameList", nameList );
- c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) );
+ c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) );
c->writeEntry( "Main:visible", main->isVisible()); // curently nou use
if ( main->inherits("KDockMainWindow") ){
@@ -2613,31 +2613,31 @@ void KDockManager::writeConfig( KConfig* c, QString group )
c->sync();
//debug("END Write Config");
}
-#include <qmessagebox.h>
-void KDockManager::readConfig( KConfig* c, QString group )
+#include <tqmessagebox.h>
+void KDockManager::readConfig( KConfig* c, TQString group )
{
if ( !c ) c = KGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group );
- QStrList nameList;
+ TQStrList nameList;
c->readListEntry( "NameList", nameList );
- QString ver = c->readEntry( "Version", "0.0.1" );
+ TQString ver = c->readEntry( "Version", "0.0.1" );
nameList.first();
if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
activate();
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
// if (isMainVisible) // CCC
- //QMessageBox::information(0,"","hallo");
+ //TQMessageBox::information(0,"","hallo");
//COMMENTED4TESTING main->hide();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ){
@@ -2652,13 +2652,13 @@ void KDockManager::readConfig( KConfig* c, QString group )
// they must be restored before e.g. tabgroups are restored
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
- QRect r = c->readRectEntry( oname + ":geometry" );
+ TQRect r = c->readRectEntry( oname + ":geometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
obj->setGeometry(r);
@@ -2667,7 +2667,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
obj->setTabPageLabel(c->readEntry( oname + ":tabCaption" ));
obj->setToolTipString(c->readEntry( oname + ":tabToolTip" ));
if ( c->readBoolEntry( oname + ":visible" ) ){
- obj->QWidget::show();
+ obj->TQWidget::show();
}
}
@@ -2690,9 +2690,9 @@ void KDockManager::readConfig( KConfig* c, QString group )
// secondly, after the common dockwidgets, restore the groups and tabgroups
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "GROUP" ){
@@ -2710,7 +2710,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
}
if ( type == "TAB_GROUP" ){
- QStrList list;
+ TQStrList list;
KDockWidget* tabDockGroup = 0L;
c->readListEntry( oname+":tabNames", list );
KDockWidget* d1 = getDockWidgetFromName( list.first() );
@@ -2746,15 +2746,15 @@ void KDockManager::readConfig( KConfig* c, QString group )
// iterate them again and link the toplevel ones of them with their corresponding dockwidget for the dockback action
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
obj = getDockWidgetFromName( oname );
c->setGroup( group );
- QString name = c->readEntry( oname + ":dockBackTo" );
+ TQString name = c->readEntry( oname + ":dockBackTo" );
if (!name.isEmpty()) {
obj->setFormerBrotherDockWidget(getDockWidgetFromName( name ));
}
@@ -2768,7 +2768,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
KDockMainWindow* dmain = (KDockMainWindow*)main;
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( dmain );
@@ -2776,14 +2776,14 @@ void KDockManager::readConfig( KConfig* c, QString group )
dmain->setView( mvd );
}
c->setGroup( group );
- QString md = c->readEntry( "Main:dock" );
+ TQString md = c->readEntry( "Main:dock" );
if ( !md.isEmpty() && getDockWidgetFromName( md ) ){
KDockWidget* mvd = getDockWidgetFromName( md );
dmain->setMainDockWidget( mvd );
}
} else {
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
KDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( main );
@@ -2798,7 +2798,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
}
c->setGroup( group );
- QRect mr = c->readRectEntry("Main:Geometry");
+ TQRect mr = c->readRectEntry("Main:Geometry");
main->move(mr.topLeft());
main->resize(mr.size());
if ( isMainVisible ) main->show();
@@ -2807,7 +2807,7 @@ void KDockManager::readConfig( KConfig* c, QString group )
void KDockManager::dumpDockWidgets() {
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
@@ -2816,19 +2816,19 @@ void KDockManager::dumpDockWidgets() {
}
-KDockWidget* KDockManager::getDockWidgetFromName( const QString& dockName )
+KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName )
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
- if ( QString(obj->name()) == dockName ) return obj;
+ if ( TQString(obj->name()) == dockName ) return obj;
}
KDockWidget* autoCreate = 0L;
if ( autoCreateDock ){
kdDebug(282)<<"Autocreating dock: "<<dockName<<endl;
- autoCreate = new KDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap("") );
autoCreateDock->append( autoCreate );
}
return autoCreate;
@@ -2868,20 +2868,20 @@ void KDockManager::slotMenuPopup()
menu->clear();
menuData->clear();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * obj;
int numerator = 0;
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
if ( obj->mayBeHide() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, true ) );
}
if ( obj->mayBeShow() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, false ) );
}
}
@@ -2893,9 +2893,9 @@ void KDockManager::slotMenuActivated( int id )
data->dock->changeHideShowState();
}
-KDockWidget* KDockManager::findWidgetParentDock( QWidget* w ) const
+KDockWidget* KDockManager::findWidgetParentDock( TQWidget* w ) const
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
KDockWidget * dock;
KDockWidget * found = 0L;
@@ -2915,7 +2915,7 @@ void KDockManager::drawDragRectangle()
return;
int i;
- QRect oldAndNewDragRect[2];
+ TQRect oldAndNewDragRect[2];
oldAndNewDragRect[0] = d->oldDragRect;
oldAndNewDragRect[1] = d->dragRect;
@@ -2924,7 +2924,7 @@ void KDockManager::drawDragRectangle()
if (oldAndNewDragRect[i].isEmpty())
continue;
- KDockWidget* pDockWdgAtRect = (KDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
+ KDockWidget* pDockWdgAtRect = (KDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
if (!pDockWdgAtRect)
continue;
@@ -2932,7 +2932,7 @@ void KDockManager::drawDragRectangle()
bool unclipped;
KDockMainWindow* pMain = 0L;
KDockWidget* pTLDockWdg = 0L;
- QWidget* topWdg;
+ TQWidget* topWdg;
if (pDockWdgAtRect->topLevelWidget() == main) {
isOverMainWdg = true;
topWdg = pMain = (KDockMainWindow*) main;
@@ -2946,7 +2946,7 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle unclipped over the main dock window
- QPainter p;
+ TQPainter p;
p.begin( topWdg );
if ( !unclipped ) {
if (isOverMainWdg)
@@ -2956,8 +2956,8 @@ void KDockManager::drawDragRectangle()
}
// draw the rectangle
p.setRasterOp(Qt::NotXorROP);
- QRect r = oldAndNewDragRect[i];
- r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) );
+ TQRect r = oldAndNewDragRect[i];
+ r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) );
p.drawRect(r.x(), r.y(), r.width(), r.height());
p.end();
}
@@ -2984,10 +2984,10 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
}
-KDockArea::KDockArea( QWidget* parent, const char *name)
-:QWidget( parent, name)
+KDockArea::KDockArea( TQWidget* parent, const char *name)
+:TQWidget( parent, name)
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -2997,7 +2997,7 @@ KDockArea::~KDockArea()
delete dockManager;
}
-KDockWidget* KDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -3014,44 +3014,44 @@ void KDockArea::makeDockInvisible( KDockWidget* dock )
dock->undock();
}
-void KDockArea::makeWidgetDockVisible( QWidget* widget )
+void KDockArea::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void KDockArea::writeDockConfig(QDomElement &base)
+void KDockArea::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void KDockArea::readDockConfig(QDomElement &base)
+void KDockArea::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
void KDockArea::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("KDockWidget")) return;
KDockWidget* pDW = (KDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
}
-void KDockArea::resizeEvent(QResizeEvent *rsize)
+void KDockArea::resizeEvent(TQResizeEvent *rsize)
{
- QWidget::resizeEvent(rsize);
+ TQWidget::resizeEvent(rsize);
if (children()){
#ifndef NO_KDE2
// kdDebug(282)<<"KDockArea::resize"<<endl;
#endif
- QObjectList *list=queryList("QWidget",0,false);
+ TQObjectList *list=queryList("TQWidget",0,false);
- QObjectListIt it( *list ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size()));
+ ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size()));
break;
}
delete list;
@@ -3059,12 +3059,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
KDockSplitter *split;
// for (unsigned int i=0;i<children()->count();i++)
{
-// QPtrList<QObject> list(children());
-// QObject *obj=((QPtrList<QObject*>)children())->at(i);
- QObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(children());
+// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
+ TQObject *obj=children()->getFirst();
if (split = dynamic_cast<KDockSplitter*>(obj))
{
- split->setGeometry( QRect(QPoint(0,0), size() ));
+ split->setGeometry( TQRect(TQPoint(0,0), size() ));
// break;
}
}
@@ -3073,12 +3073,12 @@ void KDockArea::resizeEvent(QResizeEvent *rsize)
}
#ifndef NO_KDE2
-void KDockArea::writeDockConfig( KConfig* c, QString group )
+void KDockArea::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void KDockArea::readDockConfig( KConfig* c, QString group )
+void KDockArea::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -3145,17 +3145,17 @@ bool KDockContainer::isOverlapMode() {
}
-bool KDockContainer::dockDragEnter(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragMove(KDockWidget*, QMouseEvent *) { return false;}
-bool KDockContainer::dockDragLeave(KDockWidget*, QMouseEvent *) { return false;}
+bool KDockContainer::dockDragEnter(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;}
+bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;}
KDockWidget *KDockContainer::parentDockWidget(){return 0;}
-QStringList KDockContainer::containedWidgets() const {
- QStringList tmp;
+TQStringList KDockContainer::containedWidgets() const {
+ TQStringList tmp;
for (struct ListItem *it=m_childrenListBegin;it;it=it->next) {
- tmp<<QString(it->data);
+ tmp<<TQString(it->data);
}
return tmp;
@@ -3164,7 +3164,7 @@ QStringList KDockContainer::containedWidgets() const {
void KDockContainer::showWidget(KDockWidget *) {
}
-void KDockContainer::insertWidget (KDockWidget *dw, QPixmap, const QString &, int &)
+void KDockContainer::insertWidget (KDockWidget *dw, TQPixmap, const TQString &, int &)
{
struct ListItem *it=new struct ListItem;
it->data=strdup(dw->name());
@@ -3201,13 +3201,13 @@ void KDockContainer::removeWidget (KDockWidget *dw){
//m_children.remove(dw->name());}
void KDockContainer::undockWidget (KDockWidget *){;}
-void KDockContainer::setToolTip(KDockWidget *, QString &){;}
-void KDockContainer::setPixmap(KDockWidget*,const QPixmap&){;}
-void KDockContainer::load (KConfig*, const QString&){;}
-void KDockContainer::save (KConfig*, const QString&){;}
-void KDockContainer::load (QDomElement&){;}
-void KDockContainer::save (QDomElement&){;}
-void KDockContainer::prepareSave(QStringList &names)
+void KDockContainer::setToolTip(KDockWidget *, TQString &){;}
+void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;}
+void KDockContainer::load (KConfig*, const TQString&){;}
+void KDockContainer::save (KConfig*, const TQString&){;}
+void KDockContainer::load (TQDomElement&){;}
+void KDockContainer::save (TQDomElement&){;}
+void KDockContainer::prepareSave(TQStringList &names)
{
for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next)
@@ -3219,11 +3219,11 @@ void KDockContainer::prepareSave(QStringList &names)
}
-QWidget *KDockTabGroup::transientTo() {
- QWidget *tT=0;
+TQWidget *KDockTabGroup::transientTo() {
+ TQWidget *tT=0;
for (int i=0;i<count();i++) {
KDockWidget *dw=static_cast<KDockWidget*>(page(i)->qt_cast("KDockWidget"));
- QWidget *tmp;
+ TQWidget *tmp;
if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp;
else {
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.h b/lib/compatibility/kmdi/qextmdi/kdockwidget.h
index 8858b9ba..849669ce 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget.h
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.h
@@ -48,18 +48,18 @@
#define _KDOCKWIDGET_2_2_
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qframe.h>
-#include <qdom.h>
-#include <qtabwidget.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqframe.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
#ifndef NO_KDE2
#include <kmainwindow.h>
#include <netwm_def.h>
#else
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include "exportdockclass.h"
#include "dummykmainwindow.h"
#endif
@@ -221,7 +221,7 @@ protected:
/**
* Draws the drag panel (a double line)
*/
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
virtual void virtual_hook( int id, void* data );
@@ -326,7 +326,7 @@ protected:
/**
* A layout manager for placing the embedded buttons (close and stay)
*/
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
/**
* a little button for closing (undocking and hiding) the dockwidget
@@ -357,7 +357,7 @@ private:
/**
* It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set).
* An abstraction what it is currently.
- * In general it is like QTabWidget but is more useful for the dockwidget class set.
+ * In general it is like TQTabWidget but is more useful for the dockwidget class set.
* More or less a minor helper class for the dockwidget class set.
*
* @author Max Judin (documentation: Falk Brettschneider).
@@ -369,15 +369,15 @@ public:
/**
* Constructs this. It just calls the method of the base class.
*/
- KDockTabGroup( QWidget *parent = 0, const char *name = 0 )
- :QTabWidget( parent, name ){};
+ KDockTabGroup( TQWidget *parent = 0, const char *name = 0 )
+ :TQTabWidget( parent, name ){};
/**
* Destructs a KDockTabGroup.
*/
virtual ~KDockTabGroup(){};
- QWidget *transientTo();
+ TQWidget *transientTo();
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -411,7 +411,7 @@ private:
* ...
* KDockWidget* dock = 0L;
* dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
- * QWidget* actualWidget = new QWidget( dock);
+ * TQWidget* actualWidget = new TQWidget( dock);
* dock->setWidget( actualWidget); // embed it
* dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
* ...
@@ -447,8 +447,8 @@ public:
* @param f Qt::WidgetFlags widget flags
*/
KDockWidget( KDockManager* dockManager, const char* name,
- const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = QString::null,
- const QString& strTabPageLabel = QString::fromLatin1( " " ), WFlags f = 0);
+ const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null,
+ const TQString& strTabPageLabel = TQString::fromLatin1( " " ), WFlags f = 0);
/**
* Destructs a dockwidget.
@@ -492,7 +492,7 @@ public:
* @param tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append
* @return result The group dockwidget that replaces the target dockwidget and will be grandparent of target and @p this.
*/
- KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1);
+ KDockWidget* manualDock( KDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1);
/**
* Specify where it is either possible or impossible for this to dock to another dockwidget.
@@ -521,23 +521,23 @@ public:
/**
* Sets the embedded widget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
*
* @param w The pointer to the dockwidget's child widget.
*/
- void setWidget( QWidget* w);
+ void setWidget( TQWidget* w);
/**
* Get the embedded widget.
*
* @return The pointer to the dockwidget's child widget, 0L if there's no such child.
*/
- QWidget* getWidget() const { return widget; };
+ TQWidget* getWidget() const { return widget; };
/**
* Sets the header of this dockwidget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
* The header contains the drag panel, the close button and the stay button.
*
* @param ah A base class pointer to the dockwidget header
@@ -591,12 +591,12 @@ public:
*
* @param ttStr A string for the tooltip on the tab.
*/
- void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; };
+ void setToolTipString(const TQString& ttStr) { toolTipStr = ttStr; };
/**
* @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
*/
- const QString& toolTipString() const { return toolTipStr; };
+ const TQString& toolTipString() const { return toolTipStr; };
/**
* @return result @p true, if a dockback is possible, otherwise @p false.
@@ -607,20 +607,20 @@ public:
* Sets a string that is used for the label of the tab page when in tab page mode
* @param label The new tab page label.
*/
- void setTabPageLabel( const QString& label) { tabPageTitle = label; };
+ void setTabPageLabel( const TQString& label) { tabPageTitle = label; };
/**
* @return A string that is used for the label of the tab page when in tab page mode.
*/
- const QString& tabPageLabel() const { return tabPageTitle; };
+ const TQString& tabPageLabel() const { return tabPageTitle; };
/**
- * Catches and processes some QWidget events that are interesting for dockwidgets.
+ * Catches and processes some TQWidget events that are interesting for dockwidgets.
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
- * Add dockwidget management actions to QWidget::show.
+ * Add dockwidget management actions to TQWidget::show.
*/
virtual void show();
/**
@@ -629,7 +629,7 @@ public:
KDockTabGroup* parentDockTabGroup() const;
/// @since 3.1
- QWidget *parentDockContainer() const;
+ TQWidget *parentDockContainer() const;
#ifndef NO_KDE2
@@ -642,13 +642,13 @@ public:
#endif
- void setDockWindowTransient (QWidget *parent, bool transientEnabled);
+ void setDockWindowTransient (TQWidget *parent, bool transientEnabled);
/**
* Returns the widget this dockwidget is set transient to, otherwise 0
* @since 3.2
*/
- QWidget *transientTo();
+ TQWidget *transientTo();
/**
* Lookup the nearest dockwidget docked left/right/top/bottom to this one or return 0
@@ -664,14 +664,14 @@ public:
* @param pixmap is the pixmap to set
* @since 3.2
*/
- void setPixmap(const QPixmap& pixmap=QPixmap());
+ void setPixmap(const TQPixmap& pixmap=TQPixmap());
/**
* Returns the dockwidget's associated caption/dock tab pixmap
*
* @since 3.2
*/
- const QPixmap& pixmap() const;
+ const TQPixmap& pixmap() const;
/**
* @return the current dock position.
@@ -739,9 +739,9 @@ protected:
void updateHeader();
/// @since 3.1
- void setLatestKDockContainer(QWidget *);
+ void setLatestKDockContainer(TQWidget *);
/// @since 3.1
- QWidget *latestKDockContainer();
+ TQWidget *latestKDockContainer();
/// @since 3.2
void setFormerBrotherDockWidget(KDockWidget *);
@@ -751,7 +751,7 @@ signals:
*@since 3.2
*is emitted after the setWidget method has finished
*/
- void widgetSet(QWidget*);
+ void widgetSet(TQWidget*);
/**
* Emitted when another dock widget is docking to this.
@@ -793,12 +793,12 @@ protected slots:
*/
void loseFormerBrotherDockWidget();
- virtual void paintEvent(QPaintEvent*);
+ virtual void paintEvent(TQPaintEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void leaveEvent(QEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void leaveEvent(TQEvent*);
protected:
friend class KDockWidgetHeader;
/**
@@ -816,11 +816,11 @@ protected:
/**
* a string used as tooltip for the tab page header when in dock-centered mode.
*/
- QString toolTipStr;
+ TQString toolTipStr;
/**
* a string used as title of the tab page when in tab page mode
*/
- QString tabPageTitle;
+ TQString tabPageTitle;
private:
/**
@@ -837,7 +837,7 @@ private:
* @param s the target widget to reparent to
* @param p the point to move to (if it doesn't reparent)
*/
- void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) );
+ void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) );
/**
* A base class pointer to the header of this dockwidget
@@ -847,12 +847,12 @@ private:
/**
* the embedded widget
*/
- QWidget* widget;
+ TQWidget* widget;
/**
* the layout manager that takes care about proper resizing and moving the embedded widget and the header
*/
- QVBoxLayout* layout;
+ TQVBoxLayout* layout;
/**
* the responsible dockmanager
@@ -862,7 +862,7 @@ private:
/**
* an icon for the tab widget header
*/
- QPixmap* pix;
+ TQPixmap* pix;
/**
* Information about the ability for docking to another dockwidget.
@@ -880,8 +880,8 @@ private:
KDockWidget::DockPosition prevSideDockPosBeforeDrag;
// GROUP data
- QString firstName;
- QString lastName;
+ TQString firstName;
+ TQString lastName;
Orientation splitterOrientation;
bool isGroup;
bool isTabGroup;
@@ -927,7 +927,7 @@ public:
* @param mainWindow the main window controlled by this
* @param name the internal QOject name
*/
- KDockManager( QWidget* mainWindow, const char* name = 0L );
+ KDockManager( TQWidget* mainWindow, const char* name = 0L );
/**
* Destructs a dockmanager.
@@ -946,14 +946,14 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void writeConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* Like writeConfig but reads the whole stuff in.
*
* In order to restore a window configuration
* from a config file, it looks up widgets by name
- * (QObject::name) in the childDock variable of
+ * (TQObject::name) in the childDock variable of
* KDockManager. This list in turn contains all
* KDockWidgets (according to the KDockWidget constructor).
* So in principle, in order to restore a window layout,
@@ -964,7 +964,7 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void readConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/// @since 3.1
@@ -973,11 +973,11 @@ public:
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeConfig(QDomElement &base);
+ void writeConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readConfig(QDomElement &base);
+ void readConfig(TQDomElement &base);
/**
* Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
@@ -993,7 +993,7 @@ public:
* @param event the event
* @return the return value of the method call of the base class method
*/
- virtual bool eventFilter( QObject * object, QEvent * event );
+ virtual bool eventFilter( TQObject * object, TQEvent * event );
/**
* This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
@@ -1002,25 +1002,25 @@ public:
* @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
* @return the dockwidget that encapsulates that widget, otherwise 0
*/
- KDockWidget* findWidgetParentDock( QWidget* w) const;
+ KDockWidget* findWidgetParentDock( TQWidget* w) const;
/**
* Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
*
* @param w the widget that is encapsulated by a dockwidget that turns to visible.
*/
- void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
+ void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
/**
* @return the popupmenu for showing/hiding dockwidgets
*/
- QPopupMenu* dockHideShowMenu() const { return menu; }
+ TQPopupMenu* dockHideShowMenu() const { return menu; }
/**
- * @param dockName an internal QObject name
- * @return the dockwidget that has got that internal QObject name
+ * @param dockName an internal TQObject name
+ * @return the dockwidget that has got that internal TQObject name
*/
- KDockWidget* getDockWidgetFromName( const QString& dockName );
+ KDockWidget* getDockWidgetFromName( const TQString& dockName );
/**
* Enables opaque resizing. Opaque resizing defaults to KGlobalSettings::opaqueResize().
@@ -1035,7 +1035,7 @@ public:
/**
* Try to preserve the widget's size. Works like KeepSize resize mode
- * of QSplitter. Off by default.
+ * of TQSplitter. Off by default.
* Call this method before you create any dock widgets!
*/
void setSplitterKeepSize(bool b=true);
@@ -1131,16 +1131,16 @@ private:
* @param pos global (desktop) position of the wanted dockwidget
* @return the dockwidget at that position
*/
- KDockWidget* findDockWidgetAt( const QPoint& pos );
+ KDockWidget* findDockWidgetAt( const TQPoint& pos );
/**
- * Finds the QWidget recursively at the position given as parameter
+ * Finds the TQWidget recursively at the position given as parameter
*
- * @param w a variable where the method puts the QWidget at that position (instead of a return value)
+ * @param w a variable where the method puts the TQWidget at that position (instead of a return value)
* @param p the parent widget where the recursive search should start from
* @param pos global (desktop) position of the wanted dockwidget
*/
- void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos );
+ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos );
/**
* Finds all dockwidgets which are child, grandchild and so on of p.
@@ -1148,7 +1148,7 @@ private:
* @param p the parent widget where the recursive search starts from
* @param l the widget list that contains the search result after the return of this method
*/
- void findChildDockWidget( const QWidget* p, QWidgetList*& l);
+ void findChildDockWidget( const TQWidget* p, TQWidgetList*& l);
/**
* Sets a dockwidget in drag mode.
@@ -1161,7 +1161,7 @@ private:
* @param d the dockwidget which is dragged
* @param pos the new position of the dragged dockwidget
*/
- void dragMove( KDockWidget* d, QPoint pos );
+ void dragMove( KDockWidget* d, TQPoint pos );
/**
* Aborts the drag mode. Restores the cursor and hides the drag indicator.
@@ -1179,7 +1179,7 @@ private:
/**
* Usually the KDockMainWindow but not necessarily.
*/
- QWidget* main;
+ TQWidget* main;
/**
* The dockwidget that is being dragged at the moment
@@ -1194,7 +1194,7 @@ private:
/**
* It is of interest during the dock process. Then it contains all child dockwidgets.
*/
- QWidgetList* childDockWidgetList;
+ TQWidgetList* childDockWidgetList;
/**
* The dockposition where the dockwidget would be docked to, if we dropped it here.
@@ -1205,12 +1205,12 @@ private:
* A QList of all objects that are important for docking.
* Some serve as group widgets of dockwidgets, others encapsulate normal widgets.
*/
- QObjectList* childDock;
+ TQObjectList* childDock;
/**
* Contains dockwidgets that are created automatically by the dockmanager. For internal use.
*/
- QObjectList* autoCreateDock;
+ TQObjectList* autoCreateDock;
/**
* For storing the width during the dragging of a dockwidget.
@@ -1242,12 +1242,12 @@ private:
* A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and
* to show or hide the appropriate dockwidget.
*/
- QPopupMenu* menu;
+ TQPopupMenu* menu;
/**
* An internal list containing data for the menuitems for the visibility popup menu.
*/
- QPtrList<MenuDockData> *menuData;
+ TQPtrList<MenuDockData> *menuData;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1319,7 +1319,7 @@ public:
* @param name internal object name
* @param f Qt::WidgetFlags widget flags
*/
- KDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ KDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructs a dockmainwindow.
@@ -1352,24 +1352,24 @@ public:
* The KDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
* The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.
*
- * @param name QObject name (default dockwidget caption)
+ * @param name TQObject name (default dockwidget caption)
* @param pixmap window icon (for instance shown when docked as tabwidget entry)
* @param parent parent widget for the new dockwidget
* @param strCaption window title (shown when toplevel)
* @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption
* @return a pointer to the new created dockwidget
*/
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readDockConfig(QDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
/**
@@ -1378,7 +1378,7 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to write to
*/
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* It reads the current dock state from the given section of KConfig.
@@ -1386,13 +1386,13 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to read from
*/
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/**
* It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
* encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
- * Additionally, if the main dockwidget is not a QDialog, it will be shown.
+ * Additionally, if the main dockwidget is not a TQDialog, it will be shown.
*/
void activateDock(){ dockManager->activate(); }
@@ -1402,7 +1402,7 @@ public:
*
* @return the wanted popup menu
*/
- QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
/**
* This method shows the given dockwidget.
@@ -1424,7 +1424,7 @@ public:
* This is an overloaded member function, provided for convenience.
* It differs from the above function only in what argument(s) it accepts.
*/
- void makeWidgetDockVisible( QWidget* widget );
+ void makeWidgetDockVisible( TQWidget* widget );
/**
* This method calls the base class method.
@@ -1432,7 +1432,7 @@ public:
*
* @param widget any widget that should become the main view
*/
- void setView( QWidget * widget );
+ void setView( TQWidget * widget );
signals:
/**
@@ -1474,7 +1474,7 @@ friend class KDockManager;
public:
- KDockArea( QWidget* parent = 0L, const char *name = 0L);
+ KDockArea( TQWidget* parent = 0L, const char *name = 0L);
virtual ~KDockArea();
@@ -1484,25 +1484,25 @@ public:
void setMainDockWidget( KDockWidget* );
KDockWidget* getMainDockWidget(){ return mainDockWidget; }
- KDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L,
- const QString& strCaption = QString::null, const QString& strTabPageLabel = QString::fromLatin1( " " ) );
+ KDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L,
+ const TQString& strCaption = TQString::null, const TQString& strTabPageLabel = TQString::fromLatin1( " " ) );
- void writeDockConfig(QDomElement &base);
- void readDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
void activateDock(){ dockManager->activate(); }
- QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
void makeDockVisible( KDockWidget* dock );
void makeDockInvisible( KDockWidget* dock );
- void makeWidgetDockVisible( QWidget* widget );
- //void setView( QWidget* );
+ void makeWidgetDockVisible( TQWidget* widget );
+ //void setView( TQWidget* );
signals:
/**
@@ -1519,7 +1519,7 @@ protected slots:
void slotDockWidgetUndocked();
public:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h
index 7c14394e..98af140f 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_p.h
@@ -37,7 +37,7 @@ COMPATIBLE. THIS HEADER IS ONLY INSTALLED, BECAUSE IT IS NEEDED IN
#define KDOCKWIDGET_P_H
#include <kdockwidget.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
// Add some describing comment !!
class KDEUI_EXPORT KDockContainer
@@ -46,24 +46,24 @@ public:
KDockContainer();
virtual ~KDockContainer();
virtual KDockWidget *parentDockWidget();
- virtual void insertWidget (KDockWidget *, QPixmap, const QString &, int &);
+ virtual void insertWidget (KDockWidget *, TQPixmap, const TQString &, int &);
virtual void showWidget(KDockWidget *);
virtual void removeWidget(KDockWidget*);
virtual void undockWidget(KDockWidget*);
- virtual void save(KConfig *cfg,const QString& group_or_prefix);
- virtual void save(QDomElement& dockElement);
- virtual void load(KConfig *cfg,const QString& group_or_prefix);
- virtual void load(QDomElement& dockElement);
- virtual void setToolTip (KDockWidget *, QString &);
- virtual void setPixmap(KDockWidget*,const QPixmap&);
- QStringList containedWidgets() const;
- virtual bool dockDragEnter(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragMove(KDockWidget* dockWidget, QMouseEvent *event);
- virtual bool dockDragLeave(KDockWidget* dockWidget, QMouseEvent *event);
+ virtual void save(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void save(TQDomElement& dockElement);
+ virtual void load(KConfig *cfg,const TQString& group_or_prefix);
+ virtual void load(TQDomElement& dockElement);
+ virtual void setToolTip (KDockWidget *, TQString &);
+ virtual void setPixmap(KDockWidget*,const TQPixmap&);
+ TQStringList containedWidgets() const;
+ virtual bool dockDragEnter(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragMove(KDockWidget* dockWidget, TQMouseEvent *event);
+ virtual bool dockDragLeave(KDockWidget* dockWidget, TQMouseEvent *event);
protected:
friend class KDockManager;
friend class KDockSplitter;
- void prepareSave(QStringList &names);
+ void prepareSave(TQStringList &names);
void activateOverlapMode(int nonOverlapSize);
void deactivateOverlapMode();
bool isOverlapMode();
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp
index 3c4783f1..4106d101 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp
@@ -20,14 +20,14 @@
#include "kdockwidget_p.h"
#include "kdockwidget_private.h"
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
-KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
-: QWidget(parent, name)
+KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
+: TQWidget(parent, name)
{
m_dontRecalc=false;
divider = 0L;
@@ -46,7 +46,7 @@ KDockSplitter::KDockSplitter(QWidget *parent, const char *name, Orientation orie
initialised = false;
}
-void KDockSplitter::activate(QWidget *c0, QWidget *c1)
+void KDockSplitter::activate(TQWidget *c0, TQWidget *c1)
{
if ( c0 ) child0 = c0;
if ( c1 ) child1 = c1;
@@ -54,15 +54,15 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1)
setupMinMaxSize();
if (divider) delete divider;
- divider = new QFrame(this, "pannerdivider");
- divider->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ divider = new TQFrame(this, "pannerdivider");
+ divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
divider->setLineWidth(1);
divider->raise();
if (m_orientation == Horizontal)
- divider->setCursor(QCursor(sizeVerCursor));
+ divider->setCursor(TQCursor(sizeVerCursor));
else
- divider->setCursor(QCursor(sizeHorCursor));
+ divider->setCursor(TQCursor(sizeHorCursor));
divider->installEventFilter(this);
@@ -76,25 +76,25 @@ void KDockSplitter::activate(QWidget *c0, QWidget *c1)
if (((KDockWidget*)child0)->forcedFixedWidth()!=-1)
{
setForcedFixedWidth(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedWidth());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize()));
}
else
if (((KDockWidget*)child1)->forcedFixedWidth()!=-1)
{
setForcedFixedWidth(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedWidth());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize()));
}
if (((KDockWidget*)child0)->forcedFixedHeight()!=-1)
{
setForcedFixedHeight(((KDockWidget*)child0),((KDockWidget*)child0)->forcedFixedHeight());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize()));
}
else
if (((KDockWidget*)child1)->forcedFixedHeight()!=-1)
{
setForcedFixedHeight(((KDockWidget*)child1),((KDockWidget*)child1)->forcedFixedHeight());
- //QTimer::singleShot(100,this,SLOT(delayedResize()));
+ //TQTimer::singleShot(100,this,TQT_SLOT(delayedResize()));
}
@@ -230,7 +230,7 @@ int KDockSplitter::separatorPos() const
return xpos;
}
-void KDockSplitter::resizeEvent(QResizeEvent *ev)
+void KDockSplitter::resizeEvent(TQResizeEvent *ev)
{
// kdDebug(282)<<"ResizeEvent :"<< ((initialised) ? "initialised":"not initialised")<<", "<< ((ev) ? "real event":"")<<
// ", "<<(isVisible() ?"visible":"")<<endl;
@@ -347,7 +347,7 @@ void KDockSplitter::resizeEvent(QResizeEvent *ev)
}
}
-int KDockSplitter::checkValueOverlapped(int position, QWidget *overlappingWidget) const {
+int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const {
if (initialised) {
if (m_orientation == Vertical) {
if (child0==overlappingWidget) {
@@ -400,15 +400,15 @@ int KDockSplitter::checkValue( int position ) const
return position;
}
-bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
+bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
{
- QMouseEvent *mev;
+ TQMouseEvent *mev;
bool handled = false;
int factor = (mHighResolution)? 10000:100;
switch (e->type()) {
- case QEvent::MouseMove:
- mev= (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize);
if (m_orientation == Horizontal) {
@@ -431,7 +431,7 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
handled=true; break;
}
if (!mOpaqueResize) {
- int position = checkValue( mapFromGlobal(QCursor::pos()).x() );
+ int position = checkValue( mapFromGlobal(TQCursor::pos()).x() );
divider->move( position, 0 );
} else {
xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
@@ -441,10 +441,10 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
}
handled= true;
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true);
- mev= (QMouseEvent*)e;
+ mev= (TQMouseEvent*)e;
if (m_orientation == Horizontal){
if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{
@@ -467,20 +467,20 @@ bool KDockSplitter::eventFilter(QObject *o, QEvent *e)
default:
break;
}
- return (handled) ? true : QWidget::eventFilter( o, e );
+ return (handled) ? true : TQWidget::eventFilter( o, e );
}
-bool KDockSplitter::event( QEvent* e )
+bool KDockSplitter::event( TQEvent* e )
{
- if ( e->type() == QEvent::LayoutHint ){
+ if ( e->type() == TQEvent::LayoutHint ){
// change children min/max size
setupMinMaxSize();
setSeparatorPos(xpos);
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QWidget* KDockSplitter::getAnother( QWidget* w ) const
+TQWidget* KDockSplitter::getAnother( TQWidget* w ) const
{
return ( w == child0 ) ? child1 : child0;
}
@@ -489,7 +489,7 @@ void KDockSplitter::updateName()
{
if ( !initialised ) return;
- QString new_name = QString( child0->name() ) + "," + child1->name();
+ TQString new_name = TQString( child0->name() ) + "," + child1->name();
parentWidget()->setName( new_name.latin1() );
parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
parentWidget()->repaint( false );
@@ -498,7 +498,7 @@ void KDockSplitter::updateName()
((KDockWidget*)parentWidget())->lastName = child1->name();
((KDockWidget*)parentWidget())->splitterOrientation = m_orientation;
- QWidget* p = parentWidget()->parentWidget();
+ TQWidget* p = parentWidget()->parentWidget();
if ( p && p->inherits("KDockSplitter" ) )
((KDockSplitter*)p)->updateName();
}
@@ -540,8 +540,8 @@ bool KDockSplitter::highResolution() const
/*************************************************************************/
-KDockButton_Private::KDockButton_Private( QWidget *parent, const char * name )
-:QPushButton( parent, name )
+KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name )
+:TQPushButton( parent, name )
{
moveMouse = false;
setFocusPolicy( NoFocus );
@@ -551,9 +551,9 @@ KDockButton_Private::~KDockButton_Private()
{
}
-void KDockButton_Private::drawButton( QPainter* p )
+void KDockButton_Private::drawButton( TQPainter* p )
{
- p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) );
+ p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) );
p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() );
if ( moveMouse && !isDown() ){
p->setPen( white );
@@ -577,13 +577,13 @@ void KDockButton_Private::drawButton( QPainter* p )
}
}
-void KDockButton_Private::enterEvent( QEvent * )
+void KDockButton_Private::enterEvent( TQEvent * )
{
moveMouse = true;
repaint();
}
-void KDockButton_Private::leaveEvent( QEvent * )
+void KDockButton_Private::leaveEvent( TQEvent * )
{
moveMouse = false;
repaint();
@@ -591,7 +591,7 @@ void KDockButton_Private::leaveEvent( QEvent * )
/*************************************************************************/
KDockWidgetPrivate::KDockWidgetPrivate()
- : QObject()
+ : TQObject()
,index(-1)
,splitPosInPercent(50)
,pendingFocusInEvent(false)
@@ -616,11 +616,11 @@ KDockWidgetPrivate::~KDockWidgetPrivate()
{
}
-void KDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w)
+void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{
if (w) {
- QWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
- if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) {
+ TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget();
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus();
}
}
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h
index 0857bd7a..4ea30bd4 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget_private.h
@@ -23,8 +23,8 @@
#ifndef KDOCKWIDGET_PRIVATE_H
#define KDOCKWIDGET_PRIVATE_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#ifndef NO_KDE2
#include <netwm_def.h>
@@ -35,7 +35,7 @@ class KDockContainer;
/**
- * Like QSplitter but specially designed for dockwidgets stuff.
+ * Like TQSplitter but specially designed for dockwidgets stuff.
* @internal
*
* @author Max Judin.
@@ -44,10 +44,10 @@ class KDEUI_EXPORT KDockSplitter : public QWidget
{
Q_OBJECT
public:
- KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
+ KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
virtual ~KDockSplitter(){};
- void activate(QWidget *c0, QWidget *c1 = 0L);
+ void activate(TQWidget *c0, TQWidget *c1 = 0L);
void deactivate();
int separatorPos() const;
@@ -63,12 +63,12 @@ public:
// ### please come up with a nicer name
void setSeparatorPosX(int pos, bool do_resize=false);
- virtual bool eventFilter(QObject *, QEvent *);
- virtual bool event( QEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+ virtual bool event( TQEvent * );
- QWidget* getFirst() const { return child0; }
- QWidget* getLast() const { return child1; }
- QWidget* getAnother( QWidget* ) const;
+ TQWidget* getFirst() const { return child0; }
+ TQWidget* getLast() const { return child1; }
+ TQWidget* getAnother( TQWidget* ) const;
void updateName();
void setOpaqueResize(bool b=true);
@@ -89,18 +89,18 @@ public:
protected:
friend class KDockContainer;
int checkValue( int ) const;
- int checkValueOverlapped( int ,QWidget*) const;
- virtual void resizeEvent(QResizeEvent *);
+ int checkValueOverlapped( int ,TQWidget*) const;
+ virtual void resizeEvent(TQResizeEvent *);
/*
protected slots:
void delayedResize();*/
private:
void setupMinMaxSize();
- QWidget *child0, *child1;
+ TQWidget *child0, *child1;
Orientation m_orientation;
bool initialised;
- QFrame* divider;
+ TQFrame* divider;
int xpos, savedXPos;
bool mOpaqueResize, mKeepSize, mHighResolution;
int fixedWidth0,fixedWidth1;
@@ -118,13 +118,13 @@ class KDEUI_EXPORT KDockButton_Private : public QPushButton
{
Q_OBJECT
public:
- KDockButton_Private( QWidget *parent=0, const char *name=0 );
+ KDockButton_Private( TQWidget *parent=0, const char *name=0 );
~KDockButton_Private();
protected:
- virtual void drawButton( QPainter * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void drawButton( TQPainter * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
private:
bool moveMouse;
@@ -150,7 +150,7 @@ public slots:
/**
* Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget.
*/
- void slotFocusEmbeddedWidget(QWidget* w = 0L);
+ void slotFocusEmbeddedWidget(TQWidget* w = 0L);
public:
enum KDockWidgetResize
@@ -169,12 +169,12 @@ public:
NET::WindowType windowType;
#endif
- QWidget *_parent;
+ TQWidget *_parent;
bool transient;
- QGuardedPtr<QWidget> container;
+ TQGuardedPtr<TQWidget> container;
- QPoint resizePos;
+ TQPoint resizePos;
bool resizing;
KDockWidgetResize resizeMode;
};
@@ -183,8 +183,8 @@ class KDEUI_EXPORT KDockWidgetHeaderPrivate
: public QObject
{
public:
- KDockWidgetHeaderPrivate( QObject* parent )
- : QObject( parent )
+ KDockWidgetHeaderPrivate( TQObject* parent )
+ : TQObject( parent )
{
forceCloseButtonHidden=false;
toDesktopButton = 0;
@@ -196,9 +196,9 @@ public:
bool showToDesktopButton;
bool topLevel;
- QPtrList<KDockButton_Private> btns;
+ TQPtrList<KDockButton_Private> btns;
bool forceCloseButtonHidden;
- QWidget *dummy;
+ TQWidget *dummy;
};
#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp
index 8074dac4..923b5537 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildarea.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdichildarea.h b/lib/compatibility/kmdi/qextmdi/kmdichildarea.h
index 3eaac559..4a074889 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildarea.h
+++ b/lib/compatibility/kmdi/qextmdi/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...
@@ -152,37 +152,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
@@ -193,8 +193,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:
/**
@@ -253,12 +253,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
@@ -288,7 +288,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/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp
index 1a30a601..5db71969 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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* pFE = new QFocusEvent( QFocusEvent::FocusIn );
- QApplication::sendEvent( qApp->mainWidget(), pFE );
+ TQFocusEvent* pFE = new TQFocusEvent( TQFocusEvent::FocusIn );
+ TQApplication::sendEvent( qApp->mainWidget(), pFE );
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/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h
index 58959a42..c6d1a618 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildfrm.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp
index 815d07d4..65d348f3 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h b/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h
index 158f76b0..4151f0c0 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildfrmcaption.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp b/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
index f09cbb3e..8fe116e1 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildview.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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 )
@@ -101,7 +101,7 @@ KMdiChildView::~KMdiChildView()
kdDebug( 760 ) << k_funcinfo << endl;
}
-void KMdiChildView::trackIconAndCaptionChanges( QWidget *view )
+void KMdiChildView::trackIconAndCaptionChanges( TQWidget *view )
{
m_trackChanges = view;
}
@@ -109,41 +109,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 );
@@ -158,13 +158,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 );
@@ -179,14 +179,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
@@ -195,16 +195,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 );
@@ -233,7 +233,7 @@ void KMdiChildView::minimize( bool bAnimate )
void KMdiChildView::showMinimized()
{
emit isMinimizedNow();
- QWidget::showMinimized();
+ TQWidget::showMinimized();
}
//slot:
@@ -261,7 +261,7 @@ void KMdiChildView::maximize( bool bAnimate )
void KMdiChildView::showMaximized()
{
emit isMaximizedNow();
- QWidget::showMaximized();
+ TQWidget::showMaximized();
}
//slot:
@@ -272,7 +272,7 @@ void KMdiChildView::maximize()
//============== restoreGeometry ================//
-QRect KMdiChildView::restoreGeometry()
+TQRect KMdiChildView::restoreGeometry()
{
if ( mdiParent() )
return mdiParent() ->restoreGeometry();
@@ -282,7 +282,7 @@ QRect KMdiChildView::restoreGeometry()
//============== setRestoreGeometry ================//
-void KMdiChildView::setRestoreGeometry( const QRect& newRestGeo )
+void KMdiChildView::setRestoreGeometry( const TQRect& newRestGeo )
{
if ( mdiParent() )
mdiParent()->setRestoreGeometry( newRestGeo );
@@ -309,7 +309,7 @@ bool KMdiChildView::isMinimized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Minimized );
else
- return QWidget::isMinimized();
+ return TQWidget::isMinimized();
}
//============== isMaximized ? ==================//
@@ -319,7 +319,7 @@ bool KMdiChildView::isMaximized() const
if ( mdiParent() )
return ( mdiParent()->state() == KMdiChildFrm::Maximized );
else
- return QWidget::isMaximized();
+ return TQWidget::isMaximized();
}
//============== restore ================//
@@ -341,7 +341,7 @@ void KMdiChildView::restore()
void KMdiChildView::showNormal()
{
emit isRestoredNow();
- QWidget::showNormal();
+ TQWidget::showNormal();
}
//=============== youAreAttached ============//
@@ -362,28 +362,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 );
@@ -391,19 +391,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 ;
@@ -456,17 +456,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 )
{
@@ -492,16 +492,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 )
@@ -518,16 +518,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 )
{
@@ -540,13 +540,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
}
@@ -561,24 +561,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
@@ -590,29 +590,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
@@ -625,15 +625,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() );
@@ -646,41 +646,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 );
@@ -713,7 +713,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,
@@ -737,7 +737,7 @@ void KMdiChildView::setMaximumSize( int maxw, int maxh )
mdiParent()->setMaximumSize( w, h );
}
- QWidget::setMaximumSize( maxw, maxh );
+ TQWidget::setMaximumSize( maxw, maxh );
}
//============= show ===============//
@@ -747,7 +747,7 @@ void KMdiChildView::show()
if ( mdiParent() )
mdiParent()->show();
- QWidget::show();
+ TQWidget::show();
}
//============= hide ===============//
@@ -757,7 +757,7 @@ void KMdiChildView::hide()
if ( mdiParent() )
mdiParent()->hide();
- QWidget::hide();
+ TQWidget::hide();
}
//============= raise ===============//
@@ -767,7 +767,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/lib/compatibility/kmdi/qextmdi/kmdichildview.h b/lib/compatibility/kmdi/qextmdi/kmdichildview.h
index fda0b95b..656c17fd 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdichildview.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdidefines.h b/lib/compatibility/kmdi/qextmdi/kmdidefines.h
index 50343235..16be290a 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdidefines.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp
index c1b1b03a..f541a824 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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();
@@ -180,7 +180,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;
@@ -212,7 +212,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 ) );
@@ -220,7 +220,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() );
@@ -228,7 +228,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;
@@ -243,11 +243,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 ( !obj )
@@ -283,21 +283,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 );
@@ -349,7 +349,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() );
}
@@ -491,16 +491,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 )
@@ -509,25 +509,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 );
@@ -541,7 +541,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 );
}
@@ -551,13 +551,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" )
@@ -585,8 +585,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() );
@@ -599,18 +599,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;
}
@@ -618,14 +618,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" );
@@ -641,23 +641,23 @@ void KMdiDockContainer::save( KConfig* cfg, const QString& group_or_prefix )
cfg->writeEntry( "separatorPos", 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() ) )
@@ -669,10 +669,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_tb->width() );
@@ -682,22 +682,22 @@ void KMdiDockContainer::load( KConfig* cfg, const QString& group_or_prefix )
m_separatorPos = cfg->readNumEntry( "separatorPos", 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 ) << 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 );
@@ -710,8 +710,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() );
@@ -724,13 +724,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 )
{
@@ -742,7 +742,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;
}
@@ -750,7 +750,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 );
}
@@ -769,8 +769,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() )
@@ -814,7 +814,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 )
@@ -835,7 +835,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/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h b/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h
index 917dac4d..e13b7371 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdidockcontainer.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp
index 8b88fb2c..b97830af 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.cpp
@@ -11,7 +11,7 @@
#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();
@@ -20,38 +20,38 @@ KMdiDocumentViewTabWidget::KMdiDocumentViewTabWidget( QWidget* parent, const cha
setHoverCloseButton( true );
#endif
- 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 );
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 );
maybeShow();
}
-void KMdiDocumentViewTabWidget::addTab ( QWidget * child, QTab * tab )
+void KMdiDocumentViewTabWidget::addTab ( TQWidget * child, TQTab * tab )
{
KTabWidget::addTab( child, tab );
showPage( child );
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 );
@@ -59,7 +59,7 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QString & lab
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 );
@@ -67,7 +67,7 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, const QIconSet & ic
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 );
@@ -75,18 +75,18 @@ void KMdiDocumentViewTabWidget::insertTab ( QWidget * child, QTab * tab, int ind
tabBar() ->repaint();
}
-void KMdiDocumentViewTabWidget::removePage ( QWidget * w )
+void KMdiDocumentViewTabWidget::removePage ( TQWidget * w )
{
KTabWidget::removePage( w );
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/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h b/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h
index b745bfa3..f24b7800 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdidocumentviewtabwidget.h
+++ b/lib/compatibility/kmdi/qextmdi/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:
diff --git a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp
index c5a7578c..471b9895 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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;
@@ -52,10 +52,10 @@ void KMdiFocusList::addWidgetTree( QWidget* w )
void KMdiFocusList::restore()
{
#if (QT_VERSION-0 >= 0x030200)
- 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 )
{
#else
- for ( QMap<QWidget*, QWidget::FocusPolicy>::iterator it = m_list.begin();it != m_list.end();++it )
+ for ( TQMap<TQWidget*, TQWidget::FocusPolicy>::iterator it = m_list.begin();it != m_list.end();++it )
{
#endif
it.key() ->setFocusPolicy( it.data() );
@@ -64,11 +64,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/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h b/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h
index fbc178d1..71e2f05c 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdifocuslist.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp
index ec00ec78..6279253b 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h b/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h
index a52db681..9c963431 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdiguiclient.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h b/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h
index 110fae7e..04c8af3b 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdilistiterator.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
index 449ce6f9..cf4c094c 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.cpp
@@ -37,31 +37,31 @@
#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>
#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"
@@ -135,7 +135,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 )
@@ -178,9 +178,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 );
@@ -189,7 +189,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 );
@@ -201,20 +201,20 @@ 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"),
#ifdef Q_WS_WIN
@@ -222,7 +222,7 @@ KMdiMainFrm::KMdiMainFrm( QWidget* parentWidget, const char* name, KMdi::MdiMode
#else
0,
#endif
- this, SLOT(closeActiveView()), actionCollection(), "window_close");
+ this, TQT_SLOT(closeActiveView()), actionCollection(), "window_close");
// the MDI view taskbar
createTaskBar();
@@ -252,12 +252,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()
@@ -275,21 +275,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 );
@@ -299,12 +299,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!
@@ -339,10 +339,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;
@@ -367,22 +367,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 );
}
@@ -393,7 +393,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() )
{
@@ -417,20 +417,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 );
@@ -462,14 +462,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 );
@@ -479,20 +479,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
{
@@ -528,7 +528,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() )
@@ -538,11 +538,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 );
}
@@ -555,7 +555,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow()
}
-void KMdiMainFrm::deleteToolWindow( QWidget* pWnd )
+void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd )
{
if ( m_pToolViews->contains( pWnd ) )
deleteToolWindow( ( *m_pToolViews ) [ pWnd ] );
@@ -567,10 +567,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 )
{
@@ -586,7 +586,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 );
@@ -610,11 +610,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() ) )
@@ -643,7 +643,7 @@ void KMdiMainFrm::attachWindow( KMdiChildView *pWnd, bool bShow, bool bAutomatic
m_pMdi->manageChild( lpC, false, bCascade );
if ( m_pMdi->topChild() && m_pMdi->topChild() ->isMaximized() )
{
- 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 );
@@ -656,8 +656,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
}
@@ -677,10 +677,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 );
@@ -691,15 +691,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
@@ -740,19 +740,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 );
}
@@ -763,7 +763,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 );
@@ -777,11 +777,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 )
@@ -849,7 +849,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 )
{
@@ -862,7 +862,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 );
@@ -879,11 +879,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 )
@@ -941,9 +941,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 )
@@ -975,7 +975,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 )
@@ -987,32 +987,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;
@@ -1110,19 +1110,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 )
@@ -1143,7 +1143,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() )
{
@@ -1153,11 +1153,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
@@ -1166,18 +1166,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() )
@@ -1196,7 +1196,7 @@ bool KMdiMainFrm::eventFilter( QObject * /*obj*/, QEvent *e )
}
}
}
- else if ( e->type() == QEvent::KeyRelease )
+ else if ( e->type() == TQEvent::KeyRelease )
{
if ( switching() )
{
@@ -1207,14 +1207,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 ) )
@@ -1239,12 +1239,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();
@@ -1258,7 +1258,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();
}
@@ -1274,7 +1274,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 )
@@ -1284,18 +1284,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() )
@@ -1315,7 +1315,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();
@@ -1329,8 +1329,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 );
@@ -1355,11 +1355,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 )
@@ -1379,7 +1379,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();
@@ -1388,7 +1388,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 );
@@ -1398,7 +1398,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 )
@@ -1422,7 +1422,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
@@ -1432,8 +1432,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 ) );
@@ -1464,8 +1464,8 @@ void KMdiMainFrm::switchToChildframeMode()
return ;
}
- QPtrList<KDockWidget> rootDockWidgetList;
- QValueList<QRect> positionList;
+ TQPtrList<KDockWidget> rootDockWidgetList;
+ TQValueList<TQRect> positionList;
if ( m_mdiMode == KMdi::TabPageMode )
{
@@ -1475,7 +1475,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();
@@ -1495,7 +1495,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();
@@ -1507,7 +1507,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 );
@@ -1530,7 +1530,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();
}
@@ -1539,7 +1539,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 );
}
@@ -1547,7 +1547,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 );
@@ -1577,14 +1577,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 );
@@ -1637,7 +1637,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();
}
@@ -1654,20 +1654,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);
@@ -1700,12 +1700,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 );
}
}
@@ -1719,20 +1719,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& ) ) );
}
}
@@ -1778,7 +1778,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() );
@@ -1787,7 +1787,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:
@@ -1862,7 +1862,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();
}
@@ -1875,9 +1875,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 );
@@ -1885,7 +1885,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() )
@@ -1937,10 +1937,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() );
@@ -1960,40 +1960,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 );
@@ -2028,22 +2028,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();
@@ -2068,22 +2068,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 );
@@ -2120,11 +2120,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();
@@ -2134,7 +2134,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 )
@@ -2146,7 +2146,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 )
{
@@ -2167,7 +2167,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 );
@@ -2199,13 +2199,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 );
@@ -2220,17 +2220,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 );
@@ -2238,17 +2238,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();
@@ -2351,7 +2351,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() );
@@ -2360,9 +2360,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;
@@ -2384,7 +2384,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() );
@@ -2393,8 +2393,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;
@@ -2436,23 +2436,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
@@ -2488,10 +2488,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();
@@ -2510,7 +2510,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 );
}
@@ -2519,18 +2519,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() ) );
}
}
@@ -2578,7 +2578,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);
@@ -2587,7 +2587,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 );
}
@@ -2595,10 +2595,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:
@@ -2622,13 +2622,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 );
@@ -2648,19 +2648,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() )
{
@@ -2678,8 +2678,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;
@@ -2690,7 +2690,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 );
@@ -2698,7 +2698,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 );
@@ -2711,7 +2711,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 );
@@ -2719,7 +2719,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 );
@@ -2780,7 +2780,7 @@ void KMdiMainFrm::dockMenuItemActivated( int id )
//================ popupWindowMenu ===============//
-void KMdiMainFrm::popupWindowMenu( QPoint p )
+void KMdiMainFrm::popupWindowMenu( TQPoint p )
{
if ( !isFakingSDIApplication() )
{
@@ -2796,7 +2796,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 );
}
}
@@ -2823,7 +2823,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/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h b/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h
index 24a956cf..9de6d8b7 100644
--- a/lib/compatibility/kmdi/qextmdi/kmdimainfrm.h
+++ b/lib/compatibility/kmdi/qextmdi/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
@@ -414,28 +414,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
@@ -472,8 +472,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; }
@@ -481,10 +481,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.
@@ -521,7 +521,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* pView, QPoint pos, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pView, TQPoint pos, int flags = KMdi::StandardAdd );
/**
* Adds a KMdiChildView to the MDI system. The main frame takes control of it.
@@ -533,17 +533,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* pView, QRect rectNormal, int flags = KMdi::StandardAdd );
+ virtual void addWindow( KMdiChildView* pView, 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 );
/**
@@ -738,7 +738,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.
@@ -756,10 +756,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();
@@ -806,7 +806,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.
@@ -837,7 +837,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();
@@ -855,7 +855,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/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp b/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp
index 2b86c0c8..71c3de45 100644
--- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmditaskbar.h b/lib/compatibility/kmdi/qextmdi/kmditaskbar.h
index f1aac814..c333070a 100644
--- a/lib/compatibility/kmdi/qextmdi/kmditaskbar.h
+++ b/lib/compatibility/kmdi/qextmdi/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 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/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp
index f9921e18..1d2cce94 100644
--- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.cpp
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h
index d5bd49a7..28241ea3 100644
--- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h b/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h
index 913b8854..ecbaa76a 100644
--- a/lib/compatibility/kmdi/qextmdi/kmditoolviewaccessor_p.h
+++ b/lib/compatibility/kmdi/qextmdi/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/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp
index 335f82db..853f8e8e 100644
--- a/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.cpp
@@ -26,28 +26,28 @@
#include "kmultitabbar.moc"
#include "kmultitabbar_p.h"
#include "kmultitabbar_p.moc"
-#include <qbutton.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
#define NEARBYINT(i) ((int(float(i) + 0.5)))
class KMultiTabBarTabPrivate {
public:
- QPixmap pix;
+ TQPixmap pix;
};
-KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent)
+KMultiTabBarInternal::KMultiTabBarInternal(TQWidget *parent, KMultiTabBar::KMultiTabBarMode bm):TQScrollView(parent)
{
m_expandedTabSize=-1;
m_showActiveTabTexts=false;
@@ -57,16 +57,16 @@ KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMulti
setVScrollBarMode(AlwaysOff);
if (bm==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedHeight(24);
setFixedHeight(24);
@@ -92,15 +92,15 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
} else if (mainLayout==0) {
if (m_barMode==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
box->setFixedHeight(24);
setFixedHeight(24);
}
@@ -113,9 +113,9 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
viewport()->repaint();
}
-void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph )
+void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph )
{
- QScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
+ TQScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
if (m_position==KMultiTabBar::Right)
{
@@ -159,12 +159,12 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy
}
-void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::contentsMousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
-void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
@@ -186,11 +186,11 @@ void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
} else {diff=0; }
-void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) {
+void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) {
/* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
- if (ev) QScrollView::resizeEvent(ev);
+ if (ev) TQScrollView::resizeEvent(ev);
if ( (m_style==KMultiTabBar::KDEV3) ||
(m_style==KMultiTabBar::KDEV3ICON) ){
@@ -328,18 +328,18 @@ void KMultiTabBarInternal::showActiveTabTexts(bool show)
KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const
{
- for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
}
-bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) {
- if (e->type()==QEvent::Resize) resizeEvent(0);
+bool KMultiTabBarInternal::eventFilter(TQObject *, TQEvent *e) {
+ if (e->type()==TQEvent::Resize) resizeEvent(0);
return false;
}
-int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text)
+int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& text)
{
KMultiTabBarTab *tab;
m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style));
@@ -382,9 +382,9 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p
}
-KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setIconSet(pic);
setText(text);
@@ -394,13 +394,13 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, Q
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
-KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setText(text);
m_position=pos;
@@ -409,8 +409,8 @@ KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
KMultiTabBarButton::~KMultiTabBarButton() {
@@ -420,11 +420,11 @@ int KMultiTabBarButton::id() const{
return m_id;
}
-void KMultiTabBarButton::setText(const QString& text)
+void KMultiTabBarButton::setText(const TQString& text)
{
- QPushButton::setText(text);
+ TQPushButton::setText(text);
m_text=text;
- QToolTip::add(this,text);
+ TQToolTip::add(this,text);
}
void KMultiTabBarButton::slotClicked()
@@ -444,20 +444,20 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
repaint();
}
-void KMultiTabBarButton::hideEvent( QHideEvent* he) {
- QPushButton::hideEvent(he);
+void KMultiTabBarButton::hideEvent( TQHideEvent* he) {
+ TQPushButton::hideEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-void KMultiTabBarButton::showEvent( QShowEvent* he) {
- QPushButton::showEvent(he);
+void KMultiTabBarButton::showEvent( TQShowEvent* he) {
+ TQPushButton::showEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-QSize KMultiTabBarButton::sizeHint() const
+TQSize KMultiTabBarButton::sizeHint() const
{
constPolish();
@@ -466,39 +466,39 @@ QSize KMultiTabBarButton::sizeHint() const
// calculate contents size...
#ifndef QT_NO_ICONSET
if ( iconSet() && !iconSet()->isNull() ) {
- int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height();
w += iw;
h = QMAX( h, ih );
}
#endif
if ( isMenuButton() )
- w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this);
+ w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this);
if ( pixmap() ) {
- QPixmap *pm = (QPixmap *)pixmap();
+ TQPixmap *pm = (TQPixmap *)pixmap();
w += pm->width();
h += pm->height();
} else {
- QString s( text() );
+ TQString s( text() );
bool empty = s.isEmpty();
if ( empty )
- s = QString::fromLatin1("XXXX");
- QFontMetrics fm = fontMetrics();
- QSize sz = fm.size( ShowPrefix, s );
+ s = TQString::fromLatin1("XXXX");
+ TQFontMetrics fm = fontMetrics();
+ TQSize sz = fm.size( ShowPrefix, s );
if(!empty || !w)
w += sz.width();
if(!empty || !h)
h = QMAX(h, sz.height());
}
- return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)).
- expandedTo(QApplication::globalStrut()));
+ return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)).
+ expandedTo(TQApplication::globalStrut()));
}
-KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
+KMultiTabBarTab::KMultiTabBarTab(const TQPixmap& pic, const TQString& text,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
KMultiTabBar::KMultiTabBarStyle style)
:KMultiTabBarButton(text,0,id,parent,pos,style),
m_showActiveTabText(false)
@@ -518,7 +518,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
{
if ((pos!=m_position) && ((pos==KMultiTabBar::Left) || (pos==KMultiTabBar::Right))) {
if (!d->pix.isNull()) {
- QWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ TQWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
temp.rotate(180);
d->pix=d->pix.xForm(temp);
setIconSet(d->pix);
@@ -529,23 +529,23 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
// repaint();
}
-void KMultiTabBarTab::setIcon(const QString& icon)
+void KMultiTabBarTab::setIcon(const TQString& icon)
{
- QPixmap pic=SmallIcon(icon);
+ TQPixmap pic=SmallIcon(icon);
setIcon(pic);
}
-void KMultiTabBarTab::setIcon(const QPixmap& icon)
+void KMultiTabBarTab::setIcon(const TQPixmap& icon)
{
if (m_style!=KMultiTabBar::KDEV3) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) {
- QWMatrix rotateMatrix;
+ TQWMatrix rotateMatrix;
if (m_position==KMultiTabBar::Left)
rotateMatrix.rotate(90);
else
rotateMatrix.rotate(-90);
- QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
+ TQPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
d->pix=pic;
setIconSet(pic);
} else setIconSet(icon);
@@ -569,10 +569,10 @@ void KMultiTabBarTab::updateState()
if (m_style!=KMultiTabBar::KONQSBC) {
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
- QPushButton::setText(m_text);
+ TQPushButton::setText(m_text);
} else {
- kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<<endl;
- QPushButton::setText(QString::null);
+ kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty TQString***************"<<endl;
+ TQPushButton::setText(TQString::null);
}
if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
@@ -598,13 +598,13 @@ void KMultiTabBarTab::updateState()
else
setFixedWidth(m_expandedSize);
}
- QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint);
- QApplication::flush();
+ TQApplication::sendPostedEvents(0,TQEvent::Paint | TQEvent::Move | TQEvent::Resize | TQEvent::LayoutHint);
+ TQApplication::flush();
}
int KMultiTabBarTab::neededSize()
{
- return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6);
+ return (((m_style!=KMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(m_text)+6);
}
void KMultiTabBarTab::setSize(int size)
@@ -618,41 +618,41 @@ void KMultiTabBarTab::showActiveTabText(bool show)
m_showActiveTabText=show;
}
-void KMultiTabBarTab::drawButtonLabel(QPainter *p) {
+void KMultiTabBarTab::drawButtonLabel(TQPainter *p) {
drawButton(p);
}
-void KMultiTabBarTab::drawButton(QPainter *paint)
+void KMultiTabBarTab::drawButton(TQPainter *paint)
{
if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint);
else drawButtonClassic(paint);
}
-void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
+void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
- QSize sh;
+ TQSize sh;
const int width = 36; // rotated
const int height = 24;
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
- sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
- else sh=QSize(this->width(),this->height());
+ sh=TQSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
+ else sh=TQSize(this->width(),this->height());
}
else
- sh=QSize(width,height);
+ sh=TQSize(width,height);
- QPixmap pixmap( sh.width(),height); ///,sh.height());
+ TQPixmap pixmap( sh.width(),height); ///,sh.height());
pixmap.fill(eraseColor());
- QPainter painter(&pixmap);
+ TQPainter painter(&pixmap);
- QStyle::SFlags st=QStyle::Style_Default;
+ TQStyle::SFlags st=TQStyle::Style_Default;
- st|=QStyle::Style_Enabled;
+ st|=TQStyle::Style_Enabled;
- if (isOn()) st|=QStyle::Style_On;
+ if (isOn()) st|=TQStyle::Style_On;
- style().drawControl(QStyle::CE_PushButton,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
- style().drawControl(QStyle::CE_PushButtonLabel,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
switch (m_position) {
case KMultiTabBar::Left:
@@ -668,17 +668,17 @@ void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
paint->drawPixmap(0,0,pixmap);
break;
}
-// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()),
-// colorGroup(),QStyle::Style_Enabled);
+// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
+// colorGroup(),TQStyle::Style_Enabled);
}
-void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
+void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( iconSet())
- pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
+ pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
paint->fillRect(0, 0, 24, 24, colorGroup().background());
if (!isOn())
@@ -686,7 +686,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
if (m_position==KMultiTabBar::Right)
{
- paint->fillRect(0,0,21,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,21,21,TQBrush(colorGroup().background()));
paint->setPen(colorGroup().background().dark(150));
paint->drawLine(0,22,23,22);
@@ -702,7 +702,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
{
- paint->fillRect(0,1,23,22,QBrush(colorGroup().background()));
+ paint->fillRect(0,1,23,22,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
@@ -723,7 +723,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
{
paint->setPen(colorGroup().background().dark(120));
paint->drawLine(0,23,23,23);
- paint->fillRect(0,0,23,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,23,21,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
paint->setPen(colorGroup().light());
@@ -746,20 +746,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->drawLine(0,height()-2,23,height()-2);
paint->drawLine(23,0,23,height()-1);
paint->drawLine(22,0,22,height()-1);
- paint->fillRect(0,0,21,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -770,12 +770,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if (m_position==KMultiTabBar::Top)
{
- paint->fillRect(0,0,width()-1,23,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
else
@@ -784,12 +784,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,23,width()-1,23);
paint->drawLine(0,22,width()-1,22);
- paint->fillRect(0,0,width()-1,21,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
@@ -800,20 +800,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,height()-1,23,height()-1);
paint->drawLine(0,height()-2,23,height()-2);
- paint->fillRect(0,0,23,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(-90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -833,19 +833,19 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
-KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name)
+KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *parent,const char *name):TQWidget(parent,name)
{
m_buttons.setAutoDelete(false);
if (bm==Vertical)
{
- m_l=new QVBoxLayout(this);
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true);
+ m_l=new TQVBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
// setFixedWidth(24);
}
else
{
- m_l=new QHBoxLayout(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true);
+ m_l=new TQHBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
// setFixedHeight(24);
}
m_l->setMargin(0);
@@ -857,9 +857,9 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
// setStyle(KDEV3);
//setStyle(KONQSBC);
m_l->insertWidget(0,m_internal);
- m_l->insertWidget(0,m_btnTabSep=new QFrame(this));
+ m_l->insertWidget(0,m_btnTabSep=new TQFrame(this));
m_btnTabSep->setFixedHeight(4);
- m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ m_btnTabSep->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
m_btnTabSep->setLineWidth(2);
m_btnTabSep->hide();
@@ -869,16 +869,16 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
KMultiTabBar::~KMultiTabBar() {
}
-/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&)
+/*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&)
{
(new KToolbarButton(pic,id,m_internal))->show();
return 0;
}*/
-int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&)
+int KMultiTabBar::appendButton(const TQPixmap &pic ,int id,TQPopupMenu *popup,const TQString&)
{
KMultiTabBarButton *btn;
- m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null,
+ m_buttons.append(btn= new KMultiTabBarButton(pic,TQString::null,
popup,id,this,m_position,m_internal->m_style));
m_l->insertWidget(0,btn);
btn->show();
@@ -888,7 +888,7 @@ int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,cons
void KMultiTabBar::updateSeparator() {
bool hideSep=true;
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->isVisibleTo(this)) {
hideSep=false;
break;
@@ -899,7 +899,7 @@ void KMultiTabBar::updateSeparator() {
}
-int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
+int KMultiTabBar::appendTab(const TQPixmap &pic ,int id ,const TQString& text)
{
m_internal->appendTab(pic,id,text);
return 0;
@@ -907,7 +907,7 @@ int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
KMultiTabBarButton* KMultiTabBar::button(int id) const
{
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
@@ -976,13 +976,13 @@ void KMultiTabBar::setPosition(KMultiTabBarPosition pos)
for (uint i=0;i<m_buttons.count();i++)
m_buttons.at(i)->setPosition(pos);
}
-void KMultiTabBar::fontChange(const QFont& /* oldFont */)
+void KMultiTabBar::fontChange(const TQFont& /* oldFont */)
{
for (uint i=0;i<tabs()->count();i++)
tabs()->at(i)->resize();
repaint();
}
-QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
-QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
+TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
+TQPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h
index 0d1a6841..a0731c01 100644
--- a/lib/compatibility/kmdi/qextmdi/kmultitabbar.h
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar.h
@@ -25,13 +25,13 @@
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
-#include <qscrollview.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -66,7 +66,7 @@ public:
*/
enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
- KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0);
+ KMultiTabBar(KMultiTabBarMode bm,TQWidget *parent=0,const char *name=0);
virtual ~KMultiTabBar();
/**
@@ -78,7 +78,7 @@ public:
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
- int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null);
+ int appendButton(const TQPixmap &pic,int id=-1,TQPopupMenu* popup=0,const TQString& not_used_yet=TQString::null);
/**
* remove a button with the given ID
*/
@@ -89,7 +89,7 @@ public:
* @param id an arbitrary ID which can be used later on to identify the tab
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
*/
- int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
+ int appendTab(const TQPixmap &pic,int id=-1,const TQString& text=TQString::null);
/**
* remove a tab with a given ID
*/
@@ -125,11 +125,11 @@ public:
/**
* be carefull, don't delete tabs yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarTab>* tabs();
+ TQPtrList<KMultiTabBarTab>* tabs();
/**
* be carefull, don't delete buttons yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarButton>* buttons();
+ TQPtrList<KMultiTabBarButton>* buttons();
/**
* might vanish, not sure yet
@@ -137,13 +137,13 @@ public:
void showActiveTabTexts(bool show=true);
protected:
friend class KMultiTabBarButton;
- virtual void fontChange( const QFont& );
+ virtual void fontChange( const TQFont& );
void updateSeparator();
private:
class KMultiTabBarInternal *m_internal;
- QBoxLayout *m_l;
- QFrame *m_btnTabSep;
- QPtrList<KMultiTabBarButton> m_buttons;
+ TQBoxLayout *m_l;
+ TQFrame *m_btnTabSep;
+ TQPtrList<KMultiTabBarButton> m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
@@ -155,10 +155,10 @@ class KUTILS_EXPORT KMultiTabBarButton: public QPushButton
{
Q_OBJECT
public:
- KMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
- KMultiTabBarButton(const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQPixmap& pic,const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarButton();
int id() const;
@@ -177,16 +177,16 @@ public slots:
/**
* modify the text of the button
*/
- void setText(const QString &);
+ void setText(const TQString &);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
- QString m_text;
- virtual void hideEvent( class QHideEvent*);
- virtual void showEvent( class QShowEvent*);
+ TQString m_text;
+ virtual void hideEvent( class TQHideEvent*);
+ virtual void showEvent( class TQShowEvent*);
private:
int m_id;
KMultiTabBarButtonPrivate *d;
@@ -207,7 +207,7 @@ class KUTILS_EXPORT KMultiTabBarTab: public KMultiTabBarButton
{
Q_OBJECT
public:
- KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
+ KMultiTabBarTab(const TQPixmap& pic,const TQString&,int id,TQWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarTab();
/**
@@ -230,17 +230,17 @@ protected:
void setSize(int);
int neededSize();
void updateState();
- virtual void drawButton(QPainter *);
- virtual void drawButtonLabel(QPainter *);
- void drawButtonStyled(QPainter *);
- void drawButtonClassic(QPainter *);
+ virtual void drawButton(TQPainter *);
+ virtual void drawButtonLabel(TQPainter *);
+ void drawButtonStyled(TQPainter *);
+ void drawButtonClassic(TQPainter *);
protected slots:
virtual void slotClicked();
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
public slots:
- virtual void setIcon(const QString&);
- virtual void setIcon(const QPixmap&);
+ virtual void setIcon(const TQString&);
+ virtual void setIcon(const TQPixmap&);
};
#endif
diff --git a/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h
index f47cc538..e4820016 100644
--- a/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h
+++ b/lib/compatibility/kmdi/qextmdi/kmultitabbar_p.h
@@ -24,26 +24,26 @@
#ifndef K_MULTI_TAB_BAR_P_H
#define K_MULTI_TAB_BAR_P_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kmultitabbar.h>
class KMultiTabBarInternal: public QScrollView
{
Q_OBJECT
public:
- KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
- int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
+ KMultiTabBarInternal(TQWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
+ int appendTab(const TQPixmap &,int=-1,const TQString& =TQString::null);
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
- QPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
+ TQPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
- QWidget *box;
- QBoxLayout *mainLayout;
- QPtrList<KMultiTabBarTab> m_tabs;
+ TQWidget *box;
+ TQBoxLayout *mainLayout;
+ TQPtrList<KMultiTabBarTab> m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
@@ -51,17 +51,17 @@ private:
int m_lines;
KMultiTabBar::KMultiTabBarMode m_barMode;
protected:
- virtual bool eventFilter(QObject *,QEvent*);
- virtual void drawContents ( QPainter *, int, int, int, int);
+ virtual bool eventFilter(TQObject *,TQEvent*);
+ virtual void drawContents ( TQPainter *, int, int, int, int);
/**
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
* in order to ignore all mouseEvents on the viewport, so that the
* parent can handle them.
*/
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
};
#endif
diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp
index d8ee58cd..e961fda1 100644
--- a/lib/compatibility/kmdi/qextmdi/ktabbar.cpp
+++ b/lib/compatibility/kmdi/qextmdi/ktabbar.cpp
@@ -18,13 +18,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
@@ -33,8 +33,8 @@
#include "ktabbar.h"
#include "ktabwidget.h"
-KTabBar::KTabBar( QWidget *parent, const char *name )
- : QTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
+KTabBar::KTabBar( TQWidget *parent, const char *name )
+ : TQTabBar( parent, name ), mReorderStartTab( -1 ), mReorderPreviousTab( -1 ),
mHoverCloseButtonTab( 0 ), mDragSwitchTab( 0 ), mHoverCloseButton( 0 ),
mHoverCloseButtonEnabled( false ), mHoverCloseButtonDelayed( true ),
mTabReorderingEnabled( false ), mTabCloseActivatePrevious( false )
@@ -42,13 +42,13 @@ KTabBar::KTabBar( QWidget *parent, const char *name )
setAcceptDrops( true );
setMouseTracking( true );
- mEnableCloseButtonTimer = new QTimer( this );
- connect( mEnableCloseButtonTimer, SIGNAL( timeout() ), SLOT( enableCloseButton() ) );
+ mEnableCloseButtonTimer = new TQTimer( this );
+ connect( mEnableCloseButtonTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( enableCloseButton() ) );
- mActivateDragSwitchTabTimer = new QTimer( this );
- connect( mActivateDragSwitchTabTimer, SIGNAL( timeout() ), SLOT( activateDragSwitchTab() ) );
+ mActivateDragSwitchTabTimer = new TQTimer( this );
+ connect( mActivateDragSwitchTabTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( activateDragSwitchTab() ) );
- connect(this, SIGNAL(layoutChanged()), SLOT(onLayoutChange()));
+ connect(this, TQT_SIGNAL(layoutChanged()), TQT_SLOT(onLayoutChange()));
}
KTabBar::~KTabBar()
@@ -59,13 +59,13 @@ KTabBar::~KTabBar()
void KTabBar::setTabEnabled( int id, bool enabled )
{
- QTab * t = tab( id );
+ TQTab * t = tab( id );
if ( t ) {
if ( t->isEnabled() != enabled ) {
t->setEnabled( enabled );
- QRect r( t->rect() );
+ TQRect r( t->rect() );
if ( !enabled && id == currentTab() && count()>1 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
if ( mTabCloseActivatePrevious )
t = tablist->at( count()-2 );
else {
@@ -85,46 +85,46 @@ void KTabBar::setTabEnabled( int id, bool enabled )
}
}
-void KTabBar::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseDoubleClick( indexOf( tab->identifier() ) ) );
return;
}
- QTabBar::mouseDoubleClickEvent( e );
+ TQTabBar::mouseDoubleClickEvent( e );
}
-void KTabBar::mousePressEvent( QMouseEvent *e )
+void KTabBar::mousePressEvent( TQMouseEvent *e )
{
if( e->button() == LeftButton ) {
mEnableCloseButtonTimer->stop();
mDragStart = e->pos();
}
else if( e->button() == RightButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) );
return;
}
}
- QTabBar::mousePressEvent( e );
+ TQTabBar::mousePressEvent( e );
}
-void KTabBar::mouseMoveEvent( QMouseEvent *e )
+void KTabBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( e->state() == LeftButton ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if ( mDragSwitchTab && tab != mDragSwitchTab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
}
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
@@ -137,11 +137,11 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
else if ( e->state() == MidButton ) {
if (mReorderStartTab==-1) {
int delay = KGlobalSettings::dndEventDelay();
- QPoint newPos = e->pos();
+ TQPoint newPos = e->pos();
if( newPos.x() > mDragStart.x()+delay || newPos.x() < mDragStart.x()-delay ||
newPos.y() > mDragStart.y()+delay || newPos.y() < mDragStart.y()-delay )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab && mTabReorderingEnabled ) {
mReorderStartTab = indexOf( tab->identifier() );
grabMouse( sizeAllCursor );
@@ -150,7 +150,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
else {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
int reorderStopTab = indexOf( tab->identifier() );
if ( mReorderStartTab!=reorderStopTab && mReorderPreviousTab!=reorderStopTab ) {
@@ -164,16 +164,16 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
if ( mHoverCloseButtonEnabled && mReorderStartTab==-1) {
- QTab *t = selectTab( e->pos() );
+ TQTab *t = selectTab( e->pos() );
if( t && t->iconSet() && t->isEnabled() ) {
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
- QRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
+ TQRect rect( 0, 0, pixmap.width() + 4, pixmap.height() +4);
int xoff = 0, yoff = 0;
// The additional offsets were found by try and error, TODO: find the rational behind them
if ( t == tab( currentTab() ) ) {
- xoff = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
- yoff = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this ) - 4;
+ xoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this ) + 3;
+ yoff = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this ) - 4;
}
else {
xoff = 7;
@@ -189,18 +189,18 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
delete mHoverCloseButton;
}
- mHoverCloseButton = new QPushButton( this );
+ mHoverCloseButton = new TQPushButton( this );
mHoverCloseButton->setIconSet( KGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) );
mHoverCloseButton->setGeometry( rect );
- QToolTip::add(mHoverCloseButton,i18n("Close this tab"));
+ TQToolTip::add(mHoverCloseButton,i18n("Close this tab"));
mHoverCloseButton->setFlat(true);
mHoverCloseButton->show();
if ( mHoverCloseButtonDelayed ) {
mHoverCloseButton->setEnabled(false);
- mEnableCloseButtonTimer->start( QApplication::doubleClickInterval(), true );
+ mEnableCloseButtonTimer->start( TQApplication::doubleClickInterval(), true );
}
mHoverCloseButtonTab = t;
- connect( mHoverCloseButton, SIGNAL( clicked() ), SLOT( closeButtonClicked() ) );
+ connect( mHoverCloseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( closeButtonClicked() ) );
return;
}
}
@@ -211,7 +211,7 @@ void KTabBar::mouseMoveEvent( QMouseEvent *e )
}
}
- QTabBar::mouseMoveEvent( e );
+ TQTabBar::mouseMoveEvent( e );
}
void KTabBar::enableCloseButton()
@@ -221,17 +221,17 @@ void KTabBar::enableCloseButton()
void KTabBar::activateDragSwitchTab()
{
- QTab *tab = selectTab( mapFromGlobal( QCursor::pos() ) );
+ TQTab *tab = selectTab( mapFromGlobal( TQCursor::pos() ) );
if ( tab && mDragSwitchTab == tab )
setCurrentTab( mDragSwitchTab );
mDragSwitchTab = 0;
}
-void KTabBar::mouseReleaseEvent( QMouseEvent *e )
+void KTabBar::mouseReleaseEvent( TQMouseEvent *e )
{
if( e->button() == MidButton ) {
if ( mReorderStartTab==-1 ) {
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
emit( mouseMiddleClick( indexOf( tab->identifier() ) ) );
return;
@@ -244,42 +244,42 @@ void KTabBar::mouseReleaseEvent( QMouseEvent *e )
mReorderPreviousTab=-1;
}
}
- QTabBar::mouseReleaseEvent( e );
+ TQTabBar::mouseReleaseEvent( e );
}
-void KTabBar::dragMoveEvent( QDragMoveEvent *e )
+void KTabBar::dragMoveEvent( TQDragMoveEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
bool accept = false;
// The receivers of the testCanDecode() signal has to adjust
// 'accept' accordingly.
emit testCanDecode( e, accept);
- if ( accept && tab != QTabBar::tab( currentTab() ) ) {
+ if ( accept && tab != TQTabBar::tab( currentTab() ) ) {
mDragSwitchTab = tab;
- mActivateDragSwitchTabTimer->start( QApplication::doubleClickInterval()*2, true );
+ mActivateDragSwitchTabTimer->start( TQApplication::doubleClickInterval()*2, true );
}
e->accept( accept );
return;
}
e->accept( false );
- QTabBar::dragMoveEvent( e );
+ TQTabBar::dragMoveEvent( e );
}
-void KTabBar::dropEvent( QDropEvent *e )
+void KTabBar::dropEvent( TQDropEvent *e )
{
- QTab *tab = selectTab( e->pos() );
+ TQTab *tab = selectTab( e->pos() );
if( tab ) {
mActivateDragSwitchTabTimer->stop();
mDragSwitchTab = 0;
emit( receivedDropEvent( indexOf( tab->identifier() ) , e ) );
return;
}
- QTabBar::dropEvent( e );
+ TQTabBar::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabBar::wheelEvent( QWheelEvent *e )
+void KTabBar::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -288,16 +288,16 @@ void KTabBar::wheelEvent( QWheelEvent *e )
}
#endif
-void KTabBar::setTabColor( int id, const QColor& color )
+void KTabBar::setTabColor( int id, const TQColor& color )
{
- QTab *t = tab( id );
+ TQTab *t = tab( id );
if ( t ) {
mTabColors.insert( id, color );
repaint( t->rect(), false );
}
}
-const QColor &KTabBar::tabColor( int id ) const
+const TQColor &KTabBar::tabColor( int id ) const
{
if ( mTabColors.contains( id ) )
return mTabColors[id];
@@ -305,43 +305,43 @@ const QColor &KTabBar::tabColor( int id ) const
return colorGroup().foreground();
}
-int KTabBar::insertTab( QTab *t, int index )
+int KTabBar::insertTab( TQTab *t, int index )
{
- int res = QTabBar::insertTab( t, index );
+ int res = TQTabBar::insertTab( t, index );
if ( mTabCloseActivatePrevious && count() > 2 ) {
- QPtrList<QTab> *tablist = tabList();
+ TQPtrList<TQTab> *tablist = tabList();
tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) );
}
return res;
}
-void KTabBar::removeTab( QTab *t )
+void KTabBar::removeTab( TQTab *t )
{
mTabColors.remove( t->identifier() );
- QTabBar::removeTab( t );
+ TQTabBar::removeTab( t );
}
-void KTabBar::paintLabel( QPainter *p, const QRect& br,
- QTab *t, bool has_focus ) const
+void KTabBar::paintLabel( TQPainter *p, const TQRect& br,
+ TQTab *t, bool has_focus ) const
{
- QRect r = br;
+ TQRect r = br;
bool selected = currentTab() == t->identifier();
if ( t->iconSet() ) {
// the tab has an iconset, draw it in the right mode
- QIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
- ? QIconSet::Normal : QIconSet::Disabled;
- if ( mode == QIconSet::Normal && has_focus )
- mode = QIconSet::Active;
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
+ TQIconSet::Mode mode = ( t->isEnabled() && isEnabled() )
+ ? TQIconSet::Normal : TQIconSet::Disabled;
+ if ( mode == TQIconSet::Normal && has_focus )
+ mode = TQIconSet::Active;
+ TQPixmap pixmap = t->iconSet()->pixmap( TQIconSet::Small, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
r.setLeft( r.left() + pixw + 4 );
r.setRight( r.right() + 2 );
- int inactiveXShift = style().pixelMetric( QStyle::PM_TabBarTabShiftHorizontal, this );
- int inactiveYShift = style().pixelMetric( QStyle::PM_TabBarTabShiftVertical, this );
+ int inactiveXShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftHorizontal, this );
+ int inactiveYShift = style().pixelMetric( TQStyle::PM_TabBarTabShiftVertical, this );
int right = t->text().isEmpty() ? br.right() - pixw : br.left() + 2;
@@ -350,20 +350,20 @@ void KTabBar::paintLabel( QPainter *p, const QRect& br,
pixmap );
}
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() && t->isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( has_focus )
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
- QColorGroup cg( colorGroup() );
+ TQColorGroup cg( colorGroup() );
if ( mTabColors.contains( t->identifier() ) )
- cg.setColor( QColorGroup::Foreground, mTabColors[t->identifier()] );
+ cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] );
- style().drawControl( QStyle::CE_TabBarLabel, p, this, r,
+ style().drawControl( TQStyle::CE_TabBarLabel, p, this, r,
t->isEnabled() ? cg : palette().disabled(),
- flags, QStyleOption(t) );
+ flags, TQStyleOption(t) );
}
bool KTabBar::isTabReorderingEnabled() const
diff --git a/lib/compatibility/kmdi/qextmdi/ktabbar.h b/lib/compatibility/kmdi/qextmdi/ktabbar.h
index 2ea300db..c8f81169 100644
--- a/lib/compatibility/kmdi/qextmdi/ktabbar.h
+++ b/lib/compatibility/kmdi/qextmdi/ktabbar.h
@@ -21,7 +21,7 @@
#ifndef KTABBAR_H
#define KTABBAR_H
-#include <qtabbar.h>
+#include <tqtabbar.h>
#include <kdelibs_export.h>
@@ -37,16 +37,16 @@ class KDEUI_EXPORT KTabBar: public QTabBar
Q_OBJECT
public:
- KTabBar( QWidget* parent=0, const char* name=0 );
+ KTabBar( TQWidget* parent=0, const char* name=0 );
virtual ~KTabBar();
virtual void setTabEnabled( int, bool );
- const QColor &tabColor( int ) const;
- void setTabColor( int, const QColor& );
+ const TQColor &tabColor( int ) const;
+ void setTabColor( int, const TQColor& );
- virtual int insertTab( QTab *, int index = -1 );
- virtual void removeTab( QTab * );
+ virtual int insertTab( TQTab *, int index = -1 );
+ virtual void removeTab( TQTab * );
void setTabReorderingEnabled( bool enable );
bool isTabReorderingEnabled() const;
@@ -61,12 +61,12 @@ public:
bool tabCloseActivatePrevious() const;
signals:
- void contextMenu( int, const QPoint & );
+ void contextMenu( int, const TQPoint & );
void mouseDoubleClick( int );
void mouseMiddleClick( int );
void initiateDrag( int );
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
- void receivedDropEvent( int, QDropEvent * );
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
+ void receivedDropEvent( int, TQDropEvent * );
void moveTab( int, int );
void closeRequest( int );
#ifndef QT_NO_WHEELEVENT
@@ -74,18 +74,18 @@ signals:
#endif
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void dragMoveEvent( QDragMoveEvent *e );
- virtual void dropEvent( QDropEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
- virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
+ virtual void paintLabel( TQPainter*, const TQRect&, TQTab*, bool ) const;
protected slots:
virtual void closeButtonClicked();
@@ -94,13 +94,13 @@ protected slots:
virtual void activateDragSwitchTab();
private:
- QPoint mDragStart;
+ TQPoint mDragStart;
int mReorderStartTab;
int mReorderPreviousTab;
- QMap<int, QColor> mTabColors;
- QTab *mHoverCloseButtonTab, *mDragSwitchTab;
- QPushButton *mHoverCloseButton;
- QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
+ TQMap<int, TQColor> mTabColors;
+ TQTab *mHoverCloseButtonTab, *mDragSwitchTab;
+ TQPushButton *mHoverCloseButton;
+ TQTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
bool mHoverCloseButtonEnabled;
bool mHoverCloseButtonDelayed;
diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
index af73e013..21ed3e82 100644
--- a/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqstyle.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -37,7 +37,7 @@ public:
//holds the full names of the tab, otherwise all we
//know about is the shortened name
- QStringList m_tabNames;
+ TQStringList m_tabNames;
KTabWidgetPrivate() {
m_automaticResizeTabs = false;
@@ -48,23 +48,23 @@ public:
}
};
-KTabWidget::KTabWidget( QWidget *parent, const char *name, WFlags f )
- : QTabWidget( parent, name, f )
+KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f )
+ : TQTabWidget( parent, name, f )
{
d = new KTabWidgetPrivate;
setTabBar( new KTabBar(this, "tabbar") );
setAcceptDrops( true );
- connect(tabBar(), SIGNAL(contextMenu( int, const QPoint & )), SLOT(contextMenu( int, const QPoint & )));
- connect(tabBar(), SIGNAL(mouseDoubleClick( int )), SLOT(mouseDoubleClick( int )));
- connect(tabBar(), SIGNAL(mouseMiddleClick( int )), SLOT(mouseMiddleClick( int )));
- connect(tabBar(), SIGNAL(initiateDrag( int )), SLOT(initiateDrag( int )));
- connect(tabBar(), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )), SIGNAL(testCanDecode(const QDragMoveEvent *, bool & )));
- connect(tabBar(), SIGNAL(receivedDropEvent( int, QDropEvent * )), SLOT(receivedDropEvent( int, QDropEvent * )));
- connect(tabBar(), SIGNAL(moveTab( int, int )), SLOT(moveTab( int, int )));
- connect(tabBar(), SIGNAL(closeRequest( int )), SLOT(closeRequest( int )));
+ connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & )));
+ connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int )));
+ connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int )));
+ connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )));
+ connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * )));
+ connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int )));
+ connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int )));
#ifndef QT_NO_WHEELEVENT
- connect(tabBar(), SIGNAL(wheelDelta( int )), SLOT(wheelDelta( int )));
+ connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int )));
#endif
}
@@ -73,19 +73,19 @@ KTabWidget::~KTabWidget()
delete d;
}
-void KTabWidget::insertTab( QWidget *child, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQString &label, int index )
{
- QTabWidget::insertTab( child, label, index );
+ TQTabWidget::insertTab( child, label, index );
}
-void KTabWidget::insertTab( QWidget *child, const QIconSet& iconset, const QString &label, int index )
+void KTabWidget::insertTab( TQWidget *child, const TQIconSet& iconset, const TQString &label, int index )
{
- QTabWidget::insertTab( child, iconset, label, index );
+ TQTabWidget::insertTab( child, iconset, label, index );
}
-void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
+void KTabWidget::insertTab( TQWidget *child, TQTab *tab, int index )
{
- QTabWidget::insertTab( child, tab, index);
+ TQTabWidget::insertTab( child, tab, index);
if ( d->m_automaticResizeTabs ) {
if ( index < 0 || index >= count() ) {
d->m_tabNames.append( tab->text() );
@@ -100,8 +100,8 @@ void KTabWidget::insertTab( QWidget *child, QTab *tab, int index )
void KTabWidget::setTabBarHidden( bool hide )
{
- QWidget *rightcorner = this->cornerWidget( TopRight );
- QWidget *leftcorner = this->cornerWidget( TopLeft );
+ TQWidget *rightcorner = this->cornerWidget( TopRight );
+ TQWidget *leftcorner = this->cornerWidget( TopLeft );
if ( hide ) {
if ( leftcorner ) leftcorner->hide();
@@ -119,21 +119,21 @@ bool KTabWidget::isTabBarHidden() const
return !( tabBar()->isVisible() );
}
-void KTabWidget::setTabColor( QWidget *w, const QColor& color )
+void KTabWidget::setTabColor( TQWidget *w, const TQColor& color )
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
static_cast<KTabBar*>(tabBar())->setTabColor( t->identifier(), color );
}
}
-QColor KTabWidget::tabColor( QWidget *w ) const
+TQColor KTabWidget::tabColor( TQWidget *w ) const
{
- QTab *t = tabBar()->tabAt( indexOf( w ) );
+ TQTab *t = tabBar()->tabAt( indexOf( w ) );
if (t) {
return static_cast<KTabBar*>(tabBar())->tabColor( t->identifier() );
} else {
- return QColor();
+ return TQColor();
}
}
@@ -160,30 +160,30 @@ bool KTabWidget::tabCloseActivatePrevious() const
unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength )
{
int hframe, overlap;
- hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, tabBar() );
- overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, tabBar() );
+ hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, tabBar() );
+ overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, tabBar() );
- QFontMetrics fm = tabBar()->fontMetrics();
+ TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0;
for( int i=0; i < count(); ++i ) {
- QString newTitle = d->m_tabNames[ i ];
+ TQString newTitle = d->m_tabNames[ i ];
newTitle = KStringHandler::rsqueeze( newTitle, maxLength ).leftJustify( d->m_minLength, ' ' );
- QTab* tab = tabBar()->tabAt( i );
+ TQTab* tab = tabBar()->tabAt( i );
int lw = fm.width( newTitle );
int iw = 0;
if ( tab->iconSet() )
- iw = tab->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this,
- QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ),
- QStyleOption( tab ) ) ).width();
+ iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this,
+ TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ),
+ TQStyleOption( tab ) ) ).width();
}
return x;
}
-void KTabWidget::changeTab( QWidget *w, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQString &label )
{
- QTabWidget::changeTab( w, label );
+ TQTabWidget::changeTab( w, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -193,9 +193,9 @@ void KTabWidget::changeTab( QWidget *w, const QString &label )
}
}
-void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &label )
+void KTabWidget::changeTab( TQWidget *w, const TQIconSet &iconset, const TQString &label )
{
- QTabWidget::changeTab( w, iconset, label );
+ TQTabWidget::changeTab( w, iconset, label );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -205,34 +205,34 @@ void KTabWidget::changeTab( QWidget *w, const QIconSet &iconset, const QString &
}
}
-QString KTabWidget::label( int index ) const
+TQString KTabWidget::label( int index ) const
{
if ( d->m_automaticResizeTabs ) {
if ( index >= 0 && index < count() )
return d->m_tabNames[ index ];
else
- return QString::null;
+ return TQString::null;
}
else
- return QTabWidget::label( index );
+ return TQTabWidget::label( index );
}
-QString KTabWidget::tabLabel( QWidget * w ) const
+TQString KTabWidget::tabLabel( TQWidget * w ) const
{
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index == -1 )
- return QString::null;
+ return TQString::null;
else
return d->m_tabNames[ index ];
}
else
- return QTabWidget::tabLabel( w );
+ return TQTabWidget::tabLabel( w );
}
-void KTabWidget::setTabLabel( QWidget *w, const QString &l )
+void KTabWidget::setTabLabel( TQWidget *w, const TQString &l )
{
- QTabWidget::setTabLabel( w, l );
+ TQTabWidget::setTabLabel( w, l );
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 ) {
@@ -278,7 +278,7 @@ void KTabWidget::resizeTabs( int changeTabIndex )
void KTabWidget::updateTab( int index )
{
- QString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : QTabWidget::label( index );
+ TQString title = d->m_automaticResizeTabs ? d->m_tabNames[ index ] : TQTabWidget::label( index );
removeTabToolTip( page( index ) );
if ( title.length() > d->m_CurrentMaxLength )
setTabToolTip( page( index ), title );
@@ -286,11 +286,11 @@ void KTabWidget::updateTab( int index )
title = KStringHandler::rsqueeze( title, d->m_CurrentMaxLength ).leftJustify( d->m_minLength, ' ' );
title.replace( '&', "&&" );
- if ( QTabWidget::label( index ) != title )
- QTabWidget::setTabLabel( page( index ), title );
+ if ( TQTabWidget::label( index ) != title )
+ TQTabWidget::setTabLabel( page( index ), title );
}
-void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
+void KTabWidget::dragMoveEvent( TQDragMoveEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
bool accept = false;
@@ -301,20 +301,20 @@ void KTabWidget::dragMoveEvent( QDragMoveEvent *e )
return;
}
e->accept( false );
- QTabWidget::dragMoveEvent( e );
+ TQTabWidget::dragMoveEvent( e );
}
-void KTabWidget::dropEvent( QDropEvent *e )
+void KTabWidget::dropEvent( TQDropEvent *e )
{
if ( isEmptyTabbarSpace( e->pos() ) ) {
emit ( receivedDropEvent( e ) );
return;
}
- QTabWidget::dropEvent( e );
+ TQTabWidget::dropEvent( e );
}
#ifndef QT_NO_WHEELEVENT
-void KTabWidget::wheelEvent( QWheelEvent *e )
+void KTabWidget::wheelEvent( TQWheelEvent *e )
{
if ( e->orientation() == Horizontal )
return;
@@ -342,7 +342,7 @@ void KTabWidget::wheelDelta( int delta )
}
#endif
-void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
+void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{
if( e->button() != LeftButton )
return;
@@ -351,10 +351,10 @@ void KTabWidget::mouseDoubleClickEvent( QMouseEvent *e )
emit( mouseDoubleClick() );
return;
}
- QTabWidget::mouseDoubleClickEvent( e );
+ TQTabWidget::mouseDoubleClickEvent( e );
}
-void KTabWidget::mousePressEvent( QMouseEvent *e )
+void KTabWidget::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) {
@@ -367,10 +367,10 @@ void KTabWidget::mousePressEvent( QMouseEvent *e )
return;
}
}
- QTabWidget::mousePressEvent( e );
+ TQTabWidget::mousePressEvent( e );
}
-void KTabWidget::receivedDropEvent( int index, QDropEvent *e )
+void KTabWidget::receivedDropEvent( int index, TQDropEvent *e )
{
emit( receivedDropEvent( page( index ), e ) );
}
@@ -380,7 +380,7 @@ void KTabWidget::initiateDrag( int index )
emit( initiateDrag( page( index ) ) );
}
-void KTabWidget::contextMenu( int index, const QPoint &p )
+void KTabWidget::contextMenu( int index, const TQPoint &p )
{
emit( contextMenu( page( index ), p ) );
}
@@ -397,25 +397,25 @@ void KTabWidget::mouseMiddleClick( int index )
void KTabWidget::moveTab( int from, int to )
{
- QString tablabel = label( from );
- QWidget *w = page( from );
- QColor color = tabColor( w );
- QIconSet tabiconset = tabIconSet( w );
- QString tabtooltip = tabToolTip( w );
+ TQString tablabel = label( from );
+ TQWidget *w = page( from );
+ TQColor color = tabColor( w );
+ TQIconSet tabiconset = tabIconSet( w );
+ TQString tabtooltip = tabToolTip( w );
bool current = ( w == currentPage() );
bool enabled = isTabEnabled( w );
blockSignals(true);
removePage( w );
// Work-around kmdi brain damage which calls showPage() in insertTab()
- QTab * t = new QTab();
+ TQTab * t = new TQTab();
t->setText(tablabel);
- QTabWidget::insertTab( w, t, to );
+ TQTabWidget::insertTab( w, t, to );
if ( d->m_automaticResizeTabs ) {
if ( to < 0 || to >= count() )
- d->m_tabNames.append( QString::null );
+ d->m_tabNames.append( TQString::null );
else
- d->m_tabNames.insert( d->m_tabNames.at( to ), QString::null );
+ d->m_tabNames.insert( d->m_tabNames.at( to ), TQString::null );
}
w = page( to );
@@ -430,29 +430,29 @@ void KTabWidget::moveTab( int from, int to )
emit ( movedTab( from, to ) );
}
-void KTabWidget::removePage( QWidget * w ) {
+void KTabWidget::removePage( TQWidget * w ) {
if ( d->m_automaticResizeTabs ) {
int index = indexOf( w );
if ( index != -1 )
d->m_tabNames.remove( d->m_tabNames.at( index ) );
}
- QTabWidget::removePage( w );
+ TQTabWidget::removePage( w );
if ( d->m_automaticResizeTabs )
resizeTabs();
}
-bool KTabWidget::isEmptyTabbarSpace( const QPoint &p ) const
+bool KTabWidget::isEmptyTabbarSpace( const TQPoint &p ) const
{
- QPoint point( p );
- QSize size( tabBar()->sizeHint() );
+ TQPoint point( p );
+ TQSize size( tabBar()->sizeHint() );
if ( ( tabPosition()==Top && point.y()< size.height() ) || ( tabPosition()==Bottom && point.y()>(height()-size.height() ) ) ) {
- QWidget *rightcorner = cornerWidget( TopRight );
+ TQWidget *rightcorner = cornerWidget( TopRight );
if ( rightcorner ) {
if ( point.x()>=width()-rightcorner->width() )
return false;
}
- QWidget *leftcorner = cornerWidget( TopLeft );
+ TQWidget *leftcorner = cornerWidget( TopLeft );
if ( leftcorner ) {
if ( point.x()<=leftcorner->width() )
return false;
@@ -460,7 +460,7 @@ bool KTabWidget::isEmptyTabbarSpace( const QPoint &p ) const
}
if ( tabPosition()==Bottom )
point.setY( point.y()-( height()-size.height() ) );
- QTab *tab = tabBar()->selectTab( point);
+ TQTab *tab = tabBar()->selectTab( point);
if( !tab )
return true;
}
@@ -514,9 +514,9 @@ void KTabWidget::closeRequest( int index )
emit( closeRequest( page( index ) ) );
}
-void KTabWidget::resizeEvent( QResizeEvent *e )
+void KTabWidget::resizeEvent( TQResizeEvent *e )
{
- QTabWidget::resizeEvent( e );
+ TQTabWidget::resizeEvent( e );
resizeTabs();
}
diff --git a/lib/compatibility/kmdi/qextmdi/ktabwidget.h b/lib/compatibility/kmdi/qextmdi/ktabwidget.h
index 634dcda3..3a686fa3 100644
--- a/lib/compatibility/kmdi/qextmdi/ktabwidget.h
+++ b/lib/compatibility/kmdi/qextmdi/ktabwidget.h
@@ -21,8 +21,8 @@
#ifndef KTABWIDGET_H
#define KTABWIDGET_H
-#include <qtabwidget.h>
-#include <qstringlist.h>
+#include <tqtabwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ class KDEUI_EXPORT KTabWidget : public QTabWidget
Q_PROPERTY( bool automaticResizeTabs READ automaticResizeTabs WRITE setAutomaticResizeTabs )
public:
- KTabWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destructor.
*/
@@ -51,8 +51,8 @@ public:
/*!
Set the tab of the given widget to \a color.
*/
- void setTabColor( QWidget *, const QColor& color );
- QColor tabColor( QWidget * ) const;
+ void setTabColor( TQWidget *, const TQColor& color );
+ TQColor tabColor( TQWidget * ) const;
/*!
Returns true if tab ordering with the middle mouse button
@@ -102,42 +102,42 @@ public:
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, const QString &, int index = -1 );
+ virtual void insertTab( TQWidget *, const TQString &, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- 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 );
/*!
Reimplemented for internal reasons.
*/
- virtual void insertTab( QWidget *, QTab *, int index = -1 );
+ virtual void insertTab( TQWidget *, TQTab *, int index = -1 );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *, const QString & );
+ void changeTab( TQWidget *, const TQString & );
/*!
Reimplemented for internal reasons.
*/
- void changeTab( QWidget *child, const QIconSet& iconset, const QString &label );
+ void changeTab( TQWidget *child, const TQIconSet& iconset, const TQString &label );
/*!
Reimplemented for internal reasons.
*/
- QString label( int ) const;
+ TQString label( int ) const;
/*!
Reimplemented for internal reasons.
*/
- QString tabLabel( QWidget * ) const;
+ TQString tabLabel( TQWidget * ) const;
/*!
Reimplemented for internal reasons.
*/
- void setTabLabel( QWidget *, const QString & );
+ void setTabLabel( TQWidget *, const TQString & );
public slots:
/*!
@@ -150,13 +150,13 @@ public slots:
Removes the widget, reimplemented for
internal reasons (keeping labels in sync).
*/
- virtual void removePage ( QWidget * w );
+ virtual void removePage ( TQWidget * w );
/*!
If \a enable is true, tab reordering with middle button will be enabled.
Note that once enabled you shouldn't rely on previously queried
- currentPageIndex() or indexOf( QWidget * ) values anymore.
+ currentPageIndex() or indexOf( TQWidget * ) values anymore.
You can connect to signal movedTab(int, int) which will notify
you from which index to which index a tab has been moved.
@@ -165,7 +165,7 @@ public slots:
/*!
If \a enable is true, a close button will be shown on mouse hover
- over tab icons which will emit signal closeRequest( QWidget * )
+ over tab icons which will emit signal closeRequest( TQWidget * )
when pressed.
*/
void setHoverCloseButton( bool enable );
@@ -186,7 +186,7 @@ public slots:
/*!
If \a enable is true, tabs will be resized to the width of the tab bar.
- Does not work reliable with "QTabWidget* foo=new KTabWidget()" and if
+ Does not work reliable with "TQTabWidget* foo=new KTabWidget()" and if
you change tabs via the tabbar or by accessing tabs directly.
@since 3.4
*/
@@ -196,34 +196,34 @@ signals:
/*!
Connect to this and set accept to true if you can and want to decode the event.
*/
- void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
+ void testCanDecode(const TQDragMoveEvent *e, bool &accept /* result */);
/*!
Received an event in the empty space beside tabbar. Usually creates a new tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QDropEvent * );
+ void receivedDropEvent( TQDropEvent * );
/*!
Received an drop event on given widget's tab.
This signal is only possible after testCanDecode and positive accept result.
*/
- void receivedDropEvent( QWidget *, QDropEvent * );
+ void receivedDropEvent( TQWidget *, TQDropEvent * );
/*!
Request to start a drag operation on the given tab.
*/
- void initiateDrag( QWidget * );
+ void initiateDrag( TQWidget * );
/*!
The right mouse button was pressed over empty space besides tabbar.
*/
- void contextMenu( const QPoint & );
+ void contextMenu( const TQPoint & );
/*!
The right mouse button was pressed over a widget.
*/
- void contextMenu( QWidget *, const QPoint & );
+ void contextMenu( TQWidget *, const TQPoint & );
/*!
A tab was moved from first to second index. This signal is only
@@ -240,7 +240,7 @@ signals:
/*!
A double left mouse button click was performed over the widget.
*/
- void mouseDoubleClick( QWidget * );
+ void mouseDoubleClick( TQWidget * );
/*!
A middle mouse button click was performed over empty space besides tabbar.
@@ -250,29 +250,29 @@ signals:
/*!
A middle mouse button click was performed over the widget.
*/
- void mouseMiddleClick( QWidget * );
+ void mouseMiddleClick( TQWidget * );
/*!
The close button of a widget's tab was clicked. This signal is
only possible after you have called setHoverCloseButton( true ).
*/
- void closeRequest( QWidget * );
+ void closeRequest( TQWidget * );
protected:
- virtual void mouseDoubleClickEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void dragMoveEvent( QDragMoveEvent * );
- virtual void dropEvent( QDropEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void dragMoveEvent( TQDragMoveEvent * );
+ virtual void dropEvent( TQDropEvent * );
unsigned int tabBarWidthForMaxChars( uint maxLength );
#ifndef QT_NO_WHEELEVENT
- virtual void wheelEvent( QWheelEvent *e );
+ virtual void wheelEvent( TQWheelEvent *e );
#endif
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
protected slots:
- virtual void receivedDropEvent( int, QDropEvent * );
+ virtual void receivedDropEvent( int, TQDropEvent * );
virtual void initiateDrag( int );
- virtual void contextMenu( int, const QPoint & );
+ virtual void contextMenu( int, const TQPoint & );
virtual void mouseDoubleClick( int );
virtual void mouseMiddleClick( int );
virtual void closeRequest( int );
@@ -281,7 +281,7 @@ protected slots:
#endif
private:
- bool isEmptyTabbarSpace( const QPoint & ) const;
+ bool isEmptyTabbarSpace( const TQPoint & ) const;
void resizeTabs( int changedTabIndex = -1 );
void updateTab( int index );