summaryrefslogtreecommitdiffstats
path: root/kdgantt
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp164
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h6
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp6
-rw-r--r--kdgantt/KDGanttSemiSizingControl.h2
-rw-r--r--kdgantt/KDGanttView.cpp172
-rw-r--r--kdgantt/KDGanttView.h12
-rw-r--r--kdgantt/KDGanttViewItem.cpp168
-rw-r--r--kdgantt/KDGanttViewItem.h6
-rw-r--r--kdgantt/KDGanttViewItemDrag.cpp6
-rw-r--r--kdgantt/KDGanttViewItemDrag.h2
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp58
-rw-r--r--kdgantt/KDGanttViewSubwidgets.h6
-rw-r--r--kdgantt/KDGanttViewTaskItem.cpp2
-rw-r--r--kdgantt/KDGanttXMLTools.cpp2
-rw-r--r--kdgantt/itemAttributeDialog.ui6
-rw-r--r--kdgantt/itemAttributeDialog.ui.h22
-rw-r--r--kdgantt/qlayoutengine_p.h12
17 files changed, 326 insertions, 326 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index 9ba1dbd2..62aec420 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -39,8 +39,8 @@
#include "tqbitmap.h"
#include "tqptrlist.h"
#include "tqmemarray.h"
-#include "tqlayout.h"
-#include "tqlayoutengine_p.h"
+#include "layout.h"
+#include "layoutengine_p.h"
#include "tqobjectlist.h"
#include "tqstyle.h"
#include "tqapplication.h" //sendPostedEvents
@@ -66,7 +66,7 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
setMouseTracking( true );
}
-TQSize KDGanttSplitterHandle::tqsizeHint() const
+TQSize KDGanttSplitterHandle::sizeHint() const
{
return TQSize(8,8);
}
@@ -110,7 +110,7 @@ void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e )
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
if ( _activeButton != 0)
- tqrepaint();
+ repaint();
updateCursor( e->pos() );
}
}
@@ -167,7 +167,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e )
s->moveSplitter( pos, id() );
}
}
- tqrepaint();
+ repaint();
}
int KDGanttSplitterHandle::onButton( const TQPoint& p )
@@ -240,16 +240,16 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
TQPainter p( &buffer );
// Draw the splitter rectangle
- p.setBrush( tqcolorGroup().background() );
- p.setPen( tqcolorGroup().foreground() );
+ p.setBrush( colorGroup().background() );
+ p.setPen( colorGroup().foreground() );
p.drawRect( rect() );
parentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, rect(),
- parentWidget()->tqcolorGroup());
+ parentWidget()->colorGroup());
int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size
// arrow color
- TQColor col = tqcolorGroup().background().dark( 200 );
+ TQColor col = colorGroup().background().dark( 200 );
p.setBrush( col );
p.setPen( col );
@@ -258,13 +258,13 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
for ( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( index == _activeButton ) {
p.save();
- p.translate( parentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- parentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
- p.tqdrawPolygon( *it, true );
+ p.translate( parentWidget()->tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ parentWidget()->tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p.drawPolygon( *it, true );
p.restore();
}
else {
- p.tqdrawPolygon( *it, true );
+ p.drawPolygon( *it, true );
}
index++;
}
@@ -321,7 +321,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
such a license) and are (C) Trolltech AS.
A splitter lets the user control the size of child widgets by
- dragging the boundary between the tqchildren. Any number of widgets
+ dragging the boundary between the children. Any number of widgets
may be controlled.
To show a TQListBox, a TQListView and a TQTextEdit side by side:
@@ -334,14 +334,14 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
\endcode
In KDGanttMinimizeSplitter, the boundary can be either horizontal or
- vertical. The default is horizontal (the tqchildren are side by side)
+ vertical. The default is horizontal (the children are side by side)
but you can use setOrientation( TQSplitter::Vertical ) to set it to
vertical.
Use setResizeMode() to specify
that a widget should keep its size when the splitter is resized.
- Although KDGanttMinimizeSplitter normally resizes the tqchildren only
+ Although KDGanttMinimizeSplitter normally resizes the children only
at the end of a resize operation, if you call setOpaqueResize( TRUE
) the widgets are resized as often as possible.
@@ -351,7 +351,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
sizes set by the user.
If you hide() a child, its space will be distributed among the other
- tqchildren. It will be reinstated when you show() it again. It is also
+ children. It will be reinstated when you show() it again. It is also
possible to reorder the widgets within the splitter using
moveToFirst() and moveToLast().
*/
@@ -366,10 +366,10 @@ static TQSize minSize( const TQWidget* /*w*/ )
// This is the original version of minSize
static TQSize minSizeHint( const TQWidget* w )
{
- TQSize min = w->tqminimumSize();
+ TQSize min = w->minimumSize();
TQSize s;
if ( min.height() <= 0 || min.width() <= 0 )
- s = w->tqminimumSizeHint();
+ s = w->minimumSizeHint();
if ( min.height() > 0 )
s.setHeight( min.height() );
if ( min.width() > 0 )
@@ -402,7 +402,7 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, TQWidget *p
}
/*!
- Destroys the splitter and any tqchildren.
+ Destroys the splitter and any children.
*/
KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
{
@@ -415,9 +415,9 @@ void KDGanttMinimizeSplitter::init()
{
data = new TQSplitterData;
if ( orient ==Qt::Horizontal )
- tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
else
- tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
}
@@ -435,9 +435,9 @@ void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
orient = o;
if ( orient ==Qt::Horizontal )
- tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
else
- tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
@@ -480,7 +480,7 @@ KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bo
s->wid = newHandle;
newHandle->setId(data->list.count());
s->isSplitter = TRUE;
- s->sizer = pick( newHandle->tqsizeHint() );
+ s->sizer = pick( newHandle->sizeHint() );
if ( first )
data->list.insert( 0, s );
else
@@ -489,8 +489,8 @@ KDGanttSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bo
s = new KDGanttSplitterLayoutStruct;
s->mode = Stretch;
s->wid = w;
- if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() )
- s->sizer = pick( w->tqsizeHint() );
+ if ( !testWState( WState_Resized ) && w->sizeHint().isValid() )
+ s->sizer = pick( w->sizeHint() );
else
s->sizer = pick( w->size() );
s->isSplitter = FALSE;
@@ -563,7 +563,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
paint.setRasterOp( XorROP );
TQRect r = contentsRect();
const int rBord = 3; //Themable????
- int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ int sw = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( orient ==Qt::Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
@@ -603,7 +603,7 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e )
void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h )
{
- tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(),
+ tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), colorGroup(),
(orientation() == Qt::Horizontal ?
TQStyle::Style_Horizontal : 0));
}
@@ -634,7 +634,7 @@ int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
close as possible to position \a p, which is the distance from the
left (or top) edge of the widget.
- For Arabic and Hebrew the tqlayout is reversed, and using this
+ For Arabic and Hebrew the layout is reversed, and using this
function to set the position of the splitter might lead to
unexpected results, since in Arabic and Hebrew the position of
splitter one is to the left of the position of splitter zero.
@@ -707,13 +707,13 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
} else {
int dd, newLeft, nextPos;
if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) {
- dd = w->tqgeometry().right() - pos;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
+ dd = w->geometry().right() - pos;
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
newLeft = pos+1;
nextPos = newLeft + dd;
} else {
dd = pos - pick( w->pos() ) + 1;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
newLeft = pos-dd+1;
nextPos = newLeft - 1;
}
@@ -762,13 +762,13 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
int right, dd,/* newRight,*/ newLeft, nextPos;
if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) {
dd = pos - left + 1;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
newLeft = pos-dd+1;
nextPos = newLeft - 1;
} else {
- right = pick( w->tqgeometry().bottomRight() );
+ right = pick( w->geometry().bottomRight() );
dd = right - pos + 1;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
/*newRight = pos+dd-1;*/
newLeft = pos;
nextPos = newLeft + dd;
@@ -822,7 +822,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxB += s->sizer;
} else {
minB += pick( minSize(s->wid) );
- maxB += pick( s->wid->tqmaximumSize() );
+ maxB += pick( s->wid->maximumSize() );
}
}
for ( i = id; i < n; i++ ) {
@@ -834,12 +834,12 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxA += s->sizer;
} else {
minA += pick( minSize(s->wid) );
- maxA += pick( s->wid->tqmaximumSize() );
+ maxA += pick( s->wid->maximumSize() );
}
}
TQRect r = contentsRect();
if ( orient ==Qt::Horizontal && TQApplication::reverseLayout() ) {
- int splitterWidth = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ int splitterWidth = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( min )
*min = pick(r.topRight()) - TQMIN( maxB, pick(r.size())-minA ) - splitterWidth;
if ( max )
@@ -881,27 +881,27 @@ void KDGanttMinimizeSplitter::doResize()
KDGanttSplitterLayoutStruct *s = data->list.at(i);
if ( s->wid->isHidden() ) {
a[i].stretch = 0;
- a[i].tqsizeHint = a[i].tqminimumSize = 0;
- a[i].tqmaximumSize = 0;
+ a[i].sizeHint = a[i].minimumSize = 0;
+ a[i].maximumSize = 0;
} else if ( s->isSplitter ) {
a[i].stretch = 0;
- a[i].tqsizeHint = a[i].tqminimumSize = a[i].tqmaximumSize = s->sizer;
+ a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer;
a[i].empty = FALSE;
} else if ( s->mode == KeepSize ) {
a[i].stretch = 0;
- a[i].tqminimumSize = pick( minSize(s->wid) );
- a[i].tqsizeHint = s->sizer;
- a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
+ a[i].minimumSize = pick( minSize(s->wid) );
+ a[i].sizeHint = s->sizer;
+ a[i].maximumSize = pick( s->wid->maximumSize() );
a[i].empty = FALSE;
} else if ( s->mode == FollowSizeHint ) {
a[i].stretch = 0;
- a[i].tqminimumSize = a[i].tqsizeHint = pick( s->wid->tqsizeHint() );
- a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
+ a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() );
+ a[i].maximumSize = pick( s->wid->maximumSize() );
a[i].empty = FALSE;
} else { //proportional
a[i].stretch = s->sizer;
- a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
- a[i].tqsizeHint = a[i].tqminimumSize = pick( minSize(s->wid) );
+ a[i].maximumSize = pick( s->wid->maximumSize() );
+ a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) );
a[i].empty = FALSE;
}
}
@@ -955,9 +955,9 @@ void KDGanttMinimizeSplitter::recalc( bool update )
} else {
TQSize minS = minSize(s->wid);
minl += pick( minS );
- maxl += pick( s->wid->tqmaximumSize() );
+ maxl += pick( s->wid->maximumSize() );
mint = TQMAX( mint, trans( minS ));
- int tm = trans( s->wid->tqmaximumSize() );
+ int tm = trans( s->wid->maximumSize() );
if ( tm > 0 )
maxt = TQMIN( maxt, tm );
}
@@ -968,7 +968,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
// nested splitters; be nice
maxl = maxt = 0;
} else {
- // KDGanttMinimizeSplitter with no tqchildren yet
+ // KDGanttMinimizeSplitter with no children yet
maxl = TQWIDGETSIZE_MAX;
}
} else {
@@ -1107,7 +1107,7 @@ void KDGanttMinimizeSplitter::recalcId()
/*! Reimplemented from superclass.
*/
-TQSize KDGanttMinimizeSplitter::tqsizeHint() const
+TQSize KDGanttMinimizeSplitter::sizeHint() const
{
constPolish();
int l = 0;
@@ -1121,7 +1121,7 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const
++it;
if ( o->isWidgetType() &&
!((TQWidget*)o)->isHidden() ) {
- TQSize s = ((TQWidget*)o)->tqsizeHint();
+ TQSize s = ((TQWidget*)o)->sizeHint();
if ( s.isValid() ) {
l += pick( s );
t = TQMAX( t, trans( s ) );
@@ -1137,7 +1137,7 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const
\reimp
*/
-TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
+TQSize KDGanttMinimizeSplitter::minimumSizeHint() const
{
constPolish();
int l = 0;
@@ -1231,7 +1231,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
splitter.
Giving the values to another splitter's setSizes() function will
- produce a splitter with the same tqlayout as this one.
+ produce a splitter with the same layout as this one.
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
@@ -1311,7 +1311,7 @@ void KDGanttMinimizeSplitter::processChildEvents()
void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
- int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
+ int sw = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
KDGanttSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
@@ -1366,9 +1366,9 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int i;
for ( i = start; i < start + count; i++ ) {
chain[i].done = FALSE;
- cHint += chain[i].tqsizeHint;
- cMin += chain[i].tqminimumSize;
- cMax += chain[i].tqmaximumSize;
+ cHint += chain[i].sizeHint;
+ cMin += chain[i].minimumSize;
+ cMax += chain[i].maximumSize;
sumStretch += chain[i].stretch;
if ( !chain[i].empty )
spacerCount++;
@@ -1381,11 +1381,11 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( space < cMin + spacerCount * spacer ) {
// qDebug("not enough space");
for ( i = start; i < start+count; i++ ) {
- chain[i].size = chain[i].tqminimumSize;
+ chain[i].size = chain[i].minimumSize;
chain[i].done = TRUE;
}
} else if ( space < cHint + spacerCount*spacer ) {
- // Less space than tqsizeHint, but more than minimum.
+ // Less space than sizeHint, but more than minimum.
// Currently take space equally from each, like in TQt 2.x.
// Commented-out lines will give more space to stretchier items.
int n = count;
@@ -1393,10 +1393,10 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int overdraft = cHint - space_left;
//first give to the fixed ones:
for ( i = start; i < start+count; i++ ) {
- if ( !chain[i].done && chain[i].tqminimumSize >= chain[i].tqsizeHint) {
- chain[i].size = chain[i].tqsizeHint;
+ if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) {
+ chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].tqsizeHint;
+ space_left -= chain[i].sizeHint;
// sumStretch -= chain[i].stretch;
n--;
}
@@ -1415,13 +1415,13 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
// else
// fp_w += (fp_over * chain[i].stretch) / sumStretch;
int w = fRound( fp_w );
- chain[i].size = chain[i].tqsizeHint - w;
+ chain[i].size = chain[i].sizeHint - w;
fp_w -= toFixed( w ); //give the difference to the next
- if ( chain[i].size < chain[i].tqminimumSize ) {
+ if ( chain[i].size < chain[i].minimumSize ) {
chain[i].done = TRUE;
- chain[i].size = chain[i].tqminimumSize;
+ chain[i].size = chain[i].minimumSize;
finished = FALSE;
- overdraft -= chain[i].tqsizeHint - chain[i].tqminimumSize;
+ overdraft -= chain[i].sizeHint - chain[i].minimumSize;
// sumStretch -= chain[i].stretch;
n--;
break;
@@ -1433,11 +1433,11 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int space_left = space - spacerCount*spacer;
// first give to the fixed ones, and handle non-expansiveness
for ( i = start; i < start + count; i++ ) {
- if ( !chain[i].done && (chain[i].tqmaximumSize <= chain[i].tqsizeHint
+ if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint
|| wannaGrow && !chain[i].expansive) ) {
- chain[i].size = chain[i].tqsizeHint;
+ chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].tqsizeHint;
+ space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch;
n--;
}
@@ -1469,20 +1469,20 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int w = fRound( fp_w );
chain[i].size = w;
fp_w -= toFixed( w ); // give the difference to the next
- if ( w < chain[i].tqsizeHint ) {
- deficit += chain[i].tqsizeHint - w;
- } else if ( w > chain[i].tqmaximumSize ) {
- surplus += w - chain[i].tqmaximumSize;
+ if ( w < chain[i].sizeHint ) {
+ deficit += chain[i].sizeHint - w;
+ } else if ( w > chain[i].maximumSize ) {
+ surplus += w - chain[i].maximumSize;
}
}
if ( deficit > 0 && surplus <= deficit ) {
// give to the ones that have too little
for ( i = start; i < start+count; i++ ) {
if ( !chain[i].done &&
- chain[i].size < chain[i].tqsizeHint ) {
- chain[i].size = chain[i].tqsizeHint;
+ chain[i].size < chain[i].sizeHint ) {
+ chain[i].size = chain[i].sizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].tqsizeHint;
+ space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch;
n--;
}
@@ -1492,10 +1492,10 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
// take from the ones that have too much
for ( i = start; i < start+count; i++ ) {
if ( !chain[i].done &&
- chain[i].size > chain[i].tqmaximumSize ) {
- chain[i].size = chain[i].tqmaximumSize;
+ chain[i].size > chain[i].maximumSize ) {
+ chain[i].size = chain[i].maximumSize;
chain[i].done = TRUE;
- space_left -= chain[i].tqmaximumSize;
+ space_left -= chain[i].maximumSize;
sumStretch -= chain[i].stretch;
n--;
}
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 557026f1..7a56d7ce 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -72,8 +72,8 @@ public:
void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- virtual TQSize tqsizeHint() const;
- virtual TQSize tqminimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
TQValueList<int> sizes() const;
void setSizes( TQValueList<int> );
@@ -149,7 +149,7 @@ public:
bool opaque() const { return s->opaqueResize(); }
- TQSize tqsizeHint() const;
+ TQSize sizeHint() const;
int id() const { return myId; } // data->list.at(id())->wid == this
void setId( int i ) { myId = i; }
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index 8bede0d0..b51507f9 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -247,7 +247,7 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition(
void KDGanttSemiSizingControl::init()
{
_but = new TQPushButton( this );
- _but->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) );
_layout = 0;
TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
@@ -258,7 +258,7 @@ void KDGanttSemiSizingControl::init()
void KDGanttSemiSizingControl::setup()
{
- //-------------------------------------------------- Setup tqlayout
+ //-------------------------------------------------- Setup layout
delete _layout;
TQBoxLayout* butLayout; // _layout will delete me
@@ -395,7 +395,7 @@ TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
TQPainter p( &pix );
p.setPen( black );
- p.setBrush( tqcolorGroup().button() );
+ p.setBrush( colorGroup().button() );
p.drawPolygon( arr );
TQBitmap bit( s, s );
bit.fill( color0 );
diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h
index 34b11a23..823eddac 100644
--- a/kdgantt/KDGanttSemiSizingControl.h
+++ b/kdgantt/KDGanttSemiSizingControl.h
@@ -36,7 +36,7 @@
#define KDGANTTSEMISIZINGCONTROL_H
#include "KDGanttSizingControl.h"
-#include <tqlayout.h>
+#include <layout.h>
class TQPushButton;
class TQBoxLayout;
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index f14ac027..b5d44d35 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -41,7 +41,7 @@
#include "itemAttributeDialog.h"
#include <tqprinter.h>
#include <tqpainter.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpaintdevicemetrics.h>
#include <tqfile.h>
#include <tqheader.h>
@@ -186,7 +186,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
fDropEnabled = false;
closingBlocked = false;
myTimeHeader->computeTicks();
- centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () );
+ centerTimelineAfterShow( TQDateTime::currentDateTime () );
setDisplayEmptyTasksAsLine( false );
TQValueList<int> list;
list.append(240);
@@ -313,12 +313,12 @@ bool KDGanttView::close ( bool alsoDelete )
/*!
Returns a useful size for the view.
Returned width:
- tqsizeHint().width() of the list view + width of TimeTable
+ sizeHint().width() of the list view + width of TimeTable
Returned height:
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-TQSize KDGanttView::tqsizeHint() const
+TQSize KDGanttView::sizeHint() const
{
bool block = myTimeTable->blockUpdating();
myTimeTable->setBlockUpdating( false );
@@ -342,9 +342,9 @@ TQSize KDGanttView::tqsizeHint() const
if ( myLegend->isShown() )
hintHeight += myLegend->legendSizeHint().height() +10;
hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2;
- int hintWid = myListView->tqsizeHint().width();
+ int hintWid = myListView->sizeHint().width();
//hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width();
- hintWid += myCanvasView->tqsizeHint().width();
+ hintWid += myCanvasView->sizeHint().width();
// add 10 for the splitter-bars
// qDebug("sizehint %d %d ",hintWid+10, hintHeight );
myTimeTable->setBlockUpdating( block );
@@ -539,7 +539,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item,
the fastest mode.
If Medium, there is extra repainting after releasing the
scrollbar. This provides fast scrolling with updated content
- after scrolling. Recommended, when tqrepaint problems occur.
+ after scrolling. Recommended, when repaint problems occur.
This is the default value after startup.
If Always, there is an extra update after every move of the
scrollbar. This entails slow scrolling with updated
@@ -622,7 +622,7 @@ void KDGanttView::slotHeaderSizeChanged()
// legend is cleared - reinit legend with list
legendItem* li;
for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) {
- myLegend->addLegendItem(li->tqshape, li->color, li->text );
+ myLegend->addLegendItem(li->shape, li->color, li->text );
}
}
}
@@ -875,7 +875,7 @@ void KDGanttView::print( TQPrinter* printer ,
TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
// at the top, we want to print current time/date
- TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -1216,7 +1216,7 @@ bool KDGanttView::showTaskLinks() const
void KDGanttView::setFont(const TQFont& font)
{
myListView->setFont(font);
- myListView->tqrepaint();
+ myListView->repaint();
myTimeHeader->setFont(font);
myLegend->setFont( font );
TQWidget::setFont( font );
@@ -1306,21 +1306,21 @@ bool KDGanttView::showTimeTablePopupMenu() const
/*!
- Sets the tqshapes for a certain type of Gantt item. Not all items use
- all three tqshapes (e.g., only summary items use the middle tqshape).
+ Sets the shapes for a certain type of Gantt item. Not all items use
+ all three shapes (e.g., only summary items use the middle shape).
- This setting overrides any tqshape settings made on individual items.
+ This setting overrides any shape settings made on individual items.
These settings will be taken as initial values of any newly created
item of this certain type.
See also the documentation of the KDGanttViewItem class.
- \param type the type of Gantt items for which to set the tqshapes
- \param start the tqshape to use for the beginning of the item
- \param middle the tqshape to use for the middle of the item
- \param end the tqshape to use for the end of the item
- \param overwriteExisting if true, overwrites existing tqshape settings
+ \param type the type of Gantt items for which to set the shapes
+ \param start the shape to use for the beginning of the item
+ \param middle the shape to use for the middle of the item
+ \param end the shape to use for the end of the item
+ \param overwriteExisting if true, overwrites existing shape settings
in the individual items
- \sa tqshapes()
+ \sa shapes()
*/
void KDGanttView::setShapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape start,
@@ -1344,18 +1344,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type,
/*!
- Queries the tqshapes for a particular type of Gantt item.
+ Queries the shapes for a particular type of Gantt item.
- \param type the type of Gantt items for which to query the tqshapes
- \param start the start tqshape is returned in this parameter
- \param middle the middle tqshape is returned in this parameter
- \param end the end tqshape is returned in this parameter
- \return true if there was a general tqshape set for the specified
- type. If the return value is false, the values of the three tqshape
+ \param type the type of Gantt items for which to query the shapes
+ \param start the start shape is returned in this parameter
+ \param middle the middle shape is returned in this parameter
+ \param end the end shape is returned in this parameter
+ \return true if there was a general shape set for the specified
+ type. If the return value is false, the values of the three shape
parameters are undefined.
\sa setShapes()
*/
-bool KDGanttView::tqshapes( KDGanttViewItem::Type type,
+bool KDGanttView::shapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape& start,
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const
@@ -1569,19 +1569,19 @@ void KDGanttView::clearLegend( )
/*!
Adds an item to the legend.
- \param tqshape the tqshape to display
- \param tqshapeColor the color in which to display the tqshape
+ \param shape the shape to display
+ \param shapeColor the color in which to display the shape
\param text the text to display
\sa clearLegend()
*/
-void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape,
- const TQColor& tqshapeColor,
+void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
+ const TQColor& shapeColor,
const TQString& text )
{
- myLegend->addLegendItem( tqshape,tqshapeColor,text );
+ myLegend->addLegendItem( shape,shapeColor,text );
legendItem* item = new legendItem;
- item->tqshape = tqshape;
- item->color = tqshapeColor;
+ item->shape = shape;
+ item->color = shapeColor;
item->text = text;
myLegendItems->append( item );
}
@@ -3412,58 +3412,58 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
showTimeTablePopupMenu() );
// the Shapes element
- TQDomElement tqshapesElement = doc.createElement( "Shapes" );
- docRoot.appendChild( tqshapesElement );
- TQDomElement tqshapesEventElement = doc.createElement( "Event" );
- tqshapesElement.appendChild( tqshapesEventElement );
+ TQDomElement shapesElement = doc.createElement( "Shapes" );
+ docRoot.appendChild( shapesElement );
+ TQDomElement shapesEventElement = doc.createElement( "Event" );
+ shapesElement.appendChild( shapesEventElement );
KDGanttViewItem::Shape start, middle, end;
- if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) {
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start",
- KDGanttViewItem::tqshapeToString( start ) );
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle",
- KDGanttViewItem::tqshapeToString( middle ) );
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "End",
- KDGanttViewItem::tqshapeToString( end ) );
+ if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
+ KDGanttXML::createStringNode( doc, shapesEventElement, "Start",
+ KDGanttViewItem::shapeToString( start ) );
+ KDGanttXML::createStringNode( doc, shapesEventElement, "Middle",
+ KDGanttViewItem::shapeToString( middle ) );
+ KDGanttXML::createStringNode( doc, shapesEventElement, "End",
+ KDGanttViewItem::shapeToString( end ) );
} else {
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start",
+ KDGanttXML::createStringNode( doc, shapesEventElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle",
+ KDGanttXML::createStringNode( doc, shapesEventElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesEventElement, "End",
+ KDGanttXML::createStringNode( doc, shapesEventElement, "End",
"Undefined" );
}
- TQDomElement tqshapesTaskElement = doc.createElement( "Task" );
- tqshapesElement.appendChild( tqshapesTaskElement );
- if( tqshapes( KDGanttViewItem::Task, start, middle, end ) ) {
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start",
- KDGanttViewItem::tqshapeToString( start ) );
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle",
- KDGanttViewItem::tqshapeToString( middle ) );
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End",
- KDGanttViewItem::tqshapeToString( end ) );
+ TQDomElement shapesTaskElement = doc.createElement( "Task" );
+ shapesElement.appendChild( shapesTaskElement );
+ if( shapes( KDGanttViewItem::Task, start, middle, end ) ) {
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
+ KDGanttViewItem::shapeToString( start ) );
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle",
+ KDGanttViewItem::shapeToString( middle ) );
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
+ KDGanttViewItem::shapeToString( end ) );
} else {
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start",
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle",
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End",
+ KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
"Undefined" );
}
- TQDomElement tqshapesSummaryElement = doc.createElement( "Summary" );
- tqshapesElement.appendChild( tqshapesSummaryElement );
- if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) {
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start",
- KDGanttViewItem::tqshapeToString( start ) );
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle",
- KDGanttViewItem::tqshapeToString( middle ) );
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End",
- KDGanttViewItem::tqshapeToString( end ) );
+ TQDomElement shapesSummaryElement = doc.createElement( "Summary" );
+ shapesElement.appendChild( shapesSummaryElement );
+ if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
+ KDGanttViewItem::shapeToString( start ) );
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle",
+ KDGanttViewItem::shapeToString( middle ) );
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "End",
+ KDGanttViewItem::shapeToString( end ) );
} else {
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start",
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle",
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End",
+ KDGanttXML::createStringNode( doc, shapesSummaryElement, "End",
"Undefined" );
}
@@ -3601,7 +3601,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
TQDomElement legendItemElement = doc.createElement( "LegendItem" );
legendItemsElement.appendChild( legendItemElement );
KDGanttXML::createStringNode( doc, legendItemElement, "Shape",
- KDGanttViewItem::tqshapeToString( current->tqshape ) );
+ KDGanttViewItem::shapeToString( current->shape ) );
KDGanttXML::createColorNode( doc, legendItemElement, "Color",
current->color );
KDGanttXML::createStringNode( doc, legendItemElement, "Text",
@@ -3754,17 +3754,17 @@ void KDGanttView::editItem( KDGanttViewItem* item)
/*!
- This method returns the pixmap used for a certain tqshape, in the
+ This method returns the pixmap used for a certain shape, in the
selected color and size.
- \param tqshape the tqshape to generate
- \param tqshapeColor the foreground color of the tqshape
- \param backgroundColor the background color of the tqshape
- \param itemSize the size of the tqshape
- \return the generated tqshape pixmap
+ \param shape the shape to generate
+ \param shapeColor the foreground color of the shape
+ \param backgroundColor the background color of the shape
+ \param itemSize the size of the shape
+ \return the generated shape pixmap
*/
-TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape,
- const TQColor& tqshapeColor,
+TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
+ const TQColor& shapeColor,
const TQColor& backgroundColor, int itemSize)
{
// 10 is a good value as size
@@ -3774,11 +3774,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape,
p.fill( backgroundColor );
TQPainter paint (&p);
TQBrush b = TQBrush ( TQt::SolidPattern );
- b.setColor( tqshapeColor );
+ b.setColor( shapeColor );
paint.setBrush( b );
TQPen pen( TQt::black, 1 ) ;
paint.setPen( pen );
- switch (tqshape) {
+ switch (shape) {
case KDGanttViewItem::TriangleDown:{
TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
@@ -3861,8 +3861,8 @@ void KDGanttView::initDefaults()
myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = TQt::cyan;//summary
myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = TQt::red;
- // setting the default tqshape types
- // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape
+ // setting the default shape types
+ // currently, we take for each item for all three shapes (start, middle, end) the same default shape
for (i = 0;i<3;++i) {
myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event
myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task
@@ -4236,7 +4236,7 @@ TQColor KDGanttView::legendHeaderBackgroundColor () const
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 TQHBox, the tqlayout of the added widgets is managed by this
+ is a TQHBox, the layout of the added widgets is managed by this
TQHBox.
\param w A pointer to the widget to be added.
diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h
index 02fdc5d7..902f82dc 100644
--- a/kdgantt/KDGanttView.h
+++ b/kdgantt/KDGanttView.h
@@ -39,7 +39,7 @@
#include <tqwidget.h>
#include <tqlistview.h>
#include <tqsplitter.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqfont.h>
#include <tqdom.h>
#include <tqvbox.h>
@@ -192,7 +192,7 @@ public:
KDGanttViewItem::Shape middle,
KDGanttViewItem::Shape end,
bool overwriteExisting = true );
- bool tqshapes( KDGanttViewItem::Type type,
+ bool shapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape& start,
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const;
@@ -227,7 +227,7 @@ public:
TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
// Legend-related stuff
- void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
// Header-related stuff
void setHorizonStart( const TQDateTime& start );
@@ -293,7 +293,7 @@ public:
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
- static TQPixmap getPixmap( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor,const TQColor& backgroundColor, int itemSize);
+ static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize);
void setHeaderVisible( bool );
bool headerVisible() const;
@@ -325,7 +325,7 @@ public:
virtual void lvStartDrag (KDGanttViewItem*);
virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
virtual void lvDragEnterEvent (TQDragEnterEvent * e );
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
KDGanttViewItem* getItemByName( const TQString& name ) const;
TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const;
@@ -409,7 +409,7 @@ private slots:
void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
private:
struct legendItem {
- KDGanttViewItem::Shape tqshape;
+ KDGanttViewItem::Shape shape;
TQColor color;
TQString text;
};
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index fab1b3bd..62205b6b 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -52,20 +52,20 @@
directly. Instead, you should create items of one of the
subclasses. This class provides methods common to all Gantt items.
- The initialization of the tqshapes/colors of the item works as follows:
+ The initialization of the shapes/colors of the item works as follows:
Shapes:
- When a new item is created, the tqshapes are set to the default values
+ When a new item is created, the shapes are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setShapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape start,
KDGanttViewItem::Shape middle,
KDGanttViewItem::Shape end );
If there is no default value defined for this type,
- the tqshapes are set as follows:
- For TaskViewItems all three tqshapes are set to Square.
- For SummaryViewItems all three tqshapes are set to TriangleDown.
- For EventViewItems all three tqshapes are set to Diamond.
+ the shapes are set as follows:
+ For TaskViewItems all three shapes are set to Square.
+ For SummaryViewItems all three shapes are set to TriangleDown.
+ For EventViewItems all three shapes are set to Diamond.
Colors:
When a new item is created, the colors are set to the default values
@@ -75,7 +75,7 @@
const TQColor& middle,
const TQColor& end );
If there is no default value defined for this type,
- the colors of the tqshapes are set to the default color for items of 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 TQColor& );
The initial default color in the KDGanttView class is set to
@@ -92,7 +92,7 @@
const TQColor& middle,
const TQColor& end );
If there is no default value defined for this type,
- the highlight colors of the tqshapes are set to the default color for
+ 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 TQColor& );
The initial default highlight color in the KDGanttView class is set to red
@@ -122,15 +122,15 @@
shown or not.
In the other mode (set with setDisplaySubitemsAsGroup( true ); ),
called "calendar mode", the item is displayed as follows:
- If the item has no tqchildren, it is displayed as usual.
- If the item is opened (i.e., its tqchildren are displayed), the
+ If the item has no children, it is displayed as usual.
+ If the item is opened (i.e., its children are displayed), the
start/end time of this item is computed automatically according to
- the earliest start time/latest end time of its tqchildren. The item
- and its tqchildren are displayed as usual.
- If the item is closed (i.e., its tqchildren are hidden in the left
- list view), the item itself is hidden, and its tqchildren are displayed
+ the earliest start time/latest end time of its children. The item
+ and its children are displayed as usual.
+ If the item is closed (i.e., its children are hidden in the left
+ list view), the item itself is hidden, and its children are displayed
on the timeline of this item instead. To control the painting of
- overlapping tqchildren, call \a setPriority() for the childs.
+ overlapping children, call \a setPriority() for the childs.
Blocking of user interaction to open item:
If you want to block users to open items used as parents of calendar items,
@@ -138,7 +138,7 @@
Example 1, Color:
If you create an instance of a KDGanttView class and add a SummaryViewItem
- without setting any color/tqshape values, you get an item with three tqshapes
+ without setting any color/shape values, you get an item with three shapes
of the form TriangleDown in the color magenta. If the item is highlighted,
the color will change to the highlight color red.
@@ -147,12 +147,12 @@
\a KDGanttView::setCalendarMode( true );
\a KDGanttView::setDisplaySubitemsAsGroup( true );
Insert root items in the Gantt view.
- Insert items as tqchildren of these root item in the Gantt view.
+ Insert items as children of these root item in the Gantt view.
You may use any item type as parent and child; there are no limitations.
It is, however, recommended to use KDGanttViewTaskItems
- Actually, you may add child items to the tqchildren themselves.
+ Actually, you may add child items to the children themselves.
Such a child behaves then like a parent.
- Now set the start/end time of the tqchildren to specify a time
+ Now set the start/end time of the children to specify a time
interval for these items.
*/
@@ -451,7 +451,7 @@ bool KDGanttViewItem::editable() const
Useful to get a so called "calendar view" with many items in one row.
When \a displaySubitemsAsGroup() is set to true, this item has a normal view,
when it is expanded. If it is not expanded (and has at least one child),
- the item itself is hidden, and all tqchildren are displayed instead.
+ the item itself is hidden, and all children are displayed instead.
To manage the painting priority of the childs (if overlapping),
you may set \a priority() of these items.
@@ -735,7 +735,7 @@ TQString KDGanttViewItem::whatsThisText() const
/*!
Specifies whether this item should be shown highlighted. The user
can also highlight items with the mouse.
- If the item displays its subitems (tqchildren) as a group
+ If the item displays its subitems (children) as a group
(displaySubitemsAsGroup() == true),
all changes apply to all subitems as well.
@@ -773,16 +773,16 @@ bool KDGanttViewItem::highlight() const
/*!
- Specifies the tqshapes to be used for this item.
+ Specifies the shapes to be used for this item.
- It is advisable not to use this method, but rather set the tqshapes
+ It is advisable not to use this method, but rather set the shapes
for all items of a type with KDGanttView::setShapes() in order to
get a uniform Gantt view.
- \param start the start tqshape
- \param middle the middle tqshape
- \param end the end tqshape
- \sa tqshapes(), setColors(), colors()
+ \param start the start shape
+ \param middle the middle shape
+ \param end the end shape
+ \sa shapes(), setColors(), colors()
*/
void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end )
{
@@ -799,20 +799,20 @@ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end )
/*!
- Creates tqshapes of the specified type \a tqshape.
- The background tqshape color is set to black and the background tqshape
- is slightly bit bigger than the foreground tqshape to have a black border
- around the foreground tqshape.
+ Creates shapes of the specified type \a shape.
+ The background shape color is set to black and the background shape
+ is slightly bit bigger than the foreground shape to have a black border
+ around the foreground shape.
- \param itemShape the foreground tqshape
- \param middle itemShapeBack the background tqshape
- \param tqshape the type of the tqshape
+ \param itemShape the foreground shape
+ \param middle itemShapeBack the background shape
+ \param shape the type of the shape
(may be TriangleDown, TriangleUp, Diamond, Square, Circle)
- \sa tqshapes(), setColors(), colors()
+ \sa shapes(), setColors(), colors()
*/
void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
KDCanvasPolygonItem* &itemShapeBack,
- Shape tqshape )
+ Shape shape )
{
if ( itemShape && type() == Task )
return;
@@ -823,7 +823,7 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
TQCanvasPolygonalItem * itemBack;
int size = myItemSize+2;
int hei = (myItemSize/3)/2;
- switch (tqshape) {
+ switch (shape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
@@ -912,8 +912,8 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
break;
}
default:
- // Uninitialized tqshape, can e.g. be the case with free-busy
- // items which don't have any tqshapes
+ // Uninitialized shape, can e.g. be the case with free-busy
+ // items which don't have any shapes
return;
}
item->setBrush(Qt::SolidPattern);
@@ -927,14 +927,14 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
/*!
- Returns the tqshapes used for this item
+ Returns the shapes used for this item
- \param start returns the start tqshape
- \param middle returns the middle tqshape
- \param end returns the end tqshape
+ \param start returns the start shape
+ \param middle returns the middle shape
+ \param end returns the end shape
\sa setShapes(), setColors(), colors()
*/
-void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const
+void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
{
start = myStartShape;
middle = myMiddleShape;
@@ -943,16 +943,16 @@ void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const
/*!
- Specifies the colors in which to draw the tqshapes of this item.
+ Specifies the colors in which to draw the shapes of this item.
It is advisable not to use this method, but rather set the colors
for all items of a type with KDGanttView::setColors() in order to
get a uniform Gantt view.
- \param start the color for the start tqshape
- \param middle the color for the middle tqshape
- \param end the color for the end tqshape
- \sa colors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor()
+ \param start the color for the start shape
+ \param middle the color for the middle shape
+ \param end the color for the end shape
+ \sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
const TQColor& end )
@@ -980,7 +980,7 @@ void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
\param start returns the start color
\param middle returns the middle color
\param end returns the end color
- \sa setColors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor()
+ \sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const
{
@@ -992,21 +992,21 @@ void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) co
/*!
- Specifies the highlight colors in which to draw the tqshapes of this item.
+ Specifies the highlight colors in which to draw the shapes of this item.
It is advisable not to use this method, but rather set the highlight
colors for all items of a type with
KDGanttView::setHighlightColors() in order to get a uniform Gantt
view.
- If the item displays its subitems (tqchildren) as a group,
+ If the item displays its subitems (children) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
- \param start the highlight color for the start tqshape
- \param middle the highlight color for the middle tqshape
- \param end the highlight color for the end tqshape
- \sa highlightColors(), setShapes(), tqshapes()
+ \param start the highlight color for the start shape
+ \param middle the highlight color for the middle shape
+ \param end the highlight color for the end shape
+ \sa highlightColors(), setShapes(), shapes()
*/
void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end )
{
@@ -1032,7 +1032,7 @@ void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& m
\param start returns the start highlight color
\param middle returns the middle highlight color
\param end returns the end highlight color
- \sa setHighlightColors(), setShapes(), tqshapes()
+ \sa setHighlightColors(), setShapes(), shapes()
*/
void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const
{
@@ -1048,7 +1048,7 @@ void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor&
It is advisable not to use this method, but rather set the text color
for all items with KDGanttView::setTextColor() in order to get a
uniform Gantt view.
- If the item displays its subitems (tqchildren) as a group,
+ If the item displays its subitems (children) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
\param color the text color
@@ -1086,7 +1086,7 @@ TQColor KDGanttViewItem::textColor() const
/*!
\enum KDGanttViewItem::Shape
- This enum is used in order to specify the tqshapes of a Gantt chart
+ This enum is used in order to specify the shapes of a Gantt chart
item.
*/
@@ -1140,7 +1140,7 @@ const TQPixmap* KDGanttViewItem::pixmap( int column ) const
for all items of a type with KDGanttView::setDefaultColor() in order to
get a uniform Gantt view.
- If the item displays its subitems (tqchildren) as a group,
+ If the item displays its subitems (children) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
@@ -1187,7 +1187,7 @@ TQColor KDGanttViewItem::defaultColor() const
for all items of a type with KDGanttView::setDefaultHighlightColor()
in order to get a uniform Gantt view.
- If the item displays its subitems (tqchildren) as a group,
+ If the item displays its subitems (children) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
@@ -1226,7 +1226,7 @@ TQColor KDGanttViewItem::defaultHighlightColor() const
/*!
Returns the first child of this item.
- \return the first child of this item, 0 if this item has no tqchildren
+ \return the first child of this item, 0 if this item has no children
*/
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
@@ -1467,10 +1467,10 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setDefaultColor( myGanttView->defaultColor(myType));
// set default highlight color
setDefaultHighlightColor(myGanttView->defaultHighlightColor(myType));
- // set tqshapes
- if (!( tqshapeDefined = (myGanttView->tqshapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
+ // set shapes
+ if (!( shapeDefined = (myGanttView->shapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
- //qDebug("KDGantt::KDGanttViewItem created with not user defined tqshapes");
+ //qDebug("KDGantt::KDGanttViewItem created with not user defined shapes");
};
setShapes(myStartShape,myMiddleShape,myEndShape);
@@ -1484,12 +1484,12 @@ void KDGanttViewItem::initColorAndShapes(Type t)
floatStartShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
floatEndShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
- // set color of tqshapes
+ // set color of shapes
if (!( colorDefined = (myGanttView->colors(myType,myStartColor,myMiddleColor,myEndColor)))) {
};
setColors(defaultColor(),defaultColor(), defaultColor());
- // set highlight color of tqshapes
+ // set highlight color of shapes
if (!( colorHLDefined = (myGanttView->highlightColors(myType,myStartColorHL,myMiddleColorHL,myEndColorHL)))) {
};
@@ -1506,9 +1506,9 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-TQString KDGanttViewItem::tqshapeToString( Shape tqshape )
+TQString KDGanttViewItem::shapeToString( Shape shape )
{
- switch( tqshape ) {
+ switch( shape ) {
case TriangleDown:
return "TriangleDown";
case TriangleUp:
@@ -1569,13 +1569,13 @@ void KDGanttViewItem::createNode( TQDomDocument& doc,
KDGanttXML::createBoolNode( doc, itemElement, "Open", isOpen() );
KDGanttXML::createBoolNode( doc, itemElement, "Highlight", highlight() );
Shape startShape, middleShape, endShape;
- tqshapes( startShape, middleShape, endShape );
+ shapes( startShape, middleShape, endShape );
KDGanttXML::createStringNode( doc, itemElement, "StartShape",
- tqshapeToString( startShape ) );
+ shapeToString( startShape ) );
KDGanttXML::createStringNode( doc, itemElement, "MiddleShape",
- tqshapeToString( middleShape ) );
+ shapeToString( middleShape ) );
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
- tqshapeToString( endShape ) );
+ shapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
@@ -1942,9 +1942,9 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
/*!
- Returns the start time of the tqchildren of this item.
+ Returns the start time of the children of this item.
- \return the start time of the tqchildren of this item
+ \return the start time of the children of this item
*/
TQDateTime KDGanttViewItem::myChildStartTime()
{
@@ -1976,9 +1976,9 @@ TQDateTime KDGanttViewItem::myChildStartTime()
/*!
- Returns the end time of the tqchildren of this item.
+ Returns the end time of the children of this item.
- \return the end time of the tqchildren of this item
+ \return the end time of the children of this item
*/
TQDateTime KDGanttViewItem::myChildEndTime()
{
@@ -2042,7 +2042,7 @@ void KDGanttViewItem::setShowNoInformation( bool show )
/*!
If the name of this item is \a name (i.e., listViewText() == name),
the pointer to this item is returned. Otherwise, it looks for an
- item with name \a name in the set of tqchildren and subtqchildren of
+ item with name \a name in the set of children and subchildren of
this item.
\param name the name of the item
\return the pointer to the item with name \a name
@@ -2363,37 +2363,37 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
\var KDGanttViewItem::startShape
- the tqshape at the beginning of the item
+ the shape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShape
- the tqshape in the middle of the item
+ the shape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShape
- the tqshape at the end of the item
+ the shape at the end of the item
*/
/*!
\var KDGanttViewItem::startShapeBack
- the background tqshape at the beginning of the item
+ the background shape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShapeBack
- the background tqshape in the middle of the item
+ the background shape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShapeBack
- the background tqshape at the end of the item
+ the background shape at the end of the item
*/
diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h
index 972aa4d6..70ca358e 100644
--- a/kdgantt/KDGanttViewItem.h
+++ b/kdgantt/KDGanttViewItem.h
@@ -146,7 +146,7 @@ public:
//bool isCalendar( ) const;
void setShapes( Shape start, Shape middle, Shape end );
- void tqshapes( Shape& start, Shape& middle, Shape& end ) const;
+ void shapes( Shape& start, Shape& middle, Shape& end ) const;
void setDefaultColor( const TQColor& );
TQColor defaultColor() const;
void setColors( const TQColor& start, const TQColor& middle,
@@ -196,7 +196,7 @@ private:
friend class KDGanttViewItemDrag;
friend class itemAttributeDialog;
- static TQString tqshapeToString( Shape tqshape );
+ static TQString shapeToString( Shape shape );
static Shape stringToShape( const TQString& string );
static TQString typeToString( Type type );
@@ -236,7 +236,7 @@ private:
bool isMyTextCanvas(TQCanvasItem *tc);
TQPoint myTextOffset;
TQString _name;
- bool tqshapeDefined;
+ bool shapeDefined;
int _priority;
static TQDict<KDGanttViewItem> sItemDict;
};
diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp
index c73eff67..158da041 100644
--- a/kdgantt/KDGanttViewItemDrag.cpp
+++ b/kdgantt/KDGanttViewItemDrag.cpp
@@ -63,7 +63,7 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *sour
pix = *(item->pixmap()) ;
else {
KDGanttViewItem::Shape start, middle, end;
- item->tqshapes( start, middle, end );
+ item->shapes( start, middle, end );
TQColor st, mi, en;
item->colors( st, mi, en );
pix =item->myGanttView->getPixmap( start, st, item->myGanttView->lvBackgroundColor(), 11 );
@@ -86,7 +86,7 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *sour
\param c the format of the data
\return the encoded data of the drag object
*/
-TQByteArray KDGanttViewItemDrag::tqencodedData( const char * c) const
+TQByteArray KDGanttViewItemDrag::encodedData( const char * c) const
{
TQString s ( c );
if ( s == "x-application/x-KDGanttViewItemDrag" ) {
@@ -132,7 +132,7 @@ bool KDGanttViewItemDrag::canDecode ( const TQMimeSource * e )
bool KDGanttViewItemDrag::decode ( const TQMimeSource * e , TQString & string)
{
TQByteArray arr;
- arr = e->tqencodedData( "x-application/x-KDGanttViewItemDrag");
+ arr = e->encodedData( "x-application/x-KDGanttViewItemDrag");
TQDataStream s( arr, IO_ReadOnly );
s >> string;
return true;
diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h
index a4d6cb6f..9219c918 100644
--- a/kdgantt/KDGanttViewItemDrag.h
+++ b/kdgantt/KDGanttViewItemDrag.h
@@ -44,7 +44,7 @@ class KDGanttViewItemDrag :public TQStoredDrag
public:
KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ;
- TQByteArray tqencodedData( const char * c) const;
+ TQByteArray encodedData( const char * c) const;
KDGanttViewItem* getItem();
static bool canDecode ( const TQMimeSource * e );
static bool decode ( const TQMimeSource * e, TQString & );
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index d158c75a..f44b8fb5 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -48,7 +48,7 @@
#include <tqtooltip.h>
#include <tqapplication.h>
#include <tqdrawutil.h>
-#include <tqpalette.h>
+#include <palette.h>
#include <tqdragobject.h>
#include <tqptrlist.h>
#include <tqpen.h>
@@ -702,12 +702,12 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant )
mySizeHint = 0;
myGanttView = gant;
flagDoNotRecomputeAfterChange = true;
- TQDateTime start = (TQDateTime::tqcurrentDateTime ()).addSecs(-3600);
+ TQDateTime start = (TQDateTime::currentDateTime ()).addSecs(-3600);
setHorizonStart(start);
setHorizonEnd( start.addSecs(3600*2));
flagStartTimeSet = false;
flagEndTimeSet = false;
- myCenterDateTime = TQDateTime::tqcurrentDateTime ();
+ myCenterDateTime = TQDateTime::currentDateTime ();
setScale(KDGanttView::Auto);
//setScale(KDGanttView::Hour);
myMaxScale = KDGanttView::Month;
@@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
if (flagZoomToFit)
myPopupMenu->changeItem( 1, i18n("Zoom (Fit)"));
else
- myPopupMenu->changeItem( 1, i18n("Zoom (%1)").tqarg( TQString::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 ) {
@@ -1140,7 +1140,7 @@ void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end)
}
flagDoNotRepaintAfterChange = false;
updateTimeTable();
- tqrepaint();
+ repaint();
moveTimeLineTo((getCoordX(start)-(viewWid-timeWid)/2));
// Since we have disconnected autoupdate of scrollbars, we must do it ourselves
if (myGanttView && myGanttView->myCanvasView)
@@ -2098,7 +2098,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
TQPainter p(this);
int Width, Height;
TQString testTextMinor,testTextMajor, tempStr;
- TQRect tqitemRectMinor, tqitemRectMajor;
+ TQRect itemRectMinor, itemRectMajor;
TQDate tempDate = myRealStart.date();
myRealEnd = myRealStart;
// preparing the testtext for the differennt scales
@@ -2121,25 +2121,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
testTextMinor = "12 AM";
testTextMajor = "Mon Aug 30, x";
if ( yearFormat() != KDGanttView::NoDate )
- testTextMajor += getYear(TQDate::tqcurrentDate());
+ testTextMajor += getYear(TQDate::currentDate());
minorPerMajor = 2400;
break;
case KDGanttView::Day:
minorItems = minorItems/(60*24);
testTextMinor = "88";
- testTextMajor = "Aug 30, x"+getYear(TQDate::tqcurrentDate());
+ testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate());
minorPerMajor = 700;
break;
case KDGanttView::Week:
minorItems = minorItems/(60*24*7);
testTextMinor = "88";
- testTextMajor = "Aug x"+getYear(TQDate::tqcurrentDate());
+ 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(TQDate::tqcurrentDate());
+ testTextMajor = "x"+getYear(TQDate::currentDate());
minorPerMajor = 1200;
break;
case KDGanttView::Auto:
@@ -2147,12 +2147,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
qDebug(" RealScale == Auto : This may not be! ");
break;
}
- tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
- tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
+ itemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
+ itemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
p.end();
//qDebug(" tempMinorScaleCount %d ", tempMinorScaleCount);
- Height = tqitemRectMinor.height()+tqitemRectMajor.height()+11;
- Width = (tqitemRectMinor.width()+5);
+ Height = itemRectMinor.height()+itemRectMajor.height()+11;
+ Width = (itemRectMinor.width()+5);
if (Width < minimumColumnWidth()) Width = minimumColumnWidth();
// if the desired width is greater than the maximum width of this widget
// increase the minorscalecount
@@ -2209,7 +2209,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
// checking, if enough space for majorscale
// if not, increasing MajorScaleCount
- while ((minorPerMajor*Width)/100 < tqitemRectMajor.width()) {
+ while ((minorPerMajor*Width)/100 < itemRectMajor.width()) {
minorPerMajor = minorPerMajor/tempMajorScaleCount;
++tempMajorScaleCount;
minorPerMajor = minorPerMajor*tempMajorScaleCount;
@@ -2219,13 +2219,13 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
myGridMinorWidth = Width;
// the width of this widget is the gridwidth * the amount of items
Width *= minorItems;
- // if size changed, reset tqgeometry
+ // if size changed, reset geometry
if (width() != Width || height() != Height )
{
resize( Width, Height );
emit sizeChanged( Width );
}
- myMajorGridHeight = tqitemRectMajor.height()+5;
+ myMajorGridHeight = itemRectMajor.height()+5;
TQTime tempTime = myRealStart.time();
TQDateTime tempDateTime;
int i;
@@ -2355,7 +2355,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
myGanttView->myTimeTable->setBlockUpdating( block );
updateTimeTable();
centerDateTime(myCenterDateTime);
- tqrepaint();
+ repaint();
}
@@ -2501,7 +2501,7 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * )
//zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) );
}
mouseDown = false;
- tqrepaint();
+ repaint();
}
@@ -2516,11 +2516,11 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
if ( mouseDown ) {
if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) {
mouseDown = false;
- tqrepaint();
+ repaint();
return;
}
endMouseDown = e->pos().x();
- //tqrepaint;
+ //repaint;
int val = -1;
if (endMouseDown < -x() ) {
val = myGanttView->myCanvasView->horizontalScrollBar()->value() -
@@ -2643,7 +2643,7 @@ TQSize KDLegendWidget::legendSize()
TQSize KDLegendWidget::legendSizeHint()
{
TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
- return TQSize( myLegend->tqsizeHint().width(), myLegend->tqsizeHint().height()+scroll->horizontalScrollBar()->height());
+ return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
}
@@ -2664,7 +2664,7 @@ void KDLegendWidget::clearLegend ( )
myLegend->setFont( font() );
scroll->addChild( myLegend );
scroll->setResizePolicy( TQScrollView::AutoOneFit );
- myLegend->tqlayout()->setMargin( 11 );
+ myLegend->layout()->setMargin( 11 );
myLegend->setFrameStyle( TQFrame::NoFrame );
if ( dock )
scroll->setMaximumHeight( 32000 );
@@ -2673,10 +2673,10 @@ void KDLegendWidget::clearLegend ( )
}
-void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text )
+void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text )
{
TQLabel * temp;
- TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10);
+ TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, TQt::white, 10);
TQWidget *w = new TQWidget( myLegend );
w->setBackgroundColor( TQt::white );
TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6);
@@ -2896,7 +2896,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
c = fc;
// draw to last interesting column
- const TQColorGroup &cg = ( tqpalette().inactive() );
+ const TQColorGroup &cg = ( palette().inactive() );
while ( c < lc && !drawables.isEmpty() ) {
int i = header()->mapToLogical( c );
@@ -2933,7 +2933,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
if ( tx < 0 )
tx = header()->cellPos( cell );
- // do any tqchildren of current need to be painted?
+ // do any children of current need to be painted?
/* FIXME: painting branches doesn't work for some reason...
if ( ih != ith &&
rootIsDecorated() &&
@@ -2961,7 +2961,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
p->translate( rleft, crtop );
//kdDebug()<<k_funcinfo<<"paintBranches: "<<current->i->text(0)<<endl;
- current->i->paintBranches( p, tqcolorGroup(), treeStepSize(),
+ current->i->paintBranches( p, colorGroup(), treeStepSize(),
rtop - crtop, r.height() );
p->restore();
}
@@ -3506,7 +3506,7 @@ TQString KDGanttCanvasView::getWhatsThisText(TQPoint p)
void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
{
//qDebug("mousepress! %d ", this);
- //qDebug("focus %d ",tqApp->tqfocusWidget());
+ //qDebug("focus %d ",tqApp->focusWidget());
setFocus();
currentLink = 0;
currentItem = 0;
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h
index 8b7bc215..618acb7a 100644
--- a/kdgantt/KDGanttViewSubwidgets.h
+++ b/kdgantt/KDGanttViewSubwidgets.h
@@ -49,9 +49,9 @@
#include <tqtimer.h>
#include <tqgroupbox.h>
#include <tqvgroupbox.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqlabel.h>
-#include <tqbrush.h>
+#include <brush.h>
#include <tqvbox.h>
#include <tqdockwindow.h>
#include <tqtimer.h>
@@ -331,7 +331,7 @@ public:
KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent );
void showMe(bool);
bool isShown();
- void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
void setFont( TQFont );
void drawToPainter( TQPainter *p );
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index b51bcbd0..64ecbd84 100644
--- a/kdgantt/KDGanttViewTaskItem.cpp
+++ b/kdgantt/KDGanttViewTaskItem.cpp
@@ -43,7 +43,7 @@
This class represents calendar items in Gantt charts.
- A calendar item in a Gantt chart has no start/end tqshape,
+ A calendar item in a Gantt chart has no start/end shape,
it is displayed as a rectangle.
You can set the colors as usual, where only the first argument of
setColors( col, col, col )
diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp
index aea23944..db2d1ef5 100644
--- a/kdgantt/KDGanttXMLTools.cpp
+++ b/kdgantt/KDGanttXMLTools.cpp
@@ -33,7 +33,7 @@
**********************************************************************/
#include "KDGanttXMLTools.h"
-#include <tqbrush.h>
+#include <brush.h>
#include <tqbuffer.h>
#include <tqimage.h>
#include <zlib.h>
diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui
index a3616dca..5a34dbb5 100644
--- a/kdgantt/itemAttributeDialog.ui
+++ b/kdgantt/itemAttributeDialog.ui
@@ -64,7 +64,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>0</width>
<height>16</height>
@@ -383,7 +383,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>0</width>
<height>16</height>
@@ -462,7 +462,7 @@
<property name="text">
<string>Text color:</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h
index 3ab24af8..8624d45d 100644
--- a/kdgantt/itemAttributeDialog.ui.h
+++ b/kdgantt/itemAttributeDialog.ui.h
@@ -54,7 +54,7 @@ void itemAttributeDialog::ChangeText_clicked()
myItem->setTextColor( c );
TQPixmap * pix = (TQPixmap *)ChangeText->pixmap();
pix->fill( myItem->textColor() );
- ChangeText->tqrepaint();
+ ChangeText->repaint();
}
@@ -62,7 +62,7 @@ void itemAttributeDialog::ChangeStart_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->colors( st, mi, en );
TQColor c = TQColorDialog::getColor( st, this );
@@ -79,7 +79,7 @@ void itemAttributeDialog::ChangeMiddle_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->colors( st, mi, en );
TQColor c = TQColorDialog::getColor( mi, this );
@@ -95,7 +95,7 @@ void itemAttributeDialog::ChangeEnd_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->colors( st, mi, en );
TQColor c = TQColorDialog::getColor( en, this );
@@ -244,7 +244,7 @@ void itemAttributeDialog::reset( KDGanttViewItem * item )
// DateEdit3->setRange(item->startTime().date(), item->endTime().date().addYears(10));
LineEdit1->setText( item->text() );
KDGanttViewItem::Shape start, middle, end;
- item->tqshapes( start, middle, end );
+ item->shapes( start, middle, end );
TQColor st, mi, en;
item->colors( st, mi, en );
ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
@@ -272,7 +272,7 @@ void itemAttributeDialog::HighStart_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
TQColor c = TQColorDialog::getColor( st, this );
@@ -289,7 +289,7 @@ void itemAttributeDialog::HighMiddle_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
TQColor c = TQColorDialog::getColor( mi, this );
@@ -306,7 +306,7 @@ void itemAttributeDialog::HighEnd_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
TQColor c = TQColorDialog::getColor( en, this );
@@ -409,7 +409,7 @@ void itemAttributeDialog::LineEdit1_textChanged( const TQString & )
void itemAttributeDialog::StartBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
start = KDGanttViewItem::stringToShape( s );
myItem->setShapes( start, middle, end );
reset( myItem );
@@ -419,7 +419,7 @@ void itemAttributeDialog::StartBox_activated( const TQString & s )
void itemAttributeDialog::MiddleBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
middle = KDGanttViewItem::stringToShape( s );
myItem->setShapes( start, middle, end );
reset( myItem );
@@ -430,7 +430,7 @@ void itemAttributeDialog::MiddleBox_activated( const TQString & s )
void itemAttributeDialog::EndBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
- myItem->tqshapes( start, middle, end );
+ myItem->shapes( start, middle, end );
end = KDGanttViewItem::stringToShape( s );
myItem->setShapes( start, middle, end );
reset( myItem );
diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h
index e87eb5de..15cd80de 100644
--- a/kdgantt/qlayoutengine_p.h
+++ b/kdgantt/qlayoutengine_p.h
@@ -56,21 +56,21 @@
#ifndef TQT_H
-#include "tqabstracttqlayout.h"
+#include "tqabstractlayout.h"
#endif // TQT_H
#ifndef TQT_NO_LAYOUT
struct QLayoutStruct
{
- void initParameters() { tqminimumSize = tqsizeHint = 0;
- tqmaximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
+ void initParameters() { minimumSize = sizeHint = 0;
+ maximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
void init() { stretch = 0; initParameters(); }
//permanent storage:
int stretch;
//parameters:
- TQCOORD tqsizeHint;
- TQCOORD tqmaximumSize;
- TQCOORD tqminimumSize;
+ TQCOORD sizeHint;
+ TQCOORD maximumSize;
+ TQCOORD minimumSize;
bool expansive;
bool empty;
//temporary storage: