summaryrefslogtreecommitdiffstats
path: root/kdgantt
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp270
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h62
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp60
-rw-r--r--kdgantt/KDGanttSemiSizingControl.h26
-rw-r--r--kdgantt/KDGanttSizingControl.cpp4
-rw-r--r--kdgantt/KDGanttSizingControl.h4
-rw-r--r--kdgantt/KDGanttView.cpp838
-rw-r--r--kdgantt/KDGanttView.h270
-rw-r--r--kdgantt/KDGanttViewEventItem.cpp36
-rw-r--r--kdgantt/KDGanttViewEventItem.h24
-rw-r--r--kdgantt/KDGanttViewItem.cpp342
-rw-r--r--kdgantt/KDGanttViewItem.h172
-rw-r--r--kdgantt/KDGanttViewItemDrag.cpp34
-rw-r--r--kdgantt/KDGanttViewItemDrag.h16
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp684
-rw-r--r--kdgantt/KDGanttViewSubwidgets.h334
-rw-r--r--kdgantt/KDGanttViewSummaryItem.cpp28
-rw-r--r--kdgantt/KDGanttViewSummaryItem.h30
-rw-r--r--kdgantt/KDGanttViewTaskItem.cpp38
-rw-r--r--kdgantt/KDGanttViewTaskItem.h22
-rw-r--r--kdgantt/KDGanttViewTaskLink.cpp192
-rw-r--r--kdgantt/KDGanttViewTaskLink.h68
-rw-r--r--kdgantt/KDGanttViewTaskLinkGroup.cpp52
-rw-r--r--kdgantt/KDGanttViewTaskLinkGroup.h32
-rw-r--r--kdgantt/KDGanttXMLTools.cpp262
-rw-r--r--kdgantt/KDGanttXMLTools.h116
-rw-r--r--kdgantt/itemAttributeDialog.ui.h94
-rw-r--r--kdgantt/qlayoutengine_p.h4
28 files changed, 2057 insertions, 2057 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;
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 1581d615..801fc011 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -35,8 +35,8 @@
#define KDGANTTMINIMIZESPLITTER_H
#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
+#include "tqframe.h"
+#include "tqvaluelist.h"
#endif // QT_H
#ifndef QT_NO_SPLITTER
@@ -55,8 +55,8 @@ public:
enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
enum Direction { Left, Right, Up, Down };
- KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
- KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( TQWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( Orientation, TQWidget* parent=0, const char* name=0 );
~KDGanttMinimizeSplitter();
virtual void setOrientation( Orientation );
@@ -66,33 +66,33 @@ public:
Direction minimizeDirection() const;
#if QT_VERSION >= 300
- virtual void setResizeMode( QWidget *w, ResizeMode );
+ virtual void setResizeMode( TQWidget *w, ResizeMode );
virtual void setOpaqueResize( bool = TRUE );
bool opaqueResize() const;
- void moveToFirst( QWidget * );
- void moveToLast( QWidget * );
+ void moveToFirst( TQWidget * );
+ void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ TQValueList<int> sizes() const;
+ void setSizes( TQValueList<int> );
void expandPos( int id, int* min, int* max );
protected:
- void childEvent( QChildEvent * );
+ void childEvent( TQChildEvent * );
- bool event( QEvent * );
- void resizeEvent( QResizeEvent * );
+ bool event( TQEvent * );
+ void resizeEvent( TQResizeEvent * );
- int idAfter( QWidget* ) const;
+ int idAfter( TQWidget* ) const;
void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
+ virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y,
QCOORD w, QCOORD h );
- void styleChange( QStyle& );
+ void styleChange( TQStyle& );
int adjustPos( int , int );
virtual void setRubberband( int );
void getRange( int id, int*, int* );
@@ -103,20 +103,20 @@ private:
void doResize();
void storeSizes();
void processChildEvents();
- QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
+ QSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
void recalcId();
void moveBefore( int pos, int id, bool upLeft );
void moveAfter( int pos, int id, bool upLeft );
- void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
+ void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
- QCOORD pick( const QPoint &p ) const
+ QCOORD pick( const TQPoint &p ) const
{ return orient == Horizontal ? p.x() : p.y(); }
- QCOORD pick( const QSize &s ) const
+ QCOORD pick( const TQSize &s ) const
{ return orient == Horizontal ? s.width() : s.height(); }
- QCOORD trans( const QPoint &p ) const
+ QCOORD trans( const TQPoint &p ) const
{ return orient == Vertical ? p.x() : p.y(); }
- QCOORD trans( const QSize &s ) const
+ QCOORD trans( const TQSize &s ) const
{ return orient == Vertical ? s.width() : s.height(); }
QSplitterData *data;
@@ -152,19 +152,19 @@ public:
bool opaque() const { return s->opaqueResize(); }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
int id() const { return myId; } // data->list.at(id())->wid == this
void setId( int i ) { myId = i; }
protected:
- QValueList<QPointArray> buttonRegions();
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- int onButton( const QPoint& p );
- void updateCursor( const QPoint& p );
+ TQValueList<TQPointArray> buttonRegions();
+ void paintEvent( TQPaintEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ int onButton( const TQPoint& p );
+ void updateCursor( const TQPoint& p );
private:
Qt::Orientation orient;
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index 91629662..e81b7781 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -33,12 +33,12 @@
#include "KDGanttSemiSizingControl.h"
-#include <qpushbutton.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*!
\class KDGanttSemiSizingControl KDGanttSemiSizingControl.h
This class provides exactly one child widget with a button for
@@ -63,7 +63,7 @@
the base class.
*/
-KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent,
+KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( Horizontal ),
_arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
@@ -85,7 +85,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent,
*/
KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation,
- QWidget* parent,
+ TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( orientation ),
_arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
@@ -109,7 +109,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation,
KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition,
Orientation orientation,
- QWidget* parent,
+ TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( orientation ),
_arrowPos( arrowPosition ), _minimizedWidget(0), _maximizedWidget(0)
@@ -127,7 +127,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition,
\sa minimizedWidget()
*/
-void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget )
+void KDGanttSemiSizingControl::setMinimizedWidget( TQWidget* widget )
{
_minimizedWidget = widget;
if( _minimizedWidget ) _minimizedWidget->hide();
@@ -143,7 +143,7 @@ void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget )
\sa setMinimizedWidget()
*/
-QWidget* KDGanttSemiSizingControl::minimizedWidget() const
+TQWidget* KDGanttSemiSizingControl::minimizedWidget() const
{
return _minimizedWidget;
}
@@ -157,7 +157,7 @@ QWidget* KDGanttSemiSizingControl::minimizedWidget() const
\sa maximizedWidget()
*/
-void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget )
+void KDGanttSemiSizingControl::setMaximizedWidget( TQWidget* widget )
{
_maximizedWidget = widget;
//if( _maximizedWidget ) _maximizedWidget->show();
@@ -172,7 +172,7 @@ void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget )
\sa setMaximizedWidget()
*/
-QWidget* KDGanttSemiSizingControl::maximizedWidget() const
+TQWidget* KDGanttSemiSizingControl::maximizedWidget() const
{
return _maximizedWidget;
}
@@ -246,12 +246,12 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition(
void KDGanttSemiSizingControl::init()
{
- _but = new QPushButton( this );
- _but->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- connect( _but, SIGNAL( clicked() ), this, SLOT(changeState()) );
+ _but = new TQPushButton( this );
+ _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) );
_layout = 0;
- QWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
- QToolTip::add( _but, "Show / hide legend");
+ TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
+ TQToolTip::add( _but, "Show / hide legend");
}
@@ -260,17 +260,17 @@ void KDGanttSemiSizingControl::setup()
{
//-------------------------------------------------- Setup layout
delete _layout;
- QBoxLayout* butLayout; // _layout will delete me
+ TQBoxLayout* butLayout; // _layout will delete me
if ( _orient == Horizontal || isMinimized() )
- _layout = new QHBoxLayout( this );
+ _layout = new TQHBoxLayout( this );
else
- _layout = new QVBoxLayout( this );
+ _layout = new TQVBoxLayout( this );
if ( _orient == Vertical && !isMinimized() )
- butLayout = new QHBoxLayout( _layout );
+ butLayout = new TQHBoxLayout( _layout );
else
- butLayout = new QVBoxLayout( _layout );
+ butLayout = new TQVBoxLayout( _layout );
@@ -298,7 +298,7 @@ void KDGanttSemiSizingControl::setup()
}
// Set widget in the correct possition
- QWidget* widget;
+ TQWidget* widget;
/* ************************** old code ***************
if ( isMinimized() )
widget = _minimizedWidget;
@@ -380,12 +380,12 @@ void KDGanttSemiSizingControl::minimize( bool minimize )
}
}
-QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
+TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
int s = 10;
- QPixmap pix( s, s );
+ TQPixmap pix( s, s );
pix.fill( blue );
- QPointArray arr;
+ TQPointArray arr;
switch ( direction ) {
case Up: arr.setPoints( 3, 0, s-1, s-1, s-1, 0, s/2 ); ;break;
case Down: arr.setPoints( 3, 0, 0, s-1, 0, s/2, s-1 ); break;
@@ -393,14 +393,14 @@ QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
case Right: arr.setPoints( 3, 0,0, s-1, s/2, 0, s-1 ); break;
}
- QPainter p( &pix );
+ TQPainter p( &pix );
p.setPen( black );
p.setBrush( colorGroup().button() );
p.drawPolygon( arr );
- QBitmap bit( s, s );
+ TQBitmap bit( s, s );
bit.fill( color0 );
- QPainter p2( &bit );
+ TQPainter p2( &bit );
p2.setPen( color1 );
p2.setBrush( color1 );
p2.drawPolygon( arr );
diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h
index 6fb56e32..af7a74e7 100644
--- a/kdgantt/KDGanttSemiSizingControl.h
+++ b/kdgantt/KDGanttSemiSizingControl.h
@@ -36,7 +36,7 @@
#define KDGANTTSEMISIZINGCONTROL_H
#include "KDGanttSizingControl.h"
-#include <qlayout.h>
+#include <tqlayout.h>
class QPushButton;
class QBoxLayout;
@@ -49,17 +49,17 @@ class KDGanttSemiSizingControl : public KDGanttSizingControl
public:
enum ArrowPosition { Before, After };
- KDGanttSemiSizingControl( QWidget* parent = 0, const char* name = 0 );
- KDGanttSemiSizingControl( Orientation orientation, QWidget* parent = 0,
+ KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 );
+ KDGanttSemiSizingControl( Orientation orientation, TQWidget* parent = 0,
const char* name = 0 );
KDGanttSemiSizingControl( ArrowPosition arrowPosition,
- Orientation orientation, QWidget* parent = 0,
+ Orientation orientation, TQWidget* parent = 0,
const char* name = 0 );
- void setMinimizedWidget( QWidget* widget );
- void setMaximizedWidget( QWidget* widget );
- QWidget* minimizedWidget() const;
- QWidget* maximizedWidget() const;
+ void setMinimizedWidget( TQWidget* widget );
+ void setMaximizedWidget( TQWidget* widget );
+ TQWidget* minimizedWidget() const;
+ TQWidget* maximizedWidget() const;
void setOrientation( Qt::Orientation orientation );
Qt::Orientation orientation() const;
@@ -75,15 +75,15 @@ protected:
void setup();
void init();
enum Direction {Left, Right, Up, Down };
- QPixmap pixmap( Direction );
+ TQPixmap pixmap( Direction );
private:
Orientation _orient;
ArrowPosition _arrowPos;
- QWidget* _minimizedWidget;
- QWidget* _maximizedWidget;
- QBoxLayout* _layout;
- QPushButton* _but;
+ TQWidget* _minimizedWidget;
+ TQWidget* _maximizedWidget;
+ TQBoxLayout* _layout;
+ TQPushButton* _but;
};
diff --git a/kdgantt/KDGanttSizingControl.cpp b/kdgantt/KDGanttSizingControl.cpp
index 5f4c004a..a650a6e4 100644
--- a/kdgantt/KDGanttSizingControl.cpp
+++ b/kdgantt/KDGanttSizingControl.cpp
@@ -56,8 +56,8 @@
*/
-KDGanttSizingControl::KDGanttSizingControl( QWidget* parent, const char* name, WFlags f )
- :QWidget( parent, name, f ), _isMinimized( false )
+KDGanttSizingControl::KDGanttSizingControl( TQWidget* parent, const char* name, WFlags f )
+ :TQWidget( parent, name, f ), _isMinimized( false )
{
}
diff --git a/kdgantt/KDGanttSizingControl.h b/kdgantt/KDGanttSizingControl.h
index 12fa075e..de700399 100644
--- a/kdgantt/KDGanttSizingControl.h
+++ b/kdgantt/KDGanttSizingControl.h
@@ -33,7 +33,7 @@
#ifndef KDGANTTSIZINGCONTROL_H
#define KDGANTTSIZINGCONTROL_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KDGanttSizingControl : public QWidget
{
@@ -43,7 +43,7 @@ public:
bool isMinimized() const;
protected:
- KDGanttSizingControl( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ KDGanttSizingControl( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
public slots:
virtual void minimize( bool minimize );
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 0b09ce10..9403c10f 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -39,19 +39,19 @@
#include "KDGanttViewItem.h"
#include "KDGanttXMLTools.h"
#include "itemAttributeDialog.h"
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qscrollview.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qiconview.h>
-
-#include <qmessagebox.h>
-#include <qfileinfo.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqscrollview.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqiconview.h>
+
+#include <tqmessagebox.h>
+#include <tqfileinfo.h>
#ifndef KDGANTT_MASTER_CVS
#include "KDGanttView.moc"
@@ -80,7 +80,7 @@
\param name the internal debugging name
*/
-KDGanttView::KDGanttView( QWidget* parent, const char* name )
+KDGanttView::KDGanttView( TQWidget* parent, const char* name )
: KDGanttMinimizeSplitter( Qt::Vertical, parent, name ),
myCanvasView(0),
myTimeHeaderScroll(0),
@@ -93,41 +93,41 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
mySplitter = new KDGanttMinimizeSplitter( this );
mySplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
- leftWidget = new QVBox( mySplitter );
- rightWidget = new QVBox( mySplitter );
+ leftWidget = new TQVBox( mySplitter );
+ rightWidget = new TQVBox( mySplitter );
myLegend = new KDLegendWidget( leftWidget, this );
- spacerLeft = new QHBox( leftWidget );
+ spacerLeft = new TQHBox( leftWidget );
myListView = new KDListView(leftWidget, this);
- myListView->setVScrollBarMode (QScrollView::AlwaysOff );
- connect( myListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotSelectionChanged( QListViewItem* ) ) );
+ myListView->setVScrollBarMode (TQScrollView::AlwaysOff );
+ connect( myListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
- connect( myListView, SIGNAL( mouseButtonClicked ( int, QListViewItem * , const QPoint &, int ) ), this, SLOT( slotmouseButtonClicked ( int , QListViewItem * , const QPoint &, int ) ) );
- connect( myListView, SIGNAL( contextMenuRequested ( QListViewItem * , const QPoint &, int ) ), this, SLOT( slotcontextMenuRequested ( QListViewItem * , const QPoint & , int ) ) );
+ connect( myListView, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) );
+ connect( myListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) );
- connect( myListView, SIGNAL(currentChanged( QListViewItem * ) ), this, SLOT(slotCurrentChanged ( QListViewItem * ) ) );
- connect( myListView, SIGNAL(itemRenamed ( QListViewItem * , int , const QString & ) ), this, SLOT(slotItemRenamed ( QListViewItem *, int , const QString & ) ) );
- connect( myListView, SIGNAL(mouseButtonPressed( int, QListViewItem * , const QPoint &, int ) ), this, SLOT(slotMouseButtonPressed ( int , QListViewItem * , const QPoint & , int ) ) );
+ connect( myListView, TQT_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQT_SLOT(slotCurrentChanged ( TQListViewItem * ) ) );
+ connect( myListView, TQT_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQT_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) );
+ connect( myListView, TQT_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) );
- //connect( myListView, SIGNAL( ), this, SLOT( ) );
+ //connect( myListView, TQT_SIGNAL( ), this, TQT_SLOT( ) );
myTimeTable = new KDTimeTableWidget (rightWidget,this);
- spacerRight = new QWidget( rightWidget );
+ spacerRight = new TQWidget( rightWidget );
- myTimeHeaderContainer = new QHBox( rightWidget );
- myTimeHeaderContainer->setFrameStyle( QFrame::NoFrame );
+ myTimeHeaderContainer = new TQHBox( rightWidget );
+ myTimeHeaderContainer->setFrameStyle( TQFrame::NoFrame );
myTimeHeaderContainer->setMargin( 0 );
- myTimeHeaderScroll = new QScrollView ( myTimeHeaderContainer );
- myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff );
- myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOff );
- timeHeaderSpacerWidget = new QWidget( myTimeHeaderContainer );
+ myTimeHeaderScroll = new TQScrollView ( myTimeHeaderContainer );
+ myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff );
+ myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOff );
+ timeHeaderSpacerWidget = new TQWidget( myTimeHeaderContainer );
/*
- myTimeHeaderScroll = new QScrollView ( rightWidget );
- myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff );
- myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOn );
+ myTimeHeaderScroll = new TQScrollView ( rightWidget );
+ myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff );
+ myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOn );
*/
//myTimeHeader = new KDTimeHeaderWidget (rightWidget,this);
myTimeHeader = new KDTimeHeaderWidget (myTimeHeaderScroll->viewport(),this);
@@ -135,18 +135,18 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
myTimeHeaderScroll->viewport()->setBackgroundColor( myTimeHeader->backgroundColor() );
timeHeaderSpacerWidget->setBackgroundColor( myTimeHeader->backgroundColor() );
myCanvasView = new KDGanttCanvasView (this,myTimeTable,rightWidget);
- myTimeHeaderScroll->setFrameStyle( QFrame::NoFrame );
+ myTimeHeaderScroll->setFrameStyle( TQFrame::NoFrame );
//
- myCanvasView->setFrameStyle( QFrame::NoFrame );
+ myCanvasView->setFrameStyle( TQFrame::NoFrame );
myCanvasView->setMargin( 0 );
//
myTimeHeaderScroll->setMargin( 0 );//myCanvasView->frameWidth() );
setFrameStyle(myListView->frameStyle());
setLineWidth( 2 );
- myListView->setFrameStyle( QFrame::NoFrame );
+ myListView->setFrameStyle( TQFrame::NoFrame );
myListView->setMargin( 0 );
- QObject::connect(myListView, SIGNAL ( expanded ( QListViewItem * ) ) , myTimeTable , SLOT( expandItem(QListViewItem * ))) ;
- QObject::connect(myListView, SIGNAL (collapsed ( QListViewItem * ) ) , myTimeTable , SLOT(collapseItem(QListViewItem * ))) ;
+ TQObject::connect(myListView, TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT( expandItem(TQListViewItem * ))) ;
+ TQObject::connect(myListView, TQT_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT(collapseItem(TQListViewItem * ))) ;
timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() );
listViewIsVisible = true;
@@ -157,8 +157,8 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
_showHeader = false;
myTextColor = Qt::black;
- myLegendItems = new QPtrList<legendItem>;
- //QObject::connect( this, SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, SLOT( editItem( KDGanttViewItem* ))) ;
+ myLegendItems = new TQPtrList<legendItem>;
+ //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ;
myItemAttributeDialog = new itemAttributeDialog();
setRepaintMode( KDGanttView::Medium );
//setRepaintMode( KDGanttView::Always );
@@ -166,19 +166,19 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
setHeaderVisible( false );
// now connecting the widgets
- connect(myCanvasView->horizontalScrollBar(), SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), SLOT( setValue ( int))) ;
- connect(myCanvasView, SIGNAL ( heightResized( int )) ,myTimeTable, SLOT( checkHeight ( int))) ;
- connect(myCanvasView, SIGNAL ( widthResized( int )) ,myTimeHeader, SLOT( checkWidth ( int))) ;
-
- QObject::connect(myCanvasView->verticalScrollBar(), SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), SLOT( setValue ( int ))) ;
- connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,this, SLOT(slotHeaderSizeChanged() )) ;
- connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,myTimeTable, SLOT(resetWidth( int ) )) ;
- connect(myListView, SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, SLOT( moveMyContent( int, int ))) ;
- connect(myTimeTable, SIGNAL ( heightComputed ( int ) ) ,myCanvasView, SLOT( setMyContentsHeight( int ))) ;
+ connect(myCanvasView->horizontalScrollBar(), TQT_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQT_SLOT( setValue ( int))) ;
+ connect(myCanvasView, TQT_SIGNAL ( heightResized( int )) ,myTimeTable, TQT_SLOT( checkHeight ( int))) ;
+ connect(myCanvasView, TQT_SIGNAL ( widthResized( int )) ,myTimeHeader, TQT_SLOT( checkWidth ( int))) ;
+
+ TQObject::connect(myCanvasView->verticalScrollBar(), TQT_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQT_SLOT( setValue ( int ))) ;
+ connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,this, TQT_SLOT(slotHeaderSizeChanged() )) ;
+ connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQT_SLOT(resetWidth( int ) )) ;
+ connect(myListView, TQT_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQT_SLOT( moveMyContent( int, int ))) ;
+ connect(myTimeTable, TQT_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQT_SLOT( setMyContentsHeight( int ))) ;
// the next three are for adding new ticks at left/right
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (prevLine () ) ,this, SLOT(addTickLeft()));
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (nextLine () ) ,this, SLOT(addTickRight()));
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (valueChanged ( int ) ) ,this, SLOT( enableAdding( int )));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(addTickLeft()));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(addTickRight()));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT( enableAdding( int )));
// now initing
fCenterTimeLineAfterShow = false;
@@ -186,9 +186,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
fDropEnabled = false;
closingBlocked = false;
myTimeHeader->computeTicks();
- centerTimelineAfterShow( QDateTime::currentDateTime () );
+ centerTimelineAfterShow( TQDateTime::currentDateTime () );
setDisplayEmptyTasksAsLine( false );
- QValueList<int> list;
+ TQValueList<int> list;
list.append(240);
list.append(530);
mySplitter->setSizes( list );
@@ -287,7 +287,7 @@ void KDGanttView::show()
else
myCanvasView->horizontalScrollBar()->setValue(1 );
myTimeTable->updateMyContent();
- QWidget::show();
+ TQWidget::show();
myCanvasView->setMyContentsHeight( 0 );
if ( fCenterTimeLineAfterShow ) {
fCenterTimeLineAfterShow = false;
@@ -306,7 +306,7 @@ bool KDGanttView::close ( bool alsoDelete )
//qDebug("close ");
if ( closingBlocked )
return false;
- return QWidget::close ( alsoDelete );
+ return TQWidget::close ( alsoDelete );
}
@@ -318,13 +318,13 @@ bool KDGanttView::close ( bool alsoDelete )
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-QSize KDGanttView::sizeHint() const
+TQSize KDGanttView::sizeHint() const
{
bool block = myTimeTable->blockUpdating();
myTimeTable->setBlockUpdating( false );
myTimeTable->updateMyContent();
/* The below causes recursive calls to various size updating methods, which
- * cause QCanvas to hide and show items like mad, which is very slow. If
+ * cause TQCanvas to hide and show items like mad, which is very slow. If
* there is a legitimate gui updating issue here somewhere, it will need
* to be solved differently.
*/
@@ -348,7 +348,7 @@ QSize KDGanttView::sizeHint() const
// add 10 for the splitter-bars
// qDebug("sizehint %d %d ",hintWid+10, hintHeight );
myTimeTable->setBlockUpdating( block );
- return QSize( hintWid+10, hintHeight );
+ return TQSize( hintWid+10, hintHeight );
}
@@ -418,7 +418,7 @@ bool KDGanttView::headerVisible() const
\param global true if coordX is a global position, false otherwise
\return the date and time at coordinate X in the Gantt view.
*/
-QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
+TQDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
{
// default for myTimeHeader->getDateTimeForIndex() is local
return myTimeHeader->getDateTimeForIndex(coordX, !global );
@@ -428,7 +428,7 @@ QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
/*!
Implements a casted pass-through of the selectionChanged() signal.
*/
-void KDGanttView::slotSelectionChanged( QListViewItem* item )
+void KDGanttView::slotSelectionChanged( TQListViewItem* item )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
Q_ASSERT( gItem );
@@ -440,8 +440,8 @@ void KDGanttView::slotSelectionChanged( QListViewItem* item )
Implements a casted pass-through of the mouseButtonClicked() signal.
Signals itemLeftClicked() , itemMidClicked() are emitted as well.
*/
-void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item,
- const QPoint & pos, int c )
+void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item,
+ const TQPoint & pos, int c )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvMouseButtonClicked ( button , gItem, pos, c );
@@ -476,7 +476,7 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item,
The signal itemRightClicked() is emitted as well;
the position is the global position.
*/
-void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col )
+void KDGanttView::slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvContextMenuRequested ( gItem, pos, col );
@@ -485,7 +485,7 @@ void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint
}
-void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
+void KDGanttView::emptySpaceDoubleClicked( TQMouseEvent * e )
{
emit dateTimeDoubleClicked( getDateTimeForCoordX( e->x(), false ) );
}
@@ -494,7 +494,7 @@ void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
/*
Implements a casted pass-through of the currentChanged() signal.
*/
-void KDGanttView::slotCurrentChanged ( QListViewItem * item )
+void KDGanttView::slotCurrentChanged ( TQListViewItem * item )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
myCurrentItem = gItem;
@@ -505,8 +505,8 @@ void KDGanttView::slotCurrentChanged ( QListViewItem * item )
/*
Implements a casted pass-through of the itemRenamed() signal.
*/
-void KDGanttView::slotItemRenamed ( QListViewItem * item , int col,
- const QString & text )
+void KDGanttView::slotItemRenamed ( TQListViewItem * item , int col,
+ const TQString & text )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvItemRenamed( gItem, col, text );
@@ -516,8 +516,8 @@ void KDGanttView::slotItemRenamed ( QListViewItem * item , int col,
/*
Implements a casted pass-through of the mouseButtonPressed() signal.
*/
-void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item,
- const QPoint & pos, int c )
+void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item,
+ const TQPoint & pos, int c )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvMouseButtonPressed( button, gItem, pos, c );
@@ -541,7 +541,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item,
void KDGanttView::setRepaintMode( RepaintMode mode )
{
- QScrollBar *cvh, *cvv;
+ TQScrollBar *cvh, *cvv;
cvh = myCanvasView->horizontalScrollBar();
cvv = myCanvasView->verticalScrollBar();
// first disconnect
@@ -553,18 +553,18 @@ void KDGanttView::setRepaintMode( RepaintMode mode )
break;
case Medium:
- connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvv, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint()));
- connect( cvv, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
break;
case Always:
- connect( cvv, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int )));
- connect( cvh, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int )));
- connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
+ connect( cvh, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
+ connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
break;
}
}
@@ -644,7 +644,7 @@ void KDGanttView::slotHeaderSizeChanged()
DO NOT DELETE THIS POINTER!
\sa setShowLegend(), setLegendIsDockwindow(),legendIsDockwindow()
*/
-QDockWindow* KDGanttView::legendDockwindow() const
+TQDockWindow* KDGanttView::legendDockwindow() const
{
return myLegend->dockwindow();
}
@@ -776,15 +776,15 @@ bool KDGanttView::editable() const
\sa loadProject()
*/
-bool KDGanttView::saveProject( QIODevice* device )
+bool KDGanttView::saveProject( TQIODevice* device )
{
Q_ASSERT( device );
- QDomDocument doc = saveXML();
+ TQDomDocument doc = saveXML();
if( device->isOpen() )
device->close();
if( device->open( IO_WriteOnly ) ) {
- QTextStream ts( device );
+ TQTextStream ts( device );
ts << doc.toString();
return true;
} else
@@ -803,15 +803,15 @@ bool KDGanttView::saveProject( QIODevice* device )
\sa saveProject()
*/
-bool KDGanttView::loadProject( QIODevice* device )
+bool KDGanttView::loadProject( TQIODevice* device )
{
Q_ASSERT( device );
if( device->isOpen() )
device->close();
if( device->open( IO_ReadOnly ) ) {
- QDomDocument doc( "GanttView" );
- QString err;
+ TQDomDocument doc( "GanttView" );
+ TQString err;
int errline, errcol;
if ( !doc.setContent( device, &err, &errline, &errcol ) ) {
qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline );
@@ -828,8 +828,8 @@ bool KDGanttView::loadProject( QIODevice* device )
/*!
Sends a Gantt view to a printer. The printer should already be set
- up for printing (by calling QPrinter::setup()).
- If the printer is not set up, QPrinter::setup() is called before printing
+ up for printing (by calling TQPrinter::setup()).
+ If the printer is not set up, TQPrinter::setup() is called before printing
You can specify, whether the ListView, TimeLine, or Legend will be
printed. All combinations of these three widgets are allowed.
@@ -844,13 +844,13 @@ bool KDGanttView::loadProject( QIODevice* device )
\sa drawContents()
*/
-void KDGanttView::print( QPrinter* printer ,
+void KDGanttView::print( TQPrinter* printer ,
bool printListView, bool printTimeLine,
bool printLegend )
{
bool deletePrinter = false;
if (! printer ) {
- printer = new QPrinter();
+ printer = new TQPrinter();
deletePrinter = true;
if ( !printer->setup()) {
delete printer;
@@ -858,17 +858,17 @@ void KDGanttView::print( QPrinter* printer ,
}
}
// now we have a printer to print on
- QPainter p( printer );
+ TQPainter p( printer );
// get the paper metrics
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer );
+ TQPaintDeviceMetrics m = TQPaintDeviceMetrics ( printer );
float dx, dy;
// get the size of the desired output for scaling.
// here we want to print all: ListView, TimeLine, and Legend
// for this purpose, we call drawContents() with a 0 pointer as painter
- QSize size = drawContents( 0, printListView, printTimeLine, printLegend );
+ TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
// at the top, we want to print current time/date
- QString date = "Printing Time: " + QDateTime::currentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -898,7 +898,7 @@ void KDGanttView::print( QPrinter* printer ,
/*!
- Paints a Gantt view on a QPainter.
+ Paints a Gantt view on a TQPainter.
You can specify, whether the list view, the time line, or the legend
is painted.
All combinations of these three widgets are allowed.
@@ -911,7 +911,7 @@ void KDGanttView::print( QPrinter* printer ,
the scale of the painter, before calling this method with a painter.
In order to get the output fitted to your paper and your printer,
call first
- QSize size = drawContents( 0, printListView, printTimeLine, printLegend );
+ TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
//then compute the scale
dx = paper.width() / size.width();
dy = paper.height() / size.height();
@@ -936,10 +936,10 @@ void KDGanttView::print( QPrinter* printer ,
\return the size of the painted area
\sa print()
*/
-QSize KDGanttView::drawContents( QPainter* p,
+TQSize KDGanttView::drawContents( TQPainter* p,
bool drawListView , bool drawTimeLine, bool drawLegend )
{
- QSize size;
+ TQSize size;
int lvX, lvY, thX, thY, tlX, tlY, lwX, lwY, allX, allY;
lvX = myListView->contentsWidth();
lvY = myCanvasView->canvas()->height() + 20;
@@ -964,7 +964,7 @@ QSize KDGanttView::drawContents( QPainter* p,
if ( allX < lwX )
allX = lwX ;
}
- size = QSize( allX, allY );
+ size = TQSize( allX, allY );
int temp = 0;
if ( p ) {
if ( drawListView ) {
@@ -1055,7 +1055,7 @@ void KDGanttView::zoomToFit()
\sa zoomToFit()
*/
-void KDGanttView::zoomToSelection( const QDateTime& start, const QDateTime& end )
+void KDGanttView::zoomToSelection( const TQDateTime& start, const TQDateTime& end )
{
myTimeHeader->zoomToSelection( start, end);
@@ -1076,21 +1076,21 @@ void KDGanttView::ensureVisible( KDGanttViewItem* item )
/*!
- Makes sure that the specified QDateTime is in the center of the
+ Makes sure that the specified TQDateTime is in the center of the
visible Gantt chart (if possible).
If you want to center the timeline when the KDGanttView is hidden,
calling centerTimelineAfterShow() is the better alternative.
\sa center(), centerTimelineAfterShow()
*/
-void KDGanttView::centerTimeline( const QDateTime& center )
+void KDGanttView::centerTimeline( const TQDateTime& center )
{
myTimeHeader->centerDateTime( center );
}
/*!
- Makes sure that the specified QDateTime is in the center of the
+ Makes sure that the specified TQDateTime is in the center of the
visible Gantt chart (if possible). If the KDGanttView is currently
hidden, this method resets the center once again after the next
show() call. Use this method if you want to center the timeline when
@@ -1102,7 +1102,7 @@ void KDGanttView::centerTimeline( const QDateTime& center )
\sa center(), centerTimeline()
*/
-void KDGanttView::centerTimelineAfterShow( const QDateTime& center )
+void KDGanttView::centerTimelineAfterShow( const TQDateTime& center )
{
myTimeHeader->centerDateTime( center );
if ( ! isVisible() ) {
@@ -1206,13 +1206,13 @@ bool KDGanttView::showTaskLinks() const
\param font the new font of the widget
*/
-void KDGanttView::setFont(const QFont& font)
+void KDGanttView::setFont(const TQFont& font)
{
myListView->setFont(font);
myListView->repaint();
myTimeHeader->setFont(font);
myLegend->setFont( font );
- QWidget::setFont( font );
+ TQWidget::setFont( font );
setScale(scale());
}
@@ -1322,7 +1322,7 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setShapes(start,middle, end );
@@ -1379,12 +1379,12 @@ bool KDGanttView::shapes( KDGanttViewItem::Type type,
\sa colors(), setDefaultColors(), defaultColors()
*/
void KDGanttView::setColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setColors(start,middle, end );
@@ -1411,7 +1411,7 @@ void KDGanttView::setColors( KDGanttViewItem::Type type,
\sa setColors(), setDefaultColor(), defaultColor()
*/
bool KDGanttView::colors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const
+ TQColor& start, TQColor& middle, TQColor& end ) const
{
int index = getIndex( type );
start = myColor [index*3];
@@ -1441,13 +1441,13 @@ bool KDGanttView::colors( KDGanttViewItem::Type type,
\sa highlightColors(), setDefaultHighlightColor(), defaultHighlightColor()
*/
void KDGanttView::setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end,
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setHighlightColors(start,middle, end );
@@ -1477,8 +1477,8 @@ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type,
defaultHighlightColor()
*/
bool KDGanttView::highlightColors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle,
- QColor& end ) const
+ TQColor& start, TQColor& middle,
+ TQColor& end ) const
{
int index = getIndex( type );
start = myColorHL [index*3];
@@ -1495,9 +1495,9 @@ bool KDGanttView::highlightColors( KDGanttViewItem::Type type,
\param color the text color to use
\sa textColor()
*/
-void KDGanttView::setTextColor( const QColor& color )
+void KDGanttView::setTextColor( const TQColor& color )
{
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
((KDGanttViewItem*)it.current())->setTextColor(color);
}
@@ -1511,7 +1511,7 @@ void KDGanttView::setTextColor( const QColor& color )
\return the color used for texts in the Gantt chart.
\sa setTextColor()
*/
-QColor KDGanttView::textColor() const
+TQColor KDGanttView::textColor() const
{
return myTextColor;
}
@@ -1527,7 +1527,7 @@ QColor KDGanttView::textColor() const
KDGanttView::noInformationBrush()
*/
-void KDGanttView::setNoInformationBrush( const QBrush& brush )
+void KDGanttView::setNoInformationBrush( const TQBrush& brush )
{
myTimeTable->setNoInformationBrush( brush );
}
@@ -1539,7 +1539,7 @@ void KDGanttView::setNoInformationBrush( const QBrush& brush )
\sa KDGanttViewItem::showNoInformation(), KDGanttViewItem::setShowNoInformation(),
setNoInformationBrush()
*/
-QBrush KDGanttView::noInformationBrush() const
+TQBrush KDGanttView::noInformationBrush() const
{
return myTimeTable->noInformationBrush();
}
@@ -1555,7 +1555,7 @@ void KDGanttView::clearLegend( )
myLegend->clearLegend();
myLegendItems->setAutoDelete( true );
delete myLegendItems;
- myLegendItems = new QPtrList<legendItem>;
+ myLegendItems = new TQPtrList<legendItem>;
}
@@ -1568,8 +1568,8 @@ void KDGanttView::clearLegend( )
\sa clearLegend()
*/
void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QString& text )
+ const TQColor& shapeColor,
+ const TQString& text )
{
myLegend->addLegendItem( shape,shapeColor,text );
legendItem* item = new legendItem;
@@ -1587,7 +1587,7 @@ void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
\param start the start of the horizon
\sa horizonStart()
*/
-void KDGanttView::setHorizonStart( const QDateTime& start )
+void KDGanttView::setHorizonStart( const TQDateTime& start )
{
myTimeHeader->setHorizonStart(start);
}
@@ -1599,7 +1599,7 @@ void KDGanttView::setHorizonStart( const QDateTime& start )
\return the start of the horizon of the Gantt chart
\sa setHorizonStart()
*/
-QDateTime KDGanttView::horizonStart() const
+TQDateTime KDGanttView::horizonStart() const
{
return myTimeHeader->horizonStart();
}
@@ -1612,7 +1612,7 @@ QDateTime KDGanttView::horizonStart() const
\param end the end of the horizon
\sa setHorizonEnd()
*/
-void KDGanttView::setHorizonEnd( const QDateTime& end )
+void KDGanttView::setHorizonEnd( const TQDateTime& end )
{
myTimeHeader->setHorizonEnd(end);
}
@@ -1625,7 +1625,7 @@ void KDGanttView::setHorizonEnd( const QDateTime& end )
\sa setHorizonEnd()
*/
-QDateTime KDGanttView::horizonEnd() const
+TQDateTime KDGanttView::horizonEnd() const
{
return myTimeHeader->horizonEnd();
}
@@ -1884,8 +1884,8 @@ bool KDGanttView::showMinorTicks() const
\sa columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
- const QColor& color ,
+void KDGanttView::setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color ,
Scale mini, Scale maxi )
{
myTimeHeader->setColumnBackgroundColor( column, color,mini,maxi );
@@ -1896,7 +1896,7 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
Sets the background color for a time interval given by \a start and
\a end. \a start may be later than \a end. If there is already a
background interval with the same \a start and \a end values
- defined, the values (i.e. const QColor& color , Scale mini, Scale
+ defined, the values (i.e. const TQColor& color , Scale mini, Scale
maxi) of this background interval are changed. Change the times of
an already defined interval with \a changeBackgroundInterval().
Delete an already defined interval with \a
@@ -1918,9 +1918,9 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDGanttView::setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color ,
+void KDGanttView::setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color ,
Scale mini, Scale maxi )
{
myTimeHeader->setIntervalBackgroundColor( start, end, color,mini,maxi );
@@ -1945,10 +1945,10 @@ void KDGanttView::setIntervalBackgroundColor( const QDateTime& start,
columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend )
+bool KDGanttView::changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend )
{
return myTimeHeader->changeBackgroundInterval( oldstart, oldend,
newstart, newend );
@@ -1963,8 +1963,8 @@ bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart,
\a start and \a end found (and hence deleted).
\sa changeBackgroundInterval(), columnBackgroundColor()
*/
-bool KDGanttView::deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end)
+bool KDGanttView::deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end)
{
return myTimeHeader->deleteBackgroundInterval( start, end );
}
@@ -2002,7 +2002,7 @@ void KDGanttView::clearBackgroundColor()
\sa setColumnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const
+TQColor KDGanttView::columnBackgroundColor( const TQDateTime& column ) const
{
return myTimeHeader->columnBackgroundColor( column ) ;
}
@@ -2016,7 +2016,7 @@ QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const
\param color the background color to use for weekend days.
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDGanttView::setWeekendBackgroundColor( const QColor& color )
+void KDGanttView::setWeekendBackgroundColor( const TQColor& color )
{
myTimeHeader->setWeekendBackgroundColor( color );
}
@@ -2028,7 +2028,7 @@ void KDGanttView::setWeekendBackgroundColor( const QColor& color )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDGanttView::weekendBackgroundColor() const
+TQColor KDGanttView::weekendBackgroundColor() const
{
return myTimeHeader->weekendBackgroundColor();
}
@@ -2044,7 +2044,7 @@ QColor KDGanttView::weekendBackgroundColor() const
\param weekday the day of the week (Monday = 1, Sunday = 7)
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday )
+void KDGanttView::setWeekdayBackgroundColor( const TQColor& color, int weekday )
{
myTimeHeader->setWeekdayBackgroundColor( color, weekday );
}
@@ -2057,7 +2057,7 @@ void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDGanttView::weekdayBackgroundColor(int weekday) const
+TQColor KDGanttView::weekdayBackgroundColor(int weekday) const
{
return myTimeHeader->weekdayBackgroundColor( weekday);
}
@@ -2249,11 +2249,11 @@ int KDGanttView::minorScaleCount() const
\sa defaultColor(), setColors(), colors()
*/
void KDGanttView::setDefaultColor( KDGanttViewItem::Type type,
- const QColor& color,
+ const TQColor& color,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setDefaultColor(color );
@@ -2275,7 +2275,7 @@ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type,
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
+TQColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
{
int index = getIndex( type );
return myDefaultColor [index];
@@ -2295,11 +2295,11 @@ QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type,
- const QColor& color,
+ const TQColor& color,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setDefaultHighlightColor(color );
@@ -2321,7 +2321,7 @@ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type,
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const
+TQColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const
{
int index = getIndex( type );
return myDefaultColorHL [index];
@@ -2386,7 +2386,7 @@ bool KDGanttView::calendarMode() const
*/
void KDGanttView::setDisplaySubitemsAsGroup( bool show )
{
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
KDGanttViewItem* currentItem = ( KDGanttViewItem* )it.current();
currentItem->setDisplaySubitemsAsGroup( show );
@@ -2437,7 +2437,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const
/*!
Defines the horizontal background lines of the Gantt chart.
Call setHorBackgroundLines()
- (equivalent to setHorBackgroundLines( 2, QBrush( QColor ( 240,240,240 )) ) )
+ (equivalent to setHorBackgroundLines( 2, TQBrush( TQColor ( 240,240,240 )) ) )
to draw a light grey horizontal background line for every second Gantt item.
Call setHorBackgroundLines(0) in order to not show horizontal
background lines.
@@ -2448,7 +2448,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const
for count < 2, no background lines are drawn
\param brush the brush of the lines
*/
-void KDGanttView::setHorBackgroundLines( int count, QBrush brush )
+void KDGanttView::setHorBackgroundLines( int count, TQBrush brush )
{
myTimeTable->setHorBackgroundLines( count, brush );
}
@@ -2463,7 +2463,7 @@ void KDGanttView::setHorBackgroundLines( int count, QBrush brush )
if 0 is returned, no backgroud lines are drawn
*/
-int KDGanttView::horBackgroundLines( QBrush& brush )
+int KDGanttView::horBackgroundLines( TQBrush& brush )
{
return myTimeTable->horBackgroundLines( brush );
}
@@ -2485,7 +2485,7 @@ KDGanttViewItem* KDGanttView::lastItem() const
\return the list of task links in the Gantt view
*/
-QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
+TQPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
{
return myTimeTable->taskLinks();
@@ -2497,7 +2497,7 @@ QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
\return the list of task link groups in the Gantt view
*/
-QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
+TQPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
{
return myTaskLinkGroupList;
}
@@ -2510,14 +2510,14 @@ QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
format error occurred
\sa saveXML
*/
-bool KDGanttView::loadXML( const QDomDocument& doc )
+bool KDGanttView::loadXML( const TQDomDocument& doc )
{
- QDomElement docRoot = doc.documentElement(); // ChartParams element
- QDomNode node = docRoot.firstChild();
+ TQDomElement docRoot = doc.documentElement(); // ChartParams element
+ TQDomNode node = docRoot.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ShowLegend" ) {
bool value;
if( KDGanttXML::readBoolNode( element, value ) )
@@ -2551,35 +2551,35 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setDisplayEmptyTasksAsLine( value );
} else if( tagName == "GlobalFont" ) {
- QFont font;
+ TQFont font;
if( KDGanttXML::readFontNode( element, font ) )
setFont( font );
} else if( tagName == "HorizonStart" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setHorizonStart( value );
} else if( tagName == "HorizonEnd" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setHorizonEnd( value );
} else if( tagName == "Scale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setScale( stringToScale( value ) );
} else if( tagName == "MinimumScale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setMinimumScale( stringToScale( value ) );
} else if( tagName == "MaximumScale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setMaximumScale( stringToScale( value ) );
} else if( tagName == "YearFormat" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setYearFormat( stringToYearFormat( value ) );
} else if( tagName == "HourFormat" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setHourFormat( stringToHourFormat( value ) );
} else if( tagName == "ShowMinorTicks" ) {
@@ -2607,7 +2607,7 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setEditable( value );
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "MajorScaleCount" ) {
@@ -2631,43 +2631,43 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readIntNode( element, value ) )
setGanttMaximumWidth( value );
} else if( tagName == "NoInformationBrush" ) {
- QBrush value;
+ TQBrush value;
if( KDGanttXML::readBrushNode( element, value ) )
setNoInformationBrush( value );
} else if( tagName == "GanttViewBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setGvBackgroundColor( value );
} else if( tagName == "ListViewBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setLvBackgroundColor( value );
} else if( tagName == "TimeHeaderBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTimeHeaderBackgroundColor( value );
} else if( tagName == "LegendHeaderBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setLegendHeaderBackgroundColor( value );
} else if( tagName == "WeekendBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setWeekendBackgroundColor( value );
} else if( tagName == "WeekdayBackgroundColor" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
int day = 0;
- QColor color;
+ TQColor color;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Day" ) {
int value;
if( KDGanttXML::readIntNode( element, value ) )
day = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else {
@@ -2681,8 +2681,8 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( day && color.isValid() )
setWeekdayBackgroundColor( color, day );
} else if( tagName == "WeekendDays" ) {
- QString startString = element.attribute( "Start" );
- QString endString = element.attribute( "End" );
+ TQString startString = element.attribute( "Start" );
+ TQString endString = element.attribute( "End" );
bool startOk = false, endOk = false;
int start = startString.toInt( &startOk );
int end = startString.toInt( &endOk );
@@ -2701,36 +2701,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setShowTimeTablePopupMenu( value );
} else if( tagName == "Shapes" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
bool undefinedShape = false;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
KDGanttViewItem::Shape startShape, middleShape, endShape;
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2751,25 +2751,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2789,25 +2789,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2831,28 +2831,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "Colors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2865,22 +2865,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
setColors( KDGanttViewItem::Event, startColor,
middleColor, endColor, false );
} else if( tagName == "Task" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2893,22 +2893,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
setColors( KDGanttViewItem::Task, startColor,
middleColor, endColor, false );
} else if( tagName == "Summary" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2928,23 +2928,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DefaultColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Event,
value, false );
} else if( tagName == "Task" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Task,
value, false );
} else if( tagName == "Summary" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Summary,
value , false);
@@ -2957,28 +2957,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "HighlightColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2992,22 +2992,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startColor,
middleColor, endColor, false );
} else if( tagName == "Task" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -3021,22 +3021,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startColor,
middleColor, endColor , false);
} else if( tagName == "Summary" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -3057,23 +3057,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DefaultHighlightColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Event,
value , false);
} else if( tagName == "Task" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Task,
value, false );
} else if( tagName == "Summary" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Summary,
value, false );
@@ -3086,12 +3086,12 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -3113,11 +3113,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "TaskLinks" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "TaskLink" )
KDGanttViewTaskLink::createFromDomElement( element );
else {
@@ -3129,11 +3129,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "TaskLinkGroups" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "TaskLink" )
KDGanttViewTaskLinkGroup::createFromDomElement( element );
} else {
@@ -3144,27 +3144,27 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "ColumnBackgroundColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ColumnBackgroundColor" ) {
- QDomNode node = element.firstChild();
- QDateTime dateTime;
- QColor color;
+ TQDomNode node = element.firstChild();
+ TQDateTime dateTime;
+ TQColor color;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was
// really an
// element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "DateTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
dateTime = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else {
@@ -3185,36 +3185,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
}
} else if( tagName == "LegendItems" ) {
clearLegend();
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "LegendItem" ) {
KDGanttViewItem::Shape tempLegendShape;
tempLegendShape = KDGanttViewItem::TriangleDown;
- QColor tempLegendColor;
- QString tempLegendString;
+ TQColor tempLegendColor;
+ TQString tempLegendString;
bool ok = true;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Shape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempLegendShape = KDGanttViewItem::stringToShape( value );
else
ok = false;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
tempLegendColor = value;
else
ok = false;
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempLegendString = value;
else
@@ -3259,19 +3259,19 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
\return the XML document that represents the parameters
\sa loadXML
*/
-QDomDocument KDGanttView::saveXML( bool withPI ) const
+TQDomDocument KDGanttView::saveXML( bool withPI ) const
{
// Create an inital DOM document
- QString docstart = "<GanttView/>";
+ TQString docstart = "<GanttView/>";
- QDomDocument doc( "GanttView" );
+ TQDomDocument doc( "GanttView" );
doc.setContent( docstart );
if( withPI ) {
- QDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ;
+ TQDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ;
doc.appendChild ( pin );
}
- QDomElement docRoot = doc.documentElement();
+ TQDomElement docRoot = doc.documentElement();
docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdgantt" );
docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" );
docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdgantt" );
@@ -3383,9 +3383,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the WeekdayBackgroundColor elements
for( int weekday = 1; weekday <= 7; weekday++ ) {
- QColor color = weekdayBackgroundColor( weekday );
+ TQColor color = weekdayBackgroundColor( weekday );
if( color.isValid() ) {
- QDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" );
+ TQDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" );
docRoot.appendChild( weekendBackgroundColorElement );
KDGanttXML::createIntNode( doc, weekendBackgroundColorElement,
"Day", weekday );
@@ -3395,7 +3395,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the WeekendDays element
- QDomElement weekendDaysElement = doc.createElement( "WeekendDays" );
+ TQDomElement weekendDaysElement = doc.createElement( "WeekendDays" );
docRoot.appendChild( weekendDaysElement );
int weekendStart, weekendEnd;
weekendDays( weekendStart, weekendEnd );
@@ -3415,9 +3415,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
showTimeTablePopupMenu() );
// the Shapes element
- QDomElement shapesElement = doc.createElement( "Shapes" );
+ TQDomElement shapesElement = doc.createElement( "Shapes" );
docRoot.appendChild( shapesElement );
- QDomElement shapesEventElement = doc.createElement( "Event" );
+ TQDomElement shapesEventElement = doc.createElement( "Event" );
shapesElement.appendChild( shapesEventElement );
KDGanttViewItem::Shape start, middle, end;
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
@@ -3435,7 +3435,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesEventElement, "End",
"Undefined" );
}
- QDomElement shapesTaskElement = doc.createElement( "Task" );
+ TQDomElement shapesTaskElement = doc.createElement( "Task" );
shapesElement.appendChild( shapesTaskElement );
if( shapes( KDGanttViewItem::Task, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
@@ -3452,7 +3452,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
"Undefined" );
}
- QDomElement shapesSummaryElement = doc.createElement( "Summary" );
+ TQDomElement shapesSummaryElement = doc.createElement( "Summary" );
shapesElement.appendChild( shapesSummaryElement );
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
@@ -3471,22 +3471,22 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the Colors element
- QDomElement colorsElement = doc.createElement( "Colors" );
+ TQDomElement colorsElement = doc.createElement( "Colors" );
docRoot.appendChild( colorsElement );
- QDomElement colorsEventElement = doc.createElement( "Event" );
+ TQDomElement colorsEventElement = doc.createElement( "Event" );
colorsElement.appendChild( colorsEventElement );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "Start", startColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "End", endColor );
- QDomElement colorsTaskElement = doc.createElement( "Task" );
+ TQDomElement colorsTaskElement = doc.createElement( "Task" );
colorsElement.appendChild( colorsTaskElement );
colors( KDGanttViewItem::Task, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "Start", startColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "End", endColor );
- QDomElement colorsSummaryElement = doc.createElement( "Summary" );
+ TQDomElement colorsSummaryElement = doc.createElement( "Summary" );
colorsElement.appendChild( colorsSummaryElement );
colors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsSummaryElement, "Start", startColor );
@@ -3494,7 +3494,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createColorNode( doc, colorsSummaryElement, "End", endColor );
// the DefaultColor element
- QDomElement defaultColorsElement = doc.createElement( "DefaultColors" );
+ TQDomElement defaultColorsElement = doc.createElement( "DefaultColors" );
docRoot.appendChild( defaultColorsElement );
KDGanttXML::createColorNode( doc, defaultColorsElement, "Event",
defaultColor( KDGanttViewItem::Event ) );
@@ -3505,21 +3505,21 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the HighlightColors element
- QDomElement highlightColorsElement = doc.createElement( "HighlightColors" );
+ TQDomElement highlightColorsElement = doc.createElement( "HighlightColors" );
docRoot.appendChild( highlightColorsElement );
- QDomElement highlightColorsEventElement = doc.createElement( "Event" );
+ TQDomElement highlightColorsEventElement = doc.createElement( "Event" );
highlightColorsElement.appendChild( highlightColorsEventElement );
highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Start", startColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "End", endColor );
- QDomElement highlightColorsTaskElement = doc.createElement( "Task" );
+ TQDomElement highlightColorsTaskElement = doc.createElement( "Task" );
highlightColorsElement.appendChild( highlightColorsTaskElement );
highlightColors( KDGanttViewItem::Task, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Start", startColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "End", endColor );
- QDomElement highlightColorsSummaryElement = doc.createElement( "Summary" );
+ TQDomElement highlightColorsSummaryElement = doc.createElement( "Summary" );
highlightColorsElement.appendChild( highlightColorsSummaryElement );
highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", startColor );
@@ -3533,13 +3533,13 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", endColor );
} else {
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", QColor() );
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", QColor() );
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", QColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", TQColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", TQColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", TQColor() );
}
*/
// the DefaultHighlightColor element
- QDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" );
+ TQDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" );
docRoot.appendChild( defaultHighlightColorsElement );
KDGanttXML::createColorNode( doc, defaultHighlightColorsElement, "Event",
defaultHighlightColor( KDGanttViewItem::Event ) );
@@ -3550,7 +3550,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the Items element
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
docRoot.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -3559,32 +3559,32 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the TaskLinks element
- QDomElement taskLinksElement = doc.createElement( "TaskLinks" );
+ TQDomElement taskLinksElement = doc.createElement( "TaskLinks" );
docRoot.appendChild( taskLinksElement );
- QPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks();
+ TQPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks();
KDGanttViewTaskLink* currentTL = 0;
for( currentTL = taskLinkList.first(); currentTL;
currentTL = taskLinkList.next() )
currentTL->createNode( doc, taskLinksElement );
// the TaskLinkGroups element
- QDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" );
+ TQDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" );
docRoot.appendChild( taskLinkGroupsElement );
- QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups();
+ TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups();
KDGanttViewTaskLinkGroup* currentTLG = 0;
for( currentTLG = taskLinkGroupList.first(); currentTLG;
currentTLG = taskLinkGroupList.next() )
currentTLG->createNode( doc, taskLinkGroupsElement );
// the ColumnBackgroundColors element
- QDomElement columnBackgroundColorsElement =
+ TQDomElement columnBackgroundColorsElement =
doc.createElement( "ColumnBackgroundColors" );
docRoot.appendChild( columnBackgroundColorsElement );
KDTimeHeaderWidget::ColumnColorList ccList =
myTimeHeader->columnBackgroundColorList();
for( KDTimeHeaderWidget::ColumnColorList::iterator it = ccList.begin();
it != ccList.end(); ++it ) {
- QDomElement columnBackgroundColorElement =
+ TQDomElement columnBackgroundColorElement =
doc.createElement( "ColumnBackgroundColor" );
columnBackgroundColorsElement.appendChild( columnBackgroundColorElement );
KDGanttXML::createDateTimeNode( doc, columnBackgroundColorElement,
@@ -3594,14 +3594,14 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the LegendItems element
- QDomElement legendItemsElement =
+ TQDomElement legendItemsElement =
doc.createElement( "LegendItems" );
docRoot.appendChild( legendItemsElement );
legendItem* current;
- QPtrListIterator<legendItem> lit( *myLegendItems );
+ TQPtrListIterator<legendItem> lit( *myLegendItems );
while( ( current = lit.current() ) ) {
++lit;
- QDomElement legendItemElement = doc.createElement( "LegendItem" );
+ TQDomElement legendItemElement = doc.createElement( "LegendItem" );
legendItemsElement.appendChild( legendItemElement );
KDGanttXML::createStringNode( doc, legendItemElement, "Shape",
KDGanttViewItem::shapeToString( current->shape ) );
@@ -3625,7 +3625,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
-QString KDGanttView::scaleToString( Scale scale )
+TQString KDGanttView::scaleToString( Scale scale )
{
switch( scale ) {
case Minute:
@@ -3645,7 +3645,7 @@ QString KDGanttView::scaleToString( Scale scale )
}
-KDGanttView::Scale KDGanttView::stringToScale( const QString& string )
+KDGanttView::Scale KDGanttView::stringToScale( const TQString& string )
{
if( string == "Minute" )
return Minute;
@@ -3664,7 +3664,7 @@ KDGanttView::Scale KDGanttView::stringToScale( const QString& string )
}
-QString KDGanttView::yearFormatToString( YearFormat format )
+TQString KDGanttView::yearFormatToString( YearFormat format )
{
switch( format ) {
case FourDigit:
@@ -3680,7 +3680,7 @@ QString KDGanttView::yearFormatToString( YearFormat format )
}
-KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string )
+KDGanttView::YearFormat KDGanttView::stringToYearFormat( const TQString& string )
{
if( string == "FourDigit" )
return FourDigit;
@@ -3695,7 +3695,7 @@ KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string )
}
-QString KDGanttView::hourFormatToString( HourFormat format )
+TQString KDGanttView::hourFormatToString( HourFormat format )
{
switch( format ) {
case Hour_12:
@@ -3709,7 +3709,7 @@ QString KDGanttView::hourFormatToString( HourFormat format )
}
-KDGanttView::HourFormat KDGanttView::stringToHourFormat( const QString& string )
+KDGanttView::HourFormat KDGanttView::stringToHourFormat( const TQString& string )
{
if( string == "Hour_12" )
return Hour_12;
@@ -3766,24 +3766,24 @@ void KDGanttView::editItem( KDGanttViewItem* item)
\param itemSize the size of the shape
\return the generated shape pixmap
*/
-QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QColor& backgroundColor, int itemSize)
+TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
+ const TQColor& shapeColor,
+ const TQColor& backgroundColor, int itemSize)
{
// 10 is a good value as size
int size = itemSize+2;
int hei = ( itemSize/3 ) / 2;
- QPixmap p = QPixmap( size+4, size+4 );
+ TQPixmap p = TQPixmap( size+4, size+4 );
p.fill( backgroundColor );
- QPainter paint (&p);
- QBrush b = QBrush ( Qt::SolidPattern );
+ TQPainter paint (&p);
+ TQBrush b = TQBrush ( Qt::SolidPattern );
b.setColor( shapeColor );
paint.setBrush( b );
- QPen pen( Qt::black, 1 ) ;
+ TQPen pen( Qt::black, 1 ) ;
paint.setPen( pen );
switch (shape) {
case KDGanttViewItem::TriangleDown:{
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
@@ -3792,7 +3792,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::TriangleUp :{
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
@@ -3801,7 +3801,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::Diamond :{
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
@@ -3811,7 +3811,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::Square :{
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
@@ -3877,19 +3877,19 @@ void KDGanttView::initDefaults()
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
-int KDGanttView::addColumn( const QString& label, int width )
+int KDGanttView::addColumn( const TQString& label, int width )
{
return myListView->addColumn( label, width );
}
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
-int KDGanttView::addColumn( const QIconSet& iconset, const QString& label,
+int KDGanttView::addColumn( const TQIconSet& iconset, const TQString& label,
int width )
{
return myListView->addColumn( iconset, label, width );
@@ -3897,7 +3897,7 @@ int KDGanttView::addColumn( const QIconSet& iconset, const QString& label,
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
void KDGanttView::removeColumn( int index )
{
@@ -3906,7 +3906,7 @@ void KDGanttView::removeColumn( int index )
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
KDGanttViewItem* KDGanttView::selectedItem() const
{
@@ -3915,7 +3915,7 @@ KDGanttViewItem* KDGanttView::selectedItem() const
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
void KDGanttView::setSelected( KDGanttViewItem* item, bool selected )
{
@@ -3935,7 +3935,7 @@ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected )
in the Gantt view with this name.
*/
-KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const
+KDGanttViewItem* KDGanttView::getItemByName( const TQString& name ) const
{
KDGanttViewItem* temp = firstChild(),* ret;
while (temp != 0) {
@@ -3958,7 +3958,7 @@ KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const
no item in the list view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const
+KDGanttViewItem* KDGanttView::getItemByListViewPos( const TQPoint& pos ) const
{
return static_cast<KDGanttViewItem*>( myListView->itemAt(myListView->mapFromGlobal(pos) ));
}
@@ -3978,13 +3978,13 @@ KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const
in the Gantt view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const
+KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const TQPoint& pos ) const
{
KDGanttViewItem* item;
- QPoint local = myCanvasView->mapFromGlobal(pos);
+ TQPoint local = myCanvasView->mapFromGlobal(pos);
- QCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( myCanvasView->getType(*it) == Type_is_KDGanttViewItem) {
item = myCanvasView->getItem(*it);
@@ -4010,10 +4010,10 @@ KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const
in the Gantt view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemAt( const QPoint& pos, bool global ) const
+KDGanttViewItem* KDGanttView::getItemAt( const TQPoint& pos, bool global ) const
{
/* buggy code - commented out
- QPoint myPos;
+ TQPoint myPos;
if ( global )
myPos = myListView->contentsToViewport( myListView->mapFromGlobal(pos) );
else
@@ -4099,7 +4099,7 @@ void KDGanttView::clear()
/*!
Passes on the signal from the list view.
*/
-void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse )
+void KDGanttView::slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse )
{
emit dropped( e, droppedItem, itemBelowMouse);
}
@@ -4107,7 +4107,7 @@ void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KD
/*!
Implements a pass-through to the list view.
*/
-QDragObject * KDGanttView::dragObject ()
+TQDragObject * KDGanttView::dragObject ()
{
return myListView->dragObject ();
}
@@ -4125,9 +4125,9 @@ void KDGanttView::startDrag ()
/*!
This method is overridden for internal purposes.
*/
-void KDGanttView::setPaletteBackgroundColor( const QColor& col)
+void KDGanttView::setPaletteBackgroundColor( const TQColor& col)
{
- QWidget::setPaletteBackgroundColor( col );
+ TQWidget::setPaletteBackgroundColor( col );
timeHeaderSpacerWidget->setPaletteBackgroundColor( col );
}
@@ -4138,7 +4138,7 @@ void KDGanttView::setPaletteBackgroundColor( const QColor& col)
\param c the background color of the Gantt view.
\sa gvBackgroundColor()
*/
-void KDGanttView::setGvBackgroundColor ( const QColor & c )
+void KDGanttView::setGvBackgroundColor ( const TQColor & c )
{
myTimeTable->setBackgroundColor( c );
}
@@ -4150,7 +4150,7 @@ void KDGanttView::setGvBackgroundColor ( const QColor & c )
\param c the background color of the time header.
\sa timeHeaderBackgroundColor()
*/
-void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c )
+void KDGanttView::setTimeHeaderBackgroundColor ( const TQColor & c )
{
myTimeHeader->setPaletteBackgroundColor( c );
//rightWidget->setPaletteBackgroundColor( c );
@@ -4164,7 +4164,7 @@ void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c )
\param c the background color of the legend header
\sa legendHeaderBackgroundColor()
*/
-void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c )
+void KDGanttView::setLegendHeaderBackgroundColor ( const TQColor & c )
{
myLegend->setPaletteBackgroundColor( c );
leftWidget->setPaletteBackgroundColor( c );
@@ -4177,7 +4177,7 @@ void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c )
\param c the background color of the list view
\sa lvBackgroundColor()
*/
-void KDGanttView::setLvBackgroundColor ( const QColor & c )
+void KDGanttView::setLvBackgroundColor ( const TQColor & c )
{
myListView->viewport()->setPaletteBackgroundColor( c );
}
@@ -4189,7 +4189,7 @@ void KDGanttView::setLvBackgroundColor ( const QColor & c )
\return the background color of the list view
\sa setLvBackgroundColor()
*/
-QColor KDGanttView::lvBackgroundColor ( )const
+TQColor KDGanttView::lvBackgroundColor ( )const
{
return myListView->viewport()->paletteBackgroundColor( );
}
@@ -4201,7 +4201,7 @@ QColor KDGanttView::lvBackgroundColor ( )const
\return the background color of the Gantt view
\sa setGvBackgroundColor()
*/
-QColor KDGanttView::gvBackgroundColor () const
+TQColor KDGanttView::gvBackgroundColor () const
{
return myTimeTable->backgroundColor( );
}
@@ -4213,7 +4213,7 @@ QColor KDGanttView::gvBackgroundColor () const
\return the background color of the time header
\sa setTimeHeaderBackgroundColor()
*/
-QColor KDGanttView::timeHeaderBackgroundColor () const
+TQColor KDGanttView::timeHeaderBackgroundColor () const
{
return myTimeHeader->paletteBackgroundColor( );
}
@@ -4225,7 +4225,7 @@ QColor KDGanttView::timeHeaderBackgroundColor () const
\return the background color of the legend header
\sa setLegendHeaderBackgroundColor()
*/
-QColor KDGanttView::legendHeaderBackgroundColor () const
+TQColor KDGanttView::legendHeaderBackgroundColor () const
{
return myLegend->paletteBackgroundColor( );
}
@@ -4235,20 +4235,20 @@ QColor KDGanttView::legendHeaderBackgroundColor () const
Adds a widget to the spacer widget above the list view part and
below the ShowLegendButton. To assign all the space above the
Listview to the spacer widget, hide the ShowLegendButton by calling
- setShowLegendButton( false ). The spacer widget is a QHBox. You
+ setShowLegendButton( false ). The spacer widget is a TQHBox. You
may add as many widgets as you want. They are ordered horizontally
from left to right. To remove a widget from the spacer widget, call
widget->reparent(newParent,...) or delete the widget. Since the spacer
- is a QHBox, the layout of the added widgets is managed by this
- QHBox.
+ is a TQHBox, the layout of the added widgets is managed by this
+ TQHBox.
\param w A pointer to the widget to be added.
\sa setShowLegendButton( )
*/
-void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w )
+void KDGanttView::addUserdefinedLegendHeaderWidget( TQWidget * w )
{
if ( w ) {
- w->reparent ( spacerLeft, 0, QPoint(0,0) );
+ w->reparent ( spacerLeft, 0, TQPoint(0,0) );
}
}
@@ -4264,7 +4264,7 @@ void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w )
void KDGanttView::setDragEnabled( bool b )
{
fDragEnabled = b;
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
(( KDGanttViewItem* )it.current())->setDragEnabled(b);
}
@@ -4285,7 +4285,7 @@ void KDGanttView::setDropEnabled( bool b )
fDropEnabled = b;
//myListView->setAcceptDrops( b );
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
(( KDGanttViewItem* )it.current())->setDropEnabled(b);
}
@@ -4375,7 +4375,7 @@ bool KDGanttView::dropEnabled() const
true, when the internal drop handling should not be executed
\sa lvDropEvent(), lvStartDrag()
*/
-bool KDGanttView::lvDropEvent ( QDropEvent* e,
+bool KDGanttView::lvDropEvent ( TQDropEvent* e,
KDGanttViewItem* droppedItem,
KDGanttViewItem* itemBelowMouse )
{
@@ -4391,20 +4391,20 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e,
// ************** begin example ************
/*
- if ( QUriDrag::canDecode( e ) ) {
- QStrList lst;
- QUriDrag::decode( e, lst );
+ if ( TQUriDrag::canDecode( e ) ) {
+ TQStrList lst;
+ TQUriDrag::decode( e, lst );
// we try the first file of icon-url-list
- QString str = lst.at ( 0 );
+ TQString str = lst.at ( 0 );
// remove file: at beginning of string
str = str.right( str.length() - 5 );
- QFileInfo info;
+ TQFileInfo info;
info.setFile( str ) ;
if ( info.isFile() ) {
- if (!QMessageBox::information( this, "KDGantt Drag&Drop test",
+ if (!TQMessageBox::information( this, "KDGantt Drag&Drop test",
"Try to insert file: "+ str + " ?",
"&Okay", "&Cancel",0,1 ) ) {
- QFile file( str );
+ TQFile file( str );
// store current updating status
bool uen = myTimeTable->blockUpdating();
// block updating while insertion of items
@@ -4439,7 +4439,7 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e,
\sa lvDropEvent(), lvStartDrag(), lvDragMoveEvent()
*/
-void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
+void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * e)
{
// the standard behaviour:
// accept drag enter events, if KDGanttViewItemDrag can decode the event
@@ -4456,7 +4456,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
// Please uncomment the following lines for this behaviour
// You have to uncomment lines in lvDragMoveEvent() and lvDropEvent () as well
- // if ( QUriDrag::canDecode( e ) ) {
+ // if ( TQUriDrag::canDecode( e ) ) {
// e->accept(true);
// return;
// }
@@ -4493,7 +4493,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
if you have called e->accept( true ) before.
\sa lvDropEvent(), lvStartDrag()
*/
-bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
+bool KDGanttView::lvDragMoveEvent ( TQDragMoveEvent* /*e*/,
KDGanttViewItem* /* draggedItem*/,
KDGanttViewItem* /*itemBelowMouse*/)
{
@@ -4513,7 +4513,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
// a saved Gantt file, subclass KDGanttView
// and reimplement this method with to following code uncommented:
- // if ( QUriDrag::canDecode( e ) ) {
+ // if ( TQUriDrag::canDecode( e ) ) {
// e->accept(true);
// return true;
// }
@@ -4525,7 +4525,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
/*!
- This virtual method creates a QDragObject and starts a drag for a
+ This virtual method creates a TQDragObject and starts a drag for a
KDGanttViewItem.
In order to prevent drags of particular items, subclass from
KDGanttView and reimplement this method.
@@ -4535,7 +4535,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
*/
void KDGanttView::lvStartDrag (KDGanttViewItem* item)
{
- QDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" );
+ TQDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" );
// call d->drag() to start the dragging
// d->drag() returns true, if a move was requested as a drag
// if a copy (by pressing the <Ctrl>-key) was performed, d->drag() returns false
@@ -4561,7 +4561,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item)
void KDGanttView::setListViewWidth( int w )
{
int sw = mySplitter->width();
- QValueList<int> list;
+ TQValueList<int> list;
list.append(w);
list.append(sw-w);
mySplitter->setSizes( list );
@@ -4589,7 +4589,7 @@ int KDGanttView::listViewWidth( )
\param m the scrollbar mode.
\sa setGvVScrollBarMode( )
*/
-void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m )
+void KDGanttView::setLvVScrollBarMode( TQScrollView::ScrollBarMode m )
{
myListView->setVScrollBarMode ( m );
}
@@ -4604,14 +4604,14 @@ void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m )
\param m The scrollbar mode.
\sa setLvVScrollBarMode( )
*/
-void KDGanttView::setGvVScrollBarMode( QScrollView::ScrollBarMode m )
+void KDGanttView::setGvVScrollBarMode( TQScrollView::ScrollBarMode m )
{
- if ( m == QScrollView::Auto )
- qDebug("KDGanttView::setListViewVScrollBarMode: QScrollView::Auto not supported. Nothing changed. ");
+ if ( m == TQScrollView::Auto )
+ qDebug("KDGanttView::setListViewVScrollBarMode: TQScrollView::Auto not supported. Nothing changed. ");
else
{
myCanvasView->setVScrollBarMode ( m );
- if ( m == QScrollView::AlwaysOn )
+ if ( m == TQScrollView::AlwaysOn )
timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() );
else
timeHeaderSpacerWidget->setFixedWidth( 0 );
@@ -4650,17 +4650,17 @@ bool KDGanttView::isLinkItemsEnabled() const
}
/*!
- \fn void KDGanttView::timeIntervalSelected( const QDateTime& start, const QDateTime& end);
+ \fn void KDGanttView::timeIntervalSelected( const TQDateTime& start, const TQDateTime& end);
This signal is emitted when the user selects a time
interval with the mouse on the time header connect this signal to
- the slot void zoomToSelection( const QDateTime& start, const
- QDateTime& end) to obtain automatic zooming.
+ the slot void zoomToSelection( const TQDateTime& start, const
+ TQDateTime& end) to obtain automatic zooming.
*/
/*!
- \fn void KDGanttView::timeIntervallSelected( const QDateTime& start, const QDateTime& end);
+ \fn void KDGanttView::timeIntervallSelected( const TQDateTime& start, const TQDateTime& end);
\deprecated This signal is deprecated, do not use it in new code;
use timeIntervalSelected() instead. timeIntervallSelected() will be
@@ -4715,7 +4715,7 @@ bool KDGanttView::isLinkItemsEnabled() const
*/
/*!
- \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos)
+ \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos)
This signal is emitted when the user clicks into the Gantt view with
any mouse button. Notice that \a pos is the absolute mouse position.
@@ -4728,7 +4728,7 @@ bool KDGanttView::isLinkItemsEnabled() const
*/
/*!
- \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos )
+ \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos )
This signal is emitted when the user requests a context menu in the
Gantt view. Notice that \a pos is the absolute mouse position.
@@ -4774,7 +4774,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvMouseButtonPressed ( int button,
- KDGanttViewItem* item, const QPoint & pos, int col)
+ KDGanttViewItem* item, const TQPoint & pos, int col)
This signal is emitted when the user presses any mouse button in the
list view. Notice that \a pos is the absolute mouse position.
@@ -4782,7 +4782,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvMouseButtonClicked ( int button,
- KDGanttViewItem* item, const QPoint & pos, int col)
+ KDGanttViewItem* item, const TQPoint & pos, int col)
This signal is emitted when the user clicks into the
list view with any mouse button . Notice that \a pos is the absolute
@@ -4797,7 +4797,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvItemRenamed( KDGanttViewItem*, int col,
- const QString& text )
+ const TQString& text )
This signal is emitted whenever the user changes the name of an item
in the list view using in-place editing. \a text contains the new
@@ -4806,7 +4806,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvContextMenuRequested( KDGanttViewItem *
- item, const QPoint & pos, int col )
+ item, const TQPoint & pos, int col )
This signal is emitted when the user requests a context menu in the
list view. Notice that \a pos is the absolute mouse position.
@@ -4821,7 +4821,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
- \fn void KDGanttView::dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse)
+ \fn void KDGanttView::dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse)
This signal is emitted whenever a Gantt item is dropped onto the
Gantt view. \a droppedItem is 0, if this is a drag operation from
diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h
index c0c9bbba..b3913d67 100644
--- a/kdgantt/KDGanttView.h
+++ b/kdgantt/KDGanttView.h
@@ -35,14 +35,14 @@
#ifndef KDGANTTVIEW_H
#define KDGANTTVIEW_H
-#include <qptrlist.h>
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qfont.h>
-#include <qdom.h>
-#include <qvbox.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqdom.h>
+#include <tqvbox.h>
#include "KDGanttViewItem.h"
@@ -75,15 +75,15 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( bool showListView READ showListView WRITE setShowListView )
Q_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks )
Q_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled )
- Q_PROPERTY( QDateTime horizonStart READ horizonStart WRITE setHorizonStart )
- Q_PROPERTY( QDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
+ Q_PROPERTY( TQDateTime horizonStart READ horizonStart WRITE setHorizonStart )
+ Q_PROPERTY( TQDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
Q_PROPERTY( Scale scale READ scale WRITE setScale )
Q_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat )
Q_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat )
Q_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks )
Q_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks )
Q_PROPERTY( bool editable READ editable WRITE setEditable )
- Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
+ Q_PROPERTY( TQColor textColor READ textColor WRITE setTextColor )
Q_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount )
Q_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount )
Q_PROPERTY( int autoScaleMinorTickCount READ autoScaleMinorTickCount WRITE setAutoScaleMinorTickCount )
@@ -91,11 +91,11 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale )
Q_PROPERTY( int minimumColumnWidth READ minimumColumnWidth WRITE setMinimumColumnWidth )
Q_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth )
- Q_PROPERTY( QColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor )
- Q_PROPERTY( QColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
- Q_PROPERTY( QColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
- Q_PROPERTY( QColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor )
- Q_PROPERTY( QColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor )
+ Q_PROPERTY( TQColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor )
+ Q_PROPERTY( TQColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
+ Q_PROPERTY( TQColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
+ Q_PROPERTY( TQColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor )
+ Q_PROPERTY( TQColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor )
Q_PROPERTY( double zoomFactor READ zoomFactor )
Q_PROPERTY( bool showHeaderPopupMenu READ showHeaderPopupMenu WRITE setShowHeaderPopupMenu )
Q_PROPERTY( bool showTimeTablePopupMenu READ showTimeTablePopupMenu WRITE setShowTimeTablePopupMenu )
@@ -103,7 +103,7 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton )
Q_PROPERTY( bool legendIsDockwindow READ legendIsDockwindow WRITE setLegendIsDockwindow )
Q_PROPERTY( bool displayEmptyTasksAsLine READ displayEmptyTasksAsLine WRITE setDisplayEmptyTasksAsLine )
- Q_PROPERTY( QBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
+ Q_PROPERTY( TQBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
Q_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled )
Q_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode )
@@ -118,7 +118,7 @@ public:
enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit };
enum RepaintMode { No, Medium, Always };
- KDGanttView( QWidget* parent = 0, const char* name = 0 );
+ KDGanttView( TQWidget* parent = 0, const char* name = 0 );
~KDGanttView();
virtual void show();
@@ -133,7 +133,7 @@ public:
bool showLegend() const;
void setLegendIsDockwindow( bool dock );
bool legendIsDockwindow( ) const;
- QDockWindow* legendDockwindow( ) const;
+ TQDockWindow* legendDockwindow( ) const;
void setShowListView( bool show );
bool showListView() const;
void setEditorEnabled( bool enable );
@@ -150,16 +150,16 @@ public:
bool displayEmptyTasksAsLine() const;
void setHorBackgroundLines( int count = 2,
- QBrush brush =
- QBrush( QColor ( 200,200,200 ),
+ TQBrush brush =
+ TQBrush( TQColor ( 200,200,200 ),
Qt::Dense6Pattern ));
- int horBackgroundLines( QBrush& brush );
- bool saveProject( QIODevice* );
- bool loadProject( QIODevice* );
- void print( QPrinter* printer = 0 ,
+ int horBackgroundLines( TQBrush& brush );
+ bool saveProject( TQIODevice* );
+ bool loadProject( TQIODevice* );
+ void print( TQPrinter* printer = 0 ,
bool printListView = true, bool printTimeLine = true,
bool printLegend = false );
- QSize drawContents( QPainter* p = 0,
+ TQSize drawContents( TQPainter* p = 0,
bool drawListView = true, bool drawTimeLine = true,
bool drawLegend = false );
void setZoomFactor( double factor, bool absolute );
@@ -167,8 +167,8 @@ public:
void zoomToFit();
void ensureVisible( KDGanttViewItem* );
void center( KDGanttViewItem* );
- void centerTimeline( const QDateTime& center );
- void centerTimelineAfterShow( const QDateTime& center );
+ void centerTimeline( const TQDateTime& center );
+ void centerTimelineAfterShow( const TQDateTime& center );
void setTimelineToStart();
void setTimelineToEnd();
void addTicksLeft( int num = 1 );
@@ -176,7 +176,7 @@ public:
void setShowTaskLinks( bool show );
bool showTaskLinks() const;
- void setFont(const QFont& f);
+ void setFont(const TQFont& f);
void setShowHeaderPopupMenu( bool show = true,
bool showZoom = true,
bool showScale = true,
@@ -197,43 +197,43 @@ public:
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const;
void setColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting = true );
bool colors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const;
+ TQColor& start, TQColor& middle, TQColor& end ) const;
void setDefaultColor( KDGanttViewItem::Type type,
- const QColor&,
+ const TQColor&,
bool overwriteExisting = true );
- QColor defaultColor( KDGanttViewItem::Type type ) const;
+ TQColor defaultColor( KDGanttViewItem::Type type ) const;
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting = true );
bool highlightColors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const;
+ TQColor& start, TQColor& middle, TQColor& end ) const;
void setDefaultHighlightColor( KDGanttViewItem::Type type,
- const QColor&,
+ const TQColor&,
bool overwriteExisting = true );
- QColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
- void setTextColor( const QColor& color );
- QColor textColor() const;
+ TQColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
+ void setTextColor( const TQColor& color );
+ TQColor textColor() const;
- void setNoInformationBrush( const QBrush& brush );
- QBrush noInformationBrush() const;
+ void setNoInformationBrush( const TQBrush& brush );
+ TQBrush noInformationBrush() const;
// Link-related stuff
- QPtrList<KDGanttViewTaskLink> taskLinks() const;
- QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
+ TQPtrList<KDGanttViewTaskLink> taskLinks() const;
+ TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
// Legend-related stuff
- void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
// Header-related stuff
- void setHorizonStart( const QDateTime& start );
- QDateTime horizonStart() const;
- void setHorizonEnd( const QDateTime& start );
- QDateTime horizonEnd() const;
+ void setHorizonStart( const TQDateTime& start );
+ TQDateTime horizonStart() const;
+ void setHorizonEnd( const TQDateTime& start );
+ TQDateTime horizonEnd() const;
void setScale( Scale );
Scale scale() const;
void setMaximumScale( Scale );
@@ -256,48 +256,48 @@ public:
bool showMajorTicks() const;
void setShowMinorTicks( bool );
bool showMinorTicks() const;
- void setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+ void setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
#if 0
// This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
- void setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+ void setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
- bool changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend );
- bool deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end );
+ bool changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend );
+ bool deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end );
#endif
void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
void clearBackgroundColor();
- QColor columnBackgroundColor( const QDateTime& column ) const;
- void setWeekendBackgroundColor( const QColor& color );
- QColor weekendBackgroundColor() const;
- void setWeekdayBackgroundColor( const QColor& color, int weekday );
- QColor weekdayBackgroundColor(int weekday) const;
-
-
- void setPaletteBackgroundColor(const QColor& col);
- void setGvBackgroundColor ( const QColor & );
- void setLvBackgroundColor ( const QColor & );
- void setTimeHeaderBackgroundColor ( const QColor & );
- void setLegendHeaderBackgroundColor ( const QColor & );
- QColor gvBackgroundColor () const ;
- QColor lvBackgroundColor () const ;
- QColor timeHeaderBackgroundColor () const ;
- QColor legendHeaderBackgroundColor () const ;
- void addUserdefinedLegendHeaderWidget( QWidget * w );
+ TQColor columnBackgroundColor( const TQDateTime& column ) const;
+ void setWeekendBackgroundColor( const TQColor& color );
+ TQColor weekendBackgroundColor() const;
+ void setWeekdayBackgroundColor( const TQColor& color, int weekday );
+ TQColor weekdayBackgroundColor(int weekday) const;
+
+
+ void setPaletteBackgroundColor(const TQColor& col);
+ void setGvBackgroundColor ( const TQColor & );
+ void setLvBackgroundColor ( const TQColor & );
+ void setTimeHeaderBackgroundColor ( const TQColor & );
+ void setLegendHeaderBackgroundColor ( const TQColor & );
+ TQColor gvBackgroundColor () const ;
+ TQColor lvBackgroundColor () const ;
+ TQColor timeHeaderBackgroundColor () const ;
+ TQColor legendHeaderBackgroundColor () const ;
+ void addUserdefinedLegendHeaderWidget( TQWidget * w );
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
- static QPixmap getPixmap( KDGanttViewItem::Shape shape, const QColor& shapeColor,const QColor& backgroundColor, int itemSize);
+ static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize);
void setHeaderVisible( bool );
bool headerVisible() const;
@@ -306,8 +306,8 @@ public:
bool showLegendButton() const;
// Pass-through methods from QListView
- virtual int addColumn( const QString& label, int width = -1 );
- virtual int addColumn( const QIconSet& iconset, const QString& label,
+ virtual int addColumn( const TQString& label, int width = -1 );
+ virtual int addColumn( const TQIconSet& iconset, const TQString& label,
int width = -1 );
virtual void removeColumn( int index );
KDGanttViewItem* selectedItem() const;
@@ -325,21 +325,21 @@ public:
bool isDragEnabled() const;
bool isDropEnabled() const;
- virtual bool lvDropEvent ( QDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
+ virtual bool lvDropEvent ( TQDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
virtual void lvStartDrag (KDGanttViewItem*);
- virtual bool lvDragMoveEvent (QDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
- virtual void lvDragEnterEvent (QDragEnterEvent * e );
- virtual QSize sizeHint() const;
- KDGanttViewItem* getItemByName( const QString& name ) const;
- QDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
- KDGanttViewItem* getItemByListViewPos( const QPoint& pos ) const;
- KDGanttViewItem* getItemByGanttViewPos( const QPoint& pos ) const;
- KDGanttViewItem* getItemAt( const QPoint& pos , bool global = true ) const;
+ virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
+ virtual void lvDragEnterEvent (TQDragEnterEvent * e );
+ virtual TQSize sizeHint() const;
+ KDGanttViewItem* getItemByName( const TQString& name ) const;
+ TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
+ KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const;
+ KDGanttViewItem* getItemByGanttViewPos( const TQPoint& pos ) const;
+ KDGanttViewItem* getItemAt( const TQPoint& pos , bool global = true ) const;
// setting the vertical scrollbars of the listview and the timetable
// default values: always off for the listview, always on for the timetable
- void setLvVScrollBarMode( QScrollView::ScrollBarMode );
- void setGvVScrollBarMode( QScrollView::ScrollBarMode );
+ void setLvVScrollBarMode( TQScrollView::ScrollBarMode );
+ void setGvVScrollBarMode( TQScrollView::ScrollBarMode );
void setLinkItemsEnabled(bool on);
bool isLinkItemsEnabled() const;
@@ -351,13 +351,13 @@ public:
public slots:
void editItem( KDGanttViewItem* );
- void zoomToSelection( const QDateTime& start, const QDateTime& end);
+ void zoomToSelection( const TQDateTime& start, const TQDateTime& end);
signals:
- void timeIntervallSelected( const QDateTime& start, const QDateTime& end);
- void timeIntervalSelected( const QDateTime& start, const QDateTime& end);
+ void timeIntervallSelected( const TQDateTime& start, const TQDateTime& end);
+ void timeIntervalSelected( const TQDateTime& start, const TQDateTime& end);
void rescaling( KDGanttView::Scale );
- void intervalColorRectangleMoved( const QDateTime& start, const QDateTime& end );
+ void intervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end );
// the following signals are emitted if an item is clicked in the
// listview (inclusive) or in the ganttview
@@ -378,21 +378,21 @@ signals:
void gvItemMidClicked( KDGanttViewItem* );
void gvItemRightClicked( KDGanttViewItem* );
// the point is the global position!!
- void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos);
+ void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos);
void gvItemDoubleClicked( KDGanttViewItem* );
// the point is the global position!!
- void gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos );
+ void gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos );
void gvItemMoved( KDGanttViewItem* );
// lv... means item in listview clicked
void lvCurrentChanged( KDGanttViewItem* );
- void lvItemRenamed( KDGanttViewItem* , int col, const QString & text );
- void lvMouseButtonPressed( int button, KDGanttViewItem * item, const QPoint & pos, int c );
+ void lvItemRenamed( KDGanttViewItem* , int col, const TQString & text );
+ void lvMouseButtonPressed( int button, KDGanttViewItem * item, const TQPoint & pos, int c );
void lvItemLeftClicked( KDGanttViewItem* );
void lvItemMidClicked( KDGanttViewItem* );
void lvItemRightClicked( KDGanttViewItem* );
- void lvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos, int col );
- void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos, int c );
+ void lvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos, int col );
+ void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos, int c );
void lvItemDoubleClicked( KDGanttViewItem* );
void lvSelectionChanged( KDGanttViewItem* );
@@ -403,39 +403,39 @@ signals:
void taskLinkRightClicked( KDGanttViewTaskLink* );
void taskLinkDoubleClicked( KDGanttViewTaskLink* );
- void dateTimeDoubleClicked (const QDateTime& );
+ void dateTimeDoubleClicked (const TQDateTime& );
- void dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
+ void dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
private slots:
void forceRepaint( int val = 0 );
- void slotSelectionChanged( QListViewItem* item );
- void slotCurrentChanged ( QListViewItem * item );
- void slotItemRenamed ( QListViewItem * item, int col, const QString & text );
- void slotMouseButtonPressed ( int button, QListViewItem * item, const QPoint & pos, int c );
- void slotmouseButtonClicked ( int button, QListViewItem * item, const QPoint & pos, int c );
- void slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col );
+ void slotSelectionChanged( TQListViewItem* item );
+ void slotCurrentChanged ( TQListViewItem * item );
+ void slotItemRenamed ( TQListViewItem * item, int col, const TQString & text );
+ void slotMouseButtonPressed ( int button, TQListViewItem * item, const TQPoint & pos, int c );
+ void slotmouseButtonClicked ( int button, TQListViewItem * item, const TQPoint & pos, int c );
+ void slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col );
void slotHeaderSizeChanged();
void addTickRight();
void addTickLeft();
void enableAdding( int );
- void slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
+ void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
private:
struct legendItem {
KDGanttViewItem::Shape shape;
- QColor color;
- QString text;
+ TQColor color;
+ TQString text;
};
- bool loadXML( const QDomDocument& doc );
- QDomDocument saveXML( bool withPI = true ) const;
+ bool loadXML( const TQDomDocument& doc );
+ TQDomDocument saveXML( bool withPI = true ) const;
- void emptySpaceDoubleClicked( QMouseEvent* e );
+ void emptySpaceDoubleClicked( TQMouseEvent* e );
- static QString scaleToString( Scale scale );
- static QString yearFormatToString( YearFormat format );
- static QString hourFormatToString( HourFormat format );
- static Scale stringToScale( const QString& string );
- static YearFormat stringToYearFormat( const QString& string );
- static HourFormat stringToHourFormat( const QString& string );
+ static TQString scaleToString( Scale scale );
+ static TQString yearFormatToString( YearFormat format );
+ static TQString hourFormatToString( HourFormat format );
+ static Scale stringToScale( const TQString& string );
+ static YearFormat stringToYearFormat( const TQString& string );
+ static HourFormat stringToHourFormat( const TQString& string );
// PENDING(lutz) Review these
friend class KDGanttCanvasView;
@@ -457,12 +457,12 @@ private:
KDTimeTableWidget * myTimeTable;
KDLegendWidget * myLegend;
itemAttributeDialog* myItemAttributeDialog;
- QVBox * leftWidget, * rightWidget;
- QHBox * spacerLeft;
- QScrollView* myTimeHeaderScroll;
- QHBox* myTimeHeaderContainer ;
- QWidget* timeHeaderSpacerWidget;
- QWidget *spacerRight;
+ TQVBox * leftWidget, * rightWidget;
+ TQHBox * spacerLeft;
+ TQScrollView* myTimeHeaderScroll;
+ TQHBox* myTimeHeaderContainer ;
+ TQWidget* timeHeaderSpacerWidget;
+ TQWidget *spacerRight;
bool listViewIsVisible;
bool chartIsEditable;
@@ -476,14 +476,14 @@ private:
bool fDragEnabled;
bool fDropEnabled;
bool closingBlocked;
- QDateTime dtCenterTimeLineAfterShow;
+ TQDateTime dtCenterTimeLineAfterShow;
KDGanttViewItem::Shape myDefaultShape [9];
- QColor myColor[9],myColorHL[9];
+ TQColor myColor[9],myColorHL[9];
bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3];
- QColor myTextColor;
- QColor myDefaultColor[3],myDefaultColorHL[3];
- QPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
- QPtrList<legendItem> *myLegendItems;
+ TQColor myTextColor;
+ TQColor myDefaultColor[3],myDefaultColorHL[3];
+ TQPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
+ TQPtrList<legendItem> *myLegendItems;
void addTaskLinkGroup(KDGanttViewTaskLinkGroup*);
void removeTaskLinkGroup(KDGanttViewTaskLinkGroup*);
int getIndex( KDGanttViewItem::Type ) const;
@@ -493,7 +493,7 @@ private:
KDGanttMinimizeSplitter *mySplitter;
bool mFixedHorizon;
protected:
- virtual QDragObject * dragObject ();
+ virtual TQDragObject * dragObject ();
virtual void startDrag ();
};
diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp
index aa6e707d..01172af8 100644
--- a/kdgantt/KDGanttViewEventItem.cpp
+++ b/kdgantt/KDGanttViewEventItem.cpp
@@ -53,8 +53,8 @@
is specified, a unique name will be generated
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, view, lvtext, name )
{
initItem();
@@ -70,8 +70,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, parent, lvtext, name )
{
initItem();
@@ -90,8 +90,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, view, after, lvtext, name )
{
@@ -110,8 +110,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, parent, after, lvtext, name )
{
@@ -136,7 +136,7 @@ KDGanttViewEventItem::~KDGanttViewEventItem()
\param start the start time
\sa startTime()
*/
-void KDGanttViewEventItem::setStartTime( const QDateTime& start )
+void KDGanttViewEventItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewEventItem::setStartTime():Invalid parameter-no time set");
@@ -160,11 +160,11 @@ void KDGanttViewEventItem::setStartTime( const QDateTime& start )
the start time is set to this lead time automatically.
\param leadTimeStart the start time of the lead time; pass an
- invalid QDateTime object in order to turn the lead time off.
+ invalid TQDateTime object in order to turn the lead time off.
\sa leadTime()
*/
-void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart )
+void KDGanttViewEventItem::setLeadTime( const TQDateTime& leadTimeStart )
{
if (!myLeadTime) myLeadTime = new QDateTime;
*myLeadTime = leadTimeStart;
@@ -182,11 +182,11 @@ void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart )
yes, when the lead time starts.
\return if the event item is shown with a lead time line, returns
- the QDateTime object representing the start of the lead time,
- otherwise returns an invalid QDateTime object
+ the TQDateTime object representing the start of the lead time,
+ otherwise returns an invalid TQDateTime object
\sa setLeadTime()
*/
-QDateTime KDGanttViewEventItem::leadTime() const
+TQDateTime KDGanttViewEventItem::leadTime() const
{
if(myLeadTime)
return *myLeadTime;
@@ -255,9 +255,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY)
int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime);
int hei = startShape->boundingRect().height();
// FIXME: Configurable colors
- QBrush b(startShape->brush().color(), Dense4Pattern);
+ TQBrush b(startShape->brush().color(), Dense4Pattern);
floatStartTemp->setBrush(b);
- floatStartTemp->setPen(QPen(gray));
+ floatStartTemp->setPen(TQPen(gray));
if (floatStartX < startX) {
floatStartTemp->setSize(startX - floatStartX, hei/2);
floatStartTemp->move(floatStartX, allY-hei/4);
@@ -272,9 +272,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY)
int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime);
int hei = startShape->boundingRect().height();
// FIXME: Configurable colors
- QBrush b(startShape->brush().color(), Dense4Pattern);
+ TQBrush b(startShape->brush().color(), Dense4Pattern);
floatEndTemp->setBrush(b);
- floatEndTemp->setPen(QPen(gray));
+ floatEndTemp->setPen(TQPen(gray));
if (floatEndX > startX) {
floatEndTemp->setSize(floatEndX - startX, hei/2);
floatEndTemp->move(startX, allY-hei/4);
diff --git a/kdgantt/KDGanttViewEventItem.h b/kdgantt/KDGanttViewEventItem.h
index 5cd029ee..6697e60c 100644
--- a/kdgantt/KDGanttViewEventItem.h
+++ b/kdgantt/KDGanttViewEventItem.h
@@ -41,26 +41,26 @@ class KDGanttViewEventItem : public KDGanttViewItem
{
public:
KDGanttViewEventItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewEventItem();
- void setLeadTime( const QDateTime& leadTimeStart );
- void setStartTime( const QDateTime& start );
- QDateTime leadTime() const;
+ void setLeadTime( const TQDateTime& leadTimeStart );
+ void setStartTime( const TQDateTime& start );
+ TQDateTime leadTime() const;
private:
void showItem( bool show = true, int coordY = 0 );
- QDateTime* myLeadTime;
+ TQDateTime* myLeadTime;
void initItem();
void hideMe();
};
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index 16665e5a..3d36683b 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -39,7 +39,7 @@
#include "KDGanttViewEventItem.h"
#include "itemAttributeDialog.h"
-#include "qpainter.h"
+#include "tqpainter.h"
#include "KDGanttXMLTools.h"
@@ -71,13 +71,13 @@
When a new item is created, the colors are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the colors of the shapes are set to the default color for items of this type,
defined in the KDGanttView class with:
- void setDefaultColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultColor( KDGanttViewItem::Type type, const TQColor& );
The initial default color in the KDGanttView class is set to
blue for KDGanttViewItem::Event,
green for KDGanttViewItem::Task,
@@ -88,13 +88,13 @@
values for items of the type of this item,
defined in the KDGanttView class with:
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the highlight colors of the shapes are set to the default color for
items of this type, defined in the KDGanttView class with:
- void setDefaultHighlightColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& );
The initial default highlight color in the KDGanttView class is set to red
for all types.
@@ -157,7 +157,7 @@
*/
-QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
+TQDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
/*!
Constructs an empty Gantt item.
@@ -169,9 +169,9 @@ QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
is specified, a unique name will be generated
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -189,9 +189,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(parentItem,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(parentItem,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -211,9 +211,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,after, lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,after, lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -233,9 +233,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem( parentItem, after, lvtext )
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem( parentItem, after, lvtext )
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -283,7 +283,7 @@ KDGanttViewItem::~KDGanttViewItem()
Generates a unique name if necessary and inserts it into the item
dictionary.
*/
-void KDGanttViewItem::generateAndInsertName( const QString& name )
+void KDGanttViewItem::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -291,7 +291,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
// We had a name, remove it
sItemDict.remove( _name );
- QString newName;
+ TQString newName;
if ( name.isEmpty() || sItemDict.find( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
@@ -311,7 +311,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
\return the unique item name
*/
-QString KDGanttViewItem::name() const
+TQString KDGanttViewItem::name() const
{
return _name;
}
@@ -325,7 +325,7 @@ QString KDGanttViewItem::name() const
with that name exists
*/
-KDGanttViewItem* KDGanttViewItem::find( const QString& name )
+KDGanttViewItem* KDGanttViewItem::find( const TQString& name )
{
if (name.isEmpty()) // avoid error msg from QDict
return 0;
@@ -369,7 +369,7 @@ void KDGanttViewItem::setEnabled( bool on )
temp->setEnabled( on );
temp = temp->nextSibling();
}
- QListViewItem::setEnabled( on );
+ TQListViewItem::setEnabled( on );
myGanttView->myTimeTable->dec_blockUpdating();
}
updateCanvasItems();
@@ -414,7 +414,7 @@ void KDGanttViewItem::setItemVisible( bool on )
*/
bool KDGanttViewItem::itemVisible () const
{
- return QListViewItem::isVisible();
+ return TQListViewItem::isVisible();
}
@@ -534,7 +534,7 @@ int KDGanttViewItem::priority()
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewItem::setStartTime( const QDateTime& )
+void KDGanttViewItem::setStartTime( const TQDateTime& )
{
}
@@ -545,7 +545,7 @@ void KDGanttViewItem::setStartTime( const QDateTime& )
\return the start time of this item
\sa setStartTime(), setEndTime(), endTime()
*/
-QDateTime KDGanttViewItem::startTime() const
+TQDateTime KDGanttViewItem::startTime() const
{
return myStartTime;
}
@@ -559,7 +559,7 @@ QDateTime KDGanttViewItem::startTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewItem::setEndTime( const QDateTime& end )
+void KDGanttViewItem::setEndTime( const TQDateTime& end )
{
switch( type() ) {
case Event:
@@ -583,7 +583,7 @@ void KDGanttViewItem::setEndTime( const QDateTime& end )
\return the end time of this item
\sa setEndTime(), setStartTime(), startTime()
*/
-QDateTime KDGanttViewItem::endTime() const
+TQDateTime KDGanttViewItem::endTime() const
{
return myEndTime;
}
@@ -600,7 +600,7 @@ QDateTime KDGanttViewItem::endTime() const
\sa text(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-void KDGanttViewItem::setText( const QString& text )
+void KDGanttViewItem::setText( const TQString& text )
{
textCanvas->setText(text);
textCanvasText = text;
@@ -615,18 +615,18 @@ void KDGanttViewItem::setText( const QString& text )
\sa setText(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-QString KDGanttViewItem::text() const
+TQString KDGanttViewItem::text() const
{
return textCanvasText;
}
/*!
- \deprecated Use setListViewTest( int, const QString& ) instead
+ \deprecated Use setListViewTest( int, const TQString& ) instead
*/
-void KDGanttViewItem::setListViewText( const QString& text, int column )
+void KDGanttViewItem::setListViewText( const TQString& text, int column )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -637,9 +637,9 @@ void KDGanttViewItem::setListViewText( const QString& text, int column )
\param text the text to be shown
\sa text(), setTextColor(), textColor(), setText(), listViewText()
*/
-void KDGanttViewItem::setListViewText( int column, const QString& text )
+void KDGanttViewItem::setListViewText( int column, const TQString& text )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -651,9 +651,9 @@ void KDGanttViewItem::setListViewText( int column, const QString& text )
\sa setText(), setTextColor(), textColor(), text(),
setListViewText()
*/
-QString KDGanttViewItem::listViewText( int column ) const
+TQString KDGanttViewItem::listViewText( int column ) const
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
@@ -663,7 +663,7 @@ QString KDGanttViewItem::listViewText( int column ) const
\param font the font to be shown
\sa font()
*/
-void KDGanttViewItem::setFont( const QFont& font )
+void KDGanttViewItem::setFont( const TQFont& font )
{
textCanvas->setFont(font);
updateCanvasItems();
@@ -676,7 +676,7 @@ void KDGanttViewItem::setFont( const QFont& font )
\return the font used for the text in this item
\sa setFont()
*/
-QFont KDGanttViewItem::font() const
+TQFont KDGanttViewItem::font() const
{
return textCanvas->font();
}
@@ -688,7 +688,7 @@ QFont KDGanttViewItem::font() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewItem::setTooltipText( const QString& text )
+void KDGanttViewItem::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -700,7 +700,7 @@ void KDGanttViewItem::setTooltipText( const QString& text )
\return the tooltip text
\sa setTooltipText()
*/
-QString KDGanttViewItem::tooltipText() const
+TQString KDGanttViewItem::tooltipText() const
{
return myToolTipText;
@@ -713,7 +713,7 @@ QString KDGanttViewItem::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewItem::setWhatsThisText( const QString& text )
+void KDGanttViewItem::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
}
@@ -726,7 +726,7 @@ void KDGanttViewItem::setWhatsThisText( const QString& text )
\sa setWhatsThisText()
*/
-QString KDGanttViewItem::whatsThisText() const
+TQString KDGanttViewItem::whatsThisText() const
{
return myWhatsThisText;
}
@@ -819,25 +819,25 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
if (itemShape) delete itemShape;
if (itemShapeBack) delete itemShapeBack;
- QCanvasPolygonalItem * item;
- QCanvasPolygonalItem * itemBack;
+ TQCanvasPolygonalItem * item;
+ TQCanvasPolygonalItem * itemBack;
int size = myItemSize+2;
int hei = (myItemSize/3)/2;
switch (shape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -847,17 +847,17 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
// of the same size as a TriangleDown-icon, if we increment the size by 2
size+=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -865,19 +865,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
case Diamond:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -885,19 +885,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
{
size -=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -954,8 +954,8 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
\param end the color for the end shape
\sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
- const QColor& end )
+void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end )
{
myStartColor=start ;
@@ -982,7 +982,7 @@ void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
\param end returns the end color
\sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColor ;
middle = myMiddleColor;
@@ -1008,7 +1008,7 @@ void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
\param end the highlight color for the end shape
\sa highlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& middle, const QColor& end )
+void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end )
{
myStartColorHL=start ;
myMiddleColorHL= middle;
@@ -1034,7 +1034,7 @@ void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& mid
\param end returns the end highlight color
\sa setHighlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColorHL ;
middle = myMiddleColorHL;
@@ -1054,7 +1054,7 @@ void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& en
\param color the text color
\sa textColor(), setText(), text()
*/
-void KDGanttViewItem::setTextColor( const QColor& color )
+void KDGanttViewItem::setTextColor( const TQColor& color )
{
myTextColor = color;
@@ -1077,7 +1077,7 @@ void KDGanttViewItem::setTextColor( const QColor& color )
\return the text color
\sa setTextColor(), setText(), text()
*/
-QColor KDGanttViewItem::textColor() const
+TQColor KDGanttViewItem::textColor() const
{
return myTextColor;
}
@@ -1105,17 +1105,17 @@ QColor KDGanttViewItem::textColor() const
\param pixmap the pixmap to show
\sa pixmap()
*/
-void KDGanttViewItem::setPixmap( int column, const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( int column, const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( column, pixmap );
+ TQListViewItem::setPixmap( column, pixmap );
}
/*!
- \deprecated use setPixmap( int, const QPixmap& ) instead
+ \deprecated use setPixmap( int, const TQPixmap& ) instead
*/
-void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( 0, pixmap );
+ TQListViewItem::setPixmap( 0, pixmap );
}
@@ -1126,9 +1126,9 @@ void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
\return a pointer to the pixmap shown
\sa setPixmap()
*/
-const QPixmap* KDGanttViewItem::pixmap( int column ) const
+const TQPixmap* KDGanttViewItem::pixmap( int column ) const
{
- return QListViewItem::pixmap( column );
+ return TQListViewItem::pixmap( column );
}
@@ -1147,7 +1147,7 @@ const QPixmap* KDGanttViewItem::pixmap( int column ) const
\param color the default color to use
\sa defaultColor(), setColors(), colors()
*/
-void KDGanttViewItem::setDefaultColor( const QColor& color )
+void KDGanttViewItem::setDefaultColor( const TQColor& color )
{
myDefaultColor = color;
@@ -1173,7 +1173,7 @@ void KDGanttViewItem::setDefaultColor( const QColor& color )
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttViewItem::defaultColor() const
+TQColor KDGanttViewItem::defaultColor() const
{
return myDefaultColor;
}
@@ -1194,7 +1194,7 @@ QColor KDGanttViewItem::defaultColor() const
\param color the default highlighting color to use
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
+void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color )
{
myDefaultColorHL = color;
if ( displaySubitemsAsGroup() ) {
@@ -1217,7 +1217,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttViewItem::defaultHighlightColor() const
+TQColor KDGanttViewItem::defaultHighlightColor() const
{
return myDefaultColorHL;
}
@@ -1231,7 +1231,7 @@ QColor KDGanttViewItem::defaultHighlightColor() const
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
- return (KDGanttViewItem* )QListViewItem::firstChild();
+ return (KDGanttViewItem* )TQListViewItem::firstChild();
}
@@ -1243,7 +1243,7 @@ KDGanttViewItem* KDGanttViewItem::firstChild() const
*/
KDGanttViewItem* KDGanttViewItem::nextSibling() const
{
- return (KDGanttViewItem* )QListViewItem::nextSibling();
+ return (KDGanttViewItem* )TQListViewItem::nextSibling();
}
@@ -1255,7 +1255,7 @@ KDGanttViewItem* KDGanttViewItem::nextSibling() const
*/
KDGanttViewItem* KDGanttViewItem::parent() const
{
- return (KDGanttViewItem*)QListViewItem::parent();
+ return (KDGanttViewItem*)TQListViewItem::parent();
}
@@ -1266,7 +1266,7 @@ KDGanttViewItem* KDGanttViewItem::parent() const
*/
KDGanttViewItem* KDGanttViewItem::itemAbove()
{
- return (KDGanttViewItem* )QListViewItem::itemAbove();
+ return (KDGanttViewItem* )TQListViewItem::itemAbove();
}
@@ -1281,7 +1281,7 @@ KDGanttViewItem* KDGanttViewItem::itemAbove()
KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
{
- KDGanttViewItem* retItem = (KDGanttViewItem* )QListViewItem::itemBelow();
+ KDGanttViewItem* retItem = (KDGanttViewItem* )TQListViewItem::itemBelow();
if ( !includeDisabled ) {
return retItem;
}
@@ -1290,7 +1290,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
return retItem;
}
}
- KDGanttViewItem* Item2 = (KDGanttViewItem* )QListViewItem::listView()->itemAt(QPoint (2, QListViewItem::itemPos() + QListViewItem::height() +2) );
+ KDGanttViewItem* Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) );
if ( Item2 != 0 )
if (!Item2->enabled() )
return Item2;
@@ -1304,8 +1304,8 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
void KDGanttViewItem::updateCanvasItems()
{
if (blockUpdating) return;
- QPen p,pBack;
- QBrush b;
+ TQPen p,pBack;
+ TQBrush b;
b.setStyle(Qt::SolidPattern);
if ( enabled() ) {
textCanvas->setColor(myTextColor);
@@ -1338,9 +1338,9 @@ void KDGanttViewItem::updateCanvasItems()
endLine->setPen(p);
}
} else {
- //QColor discol = Qt::lightGray;
- QColor discol = QColor(232,232,232);
- textCanvas->setColor( QColor(150,150,150) );
+ //TQColor discol = Qt::lightGray;
+ TQColor discol = TQColor(232,232,232);
+ textCanvas->setColor( TQColor(150,150,150) );
b.setStyle(Qt::SolidPattern);
b.setColor(discol);
startShape->setBrush(b);
@@ -1354,7 +1354,7 @@ void KDGanttViewItem::updateCanvasItems()
pBack.setWidth((myItemSize/3-1)+2);
startLineBack->setPen(pBack);
endLineBack->setPen(pBack);
- QFont f = textCanvas->font();
+ TQFont f = textCanvas->font();
f.setPixelSize(myItemSize);
textCanvas->setFont(f);
//if (isvisible) {
@@ -1380,7 +1380,7 @@ void KDGanttViewItem::setOpen( bool open )
} else {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
}
@@ -1390,16 +1390,16 @@ void KDGanttViewItem::showItem( bool, int )
}
-QPoint KDGanttViewItem::getTaskLinkStartCoord(QPoint p)
+TQPoint KDGanttViewItem::getTaskLinkStartCoord(TQPoint p)
{
textCanvas->move(p.x()+myItemSize, itemPos() + height()/2-myItemSize/2);
- return QPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
}
-QPoint KDGanttViewItem::getTaskLinkEndCoord()
+TQPoint KDGanttViewItem::getTaskLinkEndCoord()
{
- return QPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
}
@@ -1423,7 +1423,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
{
_isMoveable = false;
_isResizeable = false;
- setTextOffset(QPoint(0,0));
+ setTextOffset(TQPoint(0,0));
//_isCalendar = false;
_callListViewOnSetOpen = true;
myType = t;
@@ -1445,8 +1445,8 @@ void KDGanttViewItem::initColorAndShapes(Type t)
myGanttView->myTimeHeader->saveCenterDateTime();
myStartTime = myGanttView->myTimeHeader->myCenterDateTime;
myEndTime = myStartTime;
- myToolTipText =QListViewItem::text(0);
- myWhatsThisText = QListViewItem::text(0);
+ myToolTipText =TQListViewItem::text(0);
+ myWhatsThisText = TQListViewItem::text(0);
isHighlighted = false;
isEditable = true;
_displaySubitemsAsGroup = myGanttView->displaySubitemsAsGroup();
@@ -1458,7 +1458,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
startLineBack->setZ(1);endLineBack->setZ(1);
actualEnd = new KDCanvasLine(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
actualEnd->setZ(5);
- actualEnd->setPen( QPen ( Qt::red, 3 ) );
+ actualEnd->setPen( TQPen ( Qt::red, 3 ) );
textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
textCanvas->setText("");
@@ -1498,7 +1498,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setHighlightColors(defaultHighlightColor(),defaultHighlightColor(), defaultHighlightColor());
setFont(myGanttView->font());
// if (type() == Task)
- //setText(QListViewItem::text(0)); // testing only
+ //setText(TQListViewItem::text(0)); // testing only
//isvisible = true;
_priority = 150;
_showNoInformation = false;
@@ -1508,7 +1508,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-QString KDGanttViewItem::shapeToString( Shape shape )
+TQString KDGanttViewItem::shapeToString( Shape shape )
{
switch( shape ) {
case TriangleDown:
@@ -1526,7 +1526,7 @@ QString KDGanttViewItem::shapeToString( Shape shape )
}
-KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
+KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& string )
{
if( string == "TriangleDown" )
return TriangleDown;
@@ -1549,10 +1549,10 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewItem::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewItem::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement itemElement = doc.createElement( "Item" );
+ TQDomElement itemElement = doc.createElement( "Item" );
parentElement.appendChild( itemElement );
itemElement.setAttribute( "Type", typeToString( type() ) );
@@ -1579,7 +1579,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
shapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, itemElement, "StartColor", startColor );
KDGanttXML::createColorNode( doc, itemElement, "MiddleColor", middleColor );
@@ -1594,7 +1594,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createColorNode( doc, itemElement, "EndHighlightColor", endColor );
KDGanttXML::createColorNode( doc, itemElement, "TextColor", textColor() );
KDGanttXML::createStringNode( doc, itemElement, "Name", name() );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
itemElement.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -1615,9 +1615,9 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
\return the newly created item
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1647,9 +1647,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1679,9 +1679,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
\return the newly created element
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1711,9 +1711,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1735,48 +1735,48 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
/*
Fills in the values in the item by reading the DOM element.
*/
-void KDGanttViewItem::loadFromDomElement( QDomElement& element )
+void KDGanttViewItem::loadFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
Shape startShape = TriangleDown, middleShape = TriangleDown,
endShape = TriangleDown;
- QColor startColor, middleColor, endColor;
- QColor startHighlightColor, middleHighlightColor, endHighlightColor;
- QString tempName;
+ TQColor startColor, middleColor, endColor;
+ TQColor startHighlightColor, middleHighlightColor, endHighlightColor;
+ TQString tempName;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "StartTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setStartTime( value );
} else if( tagName == "EndTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setEndTime( value );
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setText( value );
} else if( tagName == "Font" ) {
- QFont value;
+ TQFont value;
if( KDGanttXML::readFontNode( element, value ) )
setFont( value );
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setTooltipText( value );
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setWhatsThisText( value );
} else if( tagName == "Pixmap" ) {
- QPixmap value;
+ TQPixmap value;
if( KDGanttXML::readPixmapNode( element, value ) )
setPixmap( value );
} else if( tagName == "ListViewText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setListViewText( value );
} else if( tagName == "Open" ) {
@@ -1788,64 +1788,64 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
if( KDGanttXML::readBoolNode( element, value ) )
setHighlight( value );
} else if( tagName == "StartShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = stringToShape( value );
} else if( tagName == "MiddleShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = stringToShape( value );
} else if( tagName == "EndShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = stringToShape( value );
} else if( tagName == "DefaultColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( value );
} else if( tagName == "StartColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "MiddleColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "EndColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else if( tagName == "DefaultHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( value );
} else if( tagName == "StartHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startHighlightColor = value;
} else if( tagName == "MiddleHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleHighlightColor = value;
} else if( tagName == "EndHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endHighlightColor = value;
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempName = value;
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -1883,7 +1883,7 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
}
-QString KDGanttViewItem::typeToString( Type type )
+TQString KDGanttViewItem::typeToString( Type type )
{
switch( type ) {
case Event:
@@ -1948,9 +1948,9 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
\return the start time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildStartTime()
+TQDateTime KDGanttViewItem::myChildStartTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -1982,9 +1982,9 @@ QDateTime KDGanttViewItem::myChildStartTime()
\return the end time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildEndTime()
+TQDateTime KDGanttViewItem::myChildEndTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -2030,7 +2030,7 @@ bool KDGanttViewItem::showNoInformation()
The height of the line is the height of the item.
The brush of the line is specified by KDGanttView::setNoInformationBrush().
(i.e. the same brush for all items of the Gantt view).
- The default brush is QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ The default brush is TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern );
\param show if true, the 'showNoInformation' line is shown for this item
\sa showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
*/
@@ -2049,7 +2049,7 @@ void KDGanttViewItem::setShowNoInformation( bool show )
\param name the name of the item
\return the pointer to the item with name \a name
*/
-KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
+KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
{
if ( listViewText() == name )
return this;
@@ -2064,7 +2064,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
/*
-void KDGanttViewItem::printinfo( QString s )
+void KDGanttViewItem::printinfo( TQString s )
{
KDGanttViewItem* temp = firstChild();
while (temp != 0) {
@@ -2105,7 +2105,7 @@ int KDGanttViewItem::computeHeight()
showItem( false );
if ( firstChild() )
firstChild()->hideSubtree();
- // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", QListViewItem::text(0).latin1());
+ // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", TQListViewItem::text(0).latin1());
return 0;
}
@@ -2146,7 +2146,7 @@ int KDGanttViewItem::computeHeight()
// display closed item as usual
//
if ( isOpen() ) {
- //qDebug("KDGanttViewItem::computeHeight() %s is open ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is open ", TQListViewItem::text(0).latin1());
temp = firstChild();
// if item opened, iterate over all subitems
int tempHeight;
@@ -2169,7 +2169,7 @@ int KDGanttViewItem::computeHeight()
temp = temp->nextSibling();
}
} else { // closed!
- //qDebug("KDGanttViewItem::computeHeight() %s is closed ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is closed ", TQListViewItem::text(0).latin1());
if ( !displaySubitemsAsGroup() ) {
if ( firstChild() ) {
@@ -2187,7 +2187,7 @@ int KDGanttViewItem::computeHeight()
showItem( true );
hei += height();
- //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", QListViewItem::text(0).latin1(), hei);
+ //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", TQListViewItem::text(0).latin1(), hei);
return hei;
}
@@ -2209,10 +2209,10 @@ bool KDGanttViewItem::showNoCross()
}
-void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
+void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg,
int w, int y, int h )
{
- QListViewItem::paintBranches ( p, cg, w, y, h);
+ TQListViewItem::paintBranches ( p, cg, w, y, h);
if ( !myGanttView->calendarMode() )
return;
else {
@@ -2224,7 +2224,7 @@ void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
int hei = temp->height();
//qDebug(" y %d w %d h %d ", y,w,h);
//qDebug("yc %d hei %d",y_coord,hei );
- myGanttView->myListView->paintemptyarea( p, QRect( 0,y+y_coord,w,hei));
+ myGanttView->myListView->paintemptyarea( p, TQRect( 0,y+y_coord,w,hei));
int x_c = w/2;
int y_c = y+y_coord+ temp->height ()/2;
int y_ce ;
@@ -2465,16 +2465,16 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
Returns the coordinate of this items middle left point
*/
-QPoint KDGanttViewItem::middleLeft()
+TQPoint KDGanttViewItem::middleLeft()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
}
/*!
Returns the coordinate of this items middle right point
*/
-QPoint KDGanttViewItem::middleRight()
+TQPoint KDGanttViewItem::middleRight()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
}
/*!
Moves this items text.
@@ -2496,21 +2496,21 @@ void KDGanttViewItem::moveTextCanvas(int x, int y)
*/
void KDGanttViewItem::moveTextCanvas()
{
- QPoint m = myTextOffset+middleRight();
+ TQPoint m = myTextOffset+middleRight();
textCanvas->move(m.x(), m.y()-myItemSize/2);
}
/*!
Sets with how much the item text is offset.
*/
-void KDGanttViewItem::setTextOffset(QPoint p)
+void KDGanttViewItem::setTextOffset(TQPoint p)
{
//qDebug("%s: setTextOffset() offset: %d,%d",listViewText(0).latin1(),p.x(),p.y());
myTextOffset.setX(p.x());
myTextOffset.setY(p.y());
}
-bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc)
+bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc)
{
return tc == textCanvas;
}
@@ -2534,7 +2534,7 @@ void KDGanttViewItem::setProgress(int percent)
\param start the float start time
*/
-void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
+void KDGanttViewItem::setFloatStartTime(const TQDateTime &start)
{
myFloatStartTime = start;
}
@@ -2545,7 +2545,7 @@ void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
\param end the float end time
*/
-void KDGanttViewItem::setFloatEndTime(const QDateTime &end)
+void KDGanttViewItem::setFloatEndTime(const TQDateTime &end)
{
myFloatEndTime = end;
}
diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h
index e296db0a..cebced30 100644
--- a/kdgantt/KDGanttViewItem.h
+++ b/kdgantt/KDGanttViewItem.h
@@ -36,15 +36,15 @@
#ifndef KDGANTTVIEWITEM_H
#define KDGANTTVIEWITEM_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qfont.h>
-#include <qlistview.h>
-#include <qcanvas.h>
-#include <qdom.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqfont.h>
+#include <tqlistview.h>
+#include <tqcanvas.h>
+#include <tqdom.h>
+#include <tqdict.h>
class KDGanttView;
class KDTimeTableWidget;
@@ -63,26 +63,26 @@ public:
protected:
KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
//bool _isCalendar;
bool isVisibleInGanttView;
void updateCanvasItems();
int getCoordY();
- QDateTime myChildStartTime();
- QDateTime myChildEndTime();
- void generateAndInsertName( const QString& name );
+ TQDateTime myChildStartTime();
+ TQDateTime myChildEndTime();
+ void generateAndInsertName( const TQString& name );
KDCanvasLine * startLine, *endLine,
* startLineBack, *endLineBack, *actualEnd ;
KDCanvasPolygonItem* startShape,* midShape, *endShape, *progressShape,
@@ -90,16 +90,16 @@ protected:
* floatStartShape, * floatEndShape;
KDGanttView* myGanttView;
KDCanvasText* textCanvas;
- QString textCanvasText;
- QDateTime myStartTime, myEndTime;
+ TQString textCanvasText;
+ TQDateTime myStartTime, myEndTime;
bool isHighlighted, isEditable;
int myItemSize;
bool blockUpdating;
void moveTextCanvas(int x, int y);
int myProgress;
- QDateTime myFloatStartTime;
- QDateTime myFloatEndTime;
+ TQDateTime myFloatStartTime;
+ TQDateTime myFloatEndTime;
public:
virtual ~KDGanttViewItem();
@@ -118,25 +118,25 @@ public:
bool displaySubitemsAsGroup() const;
void setPriority( int prio );
int priority();
- virtual void setStartTime( const QDateTime& start );
- QDateTime startTime() const;
- virtual void setEndTime( const QDateTime& end );
- QDateTime endTime() const;
-
- void setText( const QString& text );
- QString text() const;
- void setListViewText( const QString& text, int column = 0 );
- void setListViewText( int column, const QString& text );
- QString listViewText( int column = 0 ) const;
- void setFont( const QFont& font );
- QFont font() const;
- void setTooltipText( const QString& text );
- QString tooltipText() const;
- void setWhatsThisText( const QString& text );
- QString whatsThisText() const;
- void setPixmap( int column, const QPixmap& pixmap );
- void setPixmap( const QPixmap& pixmap );
- const QPixmap* pixmap( int column = 0 ) const;
+ virtual void setStartTime( const TQDateTime& start );
+ TQDateTime startTime() const;
+ virtual void setEndTime( const TQDateTime& end );
+ TQDateTime endTime() const;
+
+ void setText( const TQString& text );
+ TQString text() const;
+ void setListViewText( const TQString& text, int column = 0 );
+ void setListViewText( int column, const TQString& text );
+ TQString listViewText( int column = 0 ) const;
+ void setFont( const TQFont& font );
+ TQFont font() const;
+ void setTooltipText( const TQString& text );
+ TQString tooltipText() const;
+ void setWhatsThisText( const TQString& text );
+ TQString whatsThisText() const;
+ void setPixmap( int column, const TQPixmap& pixmap );
+ void setPixmap( const TQPixmap& pixmap );
+ const TQPixmap* pixmap( int column = 0 ) const;
void setHighlight( bool );
bool highlight() const;
@@ -147,44 +147,44 @@ public:
void setShapes( Shape start, Shape middle, Shape end );
void shapes( Shape& start, Shape& middle, Shape& end ) const;
- void setDefaultColor( const QColor& );
- QColor defaultColor() const;
- void setColors( const QColor& start, const QColor& middle,
- const QColor& end );
- void colors( QColor& start, QColor& middle, QColor& end ) const;
- void setDefaultHighlightColor( const QColor& );
- QColor defaultHighlightColor() const;
- void setHighlightColors( const QColor& start, const QColor& middle,
- const QColor& end );
- void highlightColors( QColor& start, QColor& middle, QColor& end ) const;
- void setTextColor( const QColor& color );
- QColor textColor() const;
+ void setDefaultColor( const TQColor& );
+ TQColor defaultColor() const;
+ void setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end );
+ void colors( TQColor& start, TQColor& middle, TQColor& end ) const;
+ void setDefaultHighlightColor( const TQColor& );
+ TQColor defaultHighlightColor() const;
+ void setHighlightColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end );
+ void highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const;
+ void setTextColor( const TQColor& color );
+ TQColor textColor() const;
void setProgress(int percent);
- void setFloatStartTime(const QDateTime &start);
- void setFloatEndTime(const QDateTime &end);
+ void setFloatStartTime(const TQDateTime &start);
+ void setFloatEndTime(const TQDateTime &end);
KDGanttViewItem* firstChild() const;
KDGanttViewItem* nextSibling() const;
KDGanttViewItem* parent() const;
KDGanttViewItem* itemAbove();
KDGanttViewItem* itemBelow( bool includeDisabled = true );
- KDGanttViewItem* getChildByName( const QString& name );
- QString name() const;
- static KDGanttViewItem* find( const QString& name );
+ KDGanttViewItem* getChildByName( const TQString& name );
+ TQString name() const;
+ static KDGanttViewItem* find( const TQString& name );
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
static KDGanttViewItem* createFromDomElement( KDGanttView* view,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent,
KDGanttViewItem* previous,
- QDomElement& element );
+ TQDomElement& element );
void setMoveable( bool m );
bool isMoveable() const;
@@ -202,9 +202,9 @@ private:
friend class KDGanttViewItemDrag;
friend class itemAttributeDialog;
- static QString shapeToString( Shape shape );
- static Shape stringToShape( const QString& string );
- static QString typeToString( Type type );
+ static TQString shapeToString( Shape shape );
+ static Shape stringToShape( const TQString& string );
+ static TQString typeToString( Type type );
Type myType;
void initColorAndShapes(Type t);
@@ -218,33 +218,33 @@ private:
void setCallListViewOnSetOpen( bool call );
bool showNoCross();
void createShape(KDCanvasPolygonItem* &,KDCanvasPolygonItem* &, Shape);
- void loadFromDomElement( QDomElement& element );
+ void loadFromDomElement( TQDomElement& element );
- //QFont myFont;
- QString myToolTipText,myWhatsThisText;
- void paintBranches ( QPainter * p, const QColorGroup & cg, int w, int y, int h );
+ //TQFont myFont;
+ TQString myToolTipText,myWhatsThisText;
+ void paintBranches ( TQPainter * p, const TQColorGroup & cg, int w, int y, int h );
bool _displaySubitemsAsGroup;
bool _showNoInformation;
bool _enabled;
bool _callListViewOnSetOpen;
Shape myStartShape,myMiddleShape,myEndShape;
- QColor myStartColor,myMiddleColor,myEndColor;
- QColor myStartColorHL,myMiddleColorHL,myEndColorHL;
- QColor myDefaultColor,myDefaultColorHL;
- QColor myTextColor;
+ TQColor myStartColor,myMiddleColor,myEndColor;
+ TQColor myStartColorHL,myMiddleColorHL,myEndColorHL;
+ TQColor myDefaultColor,myDefaultColorHL;
+ TQColor myTextColor;
bool colorDefined,colorHLDefined;
- QPoint getTaskLinkStartCoord(QPoint);
- QPoint getTaskLinkEndCoord();
- QPoint middleLeft();
- QPoint middleRight();
+ TQPoint getTaskLinkStartCoord(TQPoint);
+ TQPoint getTaskLinkEndCoord();
+ TQPoint middleLeft();
+ TQPoint middleRight();
void moveTextCanvas();
- void setTextOffset(QPoint p);
- bool isMyTextCanvas(QCanvasItem *tc);
- QPoint myTextOffset;
- QString _name;
+ void setTextOffset(TQPoint p);
+ bool isMyTextCanvas(TQCanvasItem *tc);
+ TQPoint myTextOffset;
+ TQString _name;
bool shapeDefined;
int _priority;
- static QDict<KDGanttViewItem> sItemDict;
+ static TQDict<KDGanttViewItem> sItemDict;
bool _isMoveable;
bool _isResizeable;
diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp
index bbc62914..23bf90ac 100644
--- a/kdgantt/KDGanttViewItemDrag.cpp
+++ b/kdgantt/KDGanttViewItemDrag.cpp
@@ -32,7 +32,7 @@
#include <KDGanttViewItemDrag.h>
#include <KDGanttViewItem.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <KDGanttView.h>
/*!
@@ -54,28 +54,28 @@
\param source the source widget
\param name the internal object name
*/
-KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *source, const char * name ) : QStoredDrag("x-application/x-KDGanttViewItemDrag", source, name )
+KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *source, const char * name ) : TQStoredDrag("x-application/x-KDGanttViewItemDrag", source, name )
{
myItem = item;
- QPixmap pix;
+ TQPixmap pix;
if (item->pixmap() )
pix = *(item->pixmap()) ;
else {
KDGanttViewItem::Shape start, middle, end;
item->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
item->colors( st, mi, en );
pix =item->myGanttView->getPixmap( start, st, item->myGanttView->lvBackgroundColor(), 11 );
}
- setPixmap( pix , QPoint( -10,-10 ));
- QDomDocument doc( "GanttView" );
- QString docstart = "<GanttView/>";
+ setPixmap( pix , TQPoint( -10,-10 ));
+ TQDomDocument doc( "GanttView" );
+ TQString docstart = "<GanttView/>";
doc.setContent( docstart );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
doc.documentElement().appendChild( itemsElement );
item->createNode( doc, itemsElement );
- QDataStream s( array, IO_WriteOnly );
+ TQDataStream s( array, IO_WriteOnly );
s << doc.toString();
}
@@ -86,13 +86,13 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *sourc
\param c the format of the data
\return the encoded data of the drag object
*/
-QByteArray KDGanttViewItemDrag::encodedData( const char * c) const
+TQByteArray KDGanttViewItemDrag::encodedData( const char * c) const
{
- QString s ( c );
+ TQString s ( c );
if ( s == "x-application/x-KDGanttViewItemDrag" ) {
return array;
}
- return QByteArray();
+ return TQByteArray();
}
/*!
@@ -112,9 +112,9 @@ KDGanttViewItem* KDGanttViewItemDrag::getItem()
\param e the mime source that has been dragged
\return true if KDGanttViewItemDrag can decode the data in \a e.
*/
-bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e )
+bool KDGanttViewItemDrag::canDecode ( const TQMimeSource * e )
{
- if ( QString( e->format() ) == "x-application/x-KDGanttViewItemDrag" )
+ if ( TQString( e->format() ) == "x-application/x-KDGanttViewItemDrag" )
return true;
return false;
@@ -129,11 +129,11 @@ bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e )
\param string the resulting XML string
\return true if the operation succeeded
*/
-bool KDGanttViewItemDrag::decode ( const QMimeSource * e , QString & string)
+bool KDGanttViewItemDrag::decode ( const TQMimeSource * e , TQString & string)
{
- QByteArray arr;
+ TQByteArray arr;
arr = e->encodedData( "x-application/x-KDGanttViewItemDrag");
- QDataStream s( arr, IO_ReadOnly );
+ TQDataStream s( arr, IO_ReadOnly );
s >> string;
return true;
}
diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h
index c017720e..2512711e 100644
--- a/kdgantt/KDGanttViewItemDrag.h
+++ b/kdgantt/KDGanttViewItemDrag.h
@@ -32,9 +32,9 @@
#ifndef KDGANTTVIEWITEMGRAG_H
#define KDGANTTVIEWITEMGRAG_H
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qdragobject.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqdragobject.h>
class KDGanttViewItem;
@@ -42,16 +42,16 @@ class KDGanttViewItem;
class KDGanttViewItemDrag :public QStoredDrag
{
public:
- KDGanttViewItemDrag(KDGanttViewItem* item, QWidget *source, const char * name ) ;
+ KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ;
- QByteArray encodedData( const char * c) const;
+ TQByteArray encodedData( const char * c) const;
KDGanttViewItem* getItem();
- static bool canDecode ( const QMimeSource * e );
- static bool decode ( const QMimeSource * e, QString & );
+ static bool canDecode ( const TQMimeSource * e );
+ static bool decode ( const TQMimeSource * e, TQString & );
protected:
private:
- QByteArray array;
+ TQByteArray array;
KDGanttViewItem* myItem;
};
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index d35f7eba..ffec6528 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -41,43 +41,43 @@
#include "KDGanttViewSubwidgets.moc"
#endif
-#include <qlabel.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qdrawutil.h>
-#include <qpalette.h>
-#include <qdragobject.h>
-#include <qptrlist.h>
-#include <qpen.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqdrawutil.h>
+#include <tqpalette.h>
+#include <tqdragobject.h>
+#include <tqptrlist.h>
+#include <tqpen.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcalendarsystem.h>
#include <kdebug.h>
-KDTimeTableWidget:: KDTimeTableWidget( QWidget* parent,KDGanttView* myGantt)
- : QCanvas (parent)
+KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt)
+ : TQCanvas (parent)
{
myGanttView = myGantt;
taskLinksVisible = true;
flag_blockUpdating = false;
int_blockUpdating = 0;
gridPen.setStyle(Qt::DotLine);
- gridPen.setColor(QColor(100,100,100));
+ gridPen.setColor(TQColor(100,100,100));
maximumComputedGridHeight = 0;
denseLineCount = 0;
- denseLineBrush = QBrush( QColor ( 240,240,240 ));
- noInfoLineBrush = QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ denseLineBrush = TQBrush( TQColor ( 240,240,240 ));
+ noInfoLineBrush = TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern );
pendingHeight = 0;
pendingWidth = 0;
retune(256);
resize(1,1);
}
-QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
+TQPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
{
return myTaskLinkList;
}
@@ -85,7 +85,7 @@ QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
void KDTimeTableWidget::clearTaskLinks()
{
// cannot use clear() here, as tasklinks will remove themselves from my list when deleted!
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
while (it.current()) {
delete it.current();
}
@@ -120,38 +120,38 @@ void KDTimeTableWidget::checkHeight( int hei )
}
-void KDTimeTableWidget::setNoInformationBrush( const QBrush& brush )
+void KDTimeTableWidget::setNoInformationBrush( const TQBrush& brush )
{
noInfoLineBrush = brush;
updateMyContent();
}
-QBrush KDTimeTableWidget::noInformationBrush() const
+TQBrush KDTimeTableWidget::noInformationBrush() const
{
return noInfoLineBrush;
}
void KDTimeTableWidget::removeItemFromTasklinks( KDGanttViewItem* item)
{
- QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
+ TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
for ( ; it.current(); ++it ) {
it.current()->removeItemFromList( item );
}
}
-void KDTimeTableWidget::expandItem( QListViewItem * item)
+void KDTimeTableWidget::expandItem( TQListViewItem * item)
{
item->invalidateHeight () ;
//qApp->processEvents();
updateMyContent();
}
-void KDTimeTableWidget::collapseItem( QListViewItem * item)
+void KDTimeTableWidget::collapseItem( TQListViewItem * item)
{
item->invalidateHeight () ;
//qApp->processEvents();
updateMyContent();
}
-void KDTimeTableWidget::highlightItem( QListViewItem * item )
+void KDTimeTableWidget::highlightItem( TQListViewItem * item )
{
static bool itemwashighlighted;
static KDGanttViewItem* highlightedItem = 0;
@@ -203,15 +203,15 @@ void KDTimeTableWidget::computeVerticalGrid()
wid = width();
KDCanvasLine* templine;
KDCanvasRectangle* temprect;
- QColor colcol;
- QPen colPen;
+ TQColor colcol;
+ TQPen colPen;
bool colorIterator = true;
if (myGanttView->showMinorTicks()){//minor
colPen.setWidth(cw);
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
for ( ; itgrid.current(); ++itgrid ) {
if (i < wid) {
itgrid.current()->setPoints(i,0,i,h);
@@ -229,8 +229,8 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(cw ,h );
itcol.current()->move( i, 0 );
itcol.current()->show();
@@ -243,8 +243,8 @@ void KDTimeTableWidget::computeVerticalGrid()
templine->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(cw ,h );
temprect->move( i, 0 );
temprect->setZ(-20);
@@ -275,16 +275,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(cw ,h );
itcol.current()->move( i, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(cw ,h );
temprect->move( i, 0 );
temprect->setZ(-20);
@@ -306,10 +306,10 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->hide();
} else {//major
if (myGanttView->showMajorTicks()) {
- QValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin();
- QValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end();
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin();
+ TQValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end();
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
int left = 0;
for ( ; itgrid.current(); ++itgrid ) {
if (intIt != intItEnd) {
@@ -331,16 +331,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+mid,0,mid,h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(mid ,h );
itcol.current()->move( left, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(mid,h );
temprect->move( left, 0 );
temprect->setZ(-20);
@@ -385,16 +385,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+mid,0,mid,h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(mid ,h );
itcol.current()->move( left, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(mid ,h );
temprect->move( left, 0 );
temprect->setZ(-20);
@@ -420,11 +420,11 @@ void KDTimeTableWidget::computeVerticalGrid()
}
else {
//hideall
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
for ( ; itgrid.current(); ++itgrid ) {
itgrid.current()->hide();
}
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
for ( ; itcol.current(); ++itcol ) {
itcol.current()->hide();
}
@@ -442,7 +442,7 @@ void KDTimeTableWidget::computeHorizontalGrid()
else
wid = width();
KDCanvasLine* templine;
- QPtrListIterator<KDCanvasLine> ithor(horGridList);
+ TQPtrListIterator<KDCanvasLine> ithor(horGridList);
if ( ithor.current() ) {
templine = ithor.current();
++ithor;
@@ -467,11 +467,11 @@ void KDTimeTableWidget::computeHorizontalGrid()
templine->setZ(0);
horGridList.append(templine);
}
- if ( templine->endPoint() != QPoint(wid,posY ))
+ if ( templine->endPoint() != TQPoint(wid,posY ))
templine->setPoints(0,posY,wid,posY );
if ( !templine->isVisible() )
templine->show();
- //QString ts = "asGroup";
+ //TQString ts = "asGroup";
//if (!temp->displaySubitemsAsGroup() )
// ts = " NOT asGroup";
//qDebug("temp name %s %s", temp->listViewText(0).latin1(), ts.latin1());
@@ -493,7 +493,7 @@ void KDTimeTableWidget::computeDenseLines()
wid = pendingWidth;
else
wid = width();
- QPtrListIterator<KDCanvasRectangle> ithordense(horDenseList);
+ TQPtrListIterator<KDCanvasRectangle> ithordense(horDenseList);
KDCanvasRectangle* denseLine;
int tempDenseLineCount = 0;
while ( temp ) {
@@ -509,12 +509,12 @@ void KDTimeTableWidget::computeDenseLines()
denseLine->setZ(-2);
horDenseList.append( denseLine );
}
- if ( denseLine->rect() != QRect(0, temp->itemPos(),wid, temp->height()) ) {
+ if ( denseLine->rect() != TQRect(0, temp->itemPos(),wid, temp->height()) ) {
denseLine->move( 0, temp->itemPos() );
denseLine->setSize( wid, temp->height());
}
if (denseLine->brush() != denseLineBrush ) {
- denseLine->setPen( QPen( Qt::NoPen ) );
+ denseLine->setPen( TQPen( Qt::NoPen ) );
denseLine->setBrush( denseLineBrush);
}
if (!denseLine->isVisible() )
@@ -541,7 +541,7 @@ void KDTimeTableWidget::computeShowNoInformation()
wid = pendingWidth;
else
wid = width();
- QPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList);
+ TQPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList);
KDCanvasRectangle* noInfoLine;
while ( temp ) {
if ( temp->showNoInformation() ) {
@@ -555,7 +555,7 @@ void KDTimeTableWidget::computeShowNoInformation()
}
noInfoLine->move( 0, temp->itemPos() );
noInfoLine->setSize( wid, temp->height());
- noInfoLine->setPen( QPen( Qt::NoPen ) );
+ noInfoLine->setPen( TQPen( Qt::NoPen ) );
noInfoLine->setBrush( noInfoLineBrush);
noInfoLine->show();
}
@@ -571,7 +571,7 @@ void KDTimeTableWidget::computeShowNoInformation()
void KDTimeTableWidget::computeTaskLinks()
{
//compute and show tasklinks
- QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
+ TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
for ( ; it.current(); ++it ) {
if (it.current()->isVisible())
it.current()->showMe(true);
@@ -673,7 +673,7 @@ bool KDTimeTableWidget::showTaskLinks()
{
return taskLinksVisible;
}
-void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush )
+void KDTimeTableWidget::setHorBackgroundLines( int count, TQBrush brush )
{
denseLineBrush = brush;
denseLineCount = 0;
@@ -682,32 +682,32 @@ void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush )
}
-int KDTimeTableWidget::horBackgroundLines( QBrush& brush )
+int KDTimeTableWidget::horBackgroundLines( TQBrush& brush )
{
brush = denseLineBrush;
return denseLineCount;
}
-int KDTimeTableWidget::getCoordX( QDateTime dt ) {
+int KDTimeTableWidget::getCoordX( TQDateTime dt ) {
return myGanttView->myTimeHeader->getCoordX(dt);
}
/* ***************************************************************
KDTimeHeaderWidget:: KDTimeHeaderWidget
***************************************************************** */
-KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant )
- : QWidget (parent)
+KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant )
+ : TQWidget (parent)
{
myToolTip = new KDTimeHeaderToolTip(this,this);
mySizeHint = 0;
myGanttView = gant;
flagDoNotRecomputeAfterChange = true;
- QDateTime start = (QDateTime::currentDateTime ()).addSecs(-3600);
+ TQDateTime start = (TQDateTime::currentDateTime ()).addSecs(-3600);
setHorizonStart(start);
setHorizonEnd( start.addSecs(3600*2));
flagStartTimeSet = false;
flagEndTimeSet = false;
- myCenterDateTime = QDateTime::currentDateTime ();
+ myCenterDateTime = TQDateTime::currentDateTime ();
setScale(KDGanttView::Auto);
//setScale(KDGanttView::Hour);
myMaxScale = KDGanttView::Month;
@@ -719,48 +719,48 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant )
setYearFormat(KDGanttView::FourDigit );
setHourFormat( KDGanttView::Hour_12 );
myZoomFactor = 1.0;
- setWeekendBackgroundColor(QColor(220,220,220) );
+ setWeekendBackgroundColor(TQColor(220,220,220) );
setWeekendDays( 6, 7 );
myGridMinorWidth = 0;
- myPopupMenu = new QPopupMenu(this);
- QPopupMenu * zoomPopupMenu = new QPopupMenu(this);
+ myPopupMenu = new TQPopupMenu(this);
+ TQPopupMenu * zoomPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Zoom"),zoomPopupMenu, 1);
- zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, SLOT(setSettings(int)),0 ,21,21 );
- zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, SLOT(setSettings(int)),0 ,20,20 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, SLOT(setSettings(int)),0 ,22,22 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, SLOT(setSettings(int)),0 ,24,24 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, SLOT(setSettings(int)),0 ,26,26 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, SLOT(setSettings(int)),0 ,23,23 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, SLOT(setSettings(int)),0 ,25,25 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, SLOT(setSettings(int)),0 ,27,27 );
- scalePopupMenu = new QPopupMenu(this);
+ zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, TQT_SLOT(setSettings(int)),0 ,21,21 );
+ zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, TQT_SLOT(setSettings(int)),0 ,20,20 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, TQT_SLOT(setSettings(int)),0 ,22,22 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, TQT_SLOT(setSettings(int)),0 ,24,24 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, TQT_SLOT(setSettings(int)),0 ,26,26 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, TQT_SLOT(setSettings(int)),0 ,23,23 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, TQT_SLOT(setSettings(int)),0 ,25,25 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, TQT_SLOT(setSettings(int)),0 ,27,27 );
+ scalePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Scale"),scalePopupMenu, 2);
- scalePopupMenu->insertItem( i18n("Minute"),this, SLOT(setSettings(int)),0 ,1,1 );
- scalePopupMenu->insertItem( i18n("Hour"),this, SLOT(setSettings(int)),0 ,2,2 );
- scalePopupMenu->insertItem( i18n("Day"),this, SLOT(setSettings(int)),0 ,3,3 );
- scalePopupMenu->insertItem( i18n("Week"),this, SLOT(setSettings(int)),0 ,4,4 );
- scalePopupMenu->insertItem( i18n("Month"),this, SLOT(setSettings(int)),0 ,5,5 );
- scalePopupMenu->insertItem( i18n("Auto"),this, SLOT(setSettings(int)),0 ,6,6 );
+ scalePopupMenu->insertItem( i18n("Minute"),this, TQT_SLOT(setSettings(int)),0 ,1,1 );
+ scalePopupMenu->insertItem( i18n("Hour"),this, TQT_SLOT(setSettings(int)),0 ,2,2 );
+ scalePopupMenu->insertItem( i18n("Day"),this, TQT_SLOT(setSettings(int)),0 ,3,3 );
+ scalePopupMenu->insertItem( i18n("Week"),this, TQT_SLOT(setSettings(int)),0 ,4,4 );
+ scalePopupMenu->insertItem( i18n("Month"),this, TQT_SLOT(setSettings(int)),0 ,5,5 );
+ scalePopupMenu->insertItem( i18n("Auto"),this, TQT_SLOT(setSettings(int)),0 ,6,6 );
scalePopupMenu->setCheckable ( true );
- timePopupMenu = new QPopupMenu(this);
+ timePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Time Format"),timePopupMenu, 3);
- timePopupMenu->insertItem( i18n("24 Hour"),this, SLOT(setSettings(int)),0 ,40,40 );
- timePopupMenu->insertItem( i18n("12 PM Hour"),this, SLOT(setSettings(int)),0 ,41,41 );
- timePopupMenu->insertItem( i18n("24:00 Hour"),this, SLOT(setSettings(int)),0 ,42,42 );
- yearPopupMenu = new QPopupMenu(this);
+ timePopupMenu->insertItem( i18n("24 Hour"),this, TQT_SLOT(setSettings(int)),0 ,40,40 );
+ timePopupMenu->insertItem( i18n("12 PM Hour"),this, TQT_SLOT(setSettings(int)),0 ,41,41 );
+ timePopupMenu->insertItem( i18n("24:00 Hour"),this, TQT_SLOT(setSettings(int)),0 ,42,42 );
+ yearPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Year Format"),yearPopupMenu, 4);
- yearPopupMenu->insertItem( i18n("Four Digit"),this, SLOT(setSettings(int)),0 ,50,50 );
- yearPopupMenu->insertItem( i18n("Two Digit"),this, SLOT(setSettings(int)),0 ,51,51 );
- yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, SLOT(setSettings(int)),0 ,52,52 );
- yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, SLOT(setSettings(int)),0 ,53,53 );
+ yearPopupMenu->insertItem( i18n("Four Digit"),this, TQT_SLOT(setSettings(int)),0 ,50,50 );
+ yearPopupMenu->insertItem( i18n("Two Digit"),this, TQT_SLOT(setSettings(int)),0 ,51,51 );
+ yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, TQT_SLOT(setSettings(int)),0 ,52,52 );
+ yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, TQT_SLOT(setSettings(int)),0 ,53,53 );
- gridPopupMenu = new QPopupMenu(this);
+ gridPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Grid"),gridPopupMenu,5);
- gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, SLOT(setSettings(int)),0 ,10,10 );
- gridPopupMenu->insertItem( i18n("Show Major Grid"),this, SLOT(setSettings(int)),0 ,11,11 );
- gridPopupMenu->insertItem( i18n("Show No Grid"),this, SLOT(setSettings(int)),0 ,12,12 );
- myPopupMenu->insertItem( i18n("Print"),this, SLOT(setSettings(int)),0 ,30,30 );
- connect(myPopupMenu, SIGNAL ( aboutToShow () ) , this, SLOT( preparePopupMenu() )) ;
+ gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, TQT_SLOT(setSettings(int)),0 ,10,10 );
+ gridPopupMenu->insertItem( i18n("Show Major Grid"),this, TQT_SLOT(setSettings(int)),0 ,11,11 );
+ gridPopupMenu->insertItem( i18n("Show No Grid"),this, TQT_SLOT(setSettings(int)),0 ,12,12 );
+ myPopupMenu->insertItem( i18n("Print"),this, TQT_SLOT(setSettings(int)),0 ,30,30 );
+ connect(myPopupMenu, TQT_SIGNAL ( aboutToShow () ) , this, TQT_SLOT( preparePopupMenu() )) ;
flagZoomToFit = false;
setShowMinorTicks( true );
myRealEnd = myHorizonEnd;
@@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
if (flagZoomToFit)
myPopupMenu->changeItem( 1, i18n("Zoom (Fit)"));
else
- myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( QString::number( zoomFactor(), 'f',3) ) );
+ myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( TQString::number( zoomFactor(), 'f',3) ) );
int i = 0;
int id;
while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) {
@@ -822,7 +822,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
}
-QString KDTimeHeaderWidget::getToolTipText(QPoint p)
+TQString KDTimeHeaderWidget::getToolTipText(TQPoint p)
{
return KGlobal::locale()->formatDateTime(getDateTimeForIndex(p.x()));
}
@@ -860,7 +860,7 @@ void KDTimeHeaderWidget::checkWidth( int wid )
// Update (horizontal) scrollbar,
// We probably come from an external resize and then we must
// calculate on basis of myCanvasView.
- // (NOTE: we have disconnected the auto QScrollView scrollbar update)
+ // (NOTE: we have disconnected the auto TQScrollView scrollbar update)
if (myGanttView && myGanttView->myCanvasView)
myGanttView->myCanvasView->updateScrollBars();
}
@@ -868,9 +868,9 @@ void KDTimeHeaderWidget::checkWidth( int wid )
bool KDTimeHeaderWidget::registerStartTime()
{
- QListViewItemIterator it( myGanttView->myListView );
+ TQListViewItemIterator it( myGanttView->myListView );
if (!flagStartTimeSet) {
- QDateTime temp , time;
+ TQDateTime temp , time;
KDGanttViewItem* item;
bool setNewTime = false;
item = (KDGanttViewItem*)myGanttView->myListView->firstChild();
@@ -916,14 +916,14 @@ bool KDTimeHeaderWidget::registerStartTime()
bool KDTimeHeaderWidget::registerEndTime()
{
if (!flagEndTimeSet) {
- QDateTime temp , time;
+ TQDateTime temp , time;
KDGanttViewItem* item;
bool setNewTime = false;
item = (KDGanttViewItem*)myGanttView->myListView->firstChild();
if ( item ) {
temp = item->startTime();
time = temp;
- QListViewItemIterator it( myGanttView->myListView );
+ TQListViewItemIterator it( myGanttView->myListView );
for ( ; it.current(); ++it ) {
item = ( KDGanttViewItem* )it.current();
if (item->isVisibleInGanttView) {
@@ -1094,9 +1094,9 @@ double KDTimeHeaderWidget::zoomFactor()
{
return myZoomFactor;
}
-double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end )
+double KDTimeHeaderWidget::secsFromTo( TQDateTime begin, TQDateTime end )
{
- QDateTime temp;
+ TQDateTime temp;
double secs, days;
days = begin.daysTo(end);
temp = begin.addDays((int) days);
@@ -1106,7 +1106,7 @@ double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end )
}
-void KDTimeHeaderWidget::zoomToSelection( QDateTime start, QDateTime end)
+void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end)
{
if (start < myHorizonStart) {
myHorizonStart = start;
@@ -1189,7 +1189,7 @@ void KDTimeHeaderWidget::zoom(double factor, bool absolute)
\param start the start of the horizon
\sa horizonStart()
*/
-void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start )
+void KDTimeHeaderWidget::setHorizonStart( const TQDateTime& start )
{
myHorizonStart = start;
flagStartTimeSet = true;
@@ -1203,7 +1203,7 @@ void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start )
\return the start of the horizon of the Gantt chart
\sa setHorizonStart()
*/
-QDateTime KDTimeHeaderWidget::horizonStart() const
+TQDateTime KDTimeHeaderWidget::horizonStart() const
{
return myHorizonStart;
}
@@ -1216,7 +1216,7 @@ QDateTime KDTimeHeaderWidget::horizonStart() const
\param end the end of the horizon
\sa setHorizonEnd()
*/
-void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start )
+void KDTimeHeaderWidget::setHorizonEnd( const TQDateTime& start )
{
myHorizonEnd = start;
flagEndTimeSet = true;
@@ -1231,7 +1231,7 @@ void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start )
\return the end of the horizon of the Gantt chart
\sa setHorizonEnd()
*/
-QDateTime KDTimeHeaderWidget::horizonEnd() const
+TQDateTime KDTimeHeaderWidget::horizonEnd() const
{
return myHorizonEnd;
}
@@ -1461,8 +1461,8 @@ bool KDTimeHeaderWidget::showMinorTicks() const
\sa columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDTimeHeaderWidget::setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+void KDTimeHeaderWidget::setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini, Scale maxi )
{
ColumnColorList::iterator it;
@@ -1498,10 +1498,10 @@ void KDTimeHeaderWidget::addIntervalBackgroundColor( KDIntervalColorRectangle* n
}
#if 0
-bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend )
+bool KDTimeHeaderWidget::changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend )
{
IntervalColorList::iterator it;
for ( it = icList.begin(); it != icList.end(); ++it ) {
@@ -1519,8 +1519,8 @@ bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart,
}
return false;
}
-bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end)
+bool KDTimeHeaderWidget::deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end)
{
IntervalColorList::iterator it;
for ( it = icList.begin(); it != icList.end(); ++it ) {
@@ -1535,9 +1535,9 @@ bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start,
return false;
}
-void KDTimeHeaderWidget::setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+void KDTimeHeaderWidget::setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini ,
Scale maxi )
{
@@ -1581,11 +1581,11 @@ void KDTimeHeaderWidget::clearBackgroundColor()
icList.clear();
updateTimeTable();
}
-QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
+TQDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
{
int coordX = X;
if ( !local ) {
- QPoint p = QPoint ( X, 1 );
+ TQPoint p = TQPoint ( X, 1 );
coordX = myGanttView->myTimeHeaderScroll->viewportToContents(myGanttView->myTimeHeaderScroll->mapFromGlobal( p )).x();
}
@@ -1602,11 +1602,11 @@ QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
// *none* get weekend color (haven't figured out why)
// Proposal: Only use weekend color if the whole column is a weekend.
// Alt: Color the area that actually is the weekend.
-bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh)
+bool KDTimeHeaderWidget::getColumnColor(TQColor& col,int coordLow, int coordHigh)
{
if (!flagShowMajorTicks && !flagShowMinorTicks)
return false;
- QDateTime start,end;
+ TQDateTime start,end;
start = getDateTimeForIndex(coordLow);
end = getDateTimeForIndex(coordHigh).addSecs(-1);
Scale tempScale = myRealScale;
@@ -1663,9 +1663,9 @@ bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh)
\sa setColumnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) const
+TQColor KDTimeHeaderWidget::columnBackgroundColor( const TQDateTime& column ) const
{
- QColor c;
+ TQColor c;
c = white;
ColumnColorList::const_iterator ite;
for ( ite = ccList.begin(); ite != ccList.end(); ++ite ) {
@@ -1685,7 +1685,7 @@ QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) cons
\param color the background color to use for weekend days.
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color )
+void KDTimeHeaderWidget::setWeekendBackgroundColor( const TQColor& color )
{
myWeekendBackgroundColor = color ;
updateTimeTable();
@@ -1698,7 +1698,7 @@ void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDTimeHeaderWidget::weekendBackgroundColor() const
+TQColor KDTimeHeaderWidget::weekendBackgroundColor() const
{
return myWeekendBackgroundColor;
}
@@ -1713,7 +1713,7 @@ QColor KDTimeHeaderWidget::weekendBackgroundColor() const
\param weekday the day of the week (Monday = 1, Sunday = 7)
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int weekday )
+void KDTimeHeaderWidget::setWeekdayBackgroundColor( const TQColor& color, int weekday )
{
weekdayColor[weekday] = color;
updateTimeTable();
@@ -1727,7 +1727,7 @@ void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int we
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const
+TQColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const
{
return weekdayColor[weekday];
}
@@ -1817,7 +1817,7 @@ int KDTimeHeaderWidget::minorScaleCount() const
}
-void KDTimeHeaderWidget::resizeEvent ( QResizeEvent * )
+void KDTimeHeaderWidget::resizeEvent ( TQResizeEvent * )
{
// qDebug("KDTimeHeaderWidget:: resizeEvent ");
paintPix.resize( 800, height () );
@@ -1831,7 +1831,7 @@ void KDTimeHeaderWidget::updateTimeTable()
// setting the scrolling steps
int scrollLineStep = myGridMinorWidth;
if (showMajorTicks()) {
- QValueList<int>::iterator intIt = majorTicks.begin();
+ TQValueList<int>::iterator intIt = majorTicks.begin();
scrollLineStep = 5 * myGridMinorWidth;
if (intIt != majorTicks.end()) {
int left = *intIt;
@@ -1861,22 +1861,22 @@ int KDTimeHeaderWidget::autoScaleMinorTickCount()
}
-void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
+void KDTimeHeaderWidget::repaintMe(int left,int paintwid, TQPainter* painter)
{
if (flagDoNotRecomputeAfterChange) return;
- QColorGroup qcg =QColorGroup( white, black,white, darkGray,black,gray,gray) ;
- QPainter* p;
+ TQColorGroup qcg =TQColorGroup( white, black,white, darkGray,black,gray,gray) ;
+ TQPainter* p;
int offsetLeft = 0;
if ( paintwid > paintPix.width()-100 )
paintPix.resize( paintwid+100, height () );
if ( painter )
p = painter;
else {
- p = new QPainter( &paintPix );
+ p = new TQPainter( &paintPix );
offsetLeft = left-50;
}
if ( mouseDown ) {
- p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) );
+ p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) );
int start ;
int wid;
if ( beginMouseDown < endMouseDown ) {
@@ -1886,13 +1886,13 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
start = endMouseDown ;
wid = -endMouseDown + beginMouseDown ;
}
- p->fillRect( start-offsetLeft, 0, wid, height(), QBrush(paletteBackgroundColor().dark()) );
+ p->fillRect( start-offsetLeft, 0, wid, height(), TQBrush(paletteBackgroundColor().dark()) );
} else {
if (! painter )
- p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) );
+ p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) );
}
- p->setPen(QColor(40,40,40));
- QFont tempFont = p->font();
+ p->setPen(TQColor(40,40,40));
+ TQFont tempFont = p->font();
tempFont.setWeight(63);
p->setFont(tempFont);
int hei1 = myMajorGridHeight,
@@ -1901,8 +1901,8 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
int xCoord;
int lwid = 1;
- QValueList<QString>::iterator it;
- QValueList<int>::iterator intIt = majorTicks.begin();
+ TQValueList<TQString>::iterator it;
+ TQValueList<int>::iterator intIt = majorTicks.begin();
for ( it = majorText.begin(); it != majorText.end(); ++it ) {
xCoord = (*intIt++);
if (((*intIt)>= left && xCoord <= left+paintwid)) {
@@ -1933,9 +1933,9 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
// cuts the secs in the DateTime if scale is Minute ,
// the minutes and secs if scale is Hour and so on
-QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
+TQDateTime KDTimeHeaderWidget::getEvenTimeDate(TQDateTime tempdatetime ,Scale sc)
{
- QDate tempdate;
+ TQDate tempdate;
int min, hour;
int tempMinorScaleCount = myRealMinorScaleCount;
switch (sc)
@@ -1946,24 +1946,24 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
tempdate = tempdate.addDays(-1);
//while (tempdate.month ()!= 1 )
//tempdate = tempdate.addMonths(-1);
- tempdatetime = QDateTime (tempdate, QTime (0,0));
+ tempdatetime = TQDateTime (tempdate, TQTime (0,0));
break;
case KDGanttView::Week:
tempdate = tempdatetime.date();
while (tempdate.dayOfWeek ()!= KGlobal::locale()->weekStartDay())
tempdate = tempdate.addDays(-1);
//tempdate = tempdate.addDays(-7);
- tempdatetime = QDateTime (tempdate, QTime (0,0));
+ tempdatetime = TQDateTime (tempdate, TQTime (0,0));
break;
case KDGanttView::Day:
- tempdatetime = QDateTime (tempdatetime.date(), QTime ( 0,0 ) );
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime ( 0,0 ) );
break;
case KDGanttView::Hour:
hour = tempdatetime.time().hour();
while (24%tempMinorScaleCount > 0 && 24%tempMinorScaleCount < 24)
++tempMinorScaleCount;
hour = ( hour /tempMinorScaleCount)*tempMinorScaleCount;
- tempdatetime = QDateTime (tempdatetime.date(), QTime (hour, 0 ));
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime (hour, 0 ));
break;
case KDGanttView::Minute:
min = tempdatetime.time().minute();
@@ -1971,7 +1971,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
++tempMinorScaleCount;
// qDebug("myMinorScaleCount %d %d %d",myMinorScaleCount, myRealMinorScaleCount, tempMinorScaleCount);
min = (min /tempMinorScaleCount)*tempMinorScaleCount;
- tempdatetime = QDateTime (tempdatetime.date(), QTime (tempdatetime.time().hour(),min ));
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime (tempdatetime.time().hour(),min ));
break;
case KDGanttView::Auto:
@@ -1981,7 +1981,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
}
-void KDTimeHeaderWidget::computeRealScale(QDateTime start)
+void KDTimeHeaderWidget::computeRealScale(TQDateTime start)
{
if (myScale ==KDGanttView::Auto) {
@@ -2083,11 +2083,11 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
int minorItems,minorPerMajor = 1;
minorItems = (int) (secsFromTo( myRealStart, myHorizonEnd)/60.0);
//qDebug("tempMinorScaleCount %d ", tempMinorScaleCount);
- QPainter p(this);
+ TQPainter p(this);
int Width, Height;
- QString testTextMinor,testTextMajor, tempStr;
- QRect itemRectMinor, itemRectMajor;
- QDate tempDate = myRealStart.date();
+ TQString testTextMinor,testTextMajor, tempStr;
+ TQRect itemRectMinor, itemRectMajor;
+ TQDate tempDate = myRealStart.date();
myRealEnd = myRealStart;
// preparing the testtext for the differennt scales
switch (myRealScale)
@@ -2109,25 +2109,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
testTextMinor = "12 AM";
testTextMajor = "Mon Aug 30, x";
if ( yearFormat() != KDGanttView::NoDate )
- testTextMajor += getYear(QDate::currentDate());
+ testTextMajor += getYear(TQDate::currentDate());
minorPerMajor = 2400;
break;
case KDGanttView::Day:
minorItems = minorItems/(60*24);
testTextMinor = "88";
- testTextMajor = "Aug 30, x"+getYear(QDate::currentDate());
+ testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate());
minorPerMajor = 700;
break;
case KDGanttView::Week:
minorItems = minorItems/(60*24*7);
testTextMinor = "88";
- testTextMajor = "Aug x"+getYear(QDate::currentDate());
+ testTextMajor = "Aug x"+getYear(TQDate::currentDate());
minorPerMajor = 435; // 435 = 365days/12months/7days * 100
break;
case KDGanttView::Month:
minorItems = (minorItems*12)/(60*24*365);
testTextMinor = "M";
- testTextMajor = "x"+getYear(QDate::currentDate());
+ testTextMajor = "x"+getYear(TQDate::currentDate());
minorPerMajor = 1200;
break;
case KDGanttView::Auto:
@@ -2214,8 +2214,8 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
emit sizeChanged( Width );
}
myMajorGridHeight = itemRectMajor.height()+5;
- QTime tempTime = myRealStart.time();
- QDateTime tempDateTime;
+ TQTime tempTime = myRealStart.time();
+ TQDateTime tempDateTime;
int i;
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
switch (myRealScale)
@@ -2280,7 +2280,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
if (tempMinorScaleCount == 1)
minorText.append((calendar->weekDayName(tempDate, true)).left(1)); //TODO: BIDI
else
- minorText.append(QString::number(tempDate.day()));
+ minorText.append(TQString::number(tempDate.day()));
tempDate = tempDate.addDays(tempMinorScaleCount);
}
tempDate = myRealStart.date();
@@ -2361,7 +2361,7 @@ void KDTimeHeaderWidget::saveCenterDateTime()
}
-void KDTimeHeaderWidget::centerDateTime( const QDateTime& center )
+void KDTimeHeaderWidget::centerDateTime( const TQDateTime& center )
{
moveTimeLineTo(getCoordX( center )-(myGanttView->myCanvasView->viewport()->width() /2));
// qDebug("centerDateTime %s %d %d", center.toString().latin1(),getCoordX( center ),(myGanttView->myCanvasView->viewport()->width() /2) );
@@ -2369,23 +2369,23 @@ void KDTimeHeaderWidget::centerDateTime( const QDateTime& center )
}
-void KDTimeHeaderWidget::paintEvent(QPaintEvent *p)
+void KDTimeHeaderWidget::paintEvent(TQPaintEvent *p)
{
repaintMe(p->rect().x(),p->rect().width());
}
-int KDTimeHeaderWidget::getCoordX(QDate date)
+int KDTimeHeaderWidget::getCoordX(TQDate date)
{
int wid = width();
int daysAll = myRealStart.daysTo(myRealEnd);
if (daysAll == 0) return 0;
- int days = myRealStart.daysTo(QDateTime(date));
+ int days = myRealStart.daysTo(TQDateTime(date));
return (wid *days) /daysAll;
}
-int KDTimeHeaderWidget::getCoordX(QDateTime datetime)
+int KDTimeHeaderWidget::getCoordX(TQDateTime datetime)
{
double wid = width();
double secsAll = secsFromTo( myRealStart, myRealEnd );
@@ -2395,9 +2395,9 @@ int KDTimeHeaderWidget::getCoordX(QDateTime datetime)
}
-QString KDTimeHeaderWidget::getYear(QDate date)
+TQString KDTimeHeaderWidget::getYear(TQDate date)
{
- QString ret;
+ TQString ret;
ret.setNum(date.year());
switch (yearFormat()) {
case KDGanttView::FourDigit:
@@ -2417,9 +2417,9 @@ QString KDTimeHeaderWidget::getYear(QDate date)
}
-QString KDTimeHeaderWidget::getHour(QTime time)
+TQString KDTimeHeaderWidget::getHour(TQTime time)
{
- QString ret;
+ TQString ret;
int hour = time.hour();
if (myHourFormat == KDGanttView::Hour_12) {
if (hour >= 12) {
@@ -2443,7 +2443,7 @@ QString KDTimeHeaderWidget::getHour(QTime time)
}
-void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e )
+void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e )
{
mouseDown = false;
switch ( e->button() ) {
@@ -2465,7 +2465,7 @@ void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e )
}
-void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * )
+void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * )
{
if ( mouseDown ) {
mouseDown = false;
@@ -2493,13 +2493,13 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * )
}
-void KDTimeHeaderWidget::mouseDoubleClickEvent ( QMouseEvent * )
+void KDTimeHeaderWidget::mouseDoubleClickEvent ( TQMouseEvent * )
{
}
-void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e )
+void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
{
if ( mouseDown ) {
if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) {
@@ -2537,17 +2537,17 @@ void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e )
/* ***************************************************************
KDLegendWidget:: KDLegendWidget
***************************************************************** */
-KDLegendWidget:: KDLegendWidget( QWidget* parent,
+KDLegendWidget:: KDLegendWidget( TQWidget* parent,
KDGanttMinimizeSplitter* legendParent ) :
KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical,
parent)
{
myLegendParent = legendParent;
dock = 0;
- scroll = new QScrollView( legendParent );
+ scroll = new TQScrollView( legendParent );
setMaximizedWidget( scroll );
- setMinimizedWidget( myLabel = new QLabel( i18n( " Legend is hidden" ), this) );
+ setMinimizedWidget( myLabel = new TQLabel( i18n( " Legend is hidden" ), this) );
setGeometry( 0, 0, 50, 50 );
myLegend = 0;
clearLegend();
@@ -2562,7 +2562,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
setMaximizedWidget( 0 );
showMe ( false );
if ( dock ) delete dock;
- dock = new QDockWindow(QDockWindow:: OutsideDock,0 );
+ dock = new TQDockWindow(TQDockWindow:: OutsideDock,0 );
dock->resize( 200, 100 );
dock->setHorizontallyStretchable( true );
dock->setVerticallyStretchable( true );
@@ -2571,7 +2571,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
delete myLegend;
myLegend = 0;
delete scroll;
- scroll = new QScrollView( dock );
+ scroll = new TQScrollView( dock );
clearLegend();
dock->setWidget(scroll);
setMaximizedWidget( dock );
@@ -2585,7 +2585,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
delete scroll;
delete dock;
dock = 0;
- scroll = new QScrollView( myLegendParent );
+ scroll = new TQScrollView( myLegendParent );
clearLegend();
setMaximizedWidget( scroll );
showMe ( false );
@@ -2602,36 +2602,36 @@ bool KDLegendWidget::asDockwindow( )
}
-QDockWindow* KDLegendWidget::dockwindow( )
+TQDockWindow* KDLegendWidget::dockwindow( )
{
return dock;
}
-void KDLegendWidget::setFont( QFont font)
+void KDLegendWidget::setFont( TQFont font)
{
myLegend->setFont( font);
myLabel->setFont( font);
- QWidget::setFont( font );
+ TQWidget::setFont( font );
}
-void KDLegendWidget::drawToPainter( QPainter *p )
+void KDLegendWidget::drawToPainter( TQPainter *p )
{
- p->drawPixmap( 0, 0, QPixmap::grabWidget( myLegend ) );
+ p->drawPixmap( 0, 0, TQPixmap::grabWidget( myLegend ) );
}
-QSize KDLegendWidget::legendSize()
+TQSize KDLegendWidget::legendSize()
{
return myLegend->size();
}
-QSize KDLegendWidget::legendSizeHint()
+TQSize KDLegendWidget::legendSizeHint()
{
- QApplication::sendPostedEvents( 0, QEvent::LayoutHint );
- return QSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
+ TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+ return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
}
@@ -2645,15 +2645,15 @@ void KDLegendWidget::clearLegend ( )
{
if ( myLegend ) delete myLegend;
if ( dock )
- myLegend = new QGroupBox( 1, Qt::Horizontal, scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() );
else
- myLegend = new QGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() );
myLegend->setBackgroundColor( Qt::white );
myLegend->setFont( font() );
scroll->addChild( myLegend );
- scroll->setResizePolicy( QScrollView::AutoOneFit );
+ scroll->setResizePolicy( TQScrollView::AutoOneFit );
myLegend->layout()->setMargin( 11 );
- myLegend->setFrameStyle( QFrame::NoFrame );
+ myLegend->setFrameStyle( TQFrame::NoFrame );
if ( dock )
scroll->setMaximumHeight( 32000 );
else
@@ -2661,17 +2661,17 @@ void KDLegendWidget::clearLegend ( )
}
-void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text )
+void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text )
{
- QLabel * temp;
- QPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10);
- QWidget *w = new QWidget( myLegend );
+ TQLabel * temp;
+ TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10);
+ TQWidget *w = new TQWidget( myLegend );
w->setBackgroundColor( Qt::white );
- QHBoxLayout *lay = new QHBoxLayout( w ,0, 6);
- temp = new QLabel ( w );
+ TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6);
+ temp = new TQLabel ( w );
lay->addWidget( temp, 0, Qt:: AlignRight);
temp->setPixmap(p);
- temp = new QLabel ( text, w );
+ temp = new TQLabel ( text, w );
temp->setBackgroundColor( Qt::white );
lay->addWidget( temp, 0, Qt:: AlignLeft);
lay->addStretch();
@@ -2688,7 +2688,7 @@ bool KDLegendWidget::isShown ( )
}
-KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent)
+KDListView::KDListView(TQWidget* parent, KDGanttView* gantView):TQListView (parent)
{
myGanttView = gantView;
setAcceptDrops(true);
@@ -2697,21 +2697,21 @@ KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent
setAllColumnsShowFocus( true );
addColumn( i18n( "Task Name" ) );
setSorting( -1 );
- //setVScrollBarMode (QScrollView::AlwaysOn );
- setHScrollBarMode (QScrollView::AlwaysOn );
- setDefaultRenameAction(QListView::Accept);
+ //setVScrollBarMode (TQScrollView::AlwaysOn );
+ setHScrollBarMode (TQScrollView::AlwaysOn );
+ setDefaultRenameAction(TQListView::Accept);
setColumnWidthMode ( 0,Maximum );
_calendarMode = false;
- // QObject::connect(this, SIGNAL ( pressed ( QListViewItem * )) , this, SLOT( dragItem( QListViewItem *))) ;
+ // TQObject::connect(this, TQT_SIGNAL ( pressed ( TQListViewItem * )) , this, TQT_SLOT( dragItem( TQListViewItem *))) ;
}
-void KDListView::dragItem( QListViewItem * )
+void KDListView::dragItem( TQListViewItem * )
{
// qDebug("drag ");
// startDrag();
}
-QString KDListView::getWhatsThisText(QPoint p)
+TQString KDListView::getWhatsThisText(TQPoint p)
{
KDGanttViewItem* item = ( KDGanttViewItem* ) itemAt( p );
if ( item )
@@ -2725,18 +2725,18 @@ void KDListView::setCalendarMode( bool mode )
// setRootIsDecorated ( ! mode );
}
-void KDListView::setOpen(QListViewItem * item, bool open )
+void KDListView::setOpen(TQListViewItem * item, bool open )
{
if (! _calendarMode || ! open ) {
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false );
- QListView::setOpen ( item, open );
+ TQListView::setOpen ( item, open );
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true );
return;
}
// we are in calendarmode
// in calendarmode only items can be opened which have subitems which have subitems
- QListViewItem* temp;
+ TQListViewItem* temp;
temp = item->firstChild();
bool openItem = false;
while (temp) {
@@ -2752,17 +2752,17 @@ void KDListView::setOpen(QListViewItem * item, bool open )
}
if ( openItem ) {
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false );
- QListView::setOpen ( item, open );
+ TQListView::setOpen ( item, open );
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true );
}
}
-void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KDListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListView::contentsMouseDoubleClickEvent ( e );
+ TQListView::contentsMouseDoubleClickEvent ( e );
//if ( ! _calendarMode )
- // QListView::contentsMouseDoubleClickEvent ( e );
+ // TQListView::contentsMouseDoubleClickEvent ( e );
// else
{
@@ -2773,7 +2773,7 @@ void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
}
-void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
+void KDListView::drawToPainter ( TQPainter * p, bool drawHeader )
{
// Draw list
drawAllContents ( p, 0, 0, contentsWidth(), contentsHeight() );
@@ -2781,11 +2781,11 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
return;
}
// Draw headers
- QPen pen = QPen(Qt::lightGray, 1);
+ TQPen pen = TQPen(Qt::lightGray, 1);
p->save();
- QHeader *h = header();
+ TQHeader *h = header();
for (int s = 0; s < h->count(); ++s) {
- QRect r = h->sectionRect(s);
+ TQRect r = h->sectionRect(s);
if (s==0) {
p->translate(0, -r.height());
}
@@ -2800,7 +2800,7 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
p->restore();
}
-int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const {
+int KDListView::buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const {
int y = ypos;
int ih = item->height();
if (y < ymin && y+ih > ymin) {
@@ -2813,26 +2813,26 @@ int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int leve
}
y += ih;
if (item->isOpen()) {
- QListViewItem *child = item->firstChild();
+ TQListViewItem *child = item->firstChild();
for (; child; child = child->nextSibling()) {
y = buildDrawables(lst, level+1, y, child, ymin, ymax);
}
}
return y;
}
-// This is a copy of QListView::drawContentsOffset(), with a few changes
+// This is a copy of TQListView::drawContentsOffset(), with a few changes
// because drawContentsOffset() only draws *visible* items,
// we want to draw *all* items.
// FIXME: Haven't got paintBraches() to work, atm live without it.
-void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
+void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) {
if ( columns() == 0 ) {
- paintEmptyArea( p, QRect( cx, cy, cw, ch ) );
+ paintEmptyArea( p, TQRect( cx, cy, cw, ch ) );
return;
}
- //kdDebug()<<k_funcinfo<<QRect(cx, cy, cw, ch)<<endl;
- QPtrList<KDListView::DrawableItem> drawables;
+ //kdDebug()<<k_funcinfo<<TQRect(cx, cy, cw, ch)<<endl;
+ TQPtrList<KDListView::DrawableItem> drawables;
drawables.setAutoDelete(true);
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
int level = 0;
int ypos = 0;
for (; child; child = child->nextSibling()) {
@@ -2841,9 +2841,9 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
p->setFont( font() );
- QPtrListIterator<KDListView::DrawableItem> it(drawables);
+ TQPtrListIterator<KDListView::DrawableItem> it(drawables);
- QRect r;
+ TQRect r;
int fx = -1, x, fc = 0, lc = 0;
int tx = -1;
KDListView::DrawableItem * current;
@@ -2884,7 +2884,7 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
c = fc;
// draw to last interesting column
- const QColorGroup &cg = ( palette().inactive() );
+ const TQColorGroup &cg = ( palette().inactive() );
while ( c < lc && !drawables.isEmpty() ) {
int i = header()->mapToLogical( c );
@@ -2957,11 +2957,11 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
}
}
-void KDListView::resizeEvent(QResizeEvent *)
+void KDListView::resizeEvent(TQResizeEvent *)
{
triggerUpdate ();
}
-void KDListView::dragEnterEvent ( QDragEnterEvent * e)
+void KDListView::dragEnterEvent ( TQDragEnterEvent * e)
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -2971,7 +2971,7 @@ void KDListView::dragEnterEvent ( QDragEnterEvent * e)
//e->accept(KDGanttViewItemDrag::canDecode(e) );
}
-void KDListView::dragMoveEvent ( QDragMoveEvent * e)
+void KDListView::dragMoveEvent ( TQDragMoveEvent * e)
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -3007,11 +3007,11 @@ void KDListView::dragMoveEvent ( QDragMoveEvent * e)
e->accept( true );
}
-void KDListView::dragLeaveEvent ( QDragLeaveEvent * )
+void KDListView::dragLeaveEvent ( TQDragLeaveEvent * )
{
//qDebug("contentsDragLeaveEvent ");
}
-void KDListView::dropEvent ( QDropEvent *e )
+void KDListView::dropEvent ( TQDropEvent *e )
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -3023,7 +3023,7 @@ void KDListView::dropEvent ( QDropEvent *e )
draggedItem = myGanttView->myCanvasView->lastClickedItem;
if (myGanttView->lvDropEvent ( e, draggedItem, gItem ))
return;
- QString string;
+ TQString string;
KDGanttViewItemDrag::decode( e, string );
KDGanttViewItem* newItem = 0;
@@ -3032,22 +3032,22 @@ void KDListView::dropEvent ( QDropEvent *e )
return;
}
- QDomDocument doc( "GanttView" );
+ TQDomDocument doc( "GanttView" );
doc.setContent( string );
- QDomElement docRoot = doc.documentElement(); // ChartParams element
- QDomNode node = docRoot.firstChild();
+ TQDomElement docRoot = doc.documentElement(); // ChartParams element
+ TQDomNode node = docRoot.firstChild();
bool enable = myGanttView->myTimeTable->blockUpdating( );
myGanttView->myTimeTable->setBlockUpdating( true );
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
if ( gItem )
newItem = KDGanttViewItem::createFromDomElement( gItem,
@@ -3076,9 +3076,9 @@ void KDListView::dropEvent ( QDropEvent *e )
return;
}
-QDragObject * KDListView::dragObject ()
+TQDragObject * KDListView::dragObject ()
{
- return QListView::dragObject ();
+ return TQListView::dragObject ();
}
void KDListView::startDrag ()
@@ -3093,7 +3093,7 @@ void KDListView::startDrag ()
KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasText(canvas)
+ TQCanvasText(canvas)
{
myParentType = type;
myParentItem = parentItem;
@@ -3103,7 +3103,7 @@ KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas,
KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasLine(canvas)
+ TQCanvasLine(canvas)
{
myParentType = type;
myParentItem = parentItem;
@@ -3113,7 +3113,7 @@ KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas,
KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasPolygonalItem( canvas )
+ TQCanvasPolygonalItem( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3123,7 +3123,7 @@ KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas,
KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasPolygon( canvas )
+ TQCanvasPolygon( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3133,7 +3133,7 @@ KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas,
KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasEllipse( canvas )
+ TQCanvasEllipse( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3143,7 +3143,7 @@ KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas,
KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasRectangle( canvas )
+ TQCanvasRectangle( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3152,13 +3152,13 @@ KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas,
-KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidget* parent, const
- char* name ) : QCanvasView ( canvas, parent, name ),
+KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* parent, const
+ char* name ) : TQCanvasView ( canvas, parent, name ),
movingGVItem( 0 ),
scrollBarTimer( 0, "scrollBarTimer" )
{
- setHScrollBarMode (QScrollView::AlwaysOn );
- setVScrollBarMode( QScrollView::AlwaysOn );
+ setHScrollBarMode (TQScrollView::AlwaysOn );
+ setVScrollBarMode( TQScrollView::AlwaysOn );
myToolTip = new KDCanvasToolTip(viewport(),this);
mySignalSender = sender;
currentItem = 0;
@@ -3168,61 +3168,61 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidg
fromArea = 0;
linkItemsEnabled = false;
mouseDown = false;
- linkLine = new QCanvasLine(canvas);
+ linkLine = new TQCanvasLine(canvas);
linkLine->hide();
linkLine->setZ(1000);
set_Mouse_Tracking(true); // mouse cursor changes over KDIntervalColorRectangle borders
new KDCanvasWhatsThis(viewport(),this);
- onItem = new QPopupMenu( this );
- QPopupMenu * newMenu = new QPopupMenu( this );
- QPopupMenu * onView = new QPopupMenu( this );
+ onItem = new TQPopupMenu( this );
+ TQPopupMenu * newMenu = new TQPopupMenu( this );
+ TQPopupMenu * onView = new TQPopupMenu( this );
onView->insertItem( i18n( "Summary" ), this,
- SLOT ( newRootItem( int ) ), 0, 0 );
+ TQT_SLOT ( newRootItem( int ) ), 0, 0 );
onView->insertItem( i18n( "Event" ), this,
- SLOT ( newRootItem( int ) ), 0, 1);
+ TQT_SLOT ( newRootItem( int ) ), 0, 1);
onView->insertItem( i18n( "Task" ), this,
- SLOT ( newRootItem( int ) ), 0, 2 );
+ TQT_SLOT ( newRootItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Root" ), onView );
newMenu->insertItem( i18n( "Summary" ),
- this, SLOT ( newChildItem( int) ), 0, 0 );
+ this, TQT_SLOT ( newChildItem( int) ), 0, 0 );
newMenu->insertItem( i18n( "Event" ),
- this, SLOT ( newChildItem( int ) ), 0, 1 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 1 );
newMenu->insertItem( i18n( "Task" ),
- this, SLOT ( newChildItem( int ) ), 0, 2 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Child" ), newMenu );
- QPopupMenu * afterMenu = new QPopupMenu( this );
+ TQPopupMenu * afterMenu = new TQPopupMenu( this );
afterMenu->insertItem( i18n( "Summary" ),
- this, SLOT ( newChildItem( int) ), 0, 0+4 );
+ this, TQT_SLOT ( newChildItem( int) ), 0, 0+4 );
afterMenu->insertItem( i18n( "Event" ),
- this, SLOT ( newChildItem( int ) ), 0, 1+4 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 1+4 );
afterMenu->insertItem( i18n( "Task" ),
- this, SLOT ( newChildItem( int ) ), 0, 2+4 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 2+4 );
onItem->insertItem( i18n( "New After" ), afterMenu );
- QPopupMenu *pasteMenu = new QPopupMenu( this );
+ TQPopupMenu *pasteMenu = new TQPopupMenu( this );
pasteMenu->insertItem( i18n( "As Root" ),
- this, SLOT ( pasteItem( int ) ), 0, 0 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 0 );
pasteMenu->insertItem( i18n( "As Child" ),
- this, SLOT ( pasteItem( int ) ), 0, 1 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 1 );
pasteMenu->insertItem( i18n( "After" ),
- this, SLOT ( pasteItem( int ) ), 0, 2 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "Paste" ), pasteMenu, 3 );
- onItem->insertItem( i18n( "Cut Item" ), this, SLOT ( cutItem() ) );
+ onItem->insertItem( i18n( "Cut Item" ), this, TQT_SLOT ( cutItem() ) );
onItem->setItemEnabled( 3, false );
myMyContentsHeight = 0;
_showItemAddPopupMenu = false;
- QObject *scrollViewTimer = child( "scrollview scrollbar timer", "QTimer", false );
+ TQObject *scrollViewTimer = child( "scrollview scrollbar timer", "TQTimer", false );
Q_ASSERT( scrollViewTimer );
if ( scrollViewTimer ) {
- disconnect( scrollViewTimer, SIGNAL(timeout()), this, SLOT(updateScrollBars() ) );
+ disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) );
}
// If they needed a scrollbar timer in scrollview...
- connect( &scrollBarTimer, SIGNAL(timeout()), this, SLOT(myUpdateScrollBars() ) );
+ connect( &scrollBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(myUpdateScrollBars() ) );
- myScrollTimer = new QTimer( this, "myScrollTimer" );
- connect( myScrollTimer, SIGNAL( timeout() ), SLOT( slotScrollTimer() ) );
+ myScrollTimer = new TQTimer( this, "myScrollTimer" );
+ connect( myScrollTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotScrollTimer() ) );
autoScrollEnabled = false;
}
@@ -3248,22 +3248,22 @@ void KDGanttCanvasView::moveMyContent( int, int y)
setContentsPos(contentsX(), y);
}
-void KDGanttCanvasView::resizeEvent ( QResizeEvent * e )
+void KDGanttCanvasView::resizeEvent ( TQResizeEvent * e )
{
int ho = e->oldSize().height();
int wo = e->oldSize().width();
int hi = height();
int wi = width();
- //QScrollView::blockSignals( true );
+ //TQScrollView::blockSignals( true );
verticalScrollBar()->setUpdatesEnabled( false );
- QScrollView::resizeEvent ( e ) ;
+ TQScrollView::resizeEvent ( e ) ;
if ( ho != hi )
emit heightResized( viewport()->height());
if ( wo != wi )
emit widthResized( viewport()->width() );
//setMyContentsHeight( 0 ); // via timer
- //QScrollView::blockSignals( false );
+ //TQScrollView::blockSignals( false );
scrollBarTimer.start(0, true);
}
@@ -3444,14 +3444,14 @@ void KDGanttCanvasView::newChildItem( int type )
mySignalSender->editItem( temp );
}
-void KDGanttCanvasView::drawToPainter ( QPainter * p )
+void KDGanttCanvasView::drawToPainter ( TQPainter * p )
{
drawContents ( p, 0, 0, canvas()->width(), canvas()->height() );
}
-QString KDGanttCanvasView::getToolTipText(QPoint p)
+TQString KDGanttCanvasView::getToolTipText(TQPoint p)
{
- QCanvasItemList il = canvas()->collisions ( viewportToContents( p ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas()->collisions ( viewportToContents( p ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
@@ -3467,10 +3467,10 @@ QString KDGanttCanvasView::getToolTipText(QPoint p)
return "";
}
-QString KDGanttCanvasView::getWhatsThisText(QPoint p)
+TQString KDGanttCanvasView::getWhatsThisText(TQPoint p)
{
- QCanvasItemList il = canvas() ->collisions (viewportToContents( p ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions (viewportToContents( p ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
@@ -3487,7 +3487,7 @@ QString KDGanttCanvasView::getWhatsThisText(QPoint p)
}
-KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const QPoint &pos )
+KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const TQPoint &pos )
{
const int left = timeHeader->getCoordX( item->startTime() );
const int right = timeHeader->getCoordX( item->endTime() );
@@ -3507,7 +3507,7 @@ KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttView
*/
-void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
{
//qDebug("mousepress! %d ", this);
//qDebug("focus %d ",qApp->focusWidget());
@@ -3517,12 +3517,12 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
movingItem = 0;
mouseDown = true;
if (e->button() == RightButton && mySignalSender->editable()) {
- lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( QPoint(2,e->pos().y()));
+ lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y()));
if ( lastClickedItem ) {
if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) {
// findSub subitem
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( getType(*it) == Type_is_KDGanttViewItem ) {
lastClickedItem = getItem(*it);
@@ -3533,8 +3533,8 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
onItem->popup(e->globalPos());
}
}
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
case LeftButton:
@@ -3577,7 +3577,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
if ( (*it)->rtti() == KDIntervalColorRectangle::RTTI ) {
// Cleaner would be isMovable()/isResizeable() in an interface
// implemented by all movable objects...
- movingItem = static_cast<QCanvasRectangle *>(*it);
+ movingItem = static_cast<TQCanvasRectangle *>(*it);
movingStart = e->pos();
KDIntervalColorRectangle* icr = static_cast<KDIntervalColorRectangle *>( movingItem );
KDIntervalColorRectangle::HitTest hitTest = icr->hitTest( mySignalSender->myTimeHeader, movingStart );
@@ -3632,7 +3632,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
{
mouseDown = false;
static KDGanttViewItem* lastClicked = 0;
@@ -3654,8 +3654,8 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
if (linkItemsEnabled && fromItem) {
linkLine->hide();
canvas()->update();
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if (getType(*it) == Type_is_KDGanttViewItem) {
KDGanttViewItem *toItem = getItem(*it);
@@ -3709,9 +3709,9 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
if ( il.isEmpty() && e->button() == LeftButton ) {
//not directly sending a signal here (encapsulation and whatnot)
@@ -3719,7 +3719,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
return;
}
- QCanvasItemList::Iterator it;
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
case LeftButton:
@@ -3776,13 +3776,13 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
+void KDGanttCanvasView::contentsMouseMoveEvent ( TQMouseEvent *e )
{
if ( !mouseDown ) {
// Update cursor
bool found = false;
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( (*it)->rtti() == KDIntervalColorRectangle::RTTI ) {
found = true;
@@ -3817,7 +3817,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
return;
}
- const QPoint p = e->pos();
+ const TQPoint p = e->pos();
if ( movingItem ) {
int x = qRound( movingItem->x() );
int width = movingItem->width();
@@ -3837,8 +3837,8 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
movingStart = p;
if ( movingItem->rtti() == KDIntervalColorRectangle::RTTI ) {
KDIntervalColorRectangle* icr = static_cast<KDIntervalColorRectangle *>(movingItem);
- const QDateTime newStart = mySignalSender->myTimeHeader->getDateTimeForIndex(x);
- const QDateTime newEnd = mySignalSender->myTimeHeader->getDateTimeForIndex(x + width);
+ const TQDateTime newStart = mySignalSender->myTimeHeader->getDateTimeForIndex(x);
+ const TQDateTime newEnd = mySignalSender->myTimeHeader->getDateTimeForIndex(x + width);
icr->setDateTimes( newStart, newEnd );
emit mySignalSender->intervalColorRectangleMoved( newStart, newEnd );
mySignalSender->myTimeHeader->computeIntervals( movingItem->height() );
@@ -3849,7 +3849,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
if ( movingGVItem ) {
int dx = movingStart.x() - e->pos().x();
int x = movingGVItem->middleLeft().x() - dx;
- QDateTime dt = mySignalSender->getDateTimeForCoordX( x, false );
+ TQDateTime dt = mySignalSender->getDateTimeForCoordX( x, false );
int duration = movingGVItem->startTime().secsTo( movingGVItem->endTime() );
if ( movingOperation == Moving ) {
movingGVItem->setStartTime( dt );
@@ -3871,7 +3871,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
currentItem = 0;
}
if (autoScrollEnabled)
- mousePos = e->pos()- QPoint(contentsX(),contentsY()); // make mousePos relative 0
+ mousePos = e->pos()- TQPoint(contentsX(),contentsY()); // make mousePos relative 0
if (fromItem) {
//qDebug("mousemove: linking %s: %d,%d ",fromItem->listViewText().latin1(), e->pos().x(), e->pos().y());
linkLine->setPoints(linkLine->startPoint().x(), linkLine->startPoint().y(), e->pos().x(), e->pos().y());
@@ -3879,46 +3879,46 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
}
// no action implemented
}
-void KDGanttCanvasView::viewportPaintEvent ( QPaintEvent * pe )
+void KDGanttCanvasView::viewportPaintEvent ( TQPaintEvent * pe )
{
- QCanvasView::viewportPaintEvent ( pe );
+ TQCanvasView::viewportPaintEvent ( pe );
}
void KDGanttCanvasView::set_Mouse_Tracking(bool on)
{
viewport()->setMouseTracking(on);
}
-int KDGanttCanvasView::getType(QCanvasItem* it)
+int KDGanttCanvasView::getType(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType;
- case QCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType;
- case QCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType;
- case QCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType;
- case QCanvasItem::Rtti_Rectangle:
+ case TQCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType;
+ case TQCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType;
+ case TQCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType;
+ case TQCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType;
+ case TQCanvasItem::Rtti_Rectangle:
case KDIntervalColorRectangle::RTTI:
return ((KDCanvasRectangle *)it)->myParentType;
}
return -1;
}
-KDGanttViewItem* KDGanttCanvasView::getItem(QCanvasItem* it)
+KDGanttViewItem* KDGanttCanvasView::getItem(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem;
- case QCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem;
- case QCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem;
- case QCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem;
- case QCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem;
+ case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem;
}
return 0;
}
-KDGanttViewTaskLink* KDGanttCanvasView::getLink(QCanvasItem* it)
+KDGanttViewTaskLink* KDGanttCanvasView::getLink(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem;
- case QCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem;
- case QCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem;
- case QCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem;
+ case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem;
}
return 0;
}
@@ -3997,8 +3997,8 @@ KDIntervalColorRectangle::KDIntervalColorRectangle( KDGanttView* view )
\param start start datetime of the time interval
\param end end datetime of the time interval
*/
-void KDIntervalColorRectangle::setDateTimes( const QDateTime& start,
- const QDateTime& end )
+void KDIntervalColorRectangle::setDateTimes( const TQDateTime& start,
+ const TQDateTime& end )
{
mStart = start;
mEnd = end;
@@ -4010,7 +4010,7 @@ void KDIntervalColorRectangle::setDateTimes( const QDateTime& start,
Sets the background color
\param color the background color
*/
-void KDIntervalColorRectangle::setColor( const QColor& color )
+void KDIntervalColorRectangle::setColor( const TQColor& color )
{
mColor = color;
}
@@ -4024,8 +4024,8 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh
int right = timeHeader->getCoordX(mEnd);
if ( right == left )
++right;
- setPen( QPen::NoPen );
- setBrush( QBrush(mColor, SolidPattern) );
+ setPen( TQPen::NoPen );
+ setBrush( TQBrush(mColor, SolidPattern) );
setSize( right - left, height );
move( left, 0 );
show();
@@ -4034,7 +4034,7 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh
/*!
\internal
*/
-KDIntervalColorRectangle::HitTest KDIntervalColorRectangle::hitTest( KDTimeHeaderWidget* timeHeader, const QPoint& pos ) const
+KDIntervalColorRectangle::HitTest KDIntervalColorRectangle::hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const
{
const int left = timeHeader->getCoordX(mStart);
const int right = timeHeader->getCoordX(mEnd);
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h
index b8d9d57a..1a88411a 100644
--- a/kdgantt/KDGanttViewSubwidgets.h
+++ b/kdgantt/KDGanttViewSubwidgets.h
@@ -37,24 +37,24 @@
#define KDGANTTVIEWSUBWIDGETS_H
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qevent.h>
-#include <qvaluelist.h>
-#include <qcanvas.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qgroupbox.h>
-#include <qvgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qvbox.h>
-#include <qdockwindow.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
+#include <tqcanvas.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqgroupbox.h>
+#include <tqvgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqvbox.h>
+#include <tqdockwindow.h>
+#include <tqtimer.h>
#include "KDGanttView.h"
#include "KDGanttViewTaskLink.h"
@@ -82,36 +82,36 @@ public:
typedef KDGanttView::YearFormat YearFormat;
typedef KDGanttView::HourFormat HourFormat;
struct DateTimeColor {
- QDateTime datetime;
- QDateTime end;
- QColor color;
+ TQDateTime datetime;
+ TQDateTime end;
+ TQColor color;
Scale minScaleView;
Scale maxScaleView;
//KDCanvasLine* canvasLine;
KDCanvasRectangle* canvasRect;
};
- typedef QValueList<DateTimeColor> ColumnColorList;
- typedef QValueList<KDIntervalColorRectangle *> IntervalColorList;
+ typedef TQValueList<DateTimeColor> ColumnColorList;
+ typedef TQValueList<KDIntervalColorRectangle *> IntervalColorList;
/*
enum Scale { Minute, Hour, Day, Week, Month, Auto };
enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe };
enum HourFormat { Hour_24, Hour_12 };
*/
- KDTimeHeaderWidget (QWidget* parent,KDGanttView* gant);
+ KDTimeHeaderWidget (TQWidget* parent,KDGanttView* gant);
~KDTimeHeaderWidget();
- QString getToolTipText(QPoint p);
+ TQString getToolTipText(TQPoint p);
void zoomToFit();
void zoom(double, bool absolute = true);
- void zoomToSelection( QDateTime startTime, QDateTime endTime);
+ void zoomToSelection( TQDateTime startTime, TQDateTime endTime);
double zoomFactor();
void setAutoScaleMinorTickCount( int count );
int autoScaleMinorTickCount();
- void setHorizonStart( const QDateTime& start );
- QDateTime horizonStart() const;
- void setHorizonEnd( const QDateTime& start );
- QDateTime horizonEnd() const;
+ void setHorizonStart( const TQDateTime& start );
+ TQDateTime horizonStart() const;
+ void setHorizonEnd( const TQDateTime& start );
+ TQDateTime horizonEnd() const;
void setMaximumScale( Scale );
KDTimeHeaderWidget::Scale maximumScale() const;
@@ -133,38 +133,38 @@ public:
void setShowMinorTicks( bool );
void setScale( Scale unit);
bool showMinorTicks() const;
- void setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+ void setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
#if 0
// This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
- void setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+ void setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
- bool changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend );
- bool deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end );
+ bool changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend );
+ bool deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end );
#endif
void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
void clearBackgroundColor();
- QColor columnBackgroundColor( const QDateTime& column ) const;
- void setWeekendBackgroundColor( const QColor& color );
- QColor weekendBackgroundColor() const;
- void setWeekdayBackgroundColor( const QColor& color, int weekday );
- QColor weekdayBackgroundColor(int weekday) const;
+ TQColor columnBackgroundColor( const TQDateTime& column ) const;
+ void setWeekendBackgroundColor( const TQColor& color );
+ TQColor weekendBackgroundColor() const;
+ void setWeekdayBackgroundColor( const TQColor& color, int weekday );
+ TQColor weekdayBackgroundColor(int weekday) const;
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
void computeTicks(bool doNotComputeRealScale = false);
- void paintEvent(QPaintEvent *);
- int getCoordX(QDate);
- int getCoordX(QDateTime);
- QDateTime getDateTimeForIndex(int coordX, bool local = true );
+ void paintEvent(TQPaintEvent *);
+ int getCoordX(TQDate);
+ int getCoordX(TQDateTime);
+ TQDateTime getDateTimeForIndex(int coordX, bool local = true );
void setShowPopupMenu( bool show, bool showZoom, bool showScale,bool showTime,
bool showYear,bool showGrid, bool showPrint);
bool registerStartTime();
@@ -173,10 +173,10 @@ public:
ColumnColorList columnBackgroundColorList() const {
return ccList;
}
- QColor weekdayColor[8];
- void repaintMe(int left, int wid, QPainter *p = 0);
+ TQColor weekdayColor[8];
+ void repaintMe(int left, int wid, TQPainter *p = 0);
- void centerDateTime( const QDateTime& center );
+ void centerDateTime( const TQDateTime& center );
public slots:
void setSettings(int);
@@ -192,22 +192,22 @@ private:
friend class KDGanttViewItem;
friend class KDGanttView;
friend class KDGanttCanvasView; // calls computeIntervals
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseReleaseEvent ( QMouseEvent * e );
- virtual void mouseDoubleClickEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * e );
- double secsFromTo( QDateTime begin, QDateTime end );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
+ double secsFromTo( TQDateTime begin, TQDateTime end );
void updateTimeTable();
void computeIntervals( int height );
- bool getColumnColor(QColor& col,int coordLow, int coordHigh);
+ bool getColumnColor(TQColor& col,int coordLow, int coordHigh);
void moveTimeLineTo(int x);
- //void mousePressEvent ( QMouseEvent * ) ;
- void resizeEvent ( QResizeEvent * ) ;
- QValueList<int> majorTicks;
- QValueList<QString> minorText;
- QValueList<QString> majorText;
- QDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart;
- QDateTime myCenterDateTime;
+ //void mousePressEvent ( TQMouseEvent * ) ;
+ void resizeEvent ( TQResizeEvent * ) ;
+ TQValueList<int> majorTicks;
+ TQValueList<TQString> minorText;
+ TQValueList<TQString> majorText;
+ TQDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart;
+ TQDateTime myCenterDateTime;
void saveCenterDateTime();
Scale myScale,myRealScale,myMaxScale,myMinScale;
YearFormat myYearFormat;
@@ -217,21 +217,21 @@ private:
bool flagShowZoom, flagShowScale ,flagShowTime ,flagShowYear;
bool flagShowGrid ,flagShowPrint;
bool flagStartTimeSet,flagEndTimeSet;
- QColor myWeekendBackgroundColor;
+ TQColor myWeekendBackgroundColor;
int myWeekendDaysStart, myWeekendDaysEnd;
ColumnColorList ccList;
IntervalColorList icList;
int myMinorScaleCount,myMajorScaleCount;
int myRealMinorScaleCount,myRealMajorScaleCount;
bool flagDoNotRecomputeAfterChange,flagDoNotRepaintAfterChange;
- QString getYear(QDate);
- QString getHour(QTime);
- QDateTime getEvenTimeDate(QDateTime ,Scale);
- void computeRealScale(QDateTime start);
+ TQString getYear(TQDate);
+ TQString getHour(TQTime);
+ TQDateTime getEvenTimeDate(TQDateTime ,Scale);
+ void computeRealScale(TQDateTime start);
int myGridMinorWidth;
int myMajorGridHeight;
- QPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu;
- QPopupMenu * yearPopupMenu, *gridPopupMenu;
+ TQPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu;
+ TQPopupMenu * yearPopupMenu, *gridPopupMenu;
KDGanttView* myGanttView;
double myZoomFactor;
int myAutoScaleMinorTickcount;
@@ -244,7 +244,7 @@ private:
int beginMouseDown;
int endMouseDown;
bool autoComputeTimeLine;
- QPixmap paintPix;
+ TQPixmap paintPix;
};
/* KDTimeTableWidget */
@@ -255,7 +255,7 @@ class KDTimeTableWidget : public QCanvas
Q_OBJECT
public:
- KDTimeTableWidget (QWidget* parent,KDGanttView* my);
+ KDTimeTableWidget (TQWidget* parent,KDGanttView* my);
void setBlockUpdating( bool block = true );
bool blockUpdating();
@@ -263,25 +263,25 @@ public:
void dec_blockUpdating();
void setShowTaskLinks( bool show );
bool showTaskLinks();
- QPtrList<KDGanttViewTaskLink>taskLinks();
+ TQPtrList<KDGanttViewTaskLink>taskLinks();
void clearTaskLinks();
void updateMyContent();
void removeItemFromTasklinks( KDGanttViewItem * );
- void setHorBackgroundLines( int count, QBrush brush );
- int horBackgroundLines( QBrush& brush );
+ void setHorBackgroundLines( int count, TQBrush brush );
+ int horBackgroundLines( TQBrush& brush );
- void setNoInformationBrush( const QBrush& brush );
- QBrush noInformationBrush() const;
+ void setNoInformationBrush( const TQBrush& brush );
+ TQBrush noInformationBrush() const;
- int getCoordX( QDateTime dt );
+ int getCoordX( TQDateTime dt );
signals:
void heightComputed( int );
public slots:
- void expandItem(QListViewItem * );
- void collapseItem(QListViewItem * );
- void highlightItem(QListViewItem * );
+ void expandItem(TQListViewItem * );
+ void collapseItem(TQListViewItem * );
+ void highlightItem(TQListViewItem * );
void resetWidth( int );
void checkHeight( int );
private:
@@ -293,15 +293,15 @@ private:
bool taskLinksVisible;
- QPtrList<KDGanttViewTaskLink> myTaskLinkList;
+ TQPtrList<KDGanttViewTaskLink> myTaskLinkList;
- QPtrList<KDCanvasLine> verGridList;
- QPtrList<KDCanvasLine> horGridList;
- QPtrList<KDCanvasRectangle> horDenseList;
- QPtrList<KDCanvasRectangle> showNoInfoList;
+ TQPtrList<KDCanvasLine> verGridList;
+ TQPtrList<KDCanvasLine> horGridList;
+ TQPtrList<KDCanvasRectangle> horDenseList;
+ TQPtrList<KDCanvasRectangle> showNoInfoList;
int denseLineCount;
- QBrush denseLineBrush, noInfoLineBrush;
- QPtrList<KDCanvasRectangle> columnColorList;
+ TQBrush denseLineBrush, noInfoLineBrush;
+ TQPtrList<KDCanvasRectangle> columnColorList;
int computeHeight();
void computeVerticalGrid();
@@ -316,7 +316,7 @@ private:
void showMinorGrid();
void hideGrid();
- QPen gridPen;
+ TQPen gridPen;
int maximumComputedGridHeight;
int minimumHeight;
int int_blockUpdating;
@@ -331,23 +331,23 @@ class KDLegendWidget : public KDGanttSemiSizingControl
Q_OBJECT
public:
- KDLegendWidget ( QWidget* parent, KDGanttMinimizeSplitter* legendParent );
+ KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent );
void showMe(bool);
bool isShown();
- void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
- void setFont( QFont );
- void drawToPainter( QPainter *p );
+ void setFont( TQFont );
+ void drawToPainter( TQPainter *p );
void setAsDockwindow( bool dockwin );
bool asDockwindow();
- QDockWindow* dockwindow();
- QSize legendSize();
- QSize legendSizeHint();
+ TQDockWindow* dockwindow();
+ TQSize legendSize();
+ TQSize legendSizeHint();
private:
- QGroupBox * myLegend;
- QLabel* myLabel;
- QScrollView * scroll;
- QDockWindow* dock;
+ TQGroupBox * myLegend;
+ TQLabel* myLabel;
+ TQScrollView * scroll;
+ TQDockWindow* dock;
KDGanttMinimizeSplitter* myLegendParent;
};
@@ -357,38 +357,38 @@ class KDListView : public QListView
Q_OBJECT
public:
- KDListView (QWidget* parent,KDGanttView* gv );
+ KDListView (TQWidget* parent,KDGanttView* gv );
KDGanttView* myGanttView;
- void drawToPainter( QPainter *p, bool drawHeader=false );
+ void drawToPainter( TQPainter *p, bool drawHeader=false );
void setCalendarMode( bool mode );
bool calendarMode() { return _calendarMode; };
- QString getWhatsThisText(QPoint p);
- void setOpen ( QListViewItem * item, bool open );
- void dragEnterEvent ( QDragEnterEvent * );
- void dragMoveEvent ( QDragMoveEvent * );
- void dragLeaveEvent ( QDragLeaveEvent * );
- void dropEvent ( QDropEvent * );
- QDragObject * dragObject ();
+ TQString getWhatsThisText(TQPoint p);
+ void setOpen ( TQListViewItem * item, bool open );
+ void dragEnterEvent ( TQDragEnterEvent * );
+ void dragMoveEvent ( TQDragMoveEvent * );
+ void dragLeaveEvent ( TQDragLeaveEvent * );
+ void dropEvent ( TQDropEvent * );
+ TQDragObject * dragObject ();
void startDrag ();
- void paintemptyarea ( QPainter * p, const QRect & rect ){ QListView::paintEmptyArea( p, rect );};
+ void paintemptyarea ( TQPainter * p, const TQRect & rect ){ TQListView::paintEmptyArea( p, rect );};
public:
class DrawableItem {
public:
- DrawableItem(int level, int ypos, QListViewItem *item ) { y = ypos; l = level; i = item; };
+ DrawableItem(int level, int ypos, TQListViewItem *item ) { y = ypos; l = level; i = item; };
int y;
int l;
- QListViewItem * i;
+ TQListViewItem * i;
};
protected:
- void drawAllContents(QPainter * p, int cx, int cy, int cw, int ch);
- int buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const;
+ void drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch);
+ int buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const;
private slots:
- void dragItem( QListViewItem * );
+ void dragItem( TQListViewItem * );
private:
- void resizeEvent ( QResizeEvent * ) ;
- void contentsMouseDoubleClickEvent ( QMouseEvent * e );
+ void resizeEvent ( TQResizeEvent * ) ;
+ void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
bool _calendarMode;
@@ -457,15 +457,15 @@ class KDIntervalColorRectangle: public KDCanvasRectangle
public:
KDIntervalColorRectangle( KDGanttView* view );
- void setDateTimes( const QDateTime& start,
- const QDateTime& end );
- QDateTime start() const { return mStart; }
- QDateTime end() const { return mEnd; }
+ void setDateTimes( const TQDateTime& start,
+ const TQDateTime& end );
+ TQDateTime start() const { return mStart; }
+ TQDateTime end() const { return mEnd; }
- void setColor( const QColor& color );
+ void setColor( const TQColor& color );
enum HitTest { Start, Middle, End };
- HitTest hitTest( KDTimeHeaderWidget* timeHeader, const QPoint& pos ) const;
+ HitTest hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const;
void layout( KDTimeHeaderWidget* timeHeader, int height );
@@ -473,9 +473,9 @@ public:
/*reimp*/ int rtti() const { return RTTI; }
private:
- QColor mColor;
- QDateTime mStart;
- QDateTime mEnd;
+ TQColor mColor;
+ TQDateTime mStart;
+ TQDateTime mEnd;
};
class KDCanvasToolTip;
@@ -485,11 +485,11 @@ class KDGanttCanvasView : public QCanvasView
Q_OBJECT
public:
- KDGanttCanvasView(KDGanttView* sender, QCanvas* canvas = 0, QWidget* parent = 0, const char* name = 0 );
+ KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* parent = 0, const char* name = 0 );
~KDGanttCanvasView();
- QString getToolTipText(QPoint p);
- QString getWhatsThisText(QPoint p);
- void drawToPainter ( QPainter * p );
+ TQString getToolTipText(TQPoint p);
+ TQString getWhatsThisText(TQPoint p);
+ void drawToPainter ( TQPainter * p );
void resetCutPaste( KDGanttViewItem* );
void setShowPopupMenu( bool show );
bool showPopupMenu();
@@ -500,35 +500,35 @@ public:
protected:
friend class KDGanttView;
friend class KDListView;
- virtual void contentsMousePressEvent ( QMouseEvent * ) ;
- virtual void contentsMouseReleaseEvent ( QMouseEvent * );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * );
- virtual void contentsMouseMoveEvent ( QMouseEvent * ) ;
- virtual void viewportPaintEvent ( QPaintEvent * pe );
- void resizeEvent ( QResizeEvent * ) ;
+ virtual void contentsMousePressEvent ( TQMouseEvent * ) ;
+ virtual void contentsMouseReleaseEvent ( TQMouseEvent * );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * );
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * ) ;
+ virtual void viewportPaintEvent ( TQPaintEvent * pe );
+ void resizeEvent ( TQResizeEvent * ) ;
void set_MouseTracking(bool on);
- int getType(QCanvasItem*);
- KDGanttViewItem* getItem(QCanvasItem*);
- KDGanttViewTaskLink* getLink(QCanvasItem*);
+ int getType(TQCanvasItem*);
+ KDGanttViewItem* getItem(TQCanvasItem*);
+ KDGanttViewTaskLink* getLink(TQCanvasItem*);
int getItemArea(KDGanttViewItem *item, int x);
int getLinkType(int from, int to);
KDGanttView* mySignalSender;
KDGanttViewItem* currentItem, *lastClickedItem, *cuttedItem;
- QCanvasRectangle* movingItem;
+ TQCanvasRectangle* movingItem;
KDGanttViewTaskItem* movingGVItem;
- QPoint movingStart;
- QDateTime movingStartDate;
+ TQPoint movingStart;
+ TQDateTime movingStartDate;
enum MovingOperation { Moving, ResizingLeft, ResizingRight };
MovingOperation movingOperation;
KDGanttViewTaskLink* currentLink;
KDCanvasWhatsThis* myWhatsThis;
- QPopupMenu* onItem;
+ TQPopupMenu* onItem;
bool _showItemAddPopupMenu;
int myMyContentsHeight;
KDGanttViewItem *fromItem;
bool linkItemsEnabled;
- QCanvasLine *linkLine;
+ TQCanvasLine *linkLine;
int fromArea;
bool autoScrollEnabled;
bool mouseDown;
@@ -551,29 +551,29 @@ private slots:
void myUpdateScrollBars();
private:
- MovingOperation gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const QPoint &pos );
+ MovingOperation gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const TQPoint &pos );
private:
KDCanvasToolTip* myToolTip;
- QTimer *myScrollTimer;
- QPoint mousePos;
- QTimer scrollBarTimer;
+ TQTimer *myScrollTimer;
+ TQPoint mousePos;
+ TQTimer scrollBarTimer;
};
class KDTimeHeaderToolTip :public QToolTip
{
public:
- KDTimeHeaderToolTip( QWidget *wid, KDTimeHeaderWidget* header ) : QToolTip( wid ), _wid(wid),_header (header) {
+ KDTimeHeaderToolTip( TQWidget *wid, KDTimeHeaderWidget* header ) : TQToolTip( wid ), _wid(wid),_header (header) {
};
protected:
- virtual void maybeTip( const QPoint& p)
+ virtual void maybeTip( const TQPoint& p)
{
static bool ishidden = true;
- if (QToolTip::isGloballyEnabled () ) {
+ if (TQToolTip::isGloballyEnabled () ) {
if (ishidden) {
- tip( QRect( p.x(),p.y(),5,5), _header->getToolTipText(p));
+ tip( TQRect( p.x(),p.y(),5,5), _header->getToolTipText(p));
}
else
hide();
@@ -581,7 +581,7 @@ protected:
}
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDTimeHeaderWidget * _header;
};
@@ -589,17 +589,17 @@ class KDCanvasToolTip :public QToolTip
{
public:
- KDCanvasToolTip( QWidget *wid, KDGanttCanvasView* canview ) : QToolTip( wid ), _wid(wid),_canview (canview) {
+ KDCanvasToolTip( TQWidget *wid, KDGanttCanvasView* canview ) : TQToolTip( wid ), _wid(wid),_canview (canview) {
};
protected:
- virtual void maybeTip( const QPoint& p)
+ virtual void maybeTip( const TQPoint& p)
{
static bool ishidden = true;
- if (QToolTip::isGloballyEnabled () ) {
+ if (TQToolTip::isGloballyEnabled () ) {
if (ishidden) {
- tip( QRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p));
+ tip( TQRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p));
}
else
hide();
@@ -607,37 +607,37 @@ protected:
}
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDGanttCanvasView * _canview;
};
class KDCanvasWhatsThis :public QWhatsThis
{
public:
- KDCanvasWhatsThis( QWidget *wid, KDGanttCanvasView* canview ) : QWhatsThis( wid ), _wid(wid),_canview (canview) { };
+ KDCanvasWhatsThis( TQWidget *wid, KDGanttCanvasView* canview ) : TQWhatsThis( wid ), _wid(wid),_canview (canview) { };
protected:
- virtual QString text( const QPoint& p)
+ virtual TQString text( const TQPoint& p)
{
return _canview->getWhatsThisText(p) ;
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDGanttCanvasView * _canview;
};
class KDListViewWhatsThis :public QWhatsThis
{
public:
- KDListViewWhatsThis( QWidget *wid, KDListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+ KDListViewWhatsThis( TQWidget *wid, KDListView* view ) : TQWhatsThis( wid ), _wid(wid),_view (view) { };
protected:
- virtual QString text( const QPoint& p)
+ virtual TQString text( const TQPoint& p)
{
return _view->getWhatsThisText(p) ;
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDListView * _view;
};
diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp
index a9cf23c6..d73a2725 100644
--- a/kdgantt/KDGanttViewSummaryItem.cpp
+++ b/kdgantt/KDGanttViewSummaryItem.cpp
@@ -54,8 +54,8 @@
is specified, a unique name will be generated
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, view, lvtext, name )
{
initItem();
@@ -71,8 +71,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, parent, lvtext, name )
{
initItem();
@@ -90,8 +90,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, view, after, lvtext, name )
{
initItem();
@@ -109,8 +109,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, parent, after, lvtext, name )
{
@@ -135,7 +135,7 @@ KDGanttViewSummaryItem::~KDGanttViewSummaryItem()
\param dateTime the middle time
\sa middleTime()
*/
-void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime )
+void KDGanttViewSummaryItem::setMiddleTime( const TQDateTime& dateTime )
{
if (! dateTime.isValid() ) {
qDebug("KDGanttViewSummaryItem::setMiddleTime():Invalid parameter-no time set");
@@ -158,7 +158,7 @@ void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime )
\return the middle time of this summary item.
If there is no middle time defined, the start time is returned.
*/
-QDateTime KDGanttViewSummaryItem::middleTime() const
+TQDateTime KDGanttViewSummaryItem::middleTime() const
{
if(myMiddleTime)
return *myMiddleTime;
@@ -174,7 +174,7 @@ QDateTime KDGanttViewSummaryItem::middleTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewSummaryItem::setEndTime( const QDateTime& end )
+void KDGanttViewSummaryItem::setEndTime( const TQDateTime& end )
{
if (! end.isValid() ) {
qDebug("KDGanttViewSummaryItem::setEndTime():Invalid parameter-no time set");
@@ -197,7 +197,7 @@ void KDGanttViewSummaryItem::setEndTime( const QDateTime& end )
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewSummaryItem::setStartTime( const QDateTime& start )
+void KDGanttViewSummaryItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewSummaryItem::setStartTime():Invalid parameter-no time set");
@@ -221,7 +221,7 @@ void KDGanttViewSummaryItem::setStartTime( const QDateTime& start )
\sa actualEndTime()
startTime()
*/
-void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end )
+void KDGanttViewSummaryItem::setActualEndTime( const TQDateTime& end )
{
if (!myActualEndTime) myActualEndTime = new QDateTime;
*myActualEndTime = end;
@@ -238,7 +238,7 @@ void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end )
\sa setActualEndTime()
*/
-QDateTime KDGanttViewSummaryItem::actualEndTime() const
+TQDateTime KDGanttViewSummaryItem::actualEndTime() const
{
if(myActualEndTime)
return *myActualEndTime;
diff --git a/kdgantt/KDGanttViewSummaryItem.h b/kdgantt/KDGanttViewSummaryItem.h
index e8fcd618..6102dbff 100644
--- a/kdgantt/KDGanttViewSummaryItem.h
+++ b/kdgantt/KDGanttViewSummaryItem.h
@@ -41,28 +41,28 @@ class KDGanttViewSummaryItem : public KDGanttViewItem
{
public:
KDGanttViewSummaryItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewSummaryItem();
- void setMiddleTime( const QDateTime& );
- QDateTime middleTime() const;
- void setActualEndTime( const QDateTime& end );
- QDateTime actualEndTime() const;
- void setStartTime( const QDateTime& start );
- void setEndTime( const QDateTime& end );
+ void setMiddleTime( const TQDateTime& );
+ TQDateTime middleTime() const;
+ void setActualEndTime( const TQDateTime& end );
+ TQDateTime actualEndTime() const;
+ void setStartTime( const TQDateTime& start );
+ void setEndTime( const TQDateTime& end );
private:
void showItem( bool show = true, int coordY = 0 );
- QDateTime* myActualEndTime,*myMiddleTime;
+ TQDateTime* myActualEndTime,*myMiddleTime;
void initItem();
void hideMe();
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index a9f1bec9..1bcb96a6 100644
--- a/kdgantt/KDGanttViewTaskItem.cpp
+++ b/kdgantt/KDGanttViewTaskItem.cpp
@@ -67,8 +67,8 @@
is specified, a unique name will be generated
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, lvtext, name )
{
@@ -85,8 +85,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, parent, lvtext, name )
{
initItem();
@@ -104,8 +104,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, after, lvtext, name )
{
initItem();
@@ -123,8 +123,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, parent, after, lvtext, name )
{
initItem();
@@ -149,7 +149,7 @@ KDGanttViewTaskItem::~KDGanttViewTaskItem()
\param end the end time
\sa setStartTime(), startTime(), endTime()
*/
-void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
+void KDGanttViewTaskItem::setEndTime( const TQDateTime& end )
{
myEndTime = end;
if ( myEndTime < startTime() )
@@ -168,7 +168,7 @@ void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewTaskItem::setStartTime( const QDateTime& start )
+void KDGanttViewTaskItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewTaskItem::setStartTime():Invalid parameter-no time set");
@@ -248,8 +248,8 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
if ( par )
hei = par->height();
}
- if (myGanttView->myListView->itemAt( QPoint(2, allY)))
- hei = myGanttView->myListView->itemAt( QPoint(2, allY))->height();
+ if (myGanttView->myListView->itemAt( TQPoint(2, allY)))
+ hei = myGanttView->myListView->itemAt( TQPoint(2, allY))->height();
if ( takedefaultHeight )
hei = 16;
if ( myStartTime == myEndTime ) {
@@ -281,12 +281,12 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
temp->show();
if (progX > 0) {
// FIXME: For now, just use inverted color for progress
- QColor c = temp->brush().color();
+ TQColor c = temp->brush().color();
int h, s, v;
c.getHsv(&h, &s, &v);
h > 359/2 ? h -= 359/2 : h += 359/2;
c.setHsv(h, s, v);
- progtemp->setBrush(QBrush(c));
+ progtemp->setBrush(TQBrush(c));
progtemp->setSize(progX, hei-3);
progtemp->move(temp->x(), temp->y());
@@ -296,9 +296,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatStartTemp = (KDCanvasRectangle*) floatStartShape;
int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatStartTemp->setBrush(b);
- floatStartTemp->setPen(QPen(gray));
+ floatStartTemp->setPen(TQPen(gray));
if (floatStartX < startX) {
floatStartTemp->setSize(startX - floatStartX, temp->size().height()/2);
floatStartTemp->move(floatStartX, temp->y() + temp->size().height()/4);
@@ -312,9 +312,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatEndTemp = (KDCanvasRectangle*) floatEndShape;
int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatEndTemp->setBrush(b);
- floatEndTemp->setPen(QPen(gray));
+ floatEndTemp->setPen(TQPen(gray));
int ex = startX + temp->size().width();
if (floatEndX > ex) {
floatEndTemp->setSize(floatEndX - ex, temp->size().height()/2);
@@ -335,7 +335,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
textCanvas->hide();
else {
textCanvas->move(startX+3, allY-textCanvas->boundingRect().height()/2);
- QString temp = textCanvasText;
+ TQString temp = textCanvasText;
textCanvas->setText(temp);
int len = temp.length();
while ( textCanvas->boundingRect().width() > wid ) {
diff --git a/kdgantt/KDGanttViewTaskItem.h b/kdgantt/KDGanttViewTaskItem.h
index d4a73cf0..63b4678e 100644
--- a/kdgantt/KDGanttViewTaskItem.h
+++ b/kdgantt/KDGanttViewTaskItem.h
@@ -44,21 +44,21 @@ class KDGanttViewTaskItem : public KDGanttViewItem
{
public:
KDGanttViewTaskItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewTaskItem();
- void setStartTime( const QDateTime& start );
- void setEndTime( const QDateTime& end );
+ void setStartTime( const TQDateTime& start );
+ void setEndTime( const TQDateTime& end );
protected:
void showItem( bool show = true, int coordY = 0 );
@@ -66,7 +66,7 @@ protected:
private:
void initItem();
void hideMe();
- QBrush myBrush, undefinedBrush;
+ TQBrush myBrush, undefinedBrush;
bool _showUndefinedBrush;
};
diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp
index 22a50b8a..2f5ca479 100644
--- a/kdgantt/KDGanttViewTaskLink.cpp
+++ b/kdgantt/KDGanttViewTaskLink.cpp
@@ -62,8 +62,8 @@
\param to the target items
\param type the link type for the connection
*/
-KDGanttViewTaskLink::KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+KDGanttViewTaskLink::KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList= from;
@@ -109,8 +109,8 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewItem* from,
*/
KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
- QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList = from;
@@ -166,14 +166,14 @@ KDGanttViewTaskLink::~KDGanttViewTaskLink( )
void KDGanttViewTaskLink::initTaskLink()
{
- horLineList = new QPtrList<KDCanvasLine>;
- verLineList = new QPtrList<KDCanvasLine>;
- horLineList2 = new QPtrList<KDCanvasLine>;
- verLineList2 = new QPtrList<KDCanvasLine>;
- horLineList3 = new QPtrList<KDCanvasLine>;
- topList = new QPtrList<KDCanvasPolygon>;
- topLeftList = new QPtrList<KDCanvasPolygon>;
- topRightList = new QPtrList<KDCanvasPolygon>;
+ horLineList = new TQPtrList<KDCanvasLine>;
+ verLineList = new TQPtrList<KDCanvasLine>;
+ horLineList2 = new TQPtrList<KDCanvasLine>;
+ verLineList2 = new TQPtrList<KDCanvasLine>;
+ horLineList3 = new TQPtrList<KDCanvasLine>;
+ topList = new TQPtrList<KDCanvasPolygon>;
+ topLeftList = new TQPtrList<KDCanvasPolygon>;
+ topRightList = new TQPtrList<KDCanvasPolygon>;
horLineList->setAutoDelete( true );
verLineList->setAutoDelete( true );
horLineList2->setAutoDelete( true );
@@ -200,7 +200,7 @@ void KDGanttViewTaskLink::initTaskLink()
top = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topLeft = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topRight = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-4,-5);
arr.setPoint(1,4,-5);
arr.setPoint(2,0,0);
@@ -265,8 +265,8 @@ void KDGanttViewTaskLink::showMe( bool visible )
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -277,17 +277,17 @@ void KDGanttViewTaskLink::showMe( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(0,0));
+ (*fromIt)->setTextOffset(TQPoint(0,0));
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
- (*toIt)->setTextOffset(QPoint(0,0));
+ (*toIt)->setTextOffset(TQPoint(0,0));
if (!isvisible || ! (*fromIt)->isVisibleInGanttView || !(*toIt)->isVisibleInGanttView || !myTimeTable->taskLinksVisible) {
(*horIt)->hide();
(*verIt)->hide();
@@ -330,8 +330,8 @@ void KDGanttViewTaskLink::showMeType( bool visible )
hide();
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -342,19 +342,19 @@ void KDGanttViewTaskLink::showMeType( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(30,0));
+ (*fromIt)->setTextOffset(TQPoint(30,0));
(*fromIt)->moveTextCanvas();
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -368,12 +368,12 @@ void KDGanttViewTaskLink::showMeType( bool visible )
(*topIt)->setBrush(b);
(*topLeftIt)->setBrush(b);
(*topRightIt)->setBrush(b);
- (*toIt)->setTextOffset(QPoint(30,0));
+ (*toIt)->setTextOffset(TQPoint(30,0));
(*toIt)->moveTextCanvas();
switch (linkType()) {
case StartStart: {
start = (*fromIt)->middleLeft();
- end = (*toIt)->middleLeft()-QPoint(12,0);
+ end = (*toIt)->middleLeft()-TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()-xOffset(*fromIt),start.y(),
start.x()-10, start.y());
@@ -401,7 +401,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -429,7 +429,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishStart: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleLeft() - QPoint(12,0);
+ end = (*toIt)->middleLeft() - TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10,start.y());
@@ -459,7 +459,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case StartFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -589,7 +589,7 @@ bool KDGanttViewTaskLink::highlight() const
\param color the color to draw this task link in
\sa color()
*/
-void KDGanttViewTaskLink::setColor( const QColor& color )
+void KDGanttViewTaskLink::setColor( const TQColor& color )
{
myColor = color;
//if ( isvisible) setVisible(true );
@@ -603,7 +603,7 @@ void KDGanttViewTaskLink::setColor( const QColor& color )
\return the color in which this task link is drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLink::color() const
+TQColor KDGanttViewTaskLink::color() const
{
return myColor;
}
@@ -615,7 +615,7 @@ QColor KDGanttViewTaskLink::color() const
\param color the highlight color to draw this task link in
\sa highlightColor()
*/
-void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
+void KDGanttViewTaskLink::setHighlightColor( const TQColor& color )
{
myColorHL = color;
//if ( isvisible) setVisible(true );
@@ -629,7 +629,7 @@ void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
\return the highlight color in which this task link is drawn
\sa setHighlightColor()
*/
-QColor KDGanttViewTaskLink::highlightColor() const
+TQColor KDGanttViewTaskLink::highlightColor() const
{
return myColorHL;
}
@@ -641,7 +641,7 @@ QColor KDGanttViewTaskLink::highlightColor() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewTaskLink::setTooltipText( const QString& text )
+void KDGanttViewTaskLink::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -653,7 +653,7 @@ void KDGanttViewTaskLink::setTooltipText( const QString& text )
\return the tooltip text of this task link
\sa setTooltipText()
*/
-QString KDGanttViewTaskLink::tooltipText() const
+TQString KDGanttViewTaskLink::tooltipText() const
{
return myToolTipText;
}
@@ -665,7 +665,7 @@ QString KDGanttViewTaskLink::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
+void KDGanttViewTaskLink::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
@@ -678,7 +678,7 @@ void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
\return the what's this text of this task link
\sa setWhatsThisText()
*/
-QString KDGanttViewTaskLink::whatsThisText() const
+TQString KDGanttViewTaskLink::whatsThisText() const
{
return myWhatsThisText;
}
@@ -690,7 +690,7 @@ QString KDGanttViewTaskLink::whatsThisText() const
\return the ist of source item of this task link
\sa to()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
{
return fromList;
}
@@ -722,7 +722,7 @@ void KDGanttViewTaskLink::removeItemFromList( KDGanttViewItem* item )
\return the list of target item of this task link
\sa from()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
{
return toList;
}
@@ -734,23 +734,23 @@ QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewTaskLink::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewTaskLink::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement taskLinkElement = doc.createElement( "TaskLink" );
+ TQDomElement taskLinkElement = doc.createElement( "TaskLink" );
parentElement.appendChild( taskLinkElement );
- QDomElement fromItemsElement = doc.createElement( "FromItems" );
+ TQDomElement fromItemsElement = doc.createElement( "FromItems" );
taskLinkElement.appendChild( fromItemsElement );
- QPtrList<KDGanttViewItem> fromList = from();
+ TQPtrList<KDGanttViewItem> fromList = from();
KDGanttViewItem* item;
for( item = fromList.first(); item;
item = fromList.next() )
KDGanttXML::createStringNode( doc, fromItemsElement, "Item", item->name() );
- QDomElement toItemsElement = doc.createElement( "ToItems" );
+ TQDomElement toItemsElement = doc.createElement( "ToItems" );
taskLinkElement.appendChild( toItemsElement );
- QPtrList<KDGanttViewItem> toList = to();
+ TQPtrList<KDGanttViewItem> toList = to();
for( item = toList.first(); item;
item = toList.next() )
KDGanttXML::createStringNode( doc, toItemsElement, "Item", item->name() );
@@ -780,26 +780,26 @@ void KDGanttViewTaskLink::createNode( QDomDocument& doc,
\param element the DOM element from which to read the specification
\return the newly created task link
*/
-KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& element )
+KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
- QStringList fromList, toList;
+ TQDomNode node = element.firstChild();
+ TQStringList fromList, toList;
bool highlight = false, visible = false;
- QColor color, highlightColor;
- QString tooltipText, whatsThisText, group;
+ TQColor color, highlightColor;
+ TQString tooltipText, whatsThisText, group;
LinkType linktype=None;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "FromItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
fromList << value;
} else {
@@ -810,13 +810,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
} else if( tagName == "ToItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
toList << value;
} else {
@@ -835,27 +835,27 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
if( KDGanttXML::readBoolNode( element, value ) )
visible = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else if( tagName == "HighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
highlightColor = value;
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tooltipText = value;
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
whatsThisText = value;
} else if( tagName == "Group" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
group = value;
} else if( tagName == "Linktype" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
linktype = stringToLinkType( value );
} else {
@@ -866,15 +866,15 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
- QPtrList<KDGanttViewItem> fromItemList;
- QPtrList<KDGanttViewItem> toItemList;
- for( QStringList::const_iterator fromIt = fromList.begin();
+ TQPtrList<KDGanttViewItem> fromItemList;
+ TQPtrList<KDGanttViewItem> toItemList;
+ for( TQStringList::const_iterator fromIt = fromList.begin();
fromIt != fromList.end(); ++fromIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *fromIt );
if( item )
fromItemList.append( item );
}
- for( QStringList::const_iterator toIt = toList.begin();
+ for( TQStringList::const_iterator toIt = toList.begin();
toIt != toList.end(); ++toIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *toIt );
if( item )
@@ -935,16 +935,16 @@ int KDGanttViewTaskLink::xOffset(KDGanttViewItem *item)
void KDGanttViewTaskLink::hide()
{
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -968,7 +968,7 @@ void KDGanttViewTaskLink::hide()
}
}
-QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
+TQString KDGanttViewTaskLink::linkTypeToString( LinkType type )
{
switch( type ) {
case None:
@@ -992,7 +992,7 @@ QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
return "";
}
-KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const QString type )
+KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const TQString type )
{
if (type == "FinishStart")
return FinishStart;
diff --git a/kdgantt/KDGanttViewTaskLink.h b/kdgantt/KDGanttViewTaskLink.h
index efafb50f..40f6660f 100644
--- a/kdgantt/KDGanttViewTaskLink.h
+++ b/kdgantt/KDGanttViewTaskLink.h
@@ -35,10 +35,10 @@
#ifndef KDGANTTVIEWTASKLINK_H
#define KDGANTTVIEWTASKLINK_H
-#include <qcolor.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qcanvas.h>
+#include <tqcolor.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqcanvas.h>
#include "KDGanttViewItem.h"
class KDGanttViewTaskLinkGroup;
@@ -50,12 +50,12 @@ class KDGanttViewTaskLink
public:
enum LinkType { None, FinishStart, StartStart, FinishFinish, StartFinish };
- KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type=None );
KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
- QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type=None );
KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
KDGanttViewItem* from,
@@ -65,8 +65,8 @@ public:
KDGanttViewItem* to,
LinkType type=None );
~KDGanttViewTaskLink();
- QPtrList<KDGanttViewItem> from() const;
- QPtrList<KDGanttViewItem> to() const;
+ TQPtrList<KDGanttViewItem> from() const;
+ TQPtrList<KDGanttViewItem> to() const;
void removeItemFromList( KDGanttViewItem* );
void setVisible( bool );
@@ -78,19 +78,19 @@ public:
void setHighlight( bool highlight );
bool highlight() const;
- void setColor( const QColor& color );
- QColor color() const;
- void setHighlightColor( const QColor& color );
- QColor highlightColor() const;
+ void setColor( const TQColor& color );
+ TQColor color() const;
+ void setHighlightColor( const TQColor& color );
+ TQColor highlightColor() const;
- void setTooltipText( const QString& text );
- QString tooltipText() const;
- void setWhatsThisText( const QString& text );
- QString whatsThisText() const;
+ void setTooltipText( const TQString& text );
+ TQString tooltipText() const;
+ void setWhatsThisText( const TQString& text );
+ TQString whatsThisText() const;
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
- static KDGanttViewTaskLink* createFromDomElement( QDomElement& );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
+ static KDGanttViewTaskLink* createFromDomElement( TQDomElement& );
int linkType();
void setLinkType(int type);
@@ -98,22 +98,22 @@ public:
private:
friend class KDGanttViewTaskLinkGroup;
friend class KDTimeTableWidget;
- QPtrList<KDGanttViewItem> fromList,toList;
- QPtrList<KDCanvasLine>* horLineList;
- QPtrList<KDCanvasLine>* verLineList;
- QPtrList<KDCanvasPolygon>* topList;
+ TQPtrList<KDGanttViewItem> fromList,toList;
+ TQPtrList<KDCanvasLine>* horLineList;
+ TQPtrList<KDCanvasLine>* verLineList;
+ TQPtrList<KDCanvasPolygon>* topList;
// also used when linkType != None
- QPtrList<KDCanvasLine>* horLineList2;
- QPtrList<KDCanvasLine>* verLineList2;
- QPtrList<KDCanvasLine>* horLineList3;
- QPtrList<KDCanvasPolygon>* topLeftList;
- QPtrList<KDCanvasPolygon>* topRightList;
+ TQPtrList<KDCanvasLine>* horLineList2;
+ TQPtrList<KDCanvasLine>* verLineList2;
+ TQPtrList<KDCanvasLine>* horLineList3;
+ TQPtrList<KDCanvasPolygon>* topLeftList;
+ TQPtrList<KDCanvasPolygon>* topRightList;
KDGanttViewTaskLinkGroup* myGroup;
bool isvisible,ishighlighted;
- QColor myColor, myColorHL;
- QString myToolTipText,myWhatsThisText;
+ TQColor myColor, myColorHL;
+ TQString myToolTipText,myWhatsThisText;
KDTimeTableWidget* myTimeTable;
void initTaskLink();
void showMe( bool );
@@ -122,8 +122,8 @@ private:
int xOffset(KDGanttViewItem *item);
LinkType myLinkType;
- static QString linkTypeToString( LinkType type );
- static LinkType stringToLinkType( const QString type );
+ static TQString linkTypeToString( LinkType type );
+ static LinkType stringToLinkType( const TQString type );
};
#endif
diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp
index c7142f67..5109168d 100644
--- a/kdgantt/KDGanttViewTaskLinkGroup.cpp
+++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp
@@ -36,7 +36,7 @@
#include "KDGanttXMLTools.h"
#include "KDGanttView.h"
-QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
+TQDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
/*! \class KDGanttViewTaskLinkGroup KDGanttViewTaskLinkGroup.h
A group of task links.
@@ -50,7 +50,7 @@ QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
*/
KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup()
{
- generateAndInsertName(QString());
+ generateAndInsertName(TQString());
}
/*!
@@ -74,7 +74,7 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup()
\param name the search name of this task link group
*/
-KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const QString& name )
+KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const TQString& name )
{
generateAndInsertName( name );
}
@@ -121,7 +121,7 @@ bool KDGanttViewTaskLinkGroup::remove (KDGanttViewTaskLink* link)
void KDGanttViewTaskLinkGroup::setVisible( bool show )
{
isvisible = show;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it ) {
it.current()->setVisible(show);
}
@@ -151,7 +151,7 @@ bool KDGanttViewTaskLinkGroup::visible() const
void KDGanttViewTaskLinkGroup::setHighlight( bool highlight )
{
ishighlighted= highlight;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setHighlight(highlight );
@@ -179,10 +179,10 @@ bool KDGanttViewTaskLinkGroup::highlight() const
\param color the color to draw the task links in this group in
\sa color()
*/
-void KDGanttViewTaskLinkGroup::setColor( const QColor& color )
+void KDGanttViewTaskLinkGroup::setColor( const TQColor& color )
{
myColor = color;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setColor(color);
}
@@ -198,7 +198,7 @@ void KDGanttViewTaskLinkGroup::setColor( const QColor& color )
\return the color in which the task links in this group are drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLinkGroup::color() const
+TQColor KDGanttViewTaskLinkGroup::color() const
{
return myColor;
}
@@ -210,11 +210,11 @@ QColor KDGanttViewTaskLinkGroup::color() const
\param color the highlight color to draw the task links in this group in
\sa color()
*/
-void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color )
+void KDGanttViewTaskLinkGroup::setHighlightColor( const TQColor& color )
{
myColorHL = color;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setHighlightColor(color);
}
@@ -230,7 +230,7 @@ void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color )
are drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLinkGroup::highlightColor() const
+TQColor KDGanttViewTaskLinkGroup::highlightColor() const
{
return myColorHL;
}
@@ -268,7 +268,7 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link)
\return the task link group with the specified name; 0 if no group
with that name exists
*/
-KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name )
+KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const TQString& name )
{
if (name.isEmpty()) // avoid error msg from QDict
return 0;
@@ -282,10 +282,10 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name )
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewTaskLinkGroup::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement taskLinkGroupElement = doc.createElement( "TaskLink" );
+ TQDomElement taskLinkGroupElement = doc.createElement( "TaskLink" );
parentElement.appendChild( taskLinkGroupElement );
KDGanttXML::createBoolNode( doc, taskLinkGroupElement, "Highlight",
@@ -306,16 +306,16 @@ void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc,
\param element the DOM element from which to read the specification
\return the newly created task link group
*/
-KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomElement& element )
+KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
bool highlight = false, visible = false;
- QColor color, highlightColor;
- QString name;
+ TQColor color, highlightColor;
+ TQString name;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Highlight" ) {
bool value;
if( KDGanttXML::readBoolNode( element, value ) )
@@ -325,15 +325,15 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl
if( KDGanttXML::readBoolNode( element, value ) )
visible = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else if( tagName == "HighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
highlightColor = value;
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
name = value;
} else {
@@ -362,7 +362,7 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl
Generates a unique name if necessary and inserts it into the group
dictionary.
*/
-void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name )
+void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -370,7 +370,7 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name )
// We had a name, remove it
sGroupDict.remove( _name );
- QString newName;
+ TQString newName;
if ( name.isEmpty() || sGroupDict.find( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
diff --git a/kdgantt/KDGanttViewTaskLinkGroup.h b/kdgantt/KDGanttViewTaskLinkGroup.h
index 2b0f31b3..b401c590 100644
--- a/kdgantt/KDGanttViewTaskLinkGroup.h
+++ b/kdgantt/KDGanttViewTaskLinkGroup.h
@@ -36,8 +36,8 @@
#define KDGANTTVIEWTASKLINKGROUP_H
#include "KDGanttViewTaskLink.h"
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
class KDTimeTableWidget;
class KDGanttView;
@@ -45,7 +45,7 @@ class KDGanttView;
class KDGanttViewTaskLinkGroup : public QObject
{
public:
- KDGanttViewTaskLinkGroup( const QString& name );
+ KDGanttViewTaskLinkGroup( const TQString& name );
KDGanttViewTaskLinkGroup();
~KDGanttViewTaskLinkGroup();
void insert (KDGanttViewTaskLink*) ;
@@ -57,32 +57,32 @@ public:
void setHighlight( bool highlight );
bool highlight() const;
- void setColor( const QColor& color );
- QColor color() const;
- void setHighlightColor( const QColor& color );
- QColor highlightColor() const;
+ void setColor( const TQColor& color );
+ TQColor color() const;
+ void setHighlightColor( const TQColor& color );
+ TQColor highlightColor() const;
- static KDGanttViewTaskLinkGroup* find( const QString& name );
+ static KDGanttViewTaskLinkGroup* find( const TQString& name );
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
- static KDGanttViewTaskLinkGroup* createFromDomElement( QDomElement& );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
+ static KDGanttViewTaskLinkGroup* createFromDomElement( TQDomElement& );
- void generateAndInsertName( const QString& name );
+ void generateAndInsertName( const TQString& name );
private:
friend class KDTimeTableWidget;
friend class KDGanttViewTaskLink;
bool isvisible,ishighlighted;
- QColor myColor, myColorHL;
- QPtrList<KDGanttViewTaskLink> myTaskLinkList;
- QString _name;
+ TQColor myColor, myColorHL;
+ TQPtrList<KDGanttViewTaskLink> myTaskLinkList;
+ TQString _name;
void insertItem(KDGanttViewTaskLink*);
void removeItem (KDGanttViewTaskLink*);
- static QDict<KDGanttViewTaskLinkGroup> sGroupDict;
+ static TQDict<KDGanttViewTaskLinkGroup> sGroupDict;
};
#endif
diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp
index 68c83207..f5f97a36 100644
--- a/kdgantt/KDGanttXMLTools.cpp
+++ b/kdgantt/KDGanttXMLTools.cpp
@@ -33,30 +33,30 @@
**********************************************************************/
#include "KDGanttXMLTools.h"
-#include <qbrush.h>
-#include <qbuffer.h>
-#include <qimage.h>
+#include <tqbrush.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
#include <zlib.h>
namespace KDGanttXML {
-void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value )
+void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, bool value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
+ TQDomText elementContent =
doc.createTextNode( value ? "true" : "false" );
newElement.appendChild( elementContent );
}
-void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value )
+void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQSize& value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
newElement.setAttribute( "Width", value.width() );
@@ -64,62 +64,62 @@ void createSizeNode( QDomDocument& doc, QDomNode& parent,
}
-void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value )
+void createIntNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, int value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
-void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value )
+void createDoubleNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, double value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
-void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text )
+void createStringNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQString& text )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
+ TQDomText elementContent =
doc.createTextNode( text );
newElement.appendChild( elementContent );
}
-void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color )
+void createColorNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQColor& color )
{
- QDomElement colorElement = doc.createElement( elementName );
+ TQDomElement colorElement = doc.createElement( elementName );
parent.appendChild( colorElement );
colorElement.setAttribute( "Red",
- QString::number( color.red() ) );
+ TQString::number( color.red() ) );
colorElement.setAttribute( "Green",
- QString::number( color.green() ) );
+ TQString::number( color.green() ) );
colorElement.setAttribute( "Blue",
- QString::number( color.blue() ) );
+ TQString::number( color.blue() ) );
}
-void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush )
+void createBrushNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQBrush& brush )
{
- QDomElement brushElement = doc.createElement( elementName );
+ TQDomElement brushElement = doc.createElement( elementName );
parent.appendChild( brushElement );
createColorNode( doc, brushElement, "Color", brush.color() );
createStringNode( doc, brushElement, "Style",
@@ -129,27 +129,27 @@ void createBrushNode( QDomDocument& doc, QDomNode& parent,
}
-void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap )
+void createPixmapNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPixmap& pixmap )
{
- QDomElement pixmapElement = doc.createElement( elementName );
+ TQDomElement pixmapElement = doc.createElement( elementName );
parent.appendChild( pixmapElement );
// Convert the pixmap to an image, save that image to an in-memory
// XPM representation and compress this representation. This
// conforms to the file format Qt Designer uses.
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
- QImageIO imgio( &buffer, "XPM" );
- QImage image = pixmap.convertToImage();
+ TQImageIO imgio( &buffer, "XPM" );
+ TQImage image = pixmap.convertToImage();
imgio.setImage( image );
imgio.write();
buffer.close();
ulong len = ba.size() * 2;
- QByteArray bazip( len );
+ TQByteArray bazip( len );
::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
- QString dataString;
+ TQString dataString;
static const char hexchars[] = "0123456789abcdef";
for ( int i = 0; i < (int)len; ++i ) {
uchar c = (uchar) bazip[i];
@@ -163,51 +163,51 @@ void createPixmapNode( QDomDocument& doc, QDomNode& parent,
}
-void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect )
+void createRectNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQRect& rect )
{
- QDomElement rectElement = doc.createElement( elementName );
+ TQDomElement rectElement = doc.createElement( elementName );
parent.appendChild( rectElement );
- QDomElement xElement = doc.createElement( "X" );
+ TQDomElement xElement = doc.createElement( "X" );
rectElement.appendChild( xElement );
- QDomText xContent = doc.createTextNode( QString::number( rect.x() ) );
+ TQDomText xContent = doc.createTextNode( TQString::number( rect.x() ) );
xElement.appendChild( xContent );
- QDomElement yElement = doc.createElement( "Y" );
+ TQDomElement yElement = doc.createElement( "Y" );
rectElement.appendChild( yElement );
- QDomText yContent = doc.createTextNode( QString::number( rect.y() ) );
+ TQDomText yContent = doc.createTextNode( TQString::number( rect.y() ) );
yElement.appendChild( yContent );
- QDomElement widthElement = doc.createElement( "Width" );
+ TQDomElement widthElement = doc.createElement( "Width" );
rectElement.appendChild( widthElement );
- QDomText widthContent = doc.createTextNode( QString::number( rect.width() ) );
+ TQDomText widthContent = doc.createTextNode( TQString::number( rect.width() ) );
widthElement.appendChild( widthContent );
- QDomElement heightElement = doc.createElement( "Height" );
+ TQDomElement heightElement = doc.createElement( "Height" );
rectElement.appendChild( heightElement );
- QDomText heightContent = doc.createTextNode( QString::number( rect.height() ) );
+ TQDomText heightContent = doc.createTextNode( TQString::number( rect.height() ) );
heightElement.appendChild( heightContent );
}
-void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* list )
+void createStringListNodes( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQStringList* list )
{
if( !list )
return;
- for( QStringList::ConstIterator it = list->begin();
+ for( TQStringList::ConstIterator it = list->begin();
it != list->end(); ++it ) {
- QDomElement element = doc.createElement( elementName );
+ TQDomElement element = doc.createElement( elementName );
parent.appendChild( element );
- QDomText elementContent = doc.createTextNode( *it );
+ TQDomText elementContent = doc.createTextNode( *it );
element.appendChild( elementContent );
}
}
-void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font )
+void createFontNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQFont& font )
{
- QDomElement fontElement = doc.createElement( elementName );
+ TQDomElement fontElement = doc.createElement( elementName );
parent.appendChild( fontElement );
createStringNode( doc, fontElement, "Family", font.family() );
createIntNode( doc, fontElement, "PointSize", font.pointSize() );
@@ -221,10 +221,10 @@ void createFontNode( QDomDocument& doc, QDomNode& parent,
}
-void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen )
+void createPenNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPen& pen )
{
- QDomElement penElement = doc.createElement( elementName );
+ TQDomElement penElement = doc.createElement( elementName );
parent.appendChild( penElement );
createIntNode( doc, penElement, "Width", pen.width() );
createColorNode( doc, penElement, "Color", pen.color() );
@@ -232,45 +232,45 @@ void createPenNode( QDomDocument& doc, QDomNode& parent,
}
-void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime )
+void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQDateTime& datetime )
{
- QDomElement dateTimeElement = doc.createElement( elementName );
+ TQDomElement dateTimeElement = doc.createElement( elementName );
parent.appendChild( dateTimeElement );
createDateNode( doc, dateTimeElement, "Date", datetime.date() );
createTimeNode( doc, dateTimeElement, "Time", datetime.time() );
}
-void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date )
+void createDateNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQDate& date )
{
- QDomElement dateElement = doc.createElement( elementName );
+ TQDomElement dateElement = doc.createElement( elementName );
parent.appendChild( dateElement );
- dateElement.setAttribute( "Year", QString::number( date.year() ) );
- dateElement.setAttribute( "Month", QString::number( date.month() ) );
- dateElement.setAttribute( "Day", QString::number( date.day() ) );
+ dateElement.setAttribute( "Year", TQString::number( date.year() ) );
+ dateElement.setAttribute( "Month", TQString::number( date.month() ) );
+ dateElement.setAttribute( "Day", TQString::number( date.day() ) );
}
-void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time )
+void createTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQTime& time )
{
- QDomElement timeElement = doc.createElement( elementName );
+ TQDomElement timeElement = doc.createElement( elementName );
parent.appendChild( timeElement );
timeElement.setAttribute( "Hour",
- QString::number( time.hour() ) );
+ TQString::number( time.hour() ) );
timeElement.setAttribute( "Minute",
- QString::number( time.minute() ) );
+ TQString::number( time.minute() ) );
timeElement.setAttribute( "Second",
- QString::number( time.second() ) );
+ TQString::number( time.second() ) );
timeElement.setAttribute( "Millisecond",
- QString::number( time.msec() ) );
+ TQString::number( time.msec() ) );
}
-QString penStyleToString( Qt::PenStyle style )
+TQString penStyleToString( Qt::PenStyle style )
{
switch( style ) {
case Qt::NoPen:
@@ -292,7 +292,7 @@ QString penStyleToString( Qt::PenStyle style )
-QString brushStyleToString( Qt::BrushStyle style )
+TQString brushStyleToString( Qt::BrushStyle style )
{
// PENDING(kalle) Support custom patterns
switch( style ) {
@@ -332,14 +332,14 @@ QString brushStyleToString( Qt::BrushStyle style )
}
-bool readStringNode( const QDomElement& element, QString& value )
+bool readStringNode( const TQDomElement& element, TQString& value )
{
value = element.text();
return true;
}
-bool readIntNode( const QDomElement& element, int& value )
+bool readIntNode( const TQDomElement& element, int& value )
{
bool ok = false;
int temp = element.text().toInt( &ok );
@@ -349,7 +349,7 @@ bool readIntNode( const QDomElement& element, int& value )
}
-bool readDoubleNode( const QDomElement& element, double& value )
+bool readDoubleNode( const TQDomElement& element, double& value )
{
bool ok = false;
double temp = element.text().toDouble( &ok );
@@ -359,7 +359,7 @@ bool readDoubleNode( const QDomElement& element, double& value )
}
-bool readBoolNode( const QDomElement& element, bool& value )
+bool readBoolNode( const TQDomElement& element, bool& value )
{
if( element.text() == "true" ) {
value = true;
@@ -372,7 +372,7 @@ bool readBoolNode( const QDomElement& element, bool& value )
}
-bool readColorNode( const QDomElement& element, QColor& value )
+bool readColorNode( const TQDomElement& element, TQColor& value )
{
bool ok = true;
int red, green, blue;
@@ -399,21 +399,21 @@ bool readColorNode( const QDomElement& element, QColor& value )
}
-bool readBrushNode( const QDomElement& element, QBrush& brush )
+bool readBrushNode( const TQDomElement& element, TQBrush& brush )
{
bool ok = true;
- QColor tempColor;
+ TQColor tempColor;
Qt::BrushStyle tempStyle;
- QPixmap tempPixmap;
- QDomNode node = element.firstChild();
+ TQPixmap tempPixmap;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToBrushStyle( value );
} else if( tagName == "Pixmap" ) {
@@ -436,18 +436,18 @@ bool readBrushNode( const QDomElement& element, QBrush& brush )
}
-bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
+bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap )
{
bool ok = true;
int tempLengthi;
- QString tempData;
- QDomNode node = element.firstChild();
+ TQString tempData;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Format" ) {
- QString formatName;
+ TQString formatName;
ok = ok & readStringNode( element, formatName );
#ifndef NDEBUG
if( formatName != "XPM.GZ" )
@@ -487,10 +487,10 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
if( tempLengthi < (int)tempData.length() * 5 )
tempLengthi = tempData.length() * 5;
unsigned long tempLength = tempLengthi;
- QByteArray baunzip( tempLength );
+ TQByteArray baunzip( tempLength );
::uncompress( (uchar*) baunzip.data(), &tempLength,
(uchar*) ba, tempData.length()/2 );
- QImage image;
+ TQImage image;
image.loadFromData( (const uchar*)baunzip.data(), tempLength, "XPM" );
if( image.isNull() )
@@ -505,23 +505,23 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
}
-bool readPenNode( const QDomElement& element, QPen& pen )
+bool readPenNode( const TQDomElement& element, TQPen& pen )
{
bool ok = true;
int tempWidth;
- QColor tempColor;
+ TQColor tempColor;
Qt::PenStyle tempStyle;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, tempWidth );
} else if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToPenStyle( value );
} else {
@@ -540,18 +540,18 @@ bool readPenNode( const QDomElement& element, QPen& pen )
return ok;
}
-bool readFontNode( const QDomElement& element, QFont& font )
+bool readFontNode( const TQDomElement& element, TQFont& font )
{
bool ok = true;
- QString family;
+ TQString family;
int pointSize, pixelSize, weight;
bool italic;
int charSet;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Family" ) {
ok = ok & readStringNode( element, family );
} else if( tagName == "PointSize" ) {
@@ -579,22 +579,22 @@ bool readFontNode( const QDomElement& element, QFont& font )
font.setItalic( italic );
#if QT_VERSION < 300
// Qt 3 handles charsets internally.
- font.setCharSet( (QFont::CharSet)charSet );
+ font.setCharSet( (TQFont::CharSet)charSet );
#endif
}
return ok;
}
-bool readRectNode( const QDomElement& element, QRect& value )
+bool readRectNode( const TQDomElement& element, TQRect& value )
{
bool ok = true;
int width, height, x, y;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, width );
} else if( tagName == "Height" ) {
@@ -622,16 +622,16 @@ bool readRectNode( const QDomElement& element, QRect& value )
-bool readDateTimeNode( const QDomElement& element, QDateTime& datetime )
+bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime )
{
bool ok = true;
- QDate tempDate;
- QTime tempTime;
- QDomNode node = element.firstChild();
+ TQDate tempDate;
+ TQTime tempTime;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Date" ) {
ok = ok & readDateNode( element, tempDate );
} else if( tagName == "Time" ) {
@@ -652,7 +652,7 @@ bool readDateTimeNode( const QDomElement& element, QDateTime& datetime )
}
-bool readDateNode( const QDomElement& element, QDate& value )
+bool readDateNode( const TQDomElement& element, TQDate& value )
{
bool ok = true;
int year, month, day;
@@ -680,7 +680,7 @@ bool readDateNode( const QDomElement& element, QDate& value )
-bool readTimeNode( const QDomElement& element, QTime& value )
+bool readTimeNode( const TQDomElement& element, TQTime& value )
{
bool ok = true;
int hour, minute, second, msec;
@@ -713,7 +713,7 @@ bool readTimeNode( const QDomElement& element, QTime& value )
-Qt::PenStyle stringToPenStyle( const QString& style )
+Qt::PenStyle stringToPenStyle( const TQString& style )
{
if( style == "NoPen" )
return Qt::NoPen;
@@ -732,7 +732,7 @@ Qt::PenStyle stringToPenStyle( const QString& style )
}
-Qt::BrushStyle stringToBrushStyle( const QString& style )
+Qt::BrushStyle stringToBrushStyle( const TQString& style )
{
// PENDING(kalle) Support custom patterns
if( style == "NoBrush" )
diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h
index 67865b96..784bc2e1 100644
--- a/kdgantt/KDGanttXMLTools.h
+++ b/kdgantt/KDGanttXMLTools.h
@@ -35,67 +35,67 @@
#ifndef __KDGANTTXMLTOOLS_H__
#define __KDGANTTXMLTOOLS_H__
-#include <qpen.h>
-#include <qdom.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqpen.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
namespace KDGanttXML {
- QString penStyleToString( Qt::PenStyle style );
- Qt::PenStyle stringToPenStyle( const QString& style );
- QString brushStyleToString( Qt::BrushStyle style );
- Qt::BrushStyle stringToBrushStyle( const QString& style );
+ TQString penStyleToString( Qt::PenStyle style );
+ Qt::PenStyle stringToPenStyle( const TQString& style );
+ TQString brushStyleToString( Qt::BrushStyle style );
+ Qt::BrushStyle stringToBrushStyle( const TQString& style );
- void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value );
- void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value );
- void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value );
- void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value );
- void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text );
- void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color );
- void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush );
- void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap );
- void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect );
- void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* list );
- void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font );
+ void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, bool value );
+ void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQSize& value );
+ void createIntNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, int value );
+ void createDoubleNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, double value );
+ void createStringNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQString& text );
+ void createColorNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQColor& color );
+ void createBrushNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQBrush& brush );
+ void createPixmapNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPixmap& pixmap );
+ void createRectNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQRect& rect );
+ void createStringListNodes( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQStringList* list );
+ void createFontNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQFont& font );
- void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen );
- void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime );
- void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date );
- void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time );
- bool readIntNode( const QDomElement& element, int& value );
- bool readStringNode( const QDomElement& element, QString& value );
- bool readDoubleNode( const QDomElement& element, double& value );
- bool readBoolNode( const QDomElement& element, bool& value );
- bool readColorNode( const QDomElement& element, QColor& value );
- bool readBrushNode( const QDomElement& element, QBrush& brush );
- bool readPixmapNode( const QDomElement& element, QPixmap& pixmap );
- bool readRectNode( const QDomElement& element, QRect& value );
- bool readFontNode( const QDomElement& element, QFont& font );
- bool readPenNode( const QDomElement& element, QPen& pen );
- bool readDateTimeNode( const QDomElement& element, QDateTime& datetime );
- bool readDateNode( const QDomElement& element, QDate& date );
- bool readTimeNode( const QDomElement& element, QTime& time );
+ void createPenNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPen& pen );
+ void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQDateTime& datetime );
+ void createDateNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQDate& date );
+ void createTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQTime& time );
+ bool readIntNode( const TQDomElement& element, int& value );
+ bool readStringNode( const TQDomElement& element, TQString& value );
+ bool readDoubleNode( const TQDomElement& element, double& value );
+ bool readBoolNode( const TQDomElement& element, bool& value );
+ bool readColorNode( const TQDomElement& element, TQColor& value );
+ bool readBrushNode( const TQDomElement& element, TQBrush& brush );
+ bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap );
+ bool readRectNode( const TQDomElement& element, TQRect& value );
+ bool readFontNode( const TQDomElement& element, TQFont& font );
+ bool readPenNode( const TQDomElement& element, TQPen& pen );
+ bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime );
+ bool readDateNode( const TQDomElement& element, TQDate& date );
+ bool readTimeNode( const TQDomElement& element, TQTime& time );
}
#endif
diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h
index 9ce60bdb..2ca8b671 100644
--- a/kdgantt/itemAttributeDialog.ui.h
+++ b/kdgantt/itemAttributeDialog.ui.h
@@ -36,7 +36,7 @@
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qcolordialog.h>
+#include <tqcolordialog.h>
void itemAttributeDialog::init( )
{
@@ -49,10 +49,10 @@ void itemAttributeDialog::init( )
void itemAttributeDialog::ChangeText_clicked()
{
if ( !myItem) return;
- QColor c = QColorDialog::getColor( myItem->textColor(), this );
+ TQColor c = QColorDialog::getColor( myItem->textColor(), this );
if ( c.isValid() )
myItem->setTextColor( c );
- QPixmap * pix = (QPixmap *)ChangeText->pixmap();
+ TQPixmap * pix = (TQPixmap *)ChangeText->pixmap();
pix->fill( myItem->textColor() );
ChangeText->repaint();
}
@@ -63,9 +63,9 @@ void itemAttributeDialog::ChangeStart_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( st, this );
+ TQColor c = QColorDialog::getColor( st, this );
if ( c.isValid() ) {
st = c;
ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
@@ -80,9 +80,9 @@ void itemAttributeDialog::ChangeMiddle_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( mi, this );
+ TQColor c = QColorDialog::getColor( mi, this );
if ( c.isValid() ) {
mi = c;
ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -96,9 +96,9 @@ void itemAttributeDialog::ChangeEnd_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( en, this );
+ TQColor c = QColorDialog::getColor( en, this );
if ( c.isValid() ) {
en = c;
ChangeEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
@@ -237,15 +237,15 @@ void itemAttributeDialog::reset( KDGanttViewItem * item )
TimeEdit1->setTime( item->startTime().time() );
if ( item->pixmap() != 0 )
setIcon( *(item->pixmap()) );
- setCaption( "Properties of " + ((QListViewItem*)item)->text(0) );
- itemName->setText(((QListViewItem*)item)->text(0) );
+ setCaption( "Properties of " + ((TQListViewItem*)item)->text(0) );
+ itemName->setText(((TQListViewItem*)item)->text(0) );
// DateEdit1->setRange(item->startTime().date().addYears(-10), item->endTime().date() );
// DateEdit3->setRange(item->startTime().date(), item->endTime().date().addYears(10));
LineEdit1->setText( item->text() );
KDGanttViewItem::Shape start, middle, end;
item->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
item->colors( st, mi, en );
ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -254,9 +254,9 @@ void itemAttributeDialog::reset( KDGanttViewItem * item )
HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
- ChangeText->setPixmap(QPixmap( 16,16 ));
- QPixmap * pix;
- pix = (QPixmap *)ChangeText->pixmap();
+ ChangeText->setPixmap(TQPixmap( 16,16 ));
+ TQPixmap * pix;
+ pix = (TQPixmap *)ChangeText->pixmap();
pix->fill( item->textColor() );
StartBox->setCurrentItem((int)start );
MiddleBox->setCurrentItem((int)middle );
@@ -273,9 +273,9 @@ void itemAttributeDialog::HighStart_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( st, this );
+ TQColor c = QColorDialog::getColor( st, this );
if ( c.isValid() ) {
st = c;
HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
@@ -290,9 +290,9 @@ void itemAttributeDialog::HighMiddle_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( mi, this );
+ TQColor c = QColorDialog::getColor( mi, this );
if ( c.isValid() ) {
mi = c;
HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -307,9 +307,9 @@ void itemAttributeDialog::HighEnd_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( en, this );
+ TQColor c = QColorDialog::getColor( en, this );
if ( c.isValid() ) {
en = c;
HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
@@ -319,10 +319,10 @@ void itemAttributeDialog::HighEnd_clicked()
}
-void itemAttributeDialog::DateEdit1_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit1_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit1->date() );
dt.setTime( TimeEdit1->time() );
if ( dt.isValid() )
@@ -333,10 +333,10 @@ void itemAttributeDialog::DateEdit1_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit1_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit1->date() );
dt.setTime( TimeEdit1->time() );
if ( dt.isValid() ) {
@@ -347,10 +347,10 @@ void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit2_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit2_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit2->date() );
dt.setTime( TimeEdit2->time() );
if ( dt.isValid() ) {
@@ -360,10 +360,10 @@ void itemAttributeDialog::DateEdit2_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit2_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit2->date() );
dt.setTime( TimeEdit2->time() );
if ( dt.isValid() ) {
@@ -373,10 +373,10 @@ void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit3_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit3_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit3->date() );
dt.setTime( TimeEdit3->time() );
if ( dt.isValid() ) {
@@ -386,10 +386,10 @@ void itemAttributeDialog::DateEdit3_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit3_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit3->date() );
dt.setTime( TimeEdit3->time() );
if ( dt.isValid() ) {
@@ -399,14 +399,14 @@ void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & )
}
-void itemAttributeDialog::LineEdit1_textChanged( const QString & )
+void itemAttributeDialog::LineEdit1_textChanged( const TQString & )
{
if ( !myItem) return;
myItem->setText(LineEdit1->text());
}
-void itemAttributeDialog::StartBox_activated( const QString & s )
+void itemAttributeDialog::StartBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -416,7 +416,7 @@ void itemAttributeDialog::StartBox_activated( const QString & s )
}
-void itemAttributeDialog::MiddleBox_activated( const QString & s )
+void itemAttributeDialog::MiddleBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -427,7 +427,7 @@ void itemAttributeDialog::MiddleBox_activated( const QString & s )
}
-void itemAttributeDialog::EndBox_activated( const QString & s )
+void itemAttributeDialog::EndBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -438,10 +438,10 @@ void itemAttributeDialog::EndBox_activated( const QString & s )
}
-void itemAttributeDialog::DateEdit4_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit4_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit4->date() );
dt.setTime( TimeEdit4->time() );
if ( dt.isValid() ) {
@@ -451,10 +451,10 @@ void itemAttributeDialog::DateEdit4_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit4_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit4->date() );
dt.setTime( TimeEdit4->time() );
if ( dt.isValid() ) {
@@ -464,10 +464,10 @@ void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit5_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit5_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit5->date() );
dt.setTime( TimeEdit5->time() );
if ( dt.isValid() ) {
@@ -477,10 +477,10 @@ void itemAttributeDialog::DateEdit5_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit5_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit5->date() );
dt.setTime( TimeEdit5->time() );
if ( dt.isValid() ) {
@@ -491,10 +491,10 @@ void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & )
-void itemAttributeDialog::itemName_textChanged( const QString & )
+void itemAttributeDialog::itemName_textChanged( const TQString & )
{
if ( !myItem) return;
- ((QListViewItem*)myItem)->setText( 0, itemName->text() );
+ ((TQListViewItem*)myItem)->setText( 0, itemName->text() );
setCaption( "Properties of " + itemName->text() );
}
diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h
index 2d6a5568..fed046ae 100644
--- a/kdgantt/qlayoutengine_p.h
+++ b/kdgantt/qlayoutengine_p.h
@@ -56,7 +56,7 @@
#ifndef QT_H
-#include "qabstractlayout.h"
+#include "tqabstractlayout.h"
#endif // QT_H
#ifndef QT_NO_LAYOUT
@@ -81,7 +81,7 @@ struct QLayoutStruct
};
-void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void qGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );