summaryrefslogtreecommitdiffstats
path: root/kdgantt
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
commit1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch)
treef2defe163a805a9e34a2142dfde4cdb5e49241e7 /kdgantt
parent67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff)
downloadtdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz
tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp84
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h10
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp18
-rw-r--r--kdgantt/KDGanttView.cpp6
-rw-r--r--kdgantt/KDGanttViewItem.cpp12
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp82
-rw-r--r--kdgantt/KDGanttViewTaskLink.cpp6
-rw-r--r--kdgantt/KDGanttXMLTools.cpp102
-rw-r--r--kdgantt/KDGanttXMLTools.h10
9 files changed, 165 insertions, 165 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index da6744c89..35c3eb0fb 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -3,7 +3,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -73,7 +73,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
{
orient = o;
#ifndef TQT_NO_CURSOR
- if ( o == KDGanttMinimizeSplitter::Horizontal )
+ if ( o == Qt::Horizontal )
setCursor( splitHCursor );
else
setCursor( splitVCursor );
@@ -84,7 +84,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e )
{
updateCursor( e->pos() );
- if ( !(e->state()&LeftButton) )
+ if ( !(e->state()&Qt::LeftButton) )
return;
if ( _activeButton != 0)
@@ -104,7 +104,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e )
void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
if ( _activeButton != 0)
@@ -119,7 +119,7 @@ void KDGanttSplitterHandle::updateCursor( const TQPoint& p)
setCursor( arrowCursor );
}
else {
- if ( orient == KDGanttMinimizeSplitter::Horizontal )
+ if ( orient == Qt::Horizontal )
setCursor( splitHCursor );
else
setCursor( splitVCursor );
@@ -158,7 +158,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e )
updateCursor( e->pos() );
}
else {
- if ( !opaque() && e->button() == LeftButton ) {
+ if ( !opaque() && e->button() == Qt::LeftButton ) {
TQCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos()))
- mouseOffset;
s->setRubberband( -1 );
@@ -241,7 +241,7 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
p.setBrush( tqcolorGroup().background() );
p.setPen( tqcolorGroup().foreground() );
p.drawRect( rect() );
- tqparentWidget()->style().drawPrimitive( TQStyle::PE_Panel, &p, rect(),
+ tqparentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, rect(),
tqparentWidget()->tqcolorGroup());
int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size
@@ -256,13 +256,13 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
for ( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( index == _activeButton ) {
p.save();
- p.translate( tqparentWidget()->style().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- tqparentWidget()->style().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
- p.drawPolygon( *it, true );
+ p.translate( tqparentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ tqparentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p.tqdrawPolygon( *it, true );
p.restore();
}
else {
- p.drawPolygon( *it, true );
+ p.tqdrawPolygon( *it, true );
}
index++;
}
@@ -302,7 +302,7 @@ public:
bool firstShow;
};
-void kdganttGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );
#endif // DOXYGEN_SKIP_INTERNAL
@@ -384,7 +384,7 @@ static TQSize minSizeHint( const TQWidget* w )
KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *tqparent, const char *name )
:TQFrame(tqparent,name,WPaintUnclipped)
{
- orient = Horizontal;
+ orient = Qt::Horizontal;
init();
}
@@ -412,7 +412,7 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
void KDGanttMinimizeSplitter::init()
{
data = new TQSplitterData;
- if ( orient == Horizontal )
+ if ( orient == Qt::Horizontal )
tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
else
tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
@@ -424,7 +424,7 @@ void KDGanttMinimizeSplitter::init()
\brief the orientation of the splitter
By default the orientation is horizontal (the widgets are side by side).
- The possible orientations are TQt:Vertical and TQt::Horizontal (the default).
+ The possible orientations are TQt:Vertical and Qt::Horizontal (the default).
*/
void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
{
@@ -432,7 +432,7 @@ void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
return;
orient = o;
- if ( orient == Horizontal )
+ if ( orient == Qt::Horizontal )
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
else
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
@@ -561,8 +561,8 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
paint.setRasterOp( XorROP );
TQRect r = contentsRect();
const int rBord = 3; //Themable????
- int sw = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
- if ( orient == Horizontal ) {
+ int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ if ( orient == Qt::Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
2*rBord, r.height() );
@@ -601,8 +601,8 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e )
void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h )
{
- style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(),
- (orientation() == TQt::Horizontal ?
+ tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(),
+ (orientation() == Qt::Horizontal ?
TQStyle::Style_Horizontal : 0));
}
@@ -644,9 +644,9 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id )
p = adjustPos( p, id );
TQSplitterLayoutStruct *s = data->list.at(id);
- int oldP = orient == Horizontal ? s->wid->x() : s->wid->y();
+ int oldP = orient == Qt::Horizontal ? s->wid->x() : s->wid->y();
bool upLeft;
- if ( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
p += s->wid->width();
upLeft = p > oldP;
} else
@@ -661,8 +661,8 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id )
void KDGanttMinimizeSplitter::setG( TQWidget *w, int p, int s, bool isSplitter )
{
- if ( orient == Horizontal ) {
- if ( TQApplication::reverseLayout() && orient == Horizontal && !isSplitter )
+ if ( orient == Qt::Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Qt::Horizontal && !isSplitter )
p = contentsRect().width() - p - s;
w->setGeometry( p, contentsRect().y(), s, contentsRect().height() );
} else
@@ -688,7 +688,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
} else if ( s->isSplitter ) {
int pos1, pos2;
int dd = s->sizer;
- if( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
pos1 = pos;
pos2 = pos + dd;
} else {
@@ -704,7 +704,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
}
} else {
int dd, newLeft, nextPos;
- if( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
dd = w->tqgeometry().right() - pos;
dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
newLeft = pos+1;
@@ -741,7 +741,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else if ( s->isSplitter ) {
int dd = s->sizer;
int pos1, pos2;
- if( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
pos2 = pos - dd;
pos1 = pos2 + 1;
} else {
@@ -758,7 +758,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else {
int left = pick( w->pos() );
int right, dd,/* newRight,*/ newLeft, nextPos;
- if ( TQApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
dd = pos - left + 1;
dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
newLeft = pos-dd+1;
@@ -836,8 +836,8 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
}
}
TQRect r = contentsRect();
- if ( orient == Horizontal && TQApplication::reverseLayout() ) {
- int splitterWidth = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ if ( orient == Qt::Horizontal && TQApplication::reverseLayout() ) {
+ int splitterWidth = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
if ( min )
*min = pick(r.topRight()) - TQMIN( maxB, pick(r.size())-minA ) - splitterWidth;
if ( max )
@@ -873,7 +873,7 @@ void KDGanttMinimizeSplitter::doResize()
TQRect r = contentsRect();
int i;
int n = data->list.count();
- TQMemArray<QLayoutStruct> a( n );
+ TQMemArray<TQLayoutStruct> a( n );
for ( i = 0; i< n; i++ ) {
a[i].init();
TQSplitterLayoutStruct *s = data->list.at(i);
@@ -975,7 +975,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
if ( maxt < mint )
maxt = mint;
- if ( orient == Horizontal ) {
+ if ( orient == Qt::Horizontal ) {
setMaximumSize( maxl, maxt );
setMinimumSize( minl, mint );
} else {
@@ -1110,9 +1110,9 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const
constPolish();
int l = 0;
int t = 0;
- if ( tqchildren() ) {
- const TQObjectList * c = tqchildren();
- TQObjectListIt it( *c );
+ if ( !childrenListObject().isEmpty() ) {
+ const TQObjectList c = childrenListObject();
+ TQObjectListIt it( c );
TQObject * o;
while( (o=it.current()) != 0 ) {
@@ -1127,7 +1127,7 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const
}
}
}
- return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
+ return orientation() == Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1140,9 +1140,9 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
constPolish();
int l = 0;
int t = 0;
- if ( tqchildren() ) {
- const TQObjectList * c = tqchildren();
- TQObjectListIt it( *c );
+ if ( !childrenListObject().isEmpty() ) {
+ const TQObjectList c = childrenListObject();
+ TQObjectListIt it( c );
TQObject * o;
while( (o=it.current()) != 0 ) {
@@ -1157,7 +1157,7 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
}
}
}
- return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
+ return orientation() == Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1309,7 +1309,7 @@ void KDGanttMinimizeSplitter::processChildEvents()
void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
- int sw = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
TQSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
@@ -1348,7 +1348,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( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &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 86b5340d1..9137da064 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -3,7 +3,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2001-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -106,14 +106,14 @@ private:
void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
TQCOORD pick( const TQPoint &p ) const
- { return orient == Horizontal ? p.x() : p.y(); }
+ { return orient == Qt::Horizontal ? p.x() : p.y(); }
TQCOORD pick( const TQSize &s ) const
- { return orient == Horizontal ? s.width() : s.height(); }
+ { return orient == Qt::Horizontal ? s.width() : s.height(); }
TQCOORD trans( const TQPoint &p ) const
- { return orient == Vertical ? p.x() : p.y(); }
+ { return orient == Qt::Vertical ? p.x() : p.y(); }
TQCOORD trans( const TQSize &s ) const
- { return orient == Vertical ? s.width() : s.height(); }
+ { return orient == Qt::Vertical ? s.width() : s.height(); }
TQSplitterData *data;
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index e6258e907..08c1a004c 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -3,7 +3,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -65,7 +65,7 @@
KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* tqparent,
const char* name ) :
- KDGanttSizingControl( tqparent, name ), _orient( Horizontal ),
+ KDGanttSizingControl( tqparent, name ), _orient( Qt::Horizontal ),
_arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
{
init();
@@ -262,12 +262,12 @@ void KDGanttSemiSizingControl::setup()
delete _tqlayout;
TQBoxLayout* butLayout; // _tqlayout will delete me
- if ( _orient == Horizontal || isMinimized() )
+ if ( _orient == Qt::Horizontal || isMinimized() )
_tqlayout = new TQHBoxLayout( this );
else
_tqlayout = new TQVBoxLayout( this );
- if ( _orient == Vertical && !isMinimized() )
+ if ( _orient == Qt::Vertical && !isMinimized() )
butLayout = new TQHBoxLayout( _tqlayout );
else
butLayout = new TQVBoxLayout( _tqlayout );
@@ -288,7 +288,7 @@ void KDGanttSemiSizingControl::setup()
}
//------------------------------ Setup the button at the correct possition
- if ( _arrowPos == After && _orient == Vertical && !isMinimized() ) {
+ if ( _arrowPos == After && _orient == Qt::Vertical && !isMinimized() ) {
butLayout->addStretch( 1 );
butLayout->addWidget( _but, 0, TQt::AlignLeft );
}
@@ -305,7 +305,7 @@ void KDGanttSemiSizingControl::setup()
else
widget = _maximizedWidget;
if( widget ) {
- if ( _arrowPos == Before || _orient == Vertical && !isMinimized() )
+ if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
_tqlayout->addWidget( widget, 1 );
else
_tqlayout->insertWidget( 0, widget, 1 );
@@ -318,20 +318,20 @@ void KDGanttSemiSizingControl::setup()
if ( isMinimized() ) {
widget = _minimizedWidget;
if( widget ) {
- if ( _arrowPos == Before || _orient == Vertical && !isMinimized() )
+ if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
_tqlayout->addWidget( widget, 1 );
else
_tqlayout->insertWidget( 0, widget, 1 );
}
}
else {
- if ( _arrowPos == Before || _orient == Vertical && !isMinimized() )
+ if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
_tqlayout->addStretch( 1 );
else
_tqlayout->insertStretch( 0, 1 );
widget = _maximizedWidget;
// the following is only the special case
- // arrowPos == Before and _orient == Vertical
+ // arrowPos == Before and _orient == Qt::Vertical
//widget->move( 0+x(), _but->height()+y());
}
}
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index f7eeeacd7..1c2667b37 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -81,7 +81,7 @@
*/
KDGanttView::KDGanttView( TQWidget* tqparent, const char* name )
- : KDGanttMinimizeSplitter( TQt::Vertical, tqparent, name ),
+ : KDGanttMinimizeSplitter( Qt::Vertical, tqparent, name ),
myCanvasView(0),
myTimeHeaderScroll(0),
mFixedHorizon( false )
@@ -458,11 +458,11 @@ void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item,
//emit mouseButtonClicked ( button , gItem, pos, c );
{
switch ( button ) {
- case LeftButton:
+ case Qt::LeftButton:
emit lvItemLeftClicked( gItem );
emit itemLeftClicked( gItem );
break;
- case MidButton:
+ case Qt::MidButton:
emit lvItemMidClicked( gItem );
emit itemMidClicked( gItem );
break;
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index eff5c26e8..9c9c1e98b 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -916,10 +916,10 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
// items which don't have any tqshapes
return;
}
- item->setBrush(TQt::SolidPattern);
+ item->setBrush(Qt::SolidPattern);
item->setZ(5);
itemShape = (KDCanvasPolygonItem*) item;
- itemBack->setBrush(TQt::SolidPattern);
+ itemBack->setBrush(Qt::SolidPattern);
itemBack->setZ(3);
itemShapeBack = (KDCanvasPolygonItem*) itemBack;
@@ -1306,11 +1306,11 @@ void KDGanttViewItem::updateCanvasItems()
if (blockUpdating) return;
TQPen p,pBack;
TQBrush b;
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
if ( enabled() ) {
textCanvas->setColor(myTextColor);
if (isHighlighted) {
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
b.setColor(myStartColorHL);
startShape->setBrush(b);
b.setColor(myMiddleColorHL);
@@ -1323,7 +1323,7 @@ void KDGanttViewItem::updateCanvasItems()
p.setColor(myEndColorHL);
endLine->setPen(p);
} else {
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
b.setColor(myStartColor);
// qDebug("update color %s %s", listViewText().latin1(),myStartColor.name().latin1() );
startShape->setBrush(b);
@@ -1341,7 +1341,7 @@ void KDGanttViewItem::updateCanvasItems()
//TQColor discol = TQt::lightGray;
TQColor discol = TQColor(232,232,232);
textCanvas->setColor( TQColor(150,150,150) );
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
b.setColor(discol);
startShape->setBrush(b);
midShape->setBrush(b);
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index 197ba18ba..88591e887 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -59,13 +59,13 @@
#include <kdebug.h>
KDTimeTableWidget:: KDTimeTableWidget( TQWidget* tqparent,KDGanttView* myGantt)
- : TQCanvas (tqparent)
+ : TQCanvas (TQT_TQOBJECT(tqparent))
{
myGanttView = myGantt;
taskLinksVisible = true;
flag_blockUpdating = false;
int_blockUpdating = 0;
- gridPen.setStyle(TQt::DotLine);
+ gridPen.setStyle(Qt::DotLine);
gridPen.setColor(TQColor(100,100,100));
maximumComputedGridHeight = 0;
denseLineCount = 0;
@@ -229,8 +229,8 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
- itcol.current()->setPen( TQPen::NoPen );
- itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen(TQPen::NoPen) );
+ itcol.current()->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- temprect->setBrush( TQBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen(TQPen::NoPen) );
+ temprect->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen(TQPen::NoPen) );
+ itcol.current()->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- temprect->setBrush( TQBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen(TQPen::NoPen) );
+ temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) );
temprect->setSize(cw ,h );
temprect->move( i, 0 );
temprect->setZ(-20);
@@ -331,16 +331,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+mid,0,mid,h);
*/
- itcol.current()->setPen( TQPen::NoPen );
- itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen(TQPen::NoPen) );
+ itcol.current()->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- temprect->setBrush( TQBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen(TQPen::NoPen) );
+ temprect->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen(TQPen::NoPen) );
+ itcol.current()->setBrush( TQBrush( colcol, Qt::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( TQPen::NoPen );
- temprect->setBrush( TQBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen(TQPen::NoPen) );
+ temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) );
temprect->setSize(mid ,h );
temprect->move( left, 0 );
temprect->setZ(-20);
@@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
if (flagZoomToFit)
myPopupMenu->changeItem( 1, i18n("Zoom (Fit)"));
else
- myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( TQString::number( zoomFactor(), 'f',3) ) );
+ myPopupMenu->changeItem( 1, i18n("Zoom (%1)").tqarg( TQString::number( zoomFactor(), 'f',3) ) );
int i = 0;
int id;
while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) {
@@ -2447,16 +2447,16 @@ void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e )
{
mouseDown = false;
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
mouseDown = true;
beginMouseDown = e->pos().x();
endMouseDown = e->pos().x();
break;
- case RightButton:
+ case Qt::RightButton:
if (flagShowPopupMenu)
myPopupMenu->popup(e->globalPos());
break;
- case MidButton:
+ case Qt::MidButton:
break;
default:
break;
@@ -2539,7 +2539,7 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
***************************************************************** */
KDLegendWidget:: KDLegendWidget( TQWidget* tqparent,
KDGanttMinimizeSplitter* legendParent ) :
- KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical,
+ KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Qt::Vertical,
tqparent)
{
myLegendParent = legendParent;
@@ -2645,9 +2645,9 @@ void KDLegendWidget::clearLegend ( )
{
if ( myLegend ) delete myLegend;
if ( dock )
- myLegend = new TQGroupBox( 1, TQt::Horizontal, scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() );
else
- myLegend = new TQGroupBox( 1, TQt::Horizontal, i18n( "Legend" ), scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() );
myLegend->setBackgroundColor( TQt::white );
myLegend->setFont( font() );
scroll->addChild( myLegend );
@@ -2884,7 +2884,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
c = fc;
// draw to last interesting column
- const TQColorGroup &cg = ( palette().inactive() );
+ const TQColorGroup &cg = ( tqpalette().inactive() );
while ( c < lc && !drawables.isEmpty() ) {
int i = header()->mapToLogical( c );
@@ -3516,7 +3516,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
currentItem = 0;
movingItem = 0;
mouseDown = true;
- if (e->button() == RightButton && mySignalSender->editable()) {
+ if (e->button() == Qt::RightButton && mySignalSender->editable()) {
lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y()));
if ( lastClickedItem ) {
if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) {
@@ -3537,7 +3537,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
currentItem = getItem(*it);
@@ -3590,7 +3590,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break;
}
break;
- case RightButton:
+ case Qt::RightButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
currentItem = getItem(*it);
@@ -3602,7 +3602,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break;
}
break;
- case MidButton:
+ case Qt::MidButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
currentItem = getItem(*it);
@@ -3618,10 +3618,10 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break;
}
}
- if (e->button() == RightButton ) {
+ if (e->button() == Qt::RightButton ) {
mySignalSender->gvContextMenuRequested( currentItem, e->globalPos() );
}
- if (autoScrollEnabled && e->button() == LeftButton) {
+ if (autoScrollEnabled && e->button() == Qt::LeftButton) {
myScrollTimer->start(50);
}
}
@@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
// if ( currentLink || currentItem )
{
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
myScrollTimer->stop();
{
mySignalSender->itemLeftClicked( currentItem );
@@ -3675,7 +3675,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
movingGVItem = 0;
}
break;
- case RightButton:
+ case Qt::RightButton:
{
mySignalSender->itemRightClicked( currentItem );
mySignalSender->gvItemRightClicked( currentItem );
@@ -3684,7 +3684,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
if ( currentLink )
mySignalSender->taskLinkRightClicked( currentLink );
break;
- case MidButton:
+ case Qt::MidButton:
{
mySignalSender->itemMidClicked( currentItem );
mySignalSender->gvItemMidClicked( currentItem );
@@ -3713,7 +3713,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
TQCanvasItemList il = canvas() ->collisions ( e->pos() );
- if ( il.isEmpty() && e->button() == LeftButton ) {
+ if ( il.isEmpty() && e->button() == Qt::LeftButton ) {
//not directly sending a signal here (encapsulation and whatnot)
mySignalSender->emptySpaceDoubleClicked(e);
return;
@@ -3722,7 +3722,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
if ( getItem(*it)->enabled() )
@@ -3739,7 +3739,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
}
break;
/*
- case RightButton:
+ case Qt::RightButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
mySignalSender->itemRightClicked(getItem(*it));
@@ -3751,7 +3751,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
break;
}
break;
- case MidButton:
+ case Qt::MidButton:
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
mySignalSender->itemMidClicked(getItem(*it));
@@ -4024,8 +4024,8 @@ void KDIntervalColorRectangle::tqlayout( KDTimeHeaderWidget* timeHeader, int hei
int right = timeHeader->getCoordX(mEnd);
if ( right == left )
++right;
- setPen( TQPen::NoPen );
- setBrush( TQBrush(mColor, SolidPattern) );
+ setPen( TQPen(TQPen::NoPen) );
+ setBrush( TQBrush(mColor, Qt::SolidPattern) );
setSize( right - left, height );
move( left, 0 );
show();
diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp
index 4d21073e7..d0aa9bd00 100644
--- a/kdgantt/KDGanttViewTaskLink.cpp
+++ b/kdgantt/KDGanttViewTaskLink.cpp
@@ -3,7 +3,7 @@
KDGantt - a multi-platform charting engine
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -268,7 +268,7 @@ void KDGanttViewTaskLink::showMe( bool visible )
TQPen p;
TQBrush b;
p.setWidth(wid);
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
b.setColor(myColorHL);
p.setColor(myColorHL);
@@ -333,7 +333,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
TQPen p;
TQBrush b;
p.setWidth(wid);
- b.setStyle(TQt::SolidPattern);
+ b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
b.setColor(myColorHL);
p.setColor(myColorHL);
diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp
index 248829d3e..e6246138c 100644
--- a/kdgantt/KDGanttXMLTools.cpp
+++ b/kdgantt/KDGanttXMLTools.cpp
@@ -4,7 +4,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -266,20 +266,20 @@ void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent,
}
-TQString penStyleToString( TQt::PenStyle style )
+TQString penStyleToString( Qt::PenStyle style )
{
switch( style ) {
- case TQt::NoPen:
+ case Qt::NoPen:
return "NoPen";
- case TQt::SolidLine:
+ case Qt::SolidLine:
return "SolidLine";
- case TQt::DashLine:
+ case Qt::DashLine:
return "DashLine";
- case TQt::DotLine:
+ case Qt::DotLine:
return "DotLine";
- case TQt::DashDotLine:
+ case Qt::DashDotLine:
return "DashDotLine";
- case TQt::DashDotDotLine:
+ case Qt::DashDotDotLine:
return "DashDotDotLine";
default: // should not happen
return "SolidLine";
@@ -288,39 +288,39 @@ TQString penStyleToString( TQt::PenStyle style )
-TQString brushStyleToString( TQt::BrushStyle style )
+TQString brushStyleToString( Qt::BrushStyle style )
{
// PENDING(kalle) Support custom patterns
switch( style ) {
- case TQt::NoBrush:
+ case Qt::NoBrush:
return "NoBrush";
- case TQt::SolidPattern:
+ case Qt::SolidPattern:
return "SolidPattern";
- case TQt::Dense1Pattern:
+ case Qt::Dense1Pattern:
return "Dense1Pattern";
- case TQt::Dense2Pattern:
+ case Qt::Dense2Pattern:
return "Dense2Pattern";
- case TQt::Dense3Pattern:
+ case Qt::Dense3Pattern:
return "Dense3Pattern";
- case TQt::Dense4Pattern:
+ case Qt::Dense4Pattern:
return "Dense4Pattern";
- case TQt::Dense5Pattern:
+ case Qt::Dense5Pattern:
return "Dense5Pattern";
- case TQt::Dense6Pattern:
+ case Qt::Dense6Pattern:
return "Dense6Pattern";
- case TQt::Dense7Pattern:
+ case Qt::Dense7Pattern:
return "Dense7Pattern";
- case TQt::HorPattern:
+ case Qt::HorPattern:
return "HorPattern";
- case TQt::VerPattern:
+ case Qt::VerPattern:
return "VerPattern";
- case TQt::CrossPattern:
+ case Qt::CrossPattern:
return "CrossPattern";
- case TQt::BDiagPattern:
+ case Qt::BDiagPattern:
return "BDiagPattern";
- case TQt::FDiagPattern:
+ case Qt::FDiagPattern:
return "FDiagPattern";
- case TQt::DiagCrossPattern:
+ case Qt::DiagCrossPattern:
return "DiagCrossPattern";
default: // should not happen (but can for a custom pattern)
return "SolidPattern";
@@ -399,7 +399,7 @@ bool readBrushNode( const TQDomElement& element, TQBrush& brush )
{
bool ok = true;
TQColor tempColor;
- TQt::BrushStyle tempStyle;
+ Qt::BrushStyle tempStyle;
TQPixmap tempPixmap;
TQDomNode node = element.firstChild();
while( !node.isNull() ) {
@@ -506,7 +506,7 @@ bool readPenNode( const TQDomElement& element, TQPen& pen )
bool ok = true;
int tempWidth;
TQColor tempColor;
- TQt::PenStyle tempStyle;
+ Qt::PenStyle tempStyle;
TQDomNode node = element.firstChild();
while( !node.isNull() ) {
TQDomElement element = node.toElement();
@@ -705,60 +705,60 @@ bool readTimeNode( const TQDomElement& element, TQTime& value )
-TQt::PenStyle stringToPenStyle( const TQString& style )
+Qt::PenStyle stringToPenStyle( const TQString& style )
{
if( style == "NoPen" )
- return TQt::NoPen;
+ return Qt::NoPen;
else if( style == "SolidLine" )
- return TQt::SolidLine;
+ return Qt::SolidLine;
else if( style == "DashLine" )
- return TQt::DashLine;
+ return Qt::DashLine;
else if( style == "DotLine" )
- return TQt::DotLine;
+ return Qt::DotLine;
else if( style == "DashDotLine" )
- return TQt::DashDotLine;
+ return Qt::DashDotLine;
else if( style == "DashDotDotLine" )
- return TQt::DashDotDotLine;
+ return Qt::DashDotDotLine;
else // should not happen
- return TQt::SolidLine;
+ return Qt::SolidLine;
}
-TQt::BrushStyle stringToBrushStyle( const TQString& style )
+Qt::BrushStyle stringToBrushStyle( const TQString& style )
{
// PENDING(kalle) Support custom patterns
if( style == "NoBrush" )
- return TQt::NoBrush;
+ return Qt::NoBrush;
else if( style == "SolidPattern" )
- return TQt::SolidPattern;
+ return Qt::SolidPattern;
else if( style == "Dense1Pattern" )
- return TQt::Dense1Pattern;
+ return Qt::Dense1Pattern;
else if( style == "Dense2Pattern" )
- return TQt::Dense2Pattern;
+ return Qt::Dense2Pattern;
else if( style == "Dense3Pattern" )
- return TQt::Dense3Pattern;
+ return Qt::Dense3Pattern;
else if( style == "Dense4Pattern" )
- return TQt::Dense4Pattern;
+ return Qt::Dense4Pattern;
else if( style == "Dense5Pattern" )
- return TQt::Dense5Pattern;
+ return Qt::Dense5Pattern;
else if( style == "Dense6Pattern" )
- return TQt::Dense6Pattern;
+ return Qt::Dense6Pattern;
else if( style == "Dense7Pattern" )
- return TQt::Dense7Pattern;
+ return Qt::Dense7Pattern;
else if( style == "HorPattern" )
- return TQt::HorPattern;
+ return Qt::HorPattern;
else if( style == "VerPattern" )
- return TQt::VerPattern;
+ return Qt::VerPattern;
else if( style == "CrossPattern" )
- return TQt::CrossPattern;
+ return Qt::CrossPattern;
else if( style == "BDiagPattern" )
- return TQt::BDiagPattern;
+ return Qt::BDiagPattern;
else if( style == "FDiagPattern" )
- return TQt::FDiagPattern;
+ return Qt::FDiagPattern;
else if( style == "DiagCrossPattern" )
- return TQt::DiagCrossPattern;
+ return Qt::DiagCrossPattern;
else // should not happen (but can with custom patterns)
- return TQt::SolidPattern;
+ return Qt::SolidPattern;
}
}
diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h
index 4d316f8b4..8ea81f464 100644
--- a/kdgantt/KDGanttXMLTools.h
+++ b/kdgantt/KDGanttXMLTools.h
@@ -4,7 +4,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -45,10 +45,10 @@
#include <tqdatetime.h>
namespace KDGanttXML {
- TQString penStyleToString( TQt::PenStyle style );
- TQt::PenStyle stringToPenStyle( const TQString& style );
- TQString brushStyleToString( TQt::BrushStyle style );
- TQt::BrushStyle stringToBrushStyle( const TQString& 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( TQDomDocument& doc, TQDomNode& tqparent,
const TQString& elementName, bool value );