summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttMinimizeSplitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttMinimizeSplitter.cpp')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp270
1 files changed, 135 insertions, 135 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index 790b381a..60908e8e 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -34,24 +34,24 @@
#include "KDGanttMinimizeSplitter.h"
#ifndef QT_NO_SPLITTER
-#include "qpainter.h"
-#include "qdrawutil.h"
-#include "qbitmap.h"
+#include "tqpainter.h"
+#include "tqdrawutil.h"
+#include "tqbitmap.h"
#if QT_VERSION >= 300
-#include "qptrlist.h"
-#include "qmemarray.h"
+#include "tqptrlist.h"
+#include "tqmemarray.h"
#else
-#include <qlist.h>
-#include <qarray.h>
-#define QPtrList QList
-#define QMemArray QArray
+#include <tqlist.h>
+#include <tqarray.h>
+#define TQPtrList QList
+#define TQMemArray QArray
#endif
#include "qlayoutengine_p.h"
-#include "qobjectlist.h"
-#include "qstyle.h"
-#include "qapplication.h" //sendPostedEvents
-#include <qvaluelist.h>
-#include <qcursor.h>
+#include "tqobjectlist.h"
+#include "tqstyle.h"
+#include "tqapplication.h" //sendPostedEvents
+#include <tqvaluelist.h>
+#include <tqcursor.h>
#ifndef KDGANTT_MASTER_CVS
#include "KDGanttMinimizeSplitter.moc"
#endif
@@ -66,16 +66,16 @@ static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit ri
KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
KDGanttMinimizeSplitter *parent, const char * name )
- : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false )
+ : TQWidget( parent, name ), _activeButton( 0 ), _collapsed( false )
{
s = parent;
setOrientation(o);
setMouseTracking( true );
}
-QSize KDGanttSplitterHandle::sizeHint() const
+TQSize KDGanttSplitterHandle::sizeHint() const
{
- return QSize(8,8);
+ return TQSize(8,8);
}
void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
@@ -90,7 +90,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
}
-void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e )
{
updateCursor( e->pos() );
if ( !(e->state()&LeftButton) )
@@ -111,7 +111,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
_collapsed = false;
}
-void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton ) {
_activeButton = onButton( e->pos() );
@@ -122,7 +122,7 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
}
}
-void KDGanttSplitterHandle::updateCursor( const QPoint& p)
+void KDGanttSplitterHandle::updateCursor( const TQPoint& p)
{
if ( onButton( p ) != 0 ) {
setCursor( arrowCursor );
@@ -136,7 +136,7 @@ void KDGanttSplitterHandle::updateCursor( const QPoint& p)
}
-void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e )
{
if ( _activeButton != 0 ) {
if ( onButton( e->pos() ) == _activeButton )
@@ -153,7 +153,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
pos = max;
}
- _origPos = s->pick(mapToParent( QPoint( 0,0 ) ));
+ _origPos = s->pick(mapToParent( TQPoint( 0,0 ) ));
s->moveSplitter( pos, id() );
_collapsed = true;
}
@@ -177,12 +177,12 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
repaint();
}
-int KDGanttSplitterHandle::onButton( const QPoint& p )
+int KDGanttSplitterHandle::onButton( const TQPoint& p )
{
- QValueList<QPointArray> list = buttonRegions();
+ TQValueList<TQPointArray> list = buttonRegions();
int index = 1;
- for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
- QRect rect = (*it).boundingRect();
+ for( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQRect rect = (*it).boundingRect();
rect.setLeft( rect.left()- 4 );
rect.setRight( rect.right() + 4);
rect.setTop( rect.top()- 4 );
@@ -196,14 +196,14 @@ int KDGanttSplitterHandle::onButton( const QPoint& p )
}
-QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
+TQValueList<TQPointArray> KDGanttSplitterHandle::buttonRegions()
{
- QValueList<QPointArray> list;
+ TQValueList<TQPointArray> list;
int sw = 8;
int voffset[] = { (int) -sw*3, (int) sw*3 };
for ( int i = 0; i < 2; i++ ) {
- QPointArray arr;
+ TQPointArray arr;
if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ||
_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) {
int mid = height()/2 + voffset[i];
@@ -241,32 +241,32 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
return list;
}
-void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
+void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
{
- QPixmap buffer( size() );
- QPainter p( &buffer );
+ TQPixmap buffer( size() );
+ TQPainter p( &buffer );
// Draw the splitter rectangle
p.setBrush( colorGroup().background() );
p.setPen( colorGroup().foreground() );
p.drawRect( rect() );
- parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(),
+ parentWidget()->style().drawPrimitive( TQStyle::PE_Panel, &p, rect(),
parentWidget()->colorGroup());
int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size
// arrow color
- QColor col = colorGroup().background().dark( 200 );
+ TQColor col = colorGroup().background().dark( 200 );
p.setBrush( col );
p.setPen( col );
- QValueList<QPointArray> list = buttonRegions();
+ TQValueList<TQPointArray> list = buttonRegions();
int index = 1;
- for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( index == _activeButton ) {
p.save();
- p.translate( parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftHorizontal ),
- parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftVertical ) );
+ p.translate( parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
p.drawPolygon( *it, true );
p.restore();
}
@@ -299,7 +299,7 @@ public:
KDGanttMinimizeSplitter::ResizeMode mode;
QCOORD sizer;
bool isSplitter;
- QWidget *wid;
+ TQWidget *wid;
};
class QSplitterData
@@ -307,12 +307,12 @@ class QSplitterData
public:
QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
- QPtrList<QSplitterLayoutStruct> list;
+ TQPtrList<QSplitterLayoutStruct> list;
bool opaque;
bool firstShow;
};
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );
#endif // DOXYGEN_SKIP_INTERNAL
@@ -323,8 +323,8 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
widget with minimize buttons.
This class (and its documentation) is largely a copy of Qt's
- QSplitter; the copying was necessary because QSplitter is not
- extensible at all. QSplitter and its documentation are licensed
+ QSplitter; the copying was necessary because TQSplitter is not
+ extensible at all. TQSplitter and its documentation are licensed
according to the GPL and the Qt Professional License (if you hold
such a license) and are (C) Trolltech AS.
@@ -332,18 +332,18 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
dragging the boundary between the children. Any number of widgets
may be controlled.
- To show a QListBox, a QListView and a QTextEdit side by side:
+ To show a TQListBox, a TQListView and a TQTextEdit side by side:
\code
KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( parent );
- QListBox *lb = new QListBox( split );
- QListView *lv = new QListView( split );
- QTextEdit *ed = new QTextEdit( split );
+ TQListBox *lb = new TQListBox( split );
+ TQListView *lv = new TQListView( split );
+ TQTextEdit *ed = new TQTextEdit( split );
\endcode
In KDGanttMinimizeSplitter, the boundary can be either horizontal or
vertical. The default is horizontal (the children are side by side)
- but you can use setOrientation( QSplitter::Vertical ) to set it to
+ but you can use setOrientation( TQSplitter::Vertical ) to set it to
vertical.
Use setResizeMode() to specify
@@ -366,33 +366,33 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
-static QSize minSize( const QWidget* /*w*/ )
+static TQSize minSize( const TQWidget* /*w*/ )
{
- return QSize(0,0);
+ return TQSize(0,0);
}
// This is the original version of minSize
-static QSize minSizeHint( const QWidget* w )
+static TQSize minSizeHint( const TQWidget* w )
{
- QSize min = w->minimumSize();
- QSize s;
+ TQSize min = w->minimumSize();
+ TQSize s;
if ( min.height() <= 0 || min.width() <= 0 )
s = w->minimumSizeHint();
if ( min.height() > 0 )
s.setHeight( min.height() );
if ( min.width() > 0 )
s.setWidth( min.width() );
- return s.expandedTo(QSize(0,0));
+ return s.expandedTo(TQSize(0,0));
}
/*!
Constructs a horizontal splitter with the \a parent and \a
- name arguments being passed on to the QFrame constructor.
+ name arguments being passed on to the TQFrame constructor.
*/
-KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *parent, const char *name )
+ :TQFrame(parent,name,WPaintUnclipped)
{
#if QT_VERSION >= 300
orient = Horizontal;
@@ -402,10 +402,10 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
/*!
Constructs a splitter with orientation \a o with the \a parent
- and \a name arguments being passed on to the QFrame constructor.
+ and \a name arguments being passed on to the TQFrame constructor.
*/
-KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, TQWidget *parent, const char *name )
+ :TQFrame(parent,name,WPaintUnclipped)
{
#if QT_VERSION >= 300
orient = o;
@@ -430,9 +430,9 @@ void KDGanttMinimizeSplitter::init()
{
data = new QSplitterData;
if ( orient == Horizontal )
- setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
else
- setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
}
#endif
@@ -452,9 +452,9 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o )
orient = o;
if ( orient == Horizontal )
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
else
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
@@ -471,7 +471,7 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o )
/*!
Reimplemented from superclass.
*/
-void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * )
+void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
{
doResize();
}
@@ -486,14 +486,14 @@ void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * )
needed. (If \a first is TRUE, then recalcId is very probably
needed.)
*/
-QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool first )
+QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
{
QSplitterLayoutStruct *s;
KDGanttSplitterHandle *newHandle = 0;
if ( data->list.count() > 0 ) {
s = new QSplitterLayoutStruct;
s->mode = KeepSize;
- QString tmp = "qt_splithandle_";
+ TQString tmp = "qt_splithandle_";
tmp += w->name();
newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
s->wid = newHandle;
@@ -527,13 +527,13 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
Tells the splitter that a child widget has been inserted or removed.
The event is passed in \a c.
*/
-void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
+void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
{
- if ( c->type() == QEvent::ChildInserted ) {
+ if ( c->type() == TQEvent::ChildInserted ) {
if ( !c->child()->isWidgetType() )
return;
- if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) )
+ if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) )
return;
QSplitterLayoutStruct *s = data->list.first();
@@ -542,10 +542,10 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
return;
s = data->list.next();
}
- addWidget( (QWidget*)c->child() );
+ addWidget( (TQWidget*)c->child() );
recalc( isVisible() );
- } else if ( c->type() == QEvent::ChildRemoved ) {
+ } else if ( c->type() == TQEvent::ChildRemoved ) {
QSplitterLayoutStruct *p = 0;
if ( data->list.count() > 1 )
p = data->list.at(1); //remove handle _after_ first widget.
@@ -576,13 +576,13 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
*/
void KDGanttMinimizeSplitter::setRubberband( int p )
{
- QPainter paint( this );
+ TQPainter paint( this );
paint.setPen( gray );
paint.setBrush( gray );
paint.setRasterOp( XorROP );
- QRect r = contentsRect();
+ TQRect r = contentsRect();
const int rBord = 3; //Themable????
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( orient == Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
@@ -601,14 +601,14 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
/*! Reimplemented from superclass. */
-bool KDGanttMinimizeSplitter::event( QEvent *e )
+bool KDGanttMinimizeSplitter::event( TQEvent *e )
{
- if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) {
+ if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) {
recalc( isVisible() );
- if ( e->type() == QEvent::Show )
+ if ( e->type() == TQEvent::Show )
data->firstShow = FALSE;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
@@ -617,14 +617,14 @@ bool KDGanttMinimizeSplitter::event( QEvent *e )
Draws the splitter handle in the rectangle described by \a x, \a y,
\a w, \a h using painter \a p.
- \sa QStyle::drawPrimitive()
+ \sa TQStyle::drawPrimitive()
*/
-void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
+void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
QCOORD x, QCOORD y, QCOORD w, QCOORD h )
{
- style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(),
+ style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), colorGroup(),
(orientation() == Qt::Horizontal ?
- QStyle::Style_Horizontal : 0));
+ TQStyle::Style_Horizontal : 0));
}
@@ -633,7 +633,7 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
or 0 if there is no such splitter
(i.e. it is either not in this KDGanttMinimizeSplitter or it is at the end).
*/
-int KDGanttMinimizeSplitter::idAfter( QWidget* w ) const
+int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
{
QSplitterLayoutStruct *s = data->list.first();
bool seen_w = FALSE;
@@ -667,7 +667,7 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
QSplitterLayoutStruct *s = data->list.at(id);
int oldP = orient == Horizontal ? s->wid->x() : s->wid->y();
bool upLeft;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
p += s->wid->width();
upLeft = p > oldP;
} else
@@ -680,10 +680,10 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
}
-void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter )
+void KDGanttMinimizeSplitter::setG( TQWidget *w, int p, int s, bool isSplitter )
{
if ( orient == Horizontal ) {
- if ( QApplication::reverseLayout() && orient == Horizontal && !isSplitter )
+ if ( TQApplication::reverseLayout() && orient == Horizontal && !isSplitter )
p = contentsRect().width() - p - s;
w->setGeometry( p, contentsRect().y(), s, contentsRect().height() );
} else
@@ -703,13 +703,13 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
QSplitterLayoutStruct *s = data->list.at(id);
if ( !s )
return;
- QWidget *w = s->wid;
+ TQWidget *w = s->wid;
if ( w->isHidden() ) {
moveBefore( pos, id-1, upLeft );
} else if ( s->isSplitter ) {
int pos1, pos2;
int dd = s->sizer;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
pos1 = pos;
pos2 = pos + dd;
} else {
@@ -725,7 +725,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
}
} else {
int dd, newLeft, nextPos;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
dd = w->geometry().right() - pos;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
newLeft = pos+1;
@@ -753,7 +753,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
data->list.at(id) : 0;
if ( !s )
return;
- QWidget *w = s->wid;
+ TQWidget *w = s->wid;
if ( w->isHidden() ) {
moveAfter( pos, id+1, upLeft );
} else if ( pick( w->pos() ) == pos ) {
@@ -762,7 +762,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else if ( s->isSplitter ) {
int dd = s->sizer;
int pos1, pos2;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
pos2 = pos - dd;
pos1 = pos2 + 1;
} else {
@@ -779,7 +779,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else {
int left = pick( w->pos() );
int right, dd,/* newRight,*/ newLeft, nextPos;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
dd = pos - left + 1;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
newLeft = pos-dd+1;
@@ -802,16 +802,16 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max )
{
QSplitterLayoutStruct *s = data->list.at(id-1);
- QWidget* w = s->wid;
- *min = pick( w->mapToParent( QPoint(0,0) ) );
+ TQWidget* w = s->wid;
+ *min = pick( w->mapToParent( TQPoint(0,0) ) );
if ( (uint) id == data->list.count() ) {
pick( size() );
}
else {
QSplitterLayoutStruct *s = data->list.at(id+1);
- QWidget* w = s->wid;
- *max = pick( w->mapToParent( QPoint( w->width(), w->height() ) ) ) -8;
+ TQWidget* w = s->wid;
+ *max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8;
}
}
@@ -856,9 +856,9 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxA += pick( s->wid->maximumSize() );
}
}
- QRect r = contentsRect();
- if ( orient == Horizontal && QApplication::reverseLayout() ) {
- int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ TQRect r = contentsRect();
+ if ( orient == Horizontal && TQApplication::reverseLayout() ) {
+ int splitterWidth = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( min )
*min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth;
if ( max )
@@ -891,10 +891,10 @@ int KDGanttMinimizeSplitter::adjustPos( int p, int id )
void KDGanttMinimizeSplitter::doResize()
{
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int i;
int n = data->list.count();
- QMemArray<QLayoutStruct> a( n );
+ TQMemArray<QLayoutStruct> a( n );
for ( i = 0; i< n; i++ ) {
a[i].init();
QSplitterLayoutStruct *s = data->list.at(i);
@@ -972,7 +972,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
minl += s->sizer;
maxl += s->sizer;
} else {
- QSize minS = minSize(s->wid);
+ TQSize minS = minSize(s->wid);
minl += pick( minS );
maxl += pick( s->wid->maximumSize() );
mint = QMAX( mint, trans( minS ));
@@ -1013,7 +1013,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
\sa ResizeMode
*/
-void KDGanttMinimizeSplitter::setResizeMode( QWidget *w, ResizeMode mode )
+void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
{
processChildEvents();
QSplitterLayoutStruct *s = data->list.first();
@@ -1059,7 +1059,7 @@ void KDGanttMinimizeSplitter::setOpaqueResize( bool on )
Moves widget \a w to the leftmost/top position.
*/
-void KDGanttMinimizeSplitter::moveToFirst( QWidget *w )
+void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
@@ -1088,7 +1088,7 @@ void KDGanttMinimizeSplitter::moveToFirst( QWidget *w )
Moves widget \a w to the rightmost/bottom position.
*/
-void KDGanttMinimizeSplitter::moveToLast( QWidget *w )
+void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
@@ -1126,21 +1126,21 @@ void KDGanttMinimizeSplitter::recalcId()
/*! Reimplemented from superclass.
*/
-QSize KDGanttMinimizeSplitter::sizeHint() const
+TQSize KDGanttMinimizeSplitter::sizeHint() const
{
constPolish();
int l = 0;
int t = 0;
if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
+ const TQObjectList * c = children();
+ TQObjectListIt it( *c );
+ TQObject * o;
while( (o=it.current()) != 0 ) {
++it;
if ( o->isWidgetType() &&
- !((QWidget*)o)->isHidden() ) {
- QSize s = ((QWidget*)o)->sizeHint();
+ !((TQWidget*)o)->isHidden() ) {
+ TQSize s = ((TQWidget*)o)->sizeHint();
if ( s.isValid() ) {
l += pick( s );
t = QMAX( t, trans( s ) );
@@ -1148,7 +1148,7 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
}
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1156,21 +1156,21 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
\reimp
*/
-QSize KDGanttMinimizeSplitter::minimumSizeHint() const
+TQSize KDGanttMinimizeSplitter::minimumSizeHint() const
{
constPolish();
int l = 0;
int t = 0;
if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
+ const TQObjectList * c = children();
+ TQObjectListIt it( *c );
+ TQObject * o;
while( (o=it.current()) != 0 ) {
++it;
if ( o->isWidgetType() &&
- !((QWidget*)o)->isHidden() ) {
- QSize s = minSizeHint((QWidget*)o);
+ !((TQWidget*)o)->isHidden() ) {
+ TQSize s = minSizeHint((TQWidget*)o);
if ( s.isValid() ) {
l += pick( s );
t = QMAX( t, trans( s ) );
@@ -1178,7 +1178,7 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
}
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1203,10 +1203,10 @@ void KDGanttMinimizeSplitter::storeSizes()
Hides \a w if \a hide is TRUE and updates the splitter.
\warning Due to a limitation in the current implementation,
- calling QWidget::hide() will not work.
+ calling TQWidget::hide() will not work.
*/
-void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide )
+void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide )
{
if ( w == w1 ) {
w1show = !hide;
@@ -1230,7 +1230,7 @@ void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide )
Returns the hidden status of \a w
*/
-bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
+bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
{
if ( w == w1 )
return !w1show;
@@ -1255,8 +1255,8 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
- QValueList<int> list = mySplitter.sizes();
- QValueList<int>::Iterator it = list.begin();
+ TQValueList<int> list = mySplitter.sizes();
+ TQValueList<int>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
@@ -1266,13 +1266,13 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
\sa setSizes()
*/
-QValueList<int> KDGanttMinimizeSplitter::sizes() const
+TQValueList<int> KDGanttMinimizeSplitter::sizes() const
{
if ( !testWState(WState_Polished) ) {
- QWidget* that = (QWidget*) this;
+ TQWidget* that = (TQWidget*) this;
that->polish();
}
- QValueList<int> list;
+ TQValueList<int> list;
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( !s->isSplitter )
@@ -1297,10 +1297,10 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const
\sa sizes()
*/
-void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
+void KDGanttMinimizeSplitter::setSizes( TQValueList<int> list )
{
processChildEvents();
- QValueList<int>::Iterator it = list.begin();
+ TQValueList<int>::Iterator it = list.begin();
QSplitterLayoutStruct *s = data->list.first();
while ( s && it != list.end() ) {
if ( !s->isSplitter ) {
@@ -1320,7 +1320,7 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
void KDGanttMinimizeSplitter::processChildEvents()
{
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
+ TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
}
@@ -1328,9 +1328,9 @@ void KDGanttMinimizeSplitter::processChildEvents()
Reimplemented from superclass.
*/
-void KDGanttMinimizeSplitter::styleChange( QStyle& old )
+void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
@@ -1338,7 +1338,7 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
s = data->list.next();
}
doResize();
- QFrame::styleChange( old );
+ TQFrame::styleChange( old );
}
#endif
@@ -1371,7 +1371,7 @@ static inline int toFixed( int i ) { return i * 256; }
static inline int fRound( int i ) {
return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256;
}
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer )
{
typedef int fixed;