summaryrefslogtreecommitdiffstats
path: root/kdgantt
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
commit9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch)
treeab537a329b9613e11dce8195761f93ffe82aed24 /kdgantt
parent3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff)
downloadtdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz
tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kdgantt')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp164
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h6
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp32
-rw-r--r--kdgantt/KDGanttSemiSizingControl.h4
-rw-r--r--kdgantt/KDGanttView.cpp206
-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.cpp62
-rw-r--r--kdgantt/KDGanttViewSubwidgets.h8
-rw-r--r--kdgantt/KDGanttViewTaskItem.cpp2
-rw-r--r--kdgantt/KDGanttXMLTools.cpp2
-rw-r--r--kdgantt/Makefile.am2
-rw-r--r--kdgantt/itemAttributeDialog.ui6
-rw-r--r--kdgantt/itemAttributeDialog.ui.h22
-rw-r--r--kdgantt/qlayoutengine_p.h14
18 files changed, 362 insertions, 362 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index 1e9a9783c..f11832f37 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -39,8 +39,8 @@
#include "tqbitmap.h"
#include "tqptrlist.h"
#include "tqmemarray.h"
-#include "layout.h"
-#include "layoutengine_p.h"
+#include "tqlayout.h"
+#include "tqlayoutengine_p.h"
#include "tqobjectlist.h"
#include "tqstyle.h"
#include "tqapplication.h" //sendPostedEvents
@@ -64,7 +64,7 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
setMouseTracking( true );
}
-TQSize KDGanttSplitterHandle::sizeHint() const
+TQSize KDGanttSplitterHandle::tqsizeHint() const
{
return TQSize(8,8);
}
@@ -108,7 +108,7 @@ void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e )
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
if ( _activeButton != 0)
- repaint();
+ tqrepaint();
updateCursor( e->pos() );
}
}
@@ -165,7 +165,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e )
s->moveSplitter( pos, id() );
}
}
- repaint();
+ tqrepaint();
}
int KDGanttSplitterHandle::onButton( const TQPoint& p )
@@ -238,16 +238,16 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
TQPainter p( &buffer );
// Draw the splitter rectangle
- p.setBrush( colorGroup().background() );
- p.setPen( colorGroup().foreground() );
+ p.setBrush( tqcolorGroup().background() );
+ p.setPen( tqcolorGroup().foreground() );
p.drawRect( rect() );
parentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, rect(),
- parentWidget()->colorGroup());
+ parentWidget()->tqcolorGroup());
int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size
// arrow color
- TQColor col = colorGroup().background().dark( 200 );
+ TQColor col = tqcolorGroup().background().dark( 200 );
p.setBrush( col );
p.setPen( col );
@@ -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( parentWidget()->tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- parentWidget()->tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
- p.drawPolygon( *it, true );
+ p.translate( parentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ parentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p.tqdrawPolygon( *it, true );
p.restore();
}
else {
- p.drawPolygon( *it, true );
+ p.tqdrawPolygon( *it, true );
}
index++;
}
@@ -319,7 +319,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 children. Any number of widgets
+ dragging the boundary between the tqchildren. Any number of widgets
may be controlled.
To show a TQListBox, a TQListView and a TQTextEdit side by side:
@@ -332,14 +332,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 children are side by side)
+ vertical. The default is horizontal (the tqchildren 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 children only
+ Although KDGanttMinimizeSplitter normally resizes the tqchildren only
at the end of a resize operation, if you call setOpaqueResize( TRUE
) the widgets are resized as often as possible.
@@ -349,7 +349,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
- children. It will be reinstated when you show() it again. It is also
+ tqchildren. It will be reinstated when you show() it again. It is also
possible to reorder the widgets within the splitter using
moveToFirst() and moveToLast().
*/
@@ -364,10 +364,10 @@ static TQSize minSize( const TQWidget* /*w*/ )
// This is the original version of minSize
static TQSize minSizeHint( const TQWidget* w )
{
- TQSize min = w->minimumSize();
+ TQSize min = w->tqminimumSize();
TQSize s;
if ( min.height() <= 0 || min.width() <= 0 )
- s = w->minimumSizeHint();
+ s = w->tqminimumSizeHint();
if ( min.height() > 0 )
s.setHeight( min.height() );
if ( min.width() > 0 )
@@ -400,7 +400,7 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, TQWidget *p
}
/*!
- Destroys the splitter and any children.
+ Destroys the splitter and any tqchildren.
*/
KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
{
@@ -413,9 +413,9 @@ void KDGanttMinimizeSplitter::init()
{
data = new TQSplitterData;
if ( orient == Qt::Horizontal )
- setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
+ tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
else
- setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
+ tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
}
@@ -433,9 +433,9 @@ void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
orient = o;
if ( orient == Qt::Horizontal )
- setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
else
- setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
TQSplitterLayoutStruct *s = data->list.first();
while ( s ) {
@@ -478,7 +478,7 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
s->wid = newHandle;
newHandle->setId(data->list.count());
s->isSplitter = TRUE;
- s->sizer = pick( newHandle->sizeHint() );
+ s->sizer = pick( newHandle->tqsizeHint() );
if ( first )
data->list.insert( 0, s );
else
@@ -487,8 +487,8 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
s = new TQSplitterLayoutStruct;
s->mode = Stretch;
s->wid = w;
- if ( !testWState( WState_Resized ) && w->sizeHint().isValid() )
- s->sizer = pick( w->sizeHint() );
+ if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() )
+ s->sizer = pick( w->tqsizeHint() );
else
s->sizer = pick( w->size() );
s->isSplitter = FALSE;
@@ -561,7 +561,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
paint.setRasterOp( XorROP );
TQRect r = contentsRect();
const int rBord = 3; //Themable????
- int sw = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
+ int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
if ( orient == Qt::Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
@@ -601,7 +601,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), colorGroup(),
+ tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(),
(orientation() == Qt::Horizontal ?
TQStyle::Style_Horizontal : 0));
}
@@ -632,7 +632,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 layout is reversed, and using this
+ For Arabic and Hebrew the tqlayout 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.
@@ -705,13 +705,13 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
} else {
int dd, newLeft, nextPos;
if( TQApplication::reverseLayout() && orient == Qt::Horizontal ) {
- dd = w->geometry().right() - pos;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
+ dd = w->tqgeometry().right() - pos;
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
newLeft = pos+1;
nextPos = newLeft + dd;
} else {
dd = pos - pick( w->pos() ) + 1;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
newLeft = pos-dd+1;
nextPos = newLeft - 1;
}
@@ -760,13 +760,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->maximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
newLeft = pos-dd+1;
nextPos = newLeft - 1;
} else {
- right = pick( w->geometry().bottomRight() );
+ right = pick( w->tqgeometry().bottomRight() );
dd = right - pos + 1;
- dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize())));
+ dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize())));
/*newRight = pos+dd-1;*/
newLeft = pos;
nextPos = newLeft + dd;
@@ -820,7 +820,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxB += s->sizer;
} else {
minB += pick( minSize(s->wid) );
- maxB += pick( s->wid->maximumSize() );
+ maxB += pick( s->wid->tqmaximumSize() );
}
}
for ( i = id; i < n; i++ ) {
@@ -832,12 +832,12 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxA += s->sizer;
} else {
minA += pick( minSize(s->wid) );
- maxA += pick( s->wid->maximumSize() );
+ maxA += pick( s->wid->tqmaximumSize() );
}
}
TQRect r = contentsRect();
if ( orient == Qt::Horizontal && TQApplication::reverseLayout() ) {
- int splitterWidth = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
+ int splitterWidth = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
if ( min )
*min = pick(r.topRight()) - TQMIN( maxB, pick(r.size())-minA ) - splitterWidth;
if ( max )
@@ -879,27 +879,27 @@ void KDGanttMinimizeSplitter::doResize()
TQSplitterLayoutStruct *s = data->list.at(i);
if ( s->wid->isHidden() ) {
a[i].stretch = 0;
- a[i].sizeHint = a[i].minimumSize = 0;
- a[i].maximumSize = 0;
+ a[i].tqsizeHint = a[i].tqminimumSize = 0;
+ a[i].tqmaximumSize = 0;
} else if ( s->isSplitter ) {
a[i].stretch = 0;
- a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer;
+ a[i].tqsizeHint = a[i].tqminimumSize = a[i].tqmaximumSize = s->sizer;
a[i].empty = FALSE;
} else if ( s->mode == KeepSize ) {
a[i].stretch = 0;
- a[i].minimumSize = pick( minSize(s->wid) );
- a[i].sizeHint = s->sizer;
- a[i].maximumSize = pick( s->wid->maximumSize() );
+ a[i].tqminimumSize = pick( minSize(s->wid) );
+ a[i].tqsizeHint = s->sizer;
+ a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
a[i].empty = FALSE;
} else if ( s->mode == FollowSizeHint ) {
a[i].stretch = 0;
- a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() );
- a[i].maximumSize = pick( s->wid->maximumSize() );
+ a[i].tqminimumSize = a[i].tqsizeHint = pick( s->wid->tqsizeHint() );
+ a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
a[i].empty = FALSE;
} else { //proportional
a[i].stretch = s->sizer;
- a[i].maximumSize = pick( s->wid->maximumSize() );
- a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) );
+ a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() );
+ a[i].tqsizeHint = a[i].tqminimumSize = pick( minSize(s->wid) );
a[i].empty = FALSE;
}
}
@@ -953,9 +953,9 @@ void KDGanttMinimizeSplitter::recalc( bool update )
} else {
TQSize minS = minSize(s->wid);
minl += pick( minS );
- maxl += pick( s->wid->maximumSize() );
+ maxl += pick( s->wid->tqmaximumSize() );
mint = TQMAX( mint, trans( minS ));
- int tm = trans( s->wid->maximumSize() );
+ int tm = trans( s->wid->tqmaximumSize() );
if ( tm > 0 )
maxt = TQMIN( maxt, tm );
}
@@ -966,7 +966,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
// nested splitters; be nice
maxl = maxt = 0;
} else {
- // KDGanttMinimizeSplitter with no children yet
+ // KDGanttMinimizeSplitter with no tqchildren yet
maxl = TQWIDGETSIZE_MAX;
}
} else {
@@ -1105,7 +1105,7 @@ void KDGanttMinimizeSplitter::recalcId()
/*! Reimplemented from superclass.
*/
-TQSize KDGanttMinimizeSplitter::sizeHint() const
+TQSize KDGanttMinimizeSplitter::tqsizeHint() const
{
constPolish();
int l = 0;
@@ -1119,7 +1119,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const
++it;
if ( o->isWidgetType() &&
!((TQWidget*)o)->isHidden() ) {
- TQSize s = ((TQWidget*)o)->sizeHint();
+ TQSize s = ((TQWidget*)o)->tqsizeHint();
if ( s.isValid() ) {
l += pick( s );
t = TQMAX( t, trans( s ) );
@@ -1135,7 +1135,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const
\reimp
*/
-TQSize KDGanttMinimizeSplitter::minimumSizeHint() const
+TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const
{
constPolish();
int l = 0;
@@ -1229,7 +1229,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
splitter.
Giving the values to another splitter's setSizes() function will
- produce a splitter with the same layout as this one.
+ produce a splitter with the same tqlayout as this one.
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
@@ -1309,7 +1309,7 @@ void KDGanttMinimizeSplitter::processChildEvents()
void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
- int sw = tqstyle().pixelMetric(TQStyle::PM_SplitterWidth, this);
+ int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this);
TQSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
@@ -1364,9 +1364,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].sizeHint;
- cMin += chain[i].minimumSize;
- cMax += chain[i].maximumSize;
+ cHint += chain[i].tqsizeHint;
+ cMin += chain[i].tqminimumSize;
+ cMax += chain[i].tqmaximumSize;
sumStretch += chain[i].stretch;
if ( !chain[i].empty )
spacerCount++;
@@ -1379,11 +1379,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].minimumSize;
+ chain[i].size = chain[i].tqminimumSize;
chain[i].done = TRUE;
}
} else if ( space < cHint + spacerCount*spacer ) {
- // Less space than sizeHint, but more than minimum.
+ // Less space than tqsizeHint, 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;
@@ -1391,10 +1391,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].minimumSize >= chain[i].sizeHint) {
- chain[i].size = chain[i].sizeHint;
+ if ( !chain[i].done && chain[i].tqminimumSize >= chain[i].tqsizeHint) {
+ chain[i].size = chain[i].tqsizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].sizeHint;
+ space_left -= chain[i].tqsizeHint;
// sumStretch -= chain[i].stretch;
n--;
}
@@ -1413,13 +1413,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].sizeHint - w;
+ chain[i].size = chain[i].tqsizeHint - w;
fp_w -= toFixed( w ); //give the difference to the next
- if ( chain[i].size < chain[i].minimumSize ) {
+ if ( chain[i].size < chain[i].tqminimumSize ) {
chain[i].done = TRUE;
- chain[i].size = chain[i].minimumSize;
+ chain[i].size = chain[i].tqminimumSize;
finished = FALSE;
- overdraft -= chain[i].sizeHint - chain[i].minimumSize;
+ overdraft -= chain[i].tqsizeHint - chain[i].tqminimumSize;
// sumStretch -= chain[i].stretch;
n--;
break;
@@ -1431,11 +1431,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].maximumSize <= chain[i].sizeHint
+ if ( !chain[i].done && (chain[i].tqmaximumSize <= chain[i].tqsizeHint
|| wannaGrow && !chain[i].expansive) ) {
- chain[i].size = chain[i].sizeHint;
+ chain[i].size = chain[i].tqsizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].sizeHint;
+ space_left -= chain[i].tqsizeHint;
sumStretch -= chain[i].stretch;
n--;
}
@@ -1467,20 +1467,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].sizeHint ) {
- deficit += chain[i].sizeHint - w;
- } else if ( w > chain[i].maximumSize ) {
- surplus += w - chain[i].maximumSize;
+ if ( w < chain[i].tqsizeHint ) {
+ deficit += chain[i].tqsizeHint - w;
+ } else if ( w > chain[i].tqmaximumSize ) {
+ surplus += w - chain[i].tqmaximumSize;
}
}
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].sizeHint ) {
- chain[i].size = chain[i].sizeHint;
+ chain[i].size < chain[i].tqsizeHint ) {
+ chain[i].size = chain[i].tqsizeHint;
chain[i].done = TRUE;
- space_left -= chain[i].sizeHint;
+ space_left -= chain[i].tqsizeHint;
sumStretch -= chain[i].stretch;
n--;
}
@@ -1490,10 +1490,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].maximumSize ) {
- chain[i].size = chain[i].maximumSize;
+ chain[i].size > chain[i].tqmaximumSize ) {
+ chain[i].size = chain[i].tqmaximumSize;
chain[i].done = TRUE;
- space_left -= chain[i].maximumSize;
+ space_left -= chain[i].tqmaximumSize;
sumStretch -= chain[i].stretch;
n--;
}
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 1ebf7b543..0d3499ac1 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -70,8 +70,8 @@ public:
void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- virtual TQSize sizeHint() const;
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
TQValueList<int> sizes() const;
void setSizes( TQValueList<int> );
@@ -147,7 +147,7 @@ public:
bool opaque() const { return s->opaqueResize(); }
- TQSize sizeHint() const;
+ TQSize tqsizeHint() 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 dcc2f40d2..bfaa161d0 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -247,9 +247,9 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition(
void KDGanttSemiSizingControl::init()
{
_but = new TQPushButton( this );
- _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ _but->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) );
- _layout = 0;
+ _tqlayout = 0;
TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
TQToolTip::add( _but, "Show / hide legend");
@@ -258,19 +258,19 @@ void KDGanttSemiSizingControl::init()
void KDGanttSemiSizingControl::setup()
{
- //-------------------------------------------------- Setup layout
- delete _layout;
- TQBoxLayout* butLayout; // _layout will delete me
+ //-------------------------------------------------- Setup tqlayout
+ delete _tqlayout;
+ TQBoxLayout* butLayout; // _tqlayout will delete me
if ( _orient == Qt::Horizontal || isMinimized() )
- _layout = new TQHBoxLayout( this );
+ _tqlayout = new TQHBoxLayout( this );
else
- _layout = new TQVBoxLayout( this );
+ _tqlayout = new TQVBoxLayout( this );
if ( _orient == Qt::Vertical && !isMinimized() )
- butLayout = new TQHBoxLayout( _layout );
+ butLayout = new TQHBoxLayout( _tqlayout );
else
- butLayout = new TQVBoxLayout( _layout );
+ butLayout = new TQVBoxLayout( _tqlayout );
@@ -306,9 +306,9 @@ void KDGanttSemiSizingControl::setup()
widget = _maximizedWidget;
if( widget ) {
if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
- _layout->addWidget( widget, 1 );
+ _tqlayout->addWidget( widget, 1 );
else
- _layout->insertWidget( 0, widget, 1 );
+ _tqlayout->insertWidget( 0, widget, 1 );
}
************************************************** */
// hack for the usage in KDGantt as pop-up legend widget
@@ -319,16 +319,16 @@ void KDGanttSemiSizingControl::setup()
widget = _minimizedWidget;
if( widget ) {
if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
- _layout->addWidget( widget, 1 );
+ _tqlayout->addWidget( widget, 1 );
else
- _layout->insertWidget( 0, widget, 1 );
+ _tqlayout->insertWidget( 0, widget, 1 );
}
}
else {
if ( _arrowPos == Before || _orient == Qt::Vertical && !isMinimized() )
- _layout->addStretch( 1 );
+ _tqlayout->addStretch( 1 );
else
- _layout->insertStretch( 0, 1 );
+ _tqlayout->insertStretch( 0, 1 );
widget = _maximizedWidget;
// the following is only the special case
// arrowPos == Before and _orient == Qt::Vertical
@@ -395,7 +395,7 @@ TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
TQPainter p( &pix );
p.setPen( black );
- p.setBrush( colorGroup().button() );
+ p.setBrush( tqcolorGroup().button() );
p.drawPolygon( arr );
TQBitmap bit( s, s );
bit.fill( color0 );
diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h
index 823eddacd..c1cc0b597 100644
--- a/kdgantt/KDGanttSemiSizingControl.h
+++ b/kdgantt/KDGanttSemiSizingControl.h
@@ -36,7 +36,7 @@
#define KDGANTTSEMISIZINGCONTROL_H
#include "KDGanttSizingControl.h"
-#include <layout.h>
+#include <tqlayout.h>
class TQPushButton;
class TQBoxLayout;
@@ -83,7 +83,7 @@ private:
ArrowPosition _arrowPos;
TQWidget* _minimizedWidget;
TQWidget* _maximizedWidget;
- TQBoxLayout* _layout;
+ TQBoxLayout* _tqlayout;
TQPushButton* _but;
};
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 1aaa1e468..5a1618a31 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -41,7 +41,7 @@
#include "itemAttributeDialog.h"
#include <tqprinter.h>
#include <tqpainter.h>
-#include <layout.h>
+#include <tqlayout.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::currentDateTime () );
+ centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () );
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:
- sizeHint().width() of the list view + width of TimeTable
+ tqsizeHint().width() of the list view + width of TimeTable
Returned height:
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-TQSize KDGanttView::sizeHint() const
+TQSize KDGanttView::tqsizeHint() const
{
bool block = myTimeTable->blockUpdating();
myTimeTable->setBlockUpdating( false );
@@ -342,9 +342,9 @@ TQSize KDGanttView::sizeHint() const
if ( myLegend->isShown() )
hintHeight += myLegend->legendSizeHint().height() +10;
hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2;
- int hintWid = myListView->sizeHint().width();
+ int hintWid = myListView->tqsizeHint().width();
//hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width();
- hintWid += myCanvasView->sizeHint().width();
+ hintWid += myCanvasView->tqsizeHint().width();
// add 10 for the splitter-bars
// qDebug("sizehint %d %d ",hintWid+10, hintHeight );
myTimeTable->setBlockUpdating( block );
@@ -532,7 +532,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 repaint problems occur.
+ after scrolling. Recommended, when tqrepaint 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
@@ -615,7 +615,7 @@ void KDGanttView::slotHeaderSizeChanged()
// legend is cleared - reinit legend with list
legendItem* li;
for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) {
- myLegend->addLegendItem(li->shape, li->color, li->text );
+ myLegend->addLegendItem(li->tqshape, li->color, li->text );
}
}
}
@@ -766,25 +766,25 @@ bool KDGanttView::editable() const
/*!
- Saves the state of the Gantt view in an IO device in XML format. The saved
+ Saves the state of the Gantt view in an IO tqdevice in XML format. The saved
data can be reloaded with \a loadProject().
- \param device a pointer to the IO device in which to store the Gantt
+ \param tqdevice a pointer to the IO tqdevice in which to store the Gantt
view state.
\return true if the data could be written, false if an error
occurred
\sa loadProject()
*/
-bool KDGanttView::saveProject( TQIODevice* device )
+bool KDGanttView::saveProject( TQIODevice* tqdevice )
{
- Q_ASSERT( device );
+ Q_ASSERT( tqdevice );
TQDomDocument doc = saveXML();
- if( device->isOpen() )
- device->close();
- if( device->open( IO_WriteOnly ) ) {
- TQTextStream ts( device );
+ if( tqdevice->isOpen() )
+ tqdevice->close();
+ if( tqdevice->open( IO_WriteOnly ) ) {
+ TQTextStream ts( tqdevice );
ts << doc.toString();
return true;
} else
@@ -796,30 +796,30 @@ bool KDGanttView::saveProject( TQIODevice* device )
Loads a previously saved state of the Gantt view. All current
settings and items are discarded before loading the data.
- \param device a pointer to the IO device from which to load the
+ \param tqdevice a pointer to the IO tqdevice from which to load the
Gantt view state.
\return true if the file could be read, false if an error
occurred
\sa saveProject()
*/
-bool KDGanttView::loadProject( TQIODevice* device )
+bool KDGanttView::loadProject( TQIODevice* tqdevice )
{
- Q_ASSERT( device );
+ Q_ASSERT( tqdevice );
- if( device->isOpen() )
- device->close();
- if( device->open( IO_ReadOnly ) ) {
+ if( tqdevice->isOpen() )
+ tqdevice->close();
+ if( tqdevice->open( IO_ReadOnly ) ) {
TQDomDocument doc( "GanttView" );
TQString err;
int errline, errcol;
- if ( !doc.setContent( device, &err, &errline, &errcol ) ) {
+ if ( !doc.setContent( tqdevice, &err, &errline, &errcol ) ) {
qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline );
qDebug("%s ", err.latin1());
- device->close();
+ tqdevice->close();
return false;
}
- device->close();
+ tqdevice->close();
return loadXML( doc );
} else
return false;
@@ -868,7 +868,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::currentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -1209,7 +1209,7 @@ bool KDGanttView::showTaskLinks() const
void KDGanttView::setFont(const TQFont& font)
{
myListView->setFont(font);
- myListView->repaint();
+ myListView->tqrepaint();
myTimeHeader->setFont(font);
myLegend->setFont( font );
TQWidget::setFont( font );
@@ -1299,21 +1299,21 @@ bool KDGanttView::showTimeTablePopupMenu() const
/*!
- 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).
+ 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).
- This setting overrides any shape settings made on individual items.
+ This setting overrides any tqshape 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 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
+ \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
in the individual items
- \sa shapes()
+ \sa tqshapes()
*/
void KDGanttView::setShapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape start,
@@ -1337,18 +1337,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type,
/*!
- Queries the shapes for a particular type of Gantt item.
+ Queries the tqshapes for a particular type of Gantt item.
- \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
+ \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
parameters are undefined.
\sa setShapes()
*/
-bool KDGanttView::shapes( KDGanttViewItem::Type type,
+bool KDGanttView::tqshapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape& start,
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const
@@ -1562,19 +1562,19 @@ void KDGanttView::clearLegend( )
/*!
Adds an item to the legend.
- \param shape the shape to display
- \param shapeColor the color in which to display the shape
+ \param tqshape the tqshape to display
+ \param tqshapeColor the color in which to display the tqshape
\param text the text to display
\sa clearLegend()
*/
-void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
- const TQColor& shapeColor,
+void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape,
+ const TQColor& tqshapeColor,
const TQString& text )
{
- myLegend->addLegendItem( shape,shapeColor,text );
+ myLegend->addLegendItem( tqshape,tqshapeColor,text );
legendItem* item = new legendItem;
- item->shape = shape;
- item->color = shapeColor;
+ item->tqshape = tqshape;
+ item->color = tqshapeColor;
item->text = text;
myLegendItems->append( item );
}
@@ -3415,58 +3415,58 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
showTimeTablePopupMenu() );
// the Shapes element
- TQDomElement shapesElement = doc.createElement( "Shapes" );
- docRoot.appendChild( shapesElement );
- TQDomElement shapesEventElement = doc.createElement( "Event" );
- shapesElement.appendChild( shapesEventElement );
+ TQDomElement tqshapesElement = doc.createElement( "Shapes" );
+ docRoot.appendChild( tqshapesElement );
+ TQDomElement tqshapesEventElement = doc.createElement( "Event" );
+ tqshapesElement.appendChild( tqshapesEventElement );
KDGanttViewItem::Shape start, middle, 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 ) );
+ 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 ) );
} else {
- KDGanttXML::createStringNode( doc, shapesEventElement, "Start",
+ KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesEventElement, "Middle",
+ KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesEventElement, "End",
+ KDGanttXML::createStringNode( doc, tqshapesEventElement, "End",
"Undefined" );
}
- 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 ) );
+ 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 ) );
} else {
- KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
+ KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle",
+ KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
+ KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End",
"Undefined" );
}
- 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 ) );
+ 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 ) );
} else {
- KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
+ KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle",
+ KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle",
"Undefined" );
- KDGanttXML::createStringNode( doc, shapesSummaryElement, "End",
+ KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End",
"Undefined" );
}
@@ -3604,7 +3604,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
TQDomElement legendItemElement = doc.createElement( "LegendItem" );
legendItemsElement.appendChild( legendItemElement );
KDGanttXML::createStringNode( doc, legendItemElement, "Shape",
- KDGanttViewItem::shapeToString( current->shape ) );
+ KDGanttViewItem::tqshapeToString( current->tqshape ) );
KDGanttXML::createColorNode( doc, legendItemElement, "Color",
current->color );
KDGanttXML::createStringNode( doc, legendItemElement, "Text",
@@ -3757,17 +3757,17 @@ void KDGanttView::editItem( KDGanttViewItem* item)
/*!
- This method returns the pixmap used for a certain shape, in the
+ This method returns the pixmap used for a certain tqshape, in the
selected color and size.
- \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
+ \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
*/
-TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
- const TQColor& shapeColor,
+TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape,
+ const TQColor& tqshapeColor,
const TQColor& backgroundColor, int itemSize)
{
// 10 is a good value as size
@@ -3777,11 +3777,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
p.fill( backgroundColor );
TQPainter paint (&p);
TQBrush b = TQBrush ( TQt::SolidPattern );
- b.setColor( shapeColor );
+ b.setColor( tqshapeColor );
paint.setBrush( b );
TQPen pen( TQt::black, 1 ) ;
paint.setPen( pen );
- switch (shape) {
+ switch (tqshape) {
case KDGanttViewItem::TriangleDown:{
TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
@@ -3864,8 +3864,8 @@ void KDGanttView::initDefaults()
myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = TQt::cyan;//summary
myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = TQt::red;
- // setting the default shape types
- // currently, we take for each item for all three shapes (start, middle, end) the same default shape
+ // setting the default tqshape types
+ // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape
for (i = 0;i<3;++i) {
myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event
myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task
@@ -4239,7 +4239,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 layout of the added widgets is managed by this
+ is a TQHBox, the tqlayout 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 ca0f78f3f..70b423218 100644
--- a/kdgantt/KDGanttView.h
+++ b/kdgantt/KDGanttView.h
@@ -39,7 +39,7 @@
#include <tqwidget.h>
#include <tqlistview.h>
#include <tqsplitter.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqfont.h>
#include <tqdom.h>
#include <tqvbox.h>
@@ -193,7 +193,7 @@ public:
KDGanttViewItem::Shape middle,
KDGanttViewItem::Shape end,
bool overwriteExisting = true );
- bool shapes( KDGanttViewItem::Type type,
+ bool tqshapes( KDGanttViewItem::Type type,
KDGanttViewItem::Shape& start,
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const;
@@ -228,7 +228,7 @@ public:
TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
// Legend-related stuff
- void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
+ void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text );
void clearLegend();
// Header-related stuff
void setHorizonStart( const TQDateTime& start );
@@ -298,7 +298,7 @@ public:
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
- static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize);
+ static TQPixmap getPixmap( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor,const TQColor& backgroundColor, int itemSize);
void setHeaderVisible( bool );
bool headerVisible() const;
@@ -330,7 +330,7 @@ public:
virtual void lvStartDrag (KDGanttViewItem*);
virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
virtual void lvDragEnterEvent (TQDragEnterEvent * e );
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KDGanttViewItem* getItemByName( const TQString& name ) const;
TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const;
@@ -422,7 +422,7 @@ private slots:
void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
private:
struct legendItem {
- KDGanttViewItem::Shape shape;
+ KDGanttViewItem::Shape tqshape;
TQColor color;
TQString text;
};
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index 0bfc72794..de80477a5 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 shapes/colors of the item works as follows:
+ The initialization of the tqshapes/colors of the item works as follows:
Shapes:
- When a new item is created, the shapes are set to the default values
+ When a new item is created, the tqshapes 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 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.
+ 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.
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 shapes are set to the default color for items of this type,
+ the colors of the tqshapes 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 shapes are set to the default color for
+ the highlight colors of the tqshapes 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 children, it is displayed as usual.
- If the item is opened (i.e., its children are displayed), the
+ If the item has no tqchildren, it is displayed as usual.
+ If the item is opened (i.e., its tqchildren are displayed), the
start/end time of this item is computed automatically according to
- 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
+ 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
on the timeline of this item instead. To control the painting of
- overlapping children, call \a setPriority() for the childs.
+ overlapping tqchildren, 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/shape values, you get an item with three shapes
+ without setting any color/tqshape values, you get an item with three tqshapes
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 children of these root item in the Gantt view.
+ Insert items as tqchildren 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 children themselves.
+ Actually, you may add child items to the tqchildren themselves.
Such a child behaves then like a parent.
- Now set the start/end time of the children to specify a time
+ Now set the start/end time of the tqchildren 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 children are displayed instead.
+ the item itself is hidden, and all tqchildren 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 (children) as a group
+ If the item displays its subitems (tqchildren) as a group
(displaySubitemsAsGroup() == true),
all changes apply to all subitems as well.
@@ -773,16 +773,16 @@ bool KDGanttViewItem::highlight() const
/*!
- Specifies the shapes to be used for this item.
+ Specifies the tqshapes to be used for this item.
- It is advisable not to use this method, but rather set the shapes
+ It is advisable not to use this method, but rather set the tqshapes
for all items of a type with KDGanttView::setShapes() in order to
get a uniform Gantt view.
- \param start the start shape
- \param middle the middle shape
- \param end the end shape
- \sa shapes(), setColors(), colors()
+ \param start the start tqshape
+ \param middle the middle tqshape
+ \param end the end tqshape
+ \sa tqshapes(), 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 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.
+ 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.
- \param itemShape the foreground shape
- \param middle itemShapeBack the background shape
- \param shape the type of the shape
+ \param itemShape the foreground tqshape
+ \param middle itemShapeBack the background tqshape
+ \param tqshape the type of the tqshape
(may be TriangleDown, TriangleUp, Diamond, Square, Circle)
- \sa shapes(), setColors(), colors()
+ \sa tqshapes(), setColors(), colors()
*/
void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
KDCanvasPolygonItem* &itemShapeBack,
- Shape shape )
+ Shape tqshape )
{
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 (shape) {
+ switch (tqshape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
@@ -912,8 +912,8 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
break;
}
default:
- // Uninitialized shape, can e.g. be the case with free-busy
- // items which don't have any shapes
+ // Uninitialized tqshape, can e.g. be the case with free-busy
+ // items which don't have any tqshapes
return;
}
item->setBrush(Qt::SolidPattern);
@@ -927,14 +927,14 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
/*!
- Returns the shapes used for this item
+ Returns the tqshapes used for this item
- \param start returns the start shape
- \param middle returns the middle shape
- \param end returns the end shape
+ \param start returns the start tqshape
+ \param middle returns the middle tqshape
+ \param end returns the end tqshape
\sa setShapes(), setColors(), colors()
*/
-void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
+void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const
{
start = myStartShape;
middle = myMiddleShape;
@@ -943,16 +943,16 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
/*!
- Specifies the colors in which to draw the shapes of this item.
+ Specifies the colors in which to draw the tqshapes 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 shape
- \param middle the color for the middle shape
- \param end the color for the end shape
- \sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
+ \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()
*/
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(), shapes(), setDefaultColor(), defaultColor()
+ \sa setColors(), setShapes(), tqshapes(), 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 shapes of this item.
+ Specifies the highlight colors in which to draw the tqshapes 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 (children) as a group,
+ If the item displays its subitems (tqchildren) as a group,
(displaySubitemsAsGroup() == true)
all changes apply to all subitems as well.
- \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()
+ \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()
*/
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(), shapes()
+ \sa setHighlightColors(), setShapes(), tqshapes()
*/
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 (children) as a group,
+ If the item displays its subitems (tqchildren) 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 shapes of a Gantt chart
+ This enum is used in order to specify the tqshapes 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 (children) as a group,
+ If the item displays its subitems (tqchildren) 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 (children) as a group,
+ If the item displays its subitems (tqchildren) 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 children
+ \return the first child of this item, 0 if this item has no tqchildren
*/
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
@@ -1469,10 +1469,10 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setDefaultColor( myGanttView->defaultColor(myType));
// set default highlight color
setDefaultHighlightColor(myGanttView->defaultHighlightColor(myType));
- // set shapes
- if (!( shapeDefined = (myGanttView->shapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
+ // set tqshapes
+ if (!( tqshapeDefined = (myGanttView->tqshapes(myType,myStartShape,myMiddleShape,myEndShape)))) {
- //qDebug("KDGantt::KDGanttViewItem created with not user defined shapes");
+ //qDebug("KDGantt::KDGanttViewItem created with not user defined tqshapes");
};
setShapes(myStartShape,myMiddleShape,myEndShape);
@@ -1486,12 +1486,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 shapes
+ // set color of tqshapes
if (!( colorDefined = (myGanttView->colors(myType,myStartColor,myMiddleColor,myEndColor)))) {
};
setColors(defaultColor(),defaultColor(), defaultColor());
- // set highlight color of shapes
+ // set highlight color of tqshapes
if (!( colorHLDefined = (myGanttView->highlightColors(myType,myStartColorHL,myMiddleColorHL,myEndColorHL)))) {
};
@@ -1508,9 +1508,9 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-TQString KDGanttViewItem::shapeToString( Shape shape )
+TQString KDGanttViewItem::tqshapeToString( Shape tqshape )
{
- switch( shape ) {
+ switch( tqshape ) {
case TriangleDown:
return "TriangleDown";
case TriangleUp:
@@ -1571,13 +1571,13 @@ void KDGanttViewItem::createNode( TQDomDocument& doc,
KDGanttXML::createBoolNode( doc, itemElement, "Open", isOpen() );
KDGanttXML::createBoolNode( doc, itemElement, "Highlight", highlight() );
Shape startShape, middleShape, endShape;
- shapes( startShape, middleShape, endShape );
+ tqshapes( startShape, middleShape, endShape );
KDGanttXML::createStringNode( doc, itemElement, "StartShape",
- shapeToString( startShape ) );
+ tqshapeToString( startShape ) );
KDGanttXML::createStringNode( doc, itemElement, "MiddleShape",
- shapeToString( middleShape ) );
+ tqshapeToString( middleShape ) );
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
- shapeToString( endShape ) );
+ tqshapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
@@ -1944,9 +1944,9 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
/*!
- Returns the start time of the children of this item.
+ Returns the start time of the tqchildren of this item.
- \return the start time of the children of this item
+ \return the start time of the tqchildren of this item
*/
TQDateTime KDGanttViewItem::myChildStartTime()
{
@@ -1978,9 +1978,9 @@ TQDateTime KDGanttViewItem::myChildStartTime()
/*!
- Returns the end time of the children of this item.
+ Returns the end time of the tqchildren of this item.
- \return the end time of the children of this item
+ \return the end time of the tqchildren of this item
*/
TQDateTime KDGanttViewItem::myChildEndTime()
{
@@ -2044,7 +2044,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 children and subchildren of
+ item with name \a name in the set of tqchildren and subtqchildren of
this item.
\param name the name of the item
\return the pointer to the item with name \a name
@@ -2365,37 +2365,37 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
\var KDGanttViewItem::startShape
- the shape at the beginning of the item
+ the tqshape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShape
- the shape in the middle of the item
+ the tqshape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShape
- the shape at the end of the item
+ the tqshape at the end of the item
*/
/*!
\var KDGanttViewItem::startShapeBack
- the background shape at the beginning of the item
+ the background tqshape at the beginning of the item
*/
/*!
\var KDGanttViewItem::midShapeBack
- the background shape in the middle of the item
+ the background tqshape in the middle of the item
*/
/*!
\var KDGanttViewItem::endShapeBack
- the background shape at the end of the item
+ the background tqshape at the end of the item
*/
diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h
index e645029d8..9e54755b8 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 shapes( Shape& start, Shape& middle, Shape& end ) const;
+ void tqshapes( Shape& start, Shape& middle, Shape& end ) const;
void setDefaultColor( const TQColor& );
TQColor defaultColor() const;
void setColors( const TQColor& start, const TQColor& middle,
@@ -202,7 +202,7 @@ private:
friend class KDGanttViewItemDrag;
friend class itemAttributeDialog;
- static TQString shapeToString( Shape shape );
+ static TQString tqshapeToString( Shape tqshape );
static Shape stringToShape( const TQString& string );
static TQString typeToString( Type type );
@@ -242,7 +242,7 @@ private:
bool isMyTextCanvas(TQCanvasItem *tc);
TQPoint myTextOffset;
TQString _name;
- bool shapeDefined;
+ bool tqshapeDefined;
int _priority;
static TQDict<KDGanttViewItem> sItemDict;
diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp
index 158da0411..c73eff67f 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->shapes( start, middle, end );
+ item->tqshapes( 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::encodedData( const char * c) const
+TQByteArray KDGanttViewItemDrag::tqencodedData( 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->encodedData( "x-application/x-KDGanttViewItemDrag");
+ arr = e->tqencodedData( "x-application/x-KDGanttViewItemDrag");
TQDataStream s( arr, IO_ReadOnly );
s >> string;
return true;
diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h
index 9219c9181..a4d6cb6f0 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 encodedData( const char * c) const;
+ TQByteArray tqencodedData( 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 bb0756f38..bd83feb14 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -48,7 +48,7 @@
#include <tqtooltip.h>
#include <tqapplication.h>
#include <tqdrawutil.h>
-#include <palette.h>
+#include <tqpalette.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::currentDateTime ()).addSecs(-3600);
+ TQDateTime start = (TQDateTime::tqcurrentDateTime ()).addSecs(-3600);
setHorizonStart(start);
setHorizonEnd( start.addSecs(3600*2));
flagStartTimeSet = false;
flagEndTimeSet = false;
- myCenterDateTime = TQDateTime::currentDateTime ();
+ myCenterDateTime = TQDateTime::tqcurrentDateTime ();
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)").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 ) {
@@ -1140,7 +1140,7 @@ void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end)
}
flagDoNotRepaintAfterChange = false;
updateTimeTable();
- repaint();
+ tqrepaint();
moveTimeLineTo((getCoordX(start)-(viewWid-timeWid)/2));
// Since we have disconnected autoupdate of scrollbars, we must do it ourselves
if (myGanttView && myGanttView->myCanvasView)
@@ -1487,7 +1487,7 @@ void KDTimeHeaderWidget::computeIntervals( int height )
{
IntervalColorList::const_iterator it;
for ( it = icList.begin(); it != icList.end(); ++it ) {
- (*it)->layout( this, height );
+ (*it)->tqlayout( this, height );
}
}
@@ -2086,7 +2086,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
TQPainter p(this);
int Width, Height;
TQString testTextMinor,testTextMajor, tempStr;
- TQRect itemRectMinor, itemRectMajor;
+ TQRect tqitemRectMinor, tqitemRectMajor;
TQDate tempDate = myRealStart.date();
myRealEnd = myRealStart;
// preparing the testtext for the differennt scales
@@ -2109,25 +2109,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
testTextMinor = "12 AM";
testTextMajor = "Mon Aug 30, x";
if ( yearFormat() != KDGanttView::NoDate )
- testTextMajor += getYear(TQDate::currentDate());
+ testTextMajor += getYear(TQDate::tqcurrentDate());
minorPerMajor = 2400;
break;
case KDGanttView::Day:
minorItems = minorItems/(60*24);
testTextMinor = "88";
- testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate());
+ testTextMajor = "Aug 30, x"+getYear(TQDate::tqcurrentDate());
minorPerMajor = 700;
break;
case KDGanttView::Week:
minorItems = minorItems/(60*24*7);
testTextMinor = "88";
- testTextMajor = "Aug x"+getYear(TQDate::currentDate());
+ testTextMajor = "Aug x"+getYear(TQDate::tqcurrentDate());
minorPerMajor = 435; // 435 = 365days/12months/7days * 100
break;
case KDGanttView::Month:
minorItems = (minorItems*12)/(60*24*365);
testTextMinor = "M";
- testTextMajor = "x"+getYear(TQDate::currentDate());
+ testTextMajor = "x"+getYear(TQDate::tqcurrentDate());
minorPerMajor = 1200;
break;
case KDGanttView::Auto:
@@ -2135,12 +2135,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
qDebug(" RealScale == Auto : This may not be! ");
break;
}
- itemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
- itemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
+ tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
+ tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
p.end();
//qDebug(" tempMinorScaleCount %d ", tempMinorScaleCount);
- Height = itemRectMinor.height()+itemRectMajor.height()+11;
- Width = (itemRectMinor.width()+5);
+ Height = tqitemRectMinor.height()+tqitemRectMajor.height()+11;
+ Width = (tqitemRectMinor.width()+5);
if (Width < minimumColumnWidth()) Width = minimumColumnWidth();
// if the desired width is greater than the maximum width of this widget
// increase the minorscalecount
@@ -2197,7 +2197,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
// checking, if enough space for majorscale
// if not, increasing MajorScaleCount
- while ((minorPerMajor*Width)/100 < itemRectMajor.width()) {
+ while ((minorPerMajor*Width)/100 < tqitemRectMajor.width()) {
minorPerMajor = minorPerMajor/tempMajorScaleCount;
++tempMajorScaleCount;
minorPerMajor = minorPerMajor*tempMajorScaleCount;
@@ -2207,13 +2207,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 geometry
+ // if size changed, reset tqgeometry
if (width() != Width || height() != Height )
{
resize( Width, Height );
emit sizeChanged( Width );
}
- myMajorGridHeight = itemRectMajor.height()+5;
+ myMajorGridHeight = tqitemRectMajor.height()+5;
TQTime tempTime = myRealStart.time();
TQDateTime tempDateTime;
int i;
@@ -2343,7 +2343,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
myGanttView->myTimeTable->setBlockUpdating( block );
updateTimeTable();
centerDateTime(myCenterDateTime);
- repaint();
+ tqrepaint();
}
@@ -2489,7 +2489,7 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * )
//zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) );
}
mouseDown = false;
- repaint();
+ tqrepaint();
}
@@ -2504,11 +2504,11 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
if ( mouseDown ) {
if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) {
mouseDown = false;
- repaint();
+ tqrepaint();
return;
}
endMouseDown = e->pos().x();
- //repaint;
+ //tqrepaint;
int val = -1;
if (endMouseDown < -x() ) {
val = myGanttView->myCanvasView->horizontalScrollBar()->value() -
@@ -2631,7 +2631,7 @@ TQSize KDLegendWidget::legendSize()
TQSize KDLegendWidget::legendSizeHint()
{
TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
- return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
+ return TQSize( myLegend->tqsizeHint().width(), myLegend->tqsizeHint().height()+scroll->horizontalScrollBar()->height());
}
@@ -2652,7 +2652,7 @@ void KDLegendWidget::clearLegend ( )
myLegend->setFont( font() );
scroll->addChild( myLegend );
scroll->setResizePolicy( TQScrollView::AutoOneFit );
- myLegend->layout()->setMargin( 11 );
+ myLegend->tqlayout()->setMargin( 11 );
myLegend->setFrameStyle( TQFrame::NoFrame );
if ( dock )
scroll->setMaximumHeight( 32000 );
@@ -2661,10 +2661,10 @@ void KDLegendWidget::clearLegend ( )
}
-void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text )
+void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text )
{
TQLabel * temp;
- TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, TQt::white, 10);
+ TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10);
TQWidget *w = new TQWidget( myLegend );
w->setBackgroundColor( TQt::white );
TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6);
@@ -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 );
@@ -2921,7 +2921,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
if ( tx < 0 )
tx = header()->cellPos( cell );
- // do any children of current need to be painted?
+ // do any tqchildren of current need to be painted?
/* FIXME: painting branches doesn't work for some reason...
if ( ih != ith &&
rootIsDecorated() &&
@@ -2949,7 +2949,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, colorGroup(), treeStepSize(),
+ current->i->paintBranches( p, tqcolorGroup(), treeStepSize(),
rtop - crtop, r.height() );
p->restore();
}
@@ -3510,7 +3510,7 @@ KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttView
void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
{
//qDebug("mousepress! %d ", this);
- //qDebug("focus %d ",tqApp->focusWidget());
+ //qDebug("focus %d ",tqApp->tqfocusWidget());
setFocus();
currentLink = 0;
currentItem = 0;
@@ -4018,7 +4018,7 @@ void KDIntervalColorRectangle::setColor( const TQColor& color )
/*!
\internal
*/
-void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int height )
+void KDIntervalColorRectangle::tqlayout( KDTimeHeaderWidget* timeHeader, int height )
{
int left = timeHeader->getCoordX(mStart);
int right = timeHeader->getCoordX(mEnd);
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h
index e8f27f8eb..7b553222a 100644
--- a/kdgantt/KDGanttViewSubwidgets.h
+++ b/kdgantt/KDGanttViewSubwidgets.h
@@ -49,9 +49,9 @@
#include <tqtimer.h>
#include <tqgroupbox.h>
#include <tqvgroupbox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
-#include <brush.h>
+#include <tqbrush.h>
#include <tqvbox.h>
#include <tqdockwindow.h>
#include <tqtimer.h>
@@ -337,7 +337,7 @@ public:
KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent );
void showMe(bool);
bool isShown();
- void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
+ void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text );
void clearLegend();
void setFont( TQFont );
void drawToPainter( TQPainter *p );
@@ -471,7 +471,7 @@ public:
enum HitTest { Start, Middle, End };
HitTest hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const;
- void layout( KDTimeHeaderWidget* timeHeader, int height );
+ void tqlayout( KDTimeHeaderWidget* timeHeader, int height );
static const int RTTI = 0x0c58;
/*reimp*/ int rtti() const { return RTTI; }
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index 605cb9919..a89f23603 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 shape,
+ A calendar item in a Gantt chart has no start/end tqshape,
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 367c8035a..5f2909c07 100644
--- a/kdgantt/KDGanttXMLTools.cpp
+++ b/kdgantt/KDGanttXMLTools.cpp
@@ -33,7 +33,7 @@
**********************************************************************/
#include "KDGanttXMLTools.h"
-#include <brush.h>
+#include <tqbrush.h>
#include <tqbuffer.h>
#include <tqimage.h>
#include <zlib.h>
diff --git a/kdgantt/Makefile.am b/kdgantt/Makefile.am
index 81222706b..39e20bcb8 100644
--- a/kdgantt/Makefile.am
+++ b/kdgantt/Makefile.am
@@ -33,7 +33,7 @@ noinst_HEADERS = \
KDGanttViewTaskLink.h \
KDGanttXMLTools.h \
itemAttributeDialog.ui.h \
- qlayoutengine_p.h
+ qtqlayoutengine_p.h
METASOURCES = AUTO
diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui
index 5a34dbb5e..a3616dcad 100644
--- a/kdgantt/itemAttributeDialog.ui
+++ b/kdgantt/itemAttributeDialog.ui
@@ -64,7 +64,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>16</height>
@@ -383,7 +383,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>16</height>
@@ -462,7 +462,7 @@
<property name="text">
<string>Text color:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h
index 8624d45d5..3ab24af83 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->repaint();
+ ChangeText->tqrepaint();
}
@@ -62,7 +62,7 @@ void itemAttributeDialog::ChangeStart_clicked()
{
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
- myItem->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ item->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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->shapes( start, middle, end );
+ myItem->tqshapes( 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 27fd861b9..1f03331d2 100644
--- a/kdgantt/qlayoutengine_p.h
+++ b/kdgantt/qlayoutengine_p.h
@@ -46,7 +46,7 @@
// -------------
//
// This file is not part of the TQt API. It exists for the convenience
-// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp.
+// of qtqlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp.
// This header file may change from version to version without notice,
// or even be removed.
//
@@ -56,21 +56,21 @@
#ifndef TQT_H
-#include "tqabstraclayout.h"
+#include "tqabstractqlayout.h"
#endif // TQT_H
#ifndef TQT_NO_LAYOUT
struct QLayoutStruct
{
- void initParameters() { minimumSize = sizeHint = 0;
- maximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
+ void initParameters() { tqminimumSize = tqsizeHint = 0;
+ tqmaximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
void init() { stretch = 0; initParameters(); }
//permanent storage:
int stretch;
//parameters:
- TQCOORD sizeHint;
- TQCOORD maximumSize;
- TQCOORD minimumSize;
+ TQCOORD tqsizeHint;
+ TQCOORD tqmaximumSize;
+ TQCOORD tqminimumSize;
bool expansive;
bool empty;
//temporary storage: