summaryrefslogtreecommitdiffstats
path: root/kdgantt
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp94
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h10
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp2
-rw-r--r--kdgantt/KDGanttView.cpp66
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp88
-rw-r--r--kdgantt/itemAttributeDialog.ui4
-rw-r--r--kdgantt/qlayoutengine_p.h2
7 files changed, 133 insertions, 133 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index 2339d1ce..ad1b252c 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -40,7 +40,7 @@
#include "tqptrlist.h"
#include "tqmemarray.h"
#include "tqlayout.h"
-#include "tqlayoutengine_p.h"
+#include "private/tqlayoutengine_p.h"
#include "tqobjectlist.h"
#include "tqstyle.h"
#include "tqapplication.h" //sendPostedEvents
@@ -295,7 +295,7 @@ public:
class TQSplitterData
{
public:
- TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
+ TQSplitterData() : opaque( false ), firstShow( true ) {}
TQPtrList<TQSplitterLayoutStruct> list;
bool opaque;
@@ -340,7 +340,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
that a widget should keep its size when the splitter is resized.
Although KDGanttMinimizeSplitter normally resizes the children only
- at the end of a resize operation, if you call setOpaqueResize( TRUE
+ at the end of a resize operation, if you call setOpaqueResize( true
) the widgets are resized as often as possible.
The initial distribution of size between the widgets is determined
@@ -404,7 +404,7 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQt::Orientation o, TQWidget *
*/
KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
{
- data->list.setAutoDelete( TRUE );
+ data->list.setAutoDelete( true );
delete data;
}
@@ -458,11 +458,11 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
/*
Inserts the widget \a w at the end (or at the beginning if \a first
- is TRUE) of the splitter's list of widgets.
+ is true) of the splitter's list of widgets.
It is the responsibility of the caller of this function to make sure
that \a w is not already in the splitter and to call recalcId if
- needed. (If \a first is TRUE, then recalcId is very probably
+ needed. (If \a first is true, then recalcId is very probably
needed.)
*/
TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
@@ -477,7 +477,7 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
s->wid = newHandle;
newHandle->setId(data->list.count());
- s->isSplitter = TRUE;
+ s->isSplitter = true;
s->sizer = pick( newHandle->sizeHint() );
if ( first )
data->list.insert( 0, s );
@@ -491,7 +491,7 @@ TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fi
s->sizer = pick( w->sizeHint() );
else
s->sizer = pick( w->size() );
- s->isSplitter = FALSE;
+ s->isSplitter = false;
if ( first )
data->list.insert( 0, s );
else
@@ -585,7 +585,7 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e )
if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) {
recalc( isVisible() );
if ( e->type() == TQEvent::Show )
- data->firstShow = FALSE;
+ data->firstShow = false;
}
return TQWidget::event( e );
}
@@ -615,12 +615,12 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
{
TQSplitterLayoutStruct *s = data->list.first();
- bool seen_w = FALSE;
+ bool seen_w = false;
while ( s ) {
if ( s->isSplitter && seen_w )
return data->list.at();
if ( !s->isSplitter && s->wid == w )
- seen_w = TRUE;
+ seen_w = true;
s = data->list.next();
}
return 0;
@@ -696,11 +696,11 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
pos1 = pos2 + 1;
}
if ( upLeft ) {
- setG( w, pos1, dd, TRUE );
+ setG( w, pos1, dd, true );
moveBefore( pos2, id-1, upLeft );
} else {
moveBefore( pos2, id-1, upLeft );
- setG( w, pos1, dd, TRUE );
+ setG( w, pos1, dd, true );
}
} else {
int dd, newLeft, nextPos;
@@ -715,7 +715,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
newLeft = pos-dd+1;
nextPos = newLeft - 1;
}
- setG( w, newLeft, dd, TRUE );
+ setG( w, newLeft, dd, true );
moveBefore( nextPos, id-1, upLeft );
}
}
@@ -749,11 +749,11 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
pos2 = pos + dd;
}
if ( upLeft ) {
- setG( w, pos1, dd, TRUE );
+ setG( w, pos1, dd, true );
moveAfter( pos2, id+1, upLeft );
} else {
moveAfter( pos2, id+1, upLeft );
- setG( w, pos1, dd, TRUE );
+ setG( w, pos1, dd, true );
}
} else {
int left = pick( w->pos() );
@@ -771,7 +771,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
newLeft = pos;
nextPos = newLeft + dd;
}
- setG( w, newLeft, dd, TRUE );
+ setG( w, newLeft, dd, true );
/*if( right != newRight )*/
moveAfter( nextPos, id+1, upLeft );
}
@@ -884,23 +884,23 @@ void KDGanttMinimizeSplitter::doResize()
} else if ( s->isSplitter ) {
a[i].stretch = 0;
a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer;
- a[i].empty = FALSE;
+ 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].empty = FALSE;
+ 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].empty = FALSE;
+ 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].empty = FALSE;
+ a[i].empty = false;
}
}
@@ -922,7 +922,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
int maxt = TQWIDGETSIZE_MAX;
int mint = fi;
int n = data->list.count();
- bool first = TRUE;
+ bool first = true;
/*
The splitter before a hidden widget is always hidden.
The splitter before the first visible widget is hidden.
@@ -938,15 +938,15 @@ void KDGanttMinimizeSplitter::recalc( bool update )
else
p->wid->show(); //may trigger new recalc
if ( !s->wid->isHidden() )
- first = FALSE;
+ first = false;
}
}
- bool empty=TRUE;
+ bool empty=true;
for ( int j = 0; j< n; j++ ) {
TQSplitterLayoutStruct *s = data->list.at(j);
if ( !s->wid->isHidden() ) {
- empty = FALSE;
+ empty = false;
if ( s->isSplitter ) {
minl += s->sizer;
maxl += s->sizer;
@@ -1003,13 +1003,13 @@ void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
}
s = data->list.next();
}
- s = addWidget( w, TRUE );
+ s = addWidget( w, true );
s->mode = mode;
}
/*!
- Returns TRUE if opaque resize is on; otherwise returns FALSE.
+ Returns true if opaque resize is on; otherwise returns false.
\sa setOpaqueResize()
*/
@@ -1021,7 +1021,7 @@ bool KDGanttMinimizeSplitter::opaqueResize() const
/*!
- If \a on is TRUE then opaque resizing is turned on; otherwise
+ If \a on is true then opaque resizing is turned on; otherwise
opaque resizing is turned off.
Opaque resizing is initially turned off.
@@ -1041,11 +1041,11 @@ void KDGanttMinimizeSplitter::setOpaqueResize( bool on )
void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
{
processChildEvents();
- bool found = FALSE;
+ bool found = false;
TQSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == w ) {
- found = TRUE;
+ found = true;
TQSplitterLayoutStruct *p = data->list.prev();
if ( p ) { // not already at first place
data->list.take(); //take p
@@ -1058,7 +1058,7 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
s = data->list.next();
}
if ( !found )
- addWidget( w, TRUE );
+ addWidget( w, true );
recalcId();
}
@@ -1070,11 +1070,11 @@ void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
{
processChildEvents();
- bool found = FALSE;
+ bool found = false;
TQSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->wid == w ) {
- found = TRUE;
+ found = true;
data->list.take(); // take s
TQSplitterLayoutStruct *p = data->list.current();
if ( p ) { // the splitter handle after s
@@ -1179,7 +1179,7 @@ void KDGanttMinimizeSplitter::storeSizes()
#if 0 // ### remove this code ASAP
/*!
- Hides \a w if \a hide is TRUE and updates the splitter.
+ Hides \a w if \a hide is true and updates the splitter.
\warning Due to a limitation in the current implementation,
calling TQWidget::hide() will not work.
@@ -1201,7 +1201,7 @@ void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide )
w->hide();
else
w->show();
- recalc( TRUE );
+ recalc( true );
}
@@ -1219,7 +1219,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
else
tqWarning( "KDGanttMinimizeSplitter::isHidden(), unknown widget" );
#endif
- return FALSE;
+ return false;
}
#endif
@@ -1358,12 +1358,12 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
int sumStretch = 0;
int spacerCount = 0;
- bool wannaGrow = FALSE; // anyone who really wants to grow?
- // bool canShrink = FALSE; // anyone who could be persuaded to shrink?
+ bool wannaGrow = false; // anyone who really wants to grow?
+ // bool canShrink = false; // anyone who could be persuaded to shrink?
int i;
for ( i = start; i < start + count; i++ ) {
- chain[i].done = FALSE;
+ chain[i].done = false;
cHint += chain[i].sizeHint;
cMin += chain[i].minimumSize;
cMax += chain[i].maximumSize;
@@ -1380,7 +1380,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
// tqDebug("not enough space");
for ( i = start; i < start+count; i++ ) {
chain[i].size = chain[i].minimumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
}
} else if ( space < cHint + spacerCount*spacer ) {
// Less space than sizeHint, but more than minimum.
@@ -1393,7 +1393,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
for ( i = start; i < start+count; i++ ) {
if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) {
chain[i].size = chain[i].sizeHint;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].sizeHint;
// sumStretch -= chain[i].stretch;
n--;
@@ -1401,7 +1401,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
}
bool finished = n == 0;
while ( !finished ) {
- finished = TRUE;
+ finished = true;
fixed fp_over = toFixed( overdraft );
fixed fp_w = 0;
@@ -1416,9 +1416,9 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
chain[i].size = chain[i].sizeHint - w;
fp_w -= toFixed( w ); //give the difference to the next
if ( chain[i].size < chain[i].minimumSize ) {
- chain[i].done = TRUE;
+ chain[i].done = true;
chain[i].size = chain[i].minimumSize;
- finished = FALSE;
+ finished = false;
overdraft -= chain[i].sizeHint - chain[i].minimumSize;
// sumStretch -= chain[i].stretch;
n--;
@@ -1434,7 +1434,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint
|| wannaGrow && !chain[i].expansive) ) {
chain[i].size = chain[i].sizeHint;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch;
n--;
@@ -1479,7 +1479,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done &&
chain[i].size < chain[i].sizeHint ) {
chain[i].size = chain[i].sizeHint;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].sizeHint;
sumStretch -= chain[i].stretch;
n--;
@@ -1492,7 +1492,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i
if ( !chain[i].done &&
chain[i].size > chain[i].maximumSize ) {
chain[i].size = chain[i].maximumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].maximumSize;
sumStretch -= chain[i].stretch;
n--;
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 3dfa659a..628a9c6f 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -63,13 +63,13 @@ public:
Direction minimizeDirection() const;
virtual void setResizeMode( TQWidget *w, ResizeMode );
- virtual void setOpaqueResize( bool = TRUE );
+ virtual void setOpaqueResize( bool = true );
bool opaqueResize() const;
void moveToFirst( TQWidget * );
void moveToLast( TQWidget * );
- void refresh() { recalc( TRUE ); }
+ void refresh() { recalc( true ); }
virtual TQSize sizeHint() const;
virtual TQSize minimumSizeHint() const;
@@ -95,15 +95,15 @@ protected:
private:
void init();
- void recalc( bool update = FALSE );
+ void recalc( bool update = false );
void doResize();
void storeSizes();
void processChildEvents();
- TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
+ TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = false );
void recalcId();
void moveBefore( int pos, int id, bool upLeft );
void moveAfter( int pos, int id, bool upLeft );
- void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
+ void setG( TQWidget *w, int p, int s, bool isSplitter = false );
TQCOORD pick( const TQPoint &p ) const
{ return orient == TQt::Horizontal ? p.x() : p.y(); }
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index 86268e87..6ea8375d 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -248,7 +248,7 @@ void KDGanttSemiSizingControl::init()
{
_but = new TQPushButton( this );
_but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
- connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) );
+ connect( _but, TQ_SIGNAL( clicked() ), this, TQ_SLOT(changeState()) );
_layout = 0;
TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
TQToolTip::add( _but, "Show / hide legend");
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 5df5248b..e9adada9 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -100,17 +100,17 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
spacerLeft = new TQHBox( leftWidget );
myListView = new KDListView(leftWidget, this);
myListView->setVScrollBarMode (TQScrollView::AlwaysOff );
- connect( myListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
- this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
+ connect( myListView, TQ_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQ_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
- connect( myListView, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) );
- connect( myListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) );
+ connect( myListView, TQ_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQ_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) );
+ connect( myListView, TQ_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQ_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) );
- connect( myListView, TQT_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQT_SLOT(slotCurrentChanged ( TQListViewItem * ) ) );
- connect( myListView, TQT_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQT_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) );
- connect( myListView, TQT_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) );
+ connect( myListView, TQ_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQ_SLOT(slotCurrentChanged ( TQListViewItem * ) ) );
+ connect( myListView, TQ_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQ_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) );
+ connect( myListView, TQ_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQ_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) );
- //connect( myListView, TQT_SIGNAL( ), this, TQT_SLOT( ) );
+ //connect( myListView, TQ_SIGNAL( ), this, TQ_SLOT( ) );
myTimeTable = new KDTimeTableWidget (rightWidget,this);
spacerRight = new TQWidget( rightWidget );
@@ -145,8 +145,8 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
setLineWidth( 2 );
myListView->setFrameStyle( TQFrame::NoFrame );
myListView->setMargin( 0 );
- TQObject::connect(myListView, TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT( expandItem(TQListViewItem * ))) ;
- TQObject::connect(myListView, TQT_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT(collapseItem(TQListViewItem * ))) ;
+ TQObject::connect(myListView, TQ_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQ_SLOT( expandItem(TQListViewItem * ))) ;
+ TQObject::connect(myListView, TQ_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQ_SLOT(collapseItem(TQListViewItem * ))) ;
timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() );
listViewIsVisible = true;
@@ -158,7 +158,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
myTextColor = TQt::black;
myLegendItems = new TQPtrList<legendItem>;
- //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ;
+ //TQObject::connect( this, TQ_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQ_SLOT( editItem( KDGanttViewItem* ))) ;
myItemAttributeDialog = new itemAttributeDialog();
setRepaintMode( KDGanttView::Medium );
//setRepaintMode( KDGanttView::Always );
@@ -166,19 +166,19 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name )
setHeaderVisible( false );
// now connecting the widgets
- connect(myCanvasView->horizontalScrollBar(), TQT_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQT_SLOT( setValue ( int))) ;
- connect(myCanvasView, TQT_SIGNAL ( heightResized( int )) ,myTimeTable, TQT_SLOT( checkHeight ( int))) ;
- connect(myCanvasView, TQT_SIGNAL ( widthResized( int )) ,myTimeHeader, TQT_SLOT( checkWidth ( int))) ;
-
- TQObject::connect(myCanvasView->verticalScrollBar(), TQT_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQT_SLOT( setValue ( int ))) ;
- connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,this, TQT_SLOT(slotHeaderSizeChanged() )) ;
- connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQT_SLOT(resetWidth( int ) )) ;
- connect(myListView, TQT_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQT_SLOT( moveMyContent( int, int ))) ;
- connect(myTimeTable, TQT_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQT_SLOT( setMyContentsHeight( int ))) ;
+ connect(myCanvasView->horizontalScrollBar(), TQ_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQ_SLOT( setValue ( int))) ;
+ connect(myCanvasView, TQ_SIGNAL ( heightResized( int )) ,myTimeTable, TQ_SLOT( checkHeight ( int))) ;
+ connect(myCanvasView, TQ_SIGNAL ( widthResized( int )) ,myTimeHeader, TQ_SLOT( checkWidth ( int))) ;
+
+ TQObject::connect(myCanvasView->verticalScrollBar(), TQ_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQ_SLOT( setValue ( int ))) ;
+ connect(myTimeHeader, TQ_SIGNAL ( sizeChanged( int ) ) ,this, TQ_SLOT(slotHeaderSizeChanged() )) ;
+ connect(myTimeHeader, TQ_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQ_SLOT(resetWidth( int ) )) ;
+ connect(myListView, TQ_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQ_SLOT( moveMyContent( int, int ))) ;
+ connect(myTimeTable, TQ_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQ_SLOT( setMyContentsHeight( int ))) ;
// the next three are for adding new ticks at left/right
- connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(addTickLeft()));
- connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(addTickRight()));
- connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT( enableAdding( int )));
+ connect( myCanvasView->horizontalScrollBar(), TQ_SIGNAL (prevLine () ) ,this, TQ_SLOT(addTickLeft()));
+ connect( myCanvasView->horizontalScrollBar(), TQ_SIGNAL (nextLine () ) ,this, TQ_SLOT(addTickRight()));
+ connect( myCanvasView->horizontalScrollBar(), TQ_SIGNAL (valueChanged ( int ) ) ,this, TQ_SLOT( enableAdding( int )));
// now initing
fCenterTimeLineAfterShow = false;
@@ -553,18 +553,18 @@ void KDGanttView::setRepaintMode( RepaintMode mode )
break;
case Medium:
- connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvv, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvh, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvv, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvh, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQ_SIGNAL (sliderReleased () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvh, TQ_SIGNAL (sliderReleased () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvv, TQ_SIGNAL (nextLine () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvh, TQ_SIGNAL (nextLine () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvv, TQ_SIGNAL (prevLine () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvh, TQ_SIGNAL (prevLine () ) ,this, TQ_SLOT(forceRepaint()));
break;
case Always:
- connect( cvv, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
- connect( cvh, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
- connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
- connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQ_SIGNAL (valueChanged ( int ) ) ,this, TQ_SLOT(forceRepaint( int )));
+ connect( cvh, TQ_SIGNAL (valueChanged ( int ) ) ,this, TQ_SLOT(forceRepaint( int )));
+ connect( cvv, TQ_SIGNAL (sliderReleased () ) ,this, TQ_SLOT(forceRepaint()));
+ connect( cvh, TQ_SIGNAL (sliderReleased () ) ,this, TQ_SLOT(forceRepaint()));
break;
}
}
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index f3dd9c40..4b1e3472 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -59,7 +59,7 @@
#include <kdebug.h>
KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt)
- : TQCanvas (TQT_TQOBJECT(parent))
+ : TQCanvas (parent)
{
myGanttView = myGantt;
taskLinksVisible = true;
@@ -725,42 +725,42 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant )
myPopupMenu = new TQPopupMenu(this);
TQPopupMenu * zoomPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Zoom"),zoomPopupMenu, 1);
- zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, TQT_SLOT(setSettings(int)),0 ,21,21 );
- zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, TQT_SLOT(setSettings(int)),0 ,20,20 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, TQT_SLOT(setSettings(int)),0 ,22,22 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, TQT_SLOT(setSettings(int)),0 ,24,24 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, TQT_SLOT(setSettings(int)),0 ,26,26 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, TQT_SLOT(setSettings(int)),0 ,23,23 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, TQT_SLOT(setSettings(int)),0 ,25,25 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, TQT_SLOT(setSettings(int)),0 ,27,27 );
+ zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, TQ_SLOT(setSettings(int)),0 ,21,21 );
+ zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, TQ_SLOT(setSettings(int)),0 ,20,20 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, TQ_SLOT(setSettings(int)),0 ,22,22 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, TQ_SLOT(setSettings(int)),0 ,24,24 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, TQ_SLOT(setSettings(int)),0 ,26,26 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, TQ_SLOT(setSettings(int)),0 ,23,23 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, TQ_SLOT(setSettings(int)),0 ,25,25 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, TQ_SLOT(setSettings(int)),0 ,27,27 );
scalePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Scale"),scalePopupMenu, 2);
- scalePopupMenu->insertItem( i18n("Minute"),this, TQT_SLOT(setSettings(int)),0 ,1,1 );
- scalePopupMenu->insertItem( i18n("Hour"),this, TQT_SLOT(setSettings(int)),0 ,2,2 );
- scalePopupMenu->insertItem( i18n("Day"),this, TQT_SLOT(setSettings(int)),0 ,3,3 );
- scalePopupMenu->insertItem( i18n("Week"),this, TQT_SLOT(setSettings(int)),0 ,4,4 );
- scalePopupMenu->insertItem( i18n("Month"),this, TQT_SLOT(setSettings(int)),0 ,5,5 );
- scalePopupMenu->insertItem( i18n("Auto"),this, TQT_SLOT(setSettings(int)),0 ,6,6 );
+ scalePopupMenu->insertItem( i18n("Minute"),this, TQ_SLOT(setSettings(int)),0 ,1,1 );
+ scalePopupMenu->insertItem( i18n("Hour"),this, TQ_SLOT(setSettings(int)),0 ,2,2 );
+ scalePopupMenu->insertItem( i18n("Day"),this, TQ_SLOT(setSettings(int)),0 ,3,3 );
+ scalePopupMenu->insertItem( i18n("Week"),this, TQ_SLOT(setSettings(int)),0 ,4,4 );
+ scalePopupMenu->insertItem( i18n("Month"),this, TQ_SLOT(setSettings(int)),0 ,5,5 );
+ scalePopupMenu->insertItem( i18n("Auto"),this, TQ_SLOT(setSettings(int)),0 ,6,6 );
scalePopupMenu->setCheckable ( true );
timePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Time Format"),timePopupMenu, 3);
- timePopupMenu->insertItem( i18n("24 Hour"),this, TQT_SLOT(setSettings(int)),0 ,40,40 );
- timePopupMenu->insertItem( i18n("12 PM Hour"),this, TQT_SLOT(setSettings(int)),0 ,41,41 );
- timePopupMenu->insertItem( i18n("24:00 Hour"),this, TQT_SLOT(setSettings(int)),0 ,42,42 );
+ timePopupMenu->insertItem( i18n("24 Hour"),this, TQ_SLOT(setSettings(int)),0 ,40,40 );
+ timePopupMenu->insertItem( i18n("12 PM Hour"),this, TQ_SLOT(setSettings(int)),0 ,41,41 );
+ timePopupMenu->insertItem( i18n("24:00 Hour"),this, TQ_SLOT(setSettings(int)),0 ,42,42 );
yearPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Year Format"),yearPopupMenu, 4);
- yearPopupMenu->insertItem( i18n("Four Digit"),this, TQT_SLOT(setSettings(int)),0 ,50,50 );
- yearPopupMenu->insertItem( i18n("Two Digit"),this, TQT_SLOT(setSettings(int)),0 ,51,51 );
- yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, TQT_SLOT(setSettings(int)),0 ,52,52 );
- yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, TQT_SLOT(setSettings(int)),0 ,53,53 );
+ yearPopupMenu->insertItem( i18n("Four Digit"),this, TQ_SLOT(setSettings(int)),0 ,50,50 );
+ yearPopupMenu->insertItem( i18n("Two Digit"),this, TQ_SLOT(setSettings(int)),0 ,51,51 );
+ yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, TQ_SLOT(setSettings(int)),0 ,52,52 );
+ yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, TQ_SLOT(setSettings(int)),0 ,53,53 );
gridPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Grid"),gridPopupMenu,5);
- gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, TQT_SLOT(setSettings(int)),0 ,10,10 );
- gridPopupMenu->insertItem( i18n("Show Major Grid"),this, TQT_SLOT(setSettings(int)),0 ,11,11 );
- gridPopupMenu->insertItem( i18n("Show No Grid"),this, TQT_SLOT(setSettings(int)),0 ,12,12 );
- myPopupMenu->insertItem( i18n("Print"),this, TQT_SLOT(setSettings(int)),0 ,30,30 );
- connect(myPopupMenu, TQT_SIGNAL ( aboutToShow () ) , this, TQT_SLOT( preparePopupMenu() )) ;
+ gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, TQ_SLOT(setSettings(int)),0 ,10,10 );
+ gridPopupMenu->insertItem( i18n("Show Major Grid"),this, TQ_SLOT(setSettings(int)),0 ,11,11 );
+ gridPopupMenu->insertItem( i18n("Show No Grid"),this, TQ_SLOT(setSettings(int)),0 ,12,12 );
+ myPopupMenu->insertItem( i18n("Print"),this, TQ_SLOT(setSettings(int)),0 ,30,30 );
+ connect(myPopupMenu, TQ_SIGNAL ( aboutToShow () ) , this, TQ_SLOT( preparePopupMenu() )) ;
flagZoomToFit = false;
setShowMinorTicks( true );
myRealEnd = myHorizonEnd;
@@ -2702,7 +2702,7 @@ KDListView::KDListView(TQWidget* parent, KDGanttView* gantView):TQListView (pare
setDefaultRenameAction(TQListView::Accept);
setColumnWidthMode ( 0,Maximum );
_calendarMode = false;
- // TQObject::connect(this, TQT_SIGNAL ( pressed ( TQListViewItem * )) , this, TQT_SLOT( dragItem( TQListViewItem *))) ;
+ // TQObject::connect(this, TQ_SIGNAL ( pressed ( TQListViewItem * )) , this, TQ_SLOT( dragItem( TQListViewItem *))) ;
}
@@ -3177,38 +3177,38 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWi
TQPopupMenu * newMenu = new TQPopupMenu( this );
TQPopupMenu * onView = new TQPopupMenu( this );
onView->insertItem( i18n( "Summary" ), this,
- TQT_SLOT ( newRootItem( int ) ), 0, 0 );
+ TQ_SLOT ( newRootItem( int ) ), 0, 0 );
onView->insertItem( i18n( "Event" ), this,
- TQT_SLOT ( newRootItem( int ) ), 0, 1);
+ TQ_SLOT ( newRootItem( int ) ), 0, 1);
onView->insertItem( i18n( "Task" ), this,
- TQT_SLOT ( newRootItem( int ) ), 0, 2 );
+ TQ_SLOT ( newRootItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Root" ), onView );
newMenu->insertItem( i18n( "Summary" ),
- this, TQT_SLOT ( newChildItem( int) ), 0, 0 );
+ this, TQ_SLOT ( newChildItem( int) ), 0, 0 );
newMenu->insertItem( i18n( "Event" ),
- this, TQT_SLOT ( newChildItem( int ) ), 0, 1 );
+ this, TQ_SLOT ( newChildItem( int ) ), 0, 1 );
newMenu->insertItem( i18n( "Task" ),
- this, TQT_SLOT ( newChildItem( int ) ), 0, 2 );
+ this, TQ_SLOT ( newChildItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Child" ), newMenu );
TQPopupMenu * afterMenu = new TQPopupMenu( this );
afterMenu->insertItem( i18n( "Summary" ),
- this, TQT_SLOT ( newChildItem( int) ), 0, 0+4 );
+ this, TQ_SLOT ( newChildItem( int) ), 0, 0+4 );
afterMenu->insertItem( i18n( "Event" ),
- this, TQT_SLOT ( newChildItem( int ) ), 0, 1+4 );
+ this, TQ_SLOT ( newChildItem( int ) ), 0, 1+4 );
afterMenu->insertItem( i18n( "Task" ),
- this, TQT_SLOT ( newChildItem( int ) ), 0, 2+4 );
+ this, TQ_SLOT ( newChildItem( int ) ), 0, 2+4 );
onItem->insertItem( i18n( "New After" ), afterMenu );
TQPopupMenu *pasteMenu = new TQPopupMenu( this );
pasteMenu->insertItem( i18n( "As Root" ),
- this, TQT_SLOT ( pasteItem( int ) ), 0, 0 );
+ this, TQ_SLOT ( pasteItem( int ) ), 0, 0 );
pasteMenu->insertItem( i18n( "As Child" ),
- this, TQT_SLOT ( pasteItem( int ) ), 0, 1 );
+ this, TQ_SLOT ( pasteItem( int ) ), 0, 1 );
pasteMenu->insertItem( i18n( "After" ),
- this, TQT_SLOT ( pasteItem( int ) ), 0, 2 );
+ this, TQ_SLOT ( pasteItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "Paste" ), pasteMenu, 3 );
- onItem->insertItem( i18n( "Cut Item" ), this, TQT_SLOT ( cutItem() ) );
+ onItem->insertItem( i18n( "Cut Item" ), this, TQ_SLOT ( cutItem() ) );
onItem->setItemEnabled( 3, false );
myMyContentsHeight = 0;
_showItemAddPopupMenu = false;
@@ -3216,13 +3216,13 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWi
TQObject *scrollViewTimer = child( "scrollview scrollbar timer", "TQTimer", false );
Q_ASSERT( scrollViewTimer );
if ( scrollViewTimer ) {
- disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) );
+ disconnect( scrollViewTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(updateScrollBars() ) );
}
// If they needed a scrollbar timer in scrollview...
- connect( &scrollBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(myUpdateScrollBars() ) );
+ connect( &scrollBarTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(myUpdateScrollBars() ) );
myScrollTimer = new TQTimer( this, "myScrollTimer" );
- connect( myScrollTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotScrollTimer() ) );
+ connect( myScrollTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotScrollTimer() ) );
autoScrollEnabled = false;
}
diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui
index 5a34dbb5..2eaa3173 100644
--- a/kdgantt/itemAttributeDialog.ui
+++ b/kdgantt/itemAttributeDialog.ui
@@ -702,7 +702,7 @@
<variables>
<variable>KDGanttViewItem * myItem</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>ChangeText_clicked()</slot>
<slot>ChangeStart_clicked()</slot>
@@ -732,6 +732,6 @@
<slot>CalBox_toggled( bool mode )</slot>
<slot>PrioSlider_valueChanged( int val )</slot>
<slot returnType="KDGanttViewItem *">getItem()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h
index cd659d69..4e46984b 100644
--- a/kdgantt/qlayoutengine_p.h
+++ b/kdgantt/qlayoutengine_p.h
@@ -63,7 +63,7 @@
struct QLayoutStruct
{
void initParameters() { minimumSize = sizeHint = 0;
- maximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; }
+ maximumSize = TQWIDGETSIZE_MAX; expansive = false; empty = true; }
void init() { stretch = 0; initParameters(); }
//permanent storage:
int stretch;