summaryrefslogtreecommitdiffstats
path: root/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kdockwidget.cpp')
-rw-r--r--lib/compatibility/kmdi/qextmdi/kdockwidget.cpp684
1 files changed, 343 insertions, 341 deletions
diff --git a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
index 32a5eaf0..fdb463dc 100644
--- a/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
+++ b/lib/compatibility/kmdi/qextmdi/kdockwidget.cpp
@@ -43,7 +43,7 @@
#include <kglobalsettings.h>
#include "config.h"
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#include <X11/X.h>
#include <X11/Xlib.h>
#endif
@@ -99,8 +99,8 @@ static const char* const not_close_xpm[]={
*
* @author Max Judin.
*/
-KDockMainWindow::KDockMainWindow( TQWidget* parent, const char *name, WFlags f)
-:KMainWindow( parent, name, f )
+KDockMainWindow::KDockMainWindow( TQWidget* tqparent, const char *name, WFlags f)
+:KMainWindow( tqparent, name, f )
{
TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
@@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
- if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
+ if ( TQT_BASE_OBJECT(view->tqparent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
}
#ifndef NO_KDE2
@@ -132,9 +132,9 @@ void KDockMainWindow::setView( TQWidget *view )
#endif
}
-KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
+KDockWidget* KDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel)
{
- return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
+ return new KDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel );
}
void KDockMainWindow::makeDockVisible( KDockWidget* dock )
@@ -185,15 +185,15 @@ void KDockMainWindow::slotDockWidgetUndocked()
}
/*************************************************************************/
-KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
-:TQFrame( parent, name )
+KDockWidgetAbstractHeaderDrag::KDockWidgetAbstractHeaderDrag( KDockWidgetAbstractHeader* tqparent, KDockWidget* dock, const char* name )
+:TQFrame( tqparent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
}
/*************************************************************************/
-KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
-:KDockWidgetAbstractHeaderDrag( parent, dock, name )
+KDockWidgetHeaderDrag::KDockWidgetHeaderDrag( KDockWidgetAbstractHeader* tqparent, KDockWidget* dock, const char* name )
+:KDockWidgetAbstractHeaderDrag( tqparent, dock, name )
{
}
@@ -203,38 +203,38 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
paint.begin( this );
- style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
+ tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup());
paint.end();
}
/*************************************************************************/
-KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* parent, const char* name )
-:TQFrame( parent, name )
+KDockWidgetAbstractHeader::KDockWidgetAbstractHeader( KDockWidget* tqparent, const char* name )
+:TQFrame( tqparent, name )
{
}
/*************************************************************************/
-KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
-:KDockWidgetAbstractHeader( parent, name )
+KDockWidgetHeader::KDockWidgetHeader( KDockWidget* tqparent, const char* name )
+:KDockWidgetAbstractHeader( tqparent, name )
{
#ifdef BORDERLESS_WINDOWS
setCursor(TQCursor(ArrowCursor));
#endif
- d = new KDockWidgetHeaderPrivate( this );
+ d = new KDockWidgetHeaderPrivate( TQT_TQOBJECT(this) );
- layout = new TQHBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
+ tqlayout = new TQHBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
- drag = new KDockWidgetHeaderDrag( this, parent );
+ drag = new KDockWidgetHeaderDrag( this, tqparent );
closeButton = new KDockButton_Private( this, "DockCloseButton" );
TQToolTip::add( closeButton, i18n("Close") );
- closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
+ closeButton->setPixmap( tqstyle().stylePixmap (TQStyle::SP_TitleBarCloseButton , this));
closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
- connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
+ connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(undock()));
stayButton = new KDockButton_Private( this, "DockStayButton" );
- TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") );
+ TQToolTip::add( stayButton, i18n("Freeze the window tqgeometry", "Freeze") );
stayButton->setToggleButton( true );
stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
@@ -244,36 +244,36 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name )
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, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(dockBack()));
d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" );
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, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
+ connect( d->toDesktopButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(toDesktop()));
stayButton->hide();
d->dummy = new TQWidget( this );
d->dummy->setFixedSize( 1,closeButton->pixmap()->height() );
- layout->addWidget( drag );
- layout->addWidget( dockbackButton );
- layout->addWidget( d->toDesktopButton );
- layout->addWidget( d->dummy);
- layout->addWidget( stayButton );
- layout->addWidget( closeButton );
- layout->activate();
+ tqlayout->addWidget( drag );
+ tqlayout->addWidget( dockbackButton );
+ tqlayout->addWidget( d->toDesktopButton );
+ tqlayout->addWidget( d->dummy);
+ tqlayout->addWidget( stayButton );
+ tqlayout->addWidget( closeButton );
+ tqlayout->activate();
d->dummy->hide();
- drag->setFixedHeight( layout->minimumSize().height() );
+ drag->setFixedHeight( tqlayout->tqminimumSize().height() );
}
void KDockWidgetHeader::setTopLevel( bool isTopLevel )
{
d->topLevel = isTopLevel;
if ( isTopLevel ){
- KDockWidget* par = (KDockWidget*)parent();
+ KDockWidget* par = (KDockWidget*)tqparent();
if( par) {
if( par->isDockBackPossible())
dockbackButton->show();
@@ -291,7 +291,7 @@ void KDockWidgetHeader::setTopLevel( bool isTopLevel )
if( d->showToDesktopButton )
d->toDesktopButton->show();
}
- layout->activate();
+ tqlayout->activate();
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
@@ -318,75 +318,75 @@ void KDockWidgetHeader::setDragPanel( KDockWidgetHeaderDrag* nd )
{
if ( !nd ) return;
- delete layout;
- layout = new TQHBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
+ delete tqlayout;
+ tqlayout = new TQHBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
delete drag;
drag = nd;
- if (drag->parentWidget()!=this) {
+ if (drag->tqparentWidget()!=this) {
drag->reparent(this,TQPoint(0,0));
}
- layout->addWidget( drag );
- layout->addWidget( dockbackButton );
- layout->addWidget( d->dummy );
- layout->addWidget( d->toDesktopButton );
- layout->addWidget( stayButton );
+ tqlayout->addWidget( drag );
+ tqlayout->addWidget( dockbackButton );
+ tqlayout->addWidget( d->dummy );
+ tqlayout->addWidget( d->toDesktopButton );
+ tqlayout->addWidget( stayButton );
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
- layout->addWidget(it.current());
+ tqlayout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
- layout->addWidget( closeButton );
- layout->activate();
- kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<layout->minimumSize().height()<<endl;
+ tqlayout->addWidget( closeButton );
+ tqlayout->activate();
+ kdDebug(282)<<"KdockWidgetHeader::setDragPanel:minimum height="<<tqlayout->tqminimumSize().height()<<endl;
#ifdef __GNUC__
#warning FIXME
#endif
- drag->setFixedHeight( closeButton->height()); // /*layout->minimumS*/sizeHint().height() );
+ drag->setFixedHeight( closeButton->height()); // /*tqlayout->minimumS*/tqsizeHint().height() );
}
void KDockWidgetHeader::addButton(KDockButton_Private* btn) {
if (!btn) return;
- if (btn->parentWidget()!=this) {
+ if (btn->tqparentWidget()!=this) {
btn->reparent(this,TQPoint(0,0));
}
btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height());
- if (!d->btns.containsRef(btn)) d->btns.append(btn);
+ if (!d->btns.tqcontainsRef(btn)) d->btns.append(btn);
btn->show();
- delete layout;
- layout = new TQHBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
+ delete tqlayout;
+ tqlayout = new TQHBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
- layout->addWidget( drag );
- layout->addWidget( dockbackButton );
- layout->addWidget( d->toDesktopButton );
- layout->addWidget( d->dummy);
- layout->addWidget( stayButton );
+ tqlayout->addWidget( drag );
+ tqlayout->addWidget( dockbackButton );
+ tqlayout->addWidget( d->toDesktopButton );
+ tqlayout->addWidget( d->dummy);
+ tqlayout->addWidget( stayButton );
bool dontShowDummy=drag->isVisibleTo(this) || dockbackButton->isVisibleTo(this) ||
d->toDesktopButton->isVisibleTo(this) || stayButton->isVisibleTo(this) ||
closeButton->isVisibleTo(this);
for (TQPtrListIterator<KDockButton_Private> it( d->btns );it.current();++it) {
- layout->addWidget(it.current());
+ tqlayout->addWidget(it.current());
dontShowDummy=dontShowDummy || (it.current()->isVisibleTo(this));
}
if (dontShowDummy) d->dummy->hide(); else d->dummy->show();
- layout->addWidget( closeButton );
- layout->activate();
- drag->setFixedHeight( layout->minimumSize().height() );
+ tqlayout->addWidget( closeButton );
+ tqlayout->activate();
+ drag->setFixedHeight( tqlayout->tqminimumSize().height() );
}
void KDockWidgetHeader::removeButton(KDockButton_Private* btn) {
- if (btn->parentWidget()==this) {
- if (d->btns.containsRef(btn)) d->btns.removeRef(btn);
+ if (btn->tqparentWidget()==this) {
+ if (d->btns.tqcontainsRef(btn)) d->btns.removeRef(btn);
delete btn;
}
}
@@ -425,12 +425,12 @@ void KDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void KDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), stayButton->isOn() );
}
void KDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), false ) );
}
#endif
@@ -479,11 +479,11 @@ public:
/*************************************************************************/
-KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
+KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
#ifdef BORDERLESS_WINDOWS
-: TQWidget( parent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+: TQWidget( tqparent, name, f )//| WType_Dialog | WStyle_Customize | WStyle_NoBorder )
#else
-: TQWidget( parent, name, f )
+: TQWidget( tqparent, name, f )
#endif
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
@@ -495,13 +495,13 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP
{
d = new KDockWidgetPrivate(); // create private data
- d->_parent = parent;
+ d->_parent = tqparent;
- layout = new TQVBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
+ tqlayout = new TQVBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
manager = dockManager;
- manager->childDock->append( this );
+ manager->childDock->append( TQT_TQOBJECT(this) );
installEventFilter( manager );
eDocking = DockFullDocking;
@@ -526,17 +526,17 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP
widget = 0L;
TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
- applyToWidget( parent, TQPoint(0,0) );
+ applyToWidget( tqparent, TQPoint(0,0) );
}
void KDockWidget::setPixmap(const TQPixmap& pixmap) {
delete pix;
pix=new TQPixmap(pixmap);
setIcon(*pix);
- KDockTabGroup *dtg=parentDockTabGroup();
+ KDockTabGroup *dtg=tqparentDockTabGroup();
if (dtg)
dtg->changeTab(this,pixmap,dtg->tabLabel(this));
- TQWidget *contWid=parentDockContainer();
+ TQWidget *contWid=tqparentDockContainer();
if (contWid) {
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
@@ -565,8 +565,8 @@ KDockWidget::~KDockWidget()
}
}
emit iMBeingClosed();
- if (manager->d) manager->d->containerDocks.remove(this);
- manager->childDock->remove( this );
+ if (manager->d) manager->d->containerDocks.remove(TQT_TQOBJECT(this));
+ manager->childDock->remove( TQT_TQOBJECT(this) );
delete pix;
delete d; // destroy private data
d=0;
@@ -577,7 +577,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe)
TQWidget::paintEvent(pe);
TQPainter paint;
paint.begin( this );
- style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup());
+ tqstyle().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), tqcolorGroup());
paint.end();
}
@@ -585,7 +585,7 @@ void KDockWidget::leaveEvent(TQEvent *e)
{
TQWidget::leaveEvent(e);
#ifdef BORDERLESS_WINDOWS
- if (parent()) return;
+ if (tqparent()) return;
// setCursor(TQCursor(ArrowCursor));
#endif
}
@@ -593,7 +593,7 @@ void KDockWidget::leaveEvent(TQEvent *e)
void KDockWidget::mousePressEvent(TQMouseEvent* mme)
{
#ifdef BORDERLESS_WINDOWS
- if (!parent())
+ if (!tqparent())
{
kdDebug(282)<<"KDockWidget::mousePressEvent"<<endl;
@@ -604,7 +604,7 @@ void KDockWidget::mousePressEvent(TQMouseEvent* mme)
int styleheight;
TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -663,7 +663,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
{
TQWidget::mouseMoveEvent(mme);
#ifdef BORDERLESS_WINDOWS
- if (parent()) return;
+ if (tqparent()) return;
if (d->resizing)
{
@@ -692,7 +692,7 @@ void KDockWidget::mouseMoveEvent(TQMouseEvent* mme)
int styleheight;
TQPoint mp;
mp=mme->pos();
- styleheight=2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this);
+ styleheight=2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this);
bbottom=mp.y()>=height()-styleheight;
btop=mp.y()<=styleheight;
bleft=mp.x()<=styleheight;
@@ -748,15 +748,15 @@ void KDockWidget::setHeader( KDockWidgetAbstractHeader* h )
if ( header ){
delete header;
- delete layout;
+ delete tqlayout;
header = h;
- layout = new TQVBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
- layout->addWidget( header );
+ tqlayout = new TQVBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
+ tqlayout->addWidget( header );
setWidget( widget );
} else {
header = h;
- layout->addWidget( header );
+ tqlayout->addWidget( header );
}
kdDebug(282)<<caption()<<": KDockWidget::setHeader"<<endl;
setEnableDocking(eDocking);
@@ -772,14 +772,14 @@ void KDockWidget::setEnableDocking( int pos )
void KDockWidget::updateHeader()
{
- if ( parent() ){
+ if ( tqparent() ){
#ifdef BORDERLESS_WINDOWS
- layout->setMargin(0);
+ tqlayout->setMargin(0);
setMouseTracking(false);
setCursor(TQCursor(ArrowCursor));
#endif
- if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
+ if ( (TQT_BASE_OBJECT(tqparent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
header->hide();
} else {
header->setTopLevel( false );
@@ -792,7 +792,7 @@ void KDockWidget::updateHeader()
header->setTopLevel( true );
header->show();
#ifdef BORDERLESS_WINDOWS
- layout->setMargin(2*style().pixelMetric(TQStyle::PM_DefaultFrameWidth,this));
+ tqlayout->setMargin(2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth,this));
setMouseTracking(true);
#endif
}
@@ -800,7 +800,7 @@ void KDockWidget::updateHeader()
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
- if ( parent() != s )
+ if ( TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(s) )
{
hide();
reparent(s, 0, TQPoint(0,0), false);
@@ -811,7 +811,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
}
if ( manager && s == manager->main ){
- setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
+ setGeometry( TQRect(TQPoint(0,0), manager->main->tqgeometry().size()) );
}
if ( !s )
@@ -819,7 +819,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
move(p);
#ifndef NO_KDE2
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if (d->transient && d->_parent)
XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() );
@@ -829,7 +829,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
#else
KWin::setType( winId(), d->windowType );
#endif // BORDERLESS_WINDOW
-#endif // Q_WS_X11
+#endif // TQ_WS_X11
#endif
}
@@ -840,11 +840,11 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
void KDockWidget::show()
{
- if ( parent() || manager->main->isVisible() )
- if ( !parent() ){
+ if ( tqparent() || manager->main->isVisible() )
+ if ( !tqparent() ){
emit manager->setDockDefaultPos( this );
emit setDockDefaultPos();
- if ( parent() ){
+ if ( tqparent() ){
makeDockVisible();
} else {
TQWidget::show();
@@ -859,16 +859,16 @@ void KDockWidget::show()
void KDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( parentWidget(), TQPoint(0,0) );
+ applyToWidget( tqparentWidget(), TQPoint(0,0) );
}
#endif
-void KDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
+void KDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEnabled)
{
- d->_parent = parent;
+ d->_parent = tqparent;
d->transient = transientEnabled;
- applyToWidget( parentWidget(), TQPoint(0,0) );
+ applyToWidget( tqparentWidget(), TQPoint(0,0) );
}
TQWidget *KDockWidget::transientTo() {
@@ -899,13 +899,13 @@ bool KDockWidget::event( TQEvent *event )
emit manager->change();
break;
case TQEvent::CaptionChange:
- if ( parentWidget() ){
- if ( parent()->inherits("KDockSplitter") ){
- ((KDockSplitter*)(parent()))->updateName();
+ if ( tqparentWidget() ){
+ if ( tqparent()->inherits("KDockSplitter") ){
+ ((KDockSplitter*)(tqparent()))->updateName();
}
- if ( parentDockTabGroup() ){
- setDockTabName( parentDockTabGroup() );
- parentDockTabGroup()->setTabLabel( this, tabPageLabel() );
+ if ( tqparentDockTabGroup() ){
+ setDockTabName( tqparentDockTabGroup() );
+ tqparentDockTabGroup()->setTabLabel( this, tabPageLabel() );
}
}
break;
@@ -920,18 +920,18 @@ bool KDockWidget::event( TQEvent *event )
KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
{
- if (!parent()) return 0;
- if (!parent()->inherits("KDockSplitter")) return 0;
- Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ? Vertical:Horizontal;
- if (((KDockSplitter*)(parent()))->orientation()==orientation)
+ if (!tqparent()) return 0;
+ if (!tqparent()->inherits("KDockSplitter")) return 0;
+ Qt::Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ?Qt::Vertical:Qt::Horizontal;
+ if (((KDockSplitter*)(tqparent()))->orientation()==orientation)
{
KDockWidget *neighbor=
((pos==DockLeft)||(pos==DockTop))?
- static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getFirst()):
- static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast());
+ static_cast<KDockWidget*>(((KDockSplitter*)(tqparent()))->getFirst()):
+ static_cast<KDockWidget*>(((KDockSplitter*)(tqparent()))->getLast());
if (neighbor==this)
- return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
+ return (static_cast<KDockWidget*>(TQT_TQWIDGET(tqparent()->tqparent()))->findNearestDockWidget(pos));
else
if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup")))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
@@ -939,7 +939,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
return neighbor;
}
else
- return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
+ return (static_cast<KDockWidget*>(TQT_TQWIDGET(tqparent()->tqparent()))->findNearestDockWidget(pos));
return 0;
}
@@ -983,10 +983,10 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (2)"<<endl;
}
- if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
- !(dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){
+ if ( tqparent() && !tqparent()->inherits("KDockSplitter") && !tqparentDockTabGroup() &&
+ !(dynamic_cast<KDockContainer*>(tqparent())) && !tqparentDockContainer()){
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl;
-// kdDebug(282)<<parent()->name()<<endl;
+// kdDebug(282)<<tqparent()->name()<<endl;
succes = false;
}
@@ -1021,28 +1021,28 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
// kdDebug(282)<<"Looking for KDockTabGroup"<<endl;
- KDockTabGroup* parentTab = target->parentDockTabGroup();
- if ( parentTab ){
+ KDockTabGroup* tqparentTab = target->tqparentDockTabGroup();
+ if ( tqparentTab ){
// add to existing TabGroup
- applyToWidget( parentTab );
- parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
+ applyToWidget( tqparentTab );
+ tqparentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- TQWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=tqparentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
- setDockTabName( parentTab );
+ setDockTabName( tqparentTab );
if( !toolTipStr.isEmpty())
- parentTab->setTabToolTip( this, toolTipStr);
+ tqparentTab->setTabToolTip( this, toolTipStr);
currentDockPos = KDockWidget::DockCenter;
emit manager->change();
- return (KDockWidget*)parentTab->parent();
+ return (KDockWidget*)tqparentTab->tqparent();
}
else
{
// kdDebug(282)<<"Looking for KDockContainer"<<endl;
- TQWidget *contWid=target->parentDockContainer();
+ TQWidget *contWid=target->tqparentDockContainer();
if (!contWid) contWid=target->widget;
if (contWid)
{
@@ -1060,21 +1060,21 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
cont->insertWidget( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setLatestKDockContainer(contWid);
-// setDockTabName( parentTab );
+// setDockTabName( tqparentTab );
if( !toolTipStr.isEmpty())
cont->setToolTip( this, toolTipStr);
currentDockPos = KDockWidget::DockCenter;
emit manager->change();
- return (KDockWidget*)(cont->parentDockWidget());
+ return (KDockWidget*)(cont->tqparentDockWidget());
}
}
}
// create a new dockwidget that will contain the target and this
- TQWidget* parentDock = target->parentWidget();
- KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(""), parentDock );
+ TQWidget* tqparentDock = target->tqparentWidget();
+ KDockWidget* newDock = new KDockWidget( manager, "tempName", TQPixmap(TQString("")), tqparentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == KDockWidget::DockCenter ){
@@ -1084,12 +1084,12 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
}
newDock->eDocking = (target->eDocking & eDocking) & (~(int)KDockWidget::DockCenter);
- newDock->applyToWidget( parentDock );
+ newDock->applyToWidget( tqparentDock );
- if ( !parentDock ){
+ if ( !tqparentDock ){
// dock to a toplevel dockwidget means newDock is toplevel now
newDock->move( target->frameGeometry().topLeft() );
- newDock->resize( target->geometry().size() );
+ newDock->resize( target->tqgeometry().size() );
if ( target->isVisibleToTLW() ) newDock->show();
}
@@ -1124,7 +1124,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
tab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
- TQRect geom=newDock->geometry();
+ TQRect geom=newDock->tqgeometry();
TQWidget *wantTransient=tab->transientTo();
newDock->setDockWindowTransient(wantTransient,wantTransient);
newDock->setGeometry(geom);
@@ -1143,13 +1143,13 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
// if to dock not to the center of the target dockwidget,
// dock to newDock
KDockSplitter* panner = 0L;
- if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_", Horizontal, spliPos, manager->splitterHighResolution() );
- if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_", Vertical , spliPos, manager->splitterHighResolution() );
+ if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_",Qt::Horizontal, spliPos, manager->splitterHighResolution() );
+ if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_",Qt::Vertical , spliPos, manager->splitterHighResolution() );
newDock->setWidget( panner );
panner->setOpaqueResize(manager->splitterOpaqueResize());
panner->setKeepSize(manager->splitterKeepSize());
- panner->setFocusPolicy( NoFocus );
+ panner->setFocusPolicy( TQ_NoFocus );
target->applyToWidget( panner );
applyToWidget( panner );
target->formerDockPos = target->currentDockPos;
@@ -1178,9 +1178,9 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
panner->show();
}
- if ( parentDock ){
- if ( parentDock->inherits("KDockSplitter") ){
- KDockSplitter* sp = (KDockSplitter*)parentDock;
+ if ( tqparentDock ){
+ if ( tqparentDock->inherits("KDockSplitter") ){
+ KDockSplitter* sp = (KDockSplitter*)tqparentDock;
sp->deactivate();
if ( sp->getFirst() == target )
sp->activate( newDock, 0L );
@@ -1197,18 +1197,18 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
return newDock;
}
-KDockTabGroup* KDockWidget::parentDockTabGroup() const
+KDockTabGroup* KDockWidget::tqparentDockTabGroup() const
{
- if ( !parent() ) return 0L;
- TQWidget* candidate = parentWidget()->parentWidget();
+ if ( !tqparent() ) return 0L;
+ TQWidget* candidate = tqparentWidget()->tqparentWidget();
if ( candidate && candidate->inherits("KDockTabGroup") ) return (KDockTabGroup*)candidate;
return 0L;
}
-TQWidget *KDockWidget::parentDockContainer() const
+TQWidget *KDockWidget::tqparentDockContainer() const
{
- if (!parent()) return 0L;
- TQWidget* candidate = parentWidget()->parentWidget();
+ if (!tqparent()) return 0L;
+ TQWidget* candidate = tqparentWidget()->tqparentWidget();
if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L;
}
@@ -1218,18 +1218,18 @@ void KDockWidget::setForcedFixedWidth(int w)
{
d->forcedWidth=w;
setFixedWidth(w);
- if (!parent()) return;
- if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
+ if (!tqparent()) return;
+ if (tqparent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
}
void KDockWidget::setForcedFixedHeight(int h)
{
d->forcedHeight=h;
setFixedHeight(h);
- if (!parent()) return;
- if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
+ if (!tqparent()) return;
+ if (tqparent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
}
int KDockWidget::forcedFixedWidth()
@@ -1249,9 +1249,9 @@ void KDockWidget::restoreFromForcedFixedSize()
setMaximumWidth(32000);
setMinimumHeight(0);
setMaximumHeight(32000);
- if (!parent()) return;
- if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(parent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
+ if (!tqparent()) return;
+ if (tqparent()->inherits("KDockSplitter"))
+ static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
}
void KDockWidget::toDesktop()
@@ -1276,8 +1276,8 @@ void KDockWidget::undock()
manager->d->dragRect = TQRect ();
manager->drawDragRectangle ();
- TQWidget* parentW = parentWidget();
- if ( !parentW ){
+ TQWidget* tqparentW = tqparentWidget();
+ if ( !tqparentW ){
hide();
if (!d->blockHasUndockedSignal)
emit hasUndocked();
@@ -1290,74 +1290,74 @@ void KDockWidget::undock()
manager->blockSignals(true);
manager->undockProcess = true;
- bool isV = parentW->isVisibleToTLW();
+ bool isV = tqparentW->isVisibleToTLW();
//UNDOCK HAS TO BE IMPLEMENTED CORRECTLY :)
- KDockTabGroup* parentTab = parentDockTabGroup();
- if ( parentTab ){
- d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
- parentTab->removePage( this );
+ KDockTabGroup* tqparentTab = tqparentDockTabGroup();
+ if ( tqparentTab ){
+ d->index = tqparentTab->indexOf( this); // memorize the page position in the tab widget
+ tqparentTab->removePage( this );
/*
- TQWidget *wantTransient=parentTab->transientTo();
+ TQWidget *wantTransient=tqparentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);
*/
- setFormerBrotherDockWidget((KDockWidget*)parentTab->page(0));
+ setFormerBrotherDockWidget((KDockWidget*)tqparentTab->page(0));
applyToWidget( 0L );
- if ( parentTab->count() == 1 ){
+ if ( tqparentTab->count() == 1 ){
// last subdock widget in the tab control
- KDockWidget* lastTab = (KDockWidget*)parentTab->page(0);
- parentTab->removePage( lastTab );
-/* TQWidget *wantTransient=parentTab->transientTo();
+ KDockWidget* lastTab = (KDockWidget*)tqparentTab->page(0);
+ tqparentTab->removePage( lastTab );
+/* TQWidget *wantTransient=tqparentTab->transientTo();
target->setDockWindowTransient(wantTransient,wantTransient);*/
lastTab->applyToWidget( 0L );
- lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) );
+ lastTab->move( tqparentTab->mapToGlobal(tqparentTab->frameGeometry().topLeft()) );
- // KDockTabGroup always have a parent that is a KDockWidget
- KDockWidget* parentOfTab = (KDockWidget*)parentTab->parent();
- delete parentTab; // KDockTabGroup
+ // KDockTabGroup always have a tqparent that is a KDockWidget
+ KDockWidget* tqparentOfTab = (KDockWidget*)tqparentTab->tqparent();
+ delete tqparentTab; // KDockTabGroup
- TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
- if ( !parentOfDockWidget ){
+ TQWidget* tqparentOfDockWidget = tqparentOfTab->tqparentWidget();
+ if ( !tqparentOfDockWidget ){
if ( isV ) lastTab->show();
} else {
- if ( parentOfDockWidget->inherits("KDockSplitter") ){
- KDockSplitter* split = (KDockSplitter*)parentOfDockWidget;
+ if ( tqparentOfDockWidget->inherits("KDockSplitter") ){
+ KDockSplitter* split = (KDockSplitter*)tqparentOfDockWidget;
lastTab->applyToWidget( split );
split->deactivate();
- if ( split->getFirst() == parentOfTab ){
+ if ( split->getFirst() == tqparentOfTab ){
split->activate( lastTab );
- if ( ((KDockWidget*)split->parent())->splitterOrientation == Vertical )
- emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft );
+ if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
+ emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockLeft );
else
- emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop );
+ emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockTop );
} else {
split->activate( 0L, lastTab );
- if ( ((KDockWidget*)split->parent())->splitterOrientation == Vertical )
- emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight );
+ if ( ((KDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical )
+ emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockRight );
else
- emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom );
+ emit ((KDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, KDockWidget::DockBottom );
}
split->show();
} else {
- lastTab->applyToWidget( parentOfDockWidget );
+ lastTab->applyToWidget( tqparentOfDockWidget );
}
lastTab->show();
}
manager->blockSignals(false);
- emit manager->replaceDock( parentOfTab, lastTab );
- lastTab->currentDockPos = parentOfTab->currentDockPos;
- emit parentOfTab->iMBeingClosed();
+ emit manager->replaceDock( tqparentOfTab, lastTab );
+ lastTab->currentDockPos = tqparentOfTab->currentDockPos;
+ emit tqparentOfTab->iMBeingClosed();
manager->blockSignals(true);
- delete parentOfTab;
+ delete tqparentOfTab;
} else {
- setDockTabName( parentTab );
+ setDockTabName( tqparentTab );
}
} else {
/*********************************************************************************************/
- //TQWidget* containerWidget = (TQWidget*)parent();
+ //TQWidget* containerWidget = (TQWidget*)tqparent();
bool undockedFromContainer=false;
if (d->container)
{
@@ -1366,41 +1366,41 @@ void KDockWidget::undock()
KDockContainer* dc = dynamic_cast<KDockContainer*>(d->container.operator->());
if (dc) {
dc->undockWidget(this);
- setFormerBrotherDockWidget(dc->parentDockWidget());
+ setFormerBrotherDockWidget(dc->tqparentDockWidget());
}
applyToWidget( 0L );
}
if (!undockedFromContainer) {
/*********************************************************************************************/
- if ( parentW->inherits("KDockSplitter") ){
- KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)parentW;
- d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
+ if ( tqparentW->inherits("KDockSplitter") ){
+ KDockSplitter* tqparentSplitterOfDockWidget = (KDockSplitter*)tqparentW;
+ d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos();
- KDockWidget* secondWidget = (KDockWidget*)parentSplitterOfDockWidget->getAnother( this );
- KDockWidget* group = (KDockWidget*)parentSplitterOfDockWidget->parentWidget();
+ KDockWidget* secondWidget = (KDockWidget*)tqparentSplitterOfDockWidget->getAnother( this );
+ KDockWidget* group = (KDockWidget*)tqparentSplitterOfDockWidget->tqparentWidget();
setFormerBrotherDockWidget(secondWidget);
applyToWidget( 0L );
group->hide();
- if ( !group->parentWidget() ){
+ if ( !group->tqparentWidget() ){
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- TQWidget* obj = group->parentWidget();
+ TQWidget* obj = group->tqparentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("KDockSplitter") ){
- KDockSplitter* parentOfGroup = (KDockSplitter*)obj;
- parentOfGroup->deactivate();
+ KDockSplitter* tqparentOfGroup = (KDockSplitter*)obj;
+ tqparentOfGroup->deactivate();
- if ( parentOfGroup->getFirst() == group )
- parentOfGroup->activate( secondWidget );
+ if ( tqparentOfGroup->getFirst() == group )
+ tqparentOfGroup->activate( secondWidget );
else
- parentOfGroup->activate( 0L, secondWidget );
+ tqparentOfGroup->activate( 0L, secondWidget );
}
}
secondWidget->currentDockPos = group->currentDockPos;
secondWidget->formerDockPos = group->formerDockPos;
- delete parentSplitterOfDockWidget;
+ delete tqparentSplitterOfDockWidget;
manager->blockSignals(false);
emit manager->replaceDock( group, secondWidget );
emit group->iMBeingClosed();
@@ -1430,7 +1430,7 @@ void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
- if ( mw->parent() != this ){
+ if ( TQT_BASE_OBJECT(mw->tqparent()) != TQT_BASE_OBJECT(this) ){
mw->reparent(this, 0, TQPoint(0,0), false);
}
@@ -1438,16 +1438,16 @@ void KDockWidget::setWidget( TQWidget* mw )
if (!mw->ownCursor()) mw->setCursor(TQCursor(ArrowCursor));
#endif
widget = mw;
- delete layout;
+ delete tqlayout;
- layout = new TQVBoxLayout( this );
- layout->setResizeMode( TQLayout::Minimum );
+ tqlayout = new TQVBoxLayout( this );
+ tqlayout->setResizeMode( TQLayout::Minimum );
KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
if (dc)
{
d->isContainer=true;
- manager->d->containerDocks.append(this);
+ manager->d->containerDocks.append(TQT_TQOBJECT(this));
}
else
{
@@ -1456,8 +1456,8 @@ void KDockWidget::setWidget( TQWidget* mw )
{
header->show();
- layout->addWidget( header );
- layout->addWidget( widget,1 );
+ tqlayout->addWidget( header );
+ tqlayout->addWidget( widget,1 );
}
updateHeader();
emit widgetSet(mw);
@@ -1475,24 +1475,24 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
listOfCaption.remove( listOfCaption.length()-1, 1 );
listOfName.remove( listOfName.length()-1, 1 );
- tab->parentWidget()->setName( listOfName.utf8() );
- tab->parentWidget()->setCaption( listOfCaption );
+ tab->tqparentWidget()->setName( listOfName.utf8() );
+ tab->tqparentWidget()->setCaption( listOfCaption );
- tab->parentWidget()->repaint( false ); // KDockWidget->repaint
- if ( tab->parentWidget()->parent() )
- if ( tab->parentWidget()->parent()->inherits("KDockSplitter") )
- ((KDockSplitter*)(tab->parentWidget()->parent()))->updateName();
+ tab->tqparentWidget()->tqrepaint( false ); // KDockWidget->tqrepaint
+ if ( tab->tqparentWidget()->tqparent() )
+ if ( tab->tqparentWidget()->tqparent()->inherits("KDockSplitter") )
+ ((KDockSplitter*)(tab->tqparentWidget()->tqparent()))->updateName();
}
bool KDockWidget::mayBeHide() const
{
- bool f = (parent() != manager->main);
+ bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
}
bool KDockWidget::mayBeShow() const
{
- bool f = (parent() != manager->main);
+ bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && !isVisible() );
}
@@ -1514,11 +1514,11 @@ void KDockWidget::changeHideShowState()
void KDockWidget::makeDockVisible()
{
- if ( parentDockTabGroup() ){
- parentDockTabGroup()->showPage( this );
+ if ( tqparentDockTabGroup() ){
+ tqparentDockTabGroup()->showPage( this );
}
- if (parentDockContainer()) {
- TQWidget *contWid=parentDockContainer();
+ if (tqparentDockContainer()) {
+ TQWidget *contWid=tqparentDockContainer();
KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) {
x->showWidget(this);
@@ -1526,13 +1526,13 @@ void KDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- TQWidget* p = parentWidget();
+ TQWidget* p = tqparentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
- if( !parent() ) // is undocked
+ if( !tqparent() ) // is undocked
dockBack();
show();
}
@@ -1551,13 +1551,13 @@ void KDockWidget::loseFormerBrotherDockWidget()
TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L;
- repaint();
+ tqrepaint();
}
void KDockWidget::dockBack()
{
if( formerBrotherDockWidget) {
- // search all children if it tries to dock back to a child
+ // search all tqchildren if it tries to dock back to a child
bool found = false;
TQObjectList* cl = queryList("KDockWidget");
TQObjectListIt it( *cl );
@@ -1582,7 +1582,7 @@ void KDockWidget::dockBack()
// else dockback to the dockmainwindow (default behavior)
manualDock( ((KDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
- if (parent())
+ if (tqparent())
makeDockVisible();
}
@@ -1676,7 +1676,7 @@ void KDockManager::activate()
while ( (obj=(KDockWidget*)it.current()) ) {
++it;
if ( obj->widget ) obj->widget->show();
- if ( !obj->parentDockTabGroup() ){
+ if ( !obj->tqparentDockTabGroup() ){
obj->show();
}
}
@@ -1700,11 +1700,11 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
break;
case TQEvent::MouseButtonPress:
- if ( ((TQMouseEvent*)event)->button() == LeftButton ){
+ if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){
if ( curdw->eDocking != (int)KDockWidget::DockNone ){
dropCancel = true;
curdw->setFocus();
- qApp->processOneEvent();
+ tqApp->processOneEvent();
currentDragWidget = curdw;
currentMoveWidget = 0L;
@@ -1713,7 +1713,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
findChildDockWidget( curdw, childDockWidgetList );
//d->oldDragRect = TQRect(); should fix rectangle not erased problem
- d->dragRect = TQRect(curdw->geometry());
+ d->dragRect = TQRect(curdw->tqgeometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
@@ -1725,7 +1725,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
}
break;
case TQEvent::MouseButtonRelease:
- if ( ((TQMouseEvent*)event)->button() == LeftButton ){
+ if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){
if ( dragging ){
if ( !dropCancel )
drop();
@@ -1735,7 +1735,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
//d->oldDragRect = TQRect(); should fix rectangle not erased problem
- d->dragRect = TQRect(curdw->geometry());
+ d->dragRect = TQRect(curdw->tqgeometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
@@ -1753,7 +1753,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
#ifdef BORDERLESS_WINDOWS
//BEGIN TEST
KDockWidget *oldMoveWidget;
- if (!curdw->parent())
+ if (!curdw->tqparent())
{
curdw->move(TQCursor::pos()-d->dragOffset);
pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos()-TQPoint(0,d->dragOffset.y()+3) );
@@ -1775,7 +1775,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
break;
} else {
if (dropCancel && curdw) {
- d->dragRect = TQRect(curdw->geometry());
+ d->dragRect = TQRect(curdw->tqgeometry());
TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
}else
@@ -1803,7 +1803,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
}
- if ( (((TQMouseEvent*)event)->state() == LeftButton) &&
+ if ( (((TQMouseEvent*)event)->state() == Qt::LeftButton) &&
(curdw->eDocking != (int)KDockWidget::DockNone) ) {
startDrag( curdw);
}
@@ -1831,7 +1831,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
return 0L;
}
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
- p = p->topLevelWidget();
+ p = p->tqtopLevelWidget();
#endif
TQWidget* w = 0L;
findChildDockWidget( w, p, p->mapFromGlobal(pos) );
@@ -1841,13 +1841,13 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
}
w = p;
}
- if ( qt_find_obj_child( w, "KDockSplitter", "_dock_split_" ) ) return 0L;
- if ( qt_find_obj_child( w, "KDockTabGroup", "_dock_tab" ) ) return 0L;
+ if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L;
+ if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L;
if (dynamic_cast<KDockContainer*>(w)) return 0L;
if (!childDockWidgetList) return 0L;
- if ( childDockWidgetList->find(w) != -1 ) return 0L;
- if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L;
+ if ( childDockWidgetList->tqfind(w) != -1 ) return 0L;
+ if ( currentDragWidget->isGroup && ((KDockWidget*)w)->tqparentDockTabGroup() ) return 0L;
KDockWidget* www = (KDockWidget*)w;
if ( www->sDocking == (int)KDockWidget::DockNone ) return 0L;
@@ -1884,14 +1884,15 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos )
{
- if ( p->children() ) {
+ TQObjectList clo = p->childrenListObject();
+ if ( !clo.isEmpty() ) {
TQWidget *w;
- TQObjectListIt it( *p->children() );
+ TQObjectListIt it( clo );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
w = (TQWidget*)it.current();
- if ( w->isVisible() && w->geometry().contains(pos) ) {
+ if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) {
if ( w->inherits("KDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) );
return;
@@ -1905,9 +1906,10 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const
void KDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList*& list )
{
- if ( p->children() ) {
+ TQObjectList clo = p->childrenListObject();
+ if ( !clo.isEmpty() ) {
TQWidget *w;
- TQObjectListIt it( *p->children() );
+ TQObjectListIt it( clo );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
@@ -1929,9 +1931,9 @@ void KDockManager::startDrag( KDockWidget* w )
|| ( w->currentDockPos == KDockWidget::DockTop) || ( w->currentDockPos == KDockWidget::DockBottom)) {
w->prevSideDockPosBeforeDrag = w->currentDockPos;
- if ( w->parentWidget()->inherits("KDockSplitter") ){
- KDockSplitter* parentSplitterOfDockWidget = (KDockSplitter*)(w->parentWidget());
- w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos();
+ if ( w->tqparentWidget()->inherits("KDockSplitter") ){
+ KDockSplitter* tqparentSplitterOfDockWidget = (KDockSplitter*)(w->tqparentWidget());
+ w->d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos();
}
}
@@ -1947,7 +1949,7 @@ void KDockManager::dragMove( KDockWidget* dw, TQPoint pos )
KDockWidget::DockPosition oldPos = curPos;
TQSize r = dw->widget->size();
- if ( dw->parentDockTabGroup() ){
+ if ( dw->tqparentDockTabGroup() ){
curPos = KDockWidget::DockCenter;
if ( oldPos != curPos ) {
d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 );
@@ -2017,7 +2019,7 @@ void KDockManager::drop()
drawDragRectangle(); // only the old rect will be deleted
return;
}
- if ( !currentMoveWidget && !currentDragWidget->parent() ) {
+ if ( !currentMoveWidget && !currentDragWidget->tqparent() ) {
currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
@@ -2049,7 +2051,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam
static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b)
{
- return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false"));
+ return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false"));
}
@@ -2088,7 +2090,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName,
TQStrListIterator it(list);
for (; it.current(); ++it) {
TQDomElement subel = doc.createElement(subTagName);
- subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current())));
+ subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current())));
el.appendChild(subel);
}
@@ -2157,8 +2159,8 @@ void KDockManager::writeConfig(TQDomElement &base)
TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
- if ( obj1->parent() == main )
- mainWidgetStr = TQString::fromLatin1(obj1->name());
+ if ( TQT_BASE_OBJECT(obj1->tqparent()) == TQT_BASE_OBJECT(main) )
+ mainWidgetStr = TQString::tqfromLatin1(obj1->name());
nList.append(obj1->name());
++it;
}
@@ -2174,9 +2176,9 @@ void KDockManager::writeConfig(TQDomElement &base)
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
- || nameList.find(obj->lastName.latin1()) == -1)) {
- // Skip until children are saved (why?)
+ if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.tqfind( obj->firstName.latin1() ) == -1
+ || nameList.tqfind(obj->lastName.latin1()) == -1)) {
+ // Skip until tqchildren are saved (why?)
++nListIt;
// nList.next();
//falk? if ( !nList.current() ) nList.first();
@@ -2208,7 +2210,7 @@ void KDockManager::writeConfig(TQDomElement &base)
list.append( ((KDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
groupEl.appendChild(createNumberEntry(doc, "currentTab", ((KDockTabGroup*)obj->widget)->currentPageIndex()));
- if (!obj->parent()) {
+ if (!obj->tqparent()) {
groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
}
@@ -2217,15 +2219,15 @@ void KDockManager::writeConfig(TQDomElement &base)
groupEl = doc.createElement("dock");
groupEl.appendChild(createStringEntry(doc, "tabCaption", obj->tabPageLabel()));
groupEl.appendChild(createStringEntry(doc, "tabToolTip", obj->toolTipString()));
- if (!obj->parent()) {
+ if (!obj->tqparent()) {
groupEl.appendChild(createStringEntry(doc, "dockBackTo", obj->formerBrotherDockWidget ? obj->formerBrotherDockWidget->name() : ""));
groupEl.appendChild(createNumberEntry(doc, "dockBackToPos", obj->formerDockPos));
}
}
- groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name())));
- groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
- if ( !obj->parent() ) {
+ groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name())));
+ groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->tqparent()));
+ if ( !obj->tqparent() ) {
groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
@@ -2274,7 +2276,7 @@ void KDockManager::readConfig(TQDomElement &base)
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
- if ( obj1->parent() )
+ if ( obj1->tqparent() )
obj1->undock();
else
obj1->hide();
@@ -2345,7 +2347,7 @@ void KDockManager::readConfig(TQDomElement &base)
KDockWidget *second = getDockWidgetFromName(secondName);
if (first && second) {
obj = first->manualDock(second,
- (orientation == (int)Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop,
+ (orientation == (int)Qt::Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop,
separatorPos);
if (obj)
obj->setName(name.latin1());
@@ -2456,7 +2458,7 @@ void KDockManager::removeFromAutoCreateList(KDockWidget* pDockWidget)
{
if (!autoCreateDock) return;
autoCreateDock->setAutoDelete(false);
- autoCreateDock->removeRef(pDockWidget);
+ autoCreateDock->removeRef(TQT_TQOBJECT(pDockWidget));
autoCreateDock->setAutoDelete(true);
}
@@ -2492,11 +2494,11 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
++it;
//debug(" +Add subdock %s", obj->name());
nList.append( obj->name() );
- if ( obj->parent() == main )
+ if ( TQT_BASE_OBJECT(obj->tqparent()) == TQT_BASE_OBJECT(main) )
c->writeEntry( "Main:view", obj->name() );
}
-// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("list size: %1").tqarg(nList.count())<<endl;
for (TQObjectListIt it(d->containerDocks);it.current();++it)
{
KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
@@ -2504,7 +2506,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
dc->prepareSave(nList);
}
}
-// kdDebug(282)<<TQString("new list size: %1").arg(nList.count())<<endl;
+// kdDebug(282)<<TQString("new list size: %1").tqarg(nList.count())<<endl;
TQStringList::Iterator nListIt=nList.begin();
while ( nListIt!=nList.end() ){
@@ -2522,15 +2524,15 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
}
/*************************************************************************************************/
if ( obj->isGroup ){
- if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){
+ if ( (findList.tqfind( obj->firstName ) != findList.end()) && (findList.tqfind( obj->lastName ) != findList.end() )){
c->writeEntry( cname+":type", "GROUP");
- if ( !obj->parent() ){
- c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
+ if ( !obj->tqparent() ){
+ c->writeEntry( cname+":tqparent", "___null___");
+ c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
- c->writeEntry( cname+":parent", "yes");
+ c->writeEntry( cname+":tqparent", "yes");
}
c->writeEntry( cname+":first_name", obj->firstName );
c->writeEntry( cname+":last_name", obj->lastName );
@@ -2545,9 +2547,9 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
} else {
/*************************************************************************************************/
//debug(" Skip %s", nList.current());
- //if ( findList.find( obj->firstName ) == -1 )
+ //if ( findList.tqfind( obj->firstName ) == -1 )
// debug(" ? Not found %s", obj->firstName);
- //if ( findList.find( obj->lastName ) == -1 )
+ //if ( findList.tqfind( obj->lastName ) == -1 )
// debug(" ? Not found %s", obj->lastName);
++nListIt;
// if ( !nList.current() ) nList.first();
@@ -2557,14 +2559,14 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
/*************************************************************************************************/
if ( obj->isTabGroup){
c->writeEntry( cname+":type", "TAB_GROUP");
- if ( !obj->parent() ){
- c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
+ if ( !obj->tqparent() ){
+ c->writeEntry( cname+":tqparent", "___null___");
+ c->writeEntry( cname+":tqgeometry", 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");
+ c->writeEntry( cname+":tqparent", "yes");
}
TQStrList list;
for ( int i = 0; i < ((KDockTabGroup*)obj->widget)->count(); ++i )
@@ -2581,9 +2583,9 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
/*************************************************************************************************/
c->writeEntry( cname+":tabCaption", obj->tabPageLabel());
c->writeEntry( cname+":tabToolTip", obj->toolTipString());
- if ( !obj->parent() ){
+ if ( !obj->tqparent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
- c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":tqgeometry", 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);
@@ -2644,7 +2646,7 @@ void KDockManager::readConfig( KConfig* c, TQString group )
++it;
if ( !obj->isGroup && !obj->isTabGroup )
{
- if ( obj->parent() ) obj->undock(); else obj->hide();
+ if ( obj->tqparent() ) obj->undock(); else obj->hide();
}
}
@@ -2657,8 +2659,8 @@ void KDockManager::readConfig( KConfig* c, TQString group )
TQString type = c->readEntry( oname + ":type" );
obj = 0L;
- if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
- TQRect r = c->readRectEntry( oname + ":geometry" );
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){
+ TQRect r = c->readRectEntry( oname + ":tqgeometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
obj->setGeometry(r);
@@ -2700,9 +2702,9 @@ void KDockManager::readConfig( KConfig* c, TQString group )
KDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) );
int sepPos = c->readNumEntry( oname + ":sepPos" );
- Orientation p = (Orientation)c->readNumEntry( oname + ":orientation" );
+ Qt::Orientation p = (Qt::Orientation)c->readNumEntry( oname + ":orientation" );
if ( first && last ){
- obj = first->manualDock( last, ( p == Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos );
+ obj = first->manualDock( last, ( p ==Qt::Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos );
if (obj){
obj->setName( oname.latin1() );
}
@@ -2751,7 +2753,7 @@ void KDockManager::readConfig( KConfig* c, TQString group )
TQString type = c->readEntry( oname + ":type" );
obj = 0L;
- if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
+ if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){
obj = getDockWidgetFromName( oname );
c->setGroup( group );
TQString name = c->readEntry( oname + ":dockBackTo" );
@@ -2828,8 +2830,8 @@ KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName )
KDockWidget* autoCreate = 0L;
if ( autoCreateDock ){
kdDebug(282)<<"Autocreating dock: "<<dockName<<endl;
- autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap("") );
- autoCreateDock->append( autoCreate );
+ autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap(TQString("")) );
+ autoCreateDock->append( TQT_TQOBJECT(autoCreate) );
}
return autoCreate;
}
@@ -2875,13 +2877,13 @@ void KDockManager::slotMenuPopup()
++it;
if ( obj->mayBeHide() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Hide %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Hide %1").tqarg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, true ) );
}
if ( obj->mayBeShow() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").arg(obj->caption()), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), i18n("Show %1").tqarg(obj->caption()), numerator++ );
menuData->append( new MenuDockData( obj, false ) );
}
}
@@ -2933,14 +2935,14 @@ void KDockManager::drawDragRectangle()
KDockMainWindow* pMain = 0L;
KDockWidget* pTLDockWdg = 0L;
TQWidget* topWdg;
- if (pDockWdgAtRect->topLevelWidget() == main) {
+ if (pDockWdgAtRect->tqtopLevelWidget() == main) {
isOverMainWdg = true;
topWdg = pMain = (KDockMainWindow*) main;
unclipped = pMain->testWFlags( WPaintUnclipped );
pMain->setWFlags( WPaintUnclipped );
}
else {
- topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->topLevelWidget();
+ topWdg = pTLDockWdg = (KDockWidget*) pDockWdgAtRect->tqtopLevelWidget();
unclipped = pTLDockWdg->testWFlags( WPaintUnclipped );
pTLDockWdg->setWFlags( WPaintUnclipped );
}
@@ -2955,7 +2957,7 @@ void KDockManager::drawDragRectangle()
pTLDockWdg->clearWFlags(WPaintUnclipped);
}
// draw the rectangle
- p.setRasterOp(Qt::NotXorROP);
+ p.setRasterOp(TQt::NotXorROP);
TQRect r = oldAndNewDragRect[i];
r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) );
p.drawRect(r.x(), r.y(), r.width(), r.height());
@@ -2984,8 +2986,8 @@ void KDockManager::setSpecialBottomDockContainer(KDockWidget* container) {
}
-KDockArea::KDockArea( TQWidget* parent, const char *name)
-:TQWidget( parent, name)
+KDockArea::KDockArea( TQWidget* tqparent, const char *name)
+:TQWidget( tqparent, name)
{
TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new KDockManager( this, new_name.latin1() );
@@ -2997,9 +2999,9 @@ KDockArea::~KDockArea()
delete dockManager;
}
-KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
+KDockWidget* KDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel)
{
- return new KDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
+ return new KDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel );
}
void KDockArea::makeDockVisible( KDockWidget* dock )
@@ -3040,7 +3042,7 @@ void KDockArea::slotDockWidgetUndocked()
void KDockArea::resizeEvent(TQResizeEvent *rsize)
{
TQWidget::resizeEvent(rsize);
- if (children()){
+ if (!childrenListObject().isEmpty()){
#ifndef NO_KDE2
// kdDebug(282)<<"KDockArea::resize"<<endl;
#endif
@@ -3057,11 +3059,11 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize)
delete list;
#if 0
KDockSplitter *split;
-// for (unsigned int i=0;i<children()->count();i++)
+// for (unsigned int i=0;i<tqchildren()->count();i++)
{
-// TQPtrList<TQObject> list(children());
-// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
- TQObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(tqchildren());
+// TQObject *obj=((TQPtrList<TQObject*>)tqchildren())->at(i);
+ TQObject *obj=tqchildren()->getFirst();
if (split = dynamic_cast<KDockSplitter*>(obj))
{
split->setGeometry( TQRect(TQPoint(0,0), size() ));
@@ -3094,12 +3096,12 @@ void KDockArea::setMainDockWidget( KDockWidget* mdw )
// KDOCKCONTAINER - AN ABSTRACTION OF THE KDOCKTABWIDGET
-KDockContainer::KDockContainer(){m_overlapMode=false; m_childrenListBegin=0; m_childrenListEnd=0;}
+KDockContainer::KDockContainer(){m_overlapMode=false; m_tqchildrenListBegin=0; m_tqchildrenListEnd=0;}
KDockContainer::~KDockContainer(){
- if (m_childrenListBegin)
+ if (m_tqchildrenListBegin)
{
- struct ListItem *tmp=m_childrenListBegin;
+ struct ListItem *tmp=m_tqchildrenListBegin;
while (tmp)
{
struct ListItem *tmp2=tmp->next;
@@ -3107,8 +3109,8 @@ KDockContainer::~KDockContainer(){
delete tmp;
tmp=tmp2;
}
- m_childrenListBegin=0;
- m_childrenListEnd=0;
+ m_tqchildrenListBegin=0;
+ m_tqchildrenListEnd=0;
}
}
@@ -3116,11 +3118,11 @@ KDockContainer::~KDockContainer(){
void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_nonOverlapSize=nonOverlapSize;
m_overlapMode=true;
- if (parentDockWidget()) {
- if (parentDockWidget()->parent()) {
+ if (tqparentDockWidget()) {
+ if (tqparentDockWidget()->tqparent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- parent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= static_cast<KDockSplitter*>(tqparentDockWidget()->
+ tqparent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
}
@@ -3129,11 +3131,11 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
void KDockContainer::deactivateOverlapMode() {
if (!m_overlapMode) return;
m_overlapMode=false;
- if (parentDockWidget()) {
- if (parentDockWidget()->parent()) {
+ if (tqparentDockWidget()) {
+ if (tqparentDockWidget()->tqparent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- parent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= static_cast<KDockSplitter*>(tqparentDockWidget()->
+ tqparent()->qt_cast("KDockSplitter"));
if (sp) sp->resizeEvent(0);
}
}
@@ -3150,11 +3152,11 @@ bool KDockContainer::dockDragMove(KDockWidget*, TQMouseEvent *) { return false;}
bool KDockContainer::dockDragLeave(KDockWidget*, TQMouseEvent *) { return false;}
-KDockWidget *KDockContainer::parentDockWidget(){return 0;}
+KDockWidget *KDockContainer::tqparentDockWidget(){return 0;}
TQStringList KDockContainer::containedWidgets() const {
TQStringList tmp;
- for (struct ListItem *it=m_childrenListBegin;it;it=it->next) {
+ for (struct ListItem *it=m_tqchildrenListBegin;it;it=it->next) {
tmp<<TQString(it->data);
}
@@ -3170,36 +3172,36 @@ void KDockContainer::insertWidget (KDockWidget *dw, TQPixmap, const TQString &,
it->data=strdup(dw->name());
it->next=0;
- if (m_childrenListEnd)
+ if (m_tqchildrenListEnd)
{
- m_childrenListEnd->next=it;
- it->prev=m_childrenListEnd;
- m_childrenListEnd=it;
+ m_tqchildrenListEnd->next=it;
+ it->prev=m_tqchildrenListEnd;
+ m_tqchildrenListEnd=it;
}
else
{
it->prev=0;
- m_childrenListEnd=it;
- m_childrenListBegin=it;
+ m_tqchildrenListEnd=it;
+ m_tqchildrenListBegin=it;
}
}
void KDockContainer::removeWidget (KDockWidget *dw){
- for (struct ListItem *tmp=m_childrenListBegin;tmp;tmp=tmp->next)
+ for (struct ListItem *tmp=m_tqchildrenListBegin;tmp;tmp=tmp->next)
{
if (!strcmp(tmp->data,dw->name()))
{
free(tmp->data);
if (tmp->next) tmp->next->prev=tmp->prev;
if (tmp->prev) tmp->prev->next=tmp->next;
- if (tmp==m_childrenListBegin) m_childrenListBegin=tmp->next;
- if (tmp==m_childrenListEnd) m_childrenListEnd=tmp->prev;
+ if (tmp==m_tqchildrenListBegin) m_tqchildrenListBegin=tmp->next;
+ if (tmp==m_tqchildrenListEnd) m_tqchildrenListEnd=tmp->prev;
delete tmp;
break;
}
}
}
-//m_children.remove(dw->name());}
+//m_tqchildren.remove(dw->name());}
void KDockContainer::undockWidget (KDockWidget *){;}
void KDockContainer::setToolTip(KDockWidget *, TQString &){;}
void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;}
@@ -3210,11 +3212,11 @@ void KDockContainer::save (TQDomElement&){;}
void KDockContainer::prepareSave(TQStringList &names)
{
- for (struct ListItem *tmp=m_childrenListBegin;tmp; tmp=tmp->next)
+ for (struct ListItem *tmp=m_tqchildrenListBegin;tmp; tmp=tmp->next)
names.remove(tmp->data);
-// for (uint i=0;i<m_children.count();i++)
+// for (uint i=0;i<m_tqchildren.count();i++)
// {
-// names.remove(m_children.at(i));
+// names.remove(m_tqchildren.at(i));
// }
}
@@ -3268,6 +3270,6 @@ void KDockArea::virtual_hook( int, void* )
{ /*KMainWindow::virtual_hook( id, data );*/ }
-#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name
+#ifndef NO_INCLUDE_TQMOCFILES // for TQt-only projects, because tmake doesn't take this name
#include "kdockwidget.moc"
#endif