diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp')
-rw-r--r-- | lib/compatibility/kmdi/qextmdi/kdockwidget_private.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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(); } } |