@ -65,7 +65,7 @@ KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt)
taskLinksVisible = true ;
taskLinksVisible = true ;
flag_blockUpdating = false ;
flag_blockUpdating = false ;
int_blockUpdating = 0 ;
int_blockUpdating = 0 ;
gridPen . setStyle ( Qt: : DotLine ) ;
gridPen . setStyle ( T Qt: : DotLine ) ;
gridPen . setColor ( TQColor ( 100 , 100 , 100 ) ) ;
gridPen . setColor ( TQColor ( 100 , 100 , 100 ) ) ;
maximumComputedGridHeight = 0 ;
maximumComputedGridHeight = 0 ;
denseLineCount = 0 ;
denseLineCount = 0 ;
@ -230,7 +230,7 @@ void KDTimeTableWidget::computeVerticalGrid()
*/
*/
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setSize ( cw , h ) ;
itcol . current ( ) - > setSize ( cw , h ) ;
itcol . current ( ) - > move ( i , 0 ) ;
itcol . current ( ) - > move ( i , 0 ) ;
itcol . current ( ) - > show ( ) ;
itcol . current ( ) - > show ( ) ;
@ -244,7 +244,7 @@ void KDTimeTableWidget::computeVerticalGrid()
*/
*/
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
temprect - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
temprect - > setSize ( cw , h ) ;
temprect - > setSize ( cw , h ) ;
temprect - > move ( i , 0 ) ;
temprect - > move ( i , 0 ) ;
temprect - > setZ ( - 20 ) ;
temprect - > setZ ( - 20 ) ;
@ -276,7 +276,7 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol . current ( ) - > setPoints ( i + ( cw / 2 ) , 0 , i + ( cw / 2 ) , h ) ;
itcol . current ( ) - > setPoints ( i + ( cw / 2 ) , 0 , i + ( cw / 2 ) , h ) ;
*/
*/
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setSize ( cw , h ) ;
itcol . current ( ) - > setSize ( cw , h ) ;
itcol . current ( ) - > move ( i , 0 ) ;
itcol . current ( ) - > move ( i , 0 ) ;
itcol . current ( ) - > show ( ) ;
itcol . current ( ) - > show ( ) ;
@ -284,7 +284,7 @@ void KDTimeTableWidget::computeVerticalGrid()
} else {
} else {
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
temprect - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
temprect - > setSize ( cw , h ) ;
temprect - > setSize ( cw , h ) ;
temprect - > move ( i , 0 ) ;
temprect - > move ( i , 0 ) ;
temprect - > setZ ( - 20 ) ;
temprect - > setZ ( - 20 ) ;
@ -332,7 +332,7 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol . current ( ) - > setPoints ( i + mid , 0 , mid , h ) ;
itcol . current ( ) - > setPoints ( i + mid , 0 , mid , h ) ;
*/
*/
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setSize ( mid , h ) ;
itcol . current ( ) - > setSize ( mid , h ) ;
itcol . current ( ) - > move ( left , 0 ) ;
itcol . current ( ) - > move ( left , 0 ) ;
itcol . current ( ) - > show ( ) ;
itcol . current ( ) - > show ( ) ;
@ -340,7 +340,7 @@ void KDTimeTableWidget::computeVerticalGrid()
} else {
} else {
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
temprect - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
temprect - > setSize ( mid , h ) ;
temprect - > setSize ( mid , h ) ;
temprect - > move ( left , 0 ) ;
temprect - > move ( left , 0 ) ;
temprect - > setZ ( - 20 ) ;
temprect - > setZ ( - 20 ) ;
@ -386,7 +386,7 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol . current ( ) - > setPoints ( i + mid , 0 , mid , h ) ;
itcol . current ( ) - > setPoints ( i + mid , 0 , mid , h ) ;
*/
*/
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
itcol . current ( ) - > setSize ( mid , h ) ;
itcol . current ( ) - > setSize ( mid , h ) ;
itcol . current ( ) - > move ( left , 0 ) ;
itcol . current ( ) - > move ( left , 0 ) ;
itcol . current ( ) - > show ( ) ;
itcol . current ( ) - > show ( ) ;
@ -394,7 +394,7 @@ void KDTimeTableWidget::computeVerticalGrid()
} else {
} else {
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect = new KDCanvasRectangle ( this , 0 , Type_is_KDGanttGridItem ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setPen ( TQPen ( TQPen : : NoPen ) ) ;
temprect - > setBrush ( TQBrush ( colcol , Qt: : SolidPattern ) ) ;
temprect - > setBrush ( TQBrush ( colcol , T Qt: : SolidPattern ) ) ;
temprect - > setSize ( mid , h ) ;
temprect - > setSize ( mid , h ) ;
temprect - > move ( left , 0 ) ;
temprect - > move ( left , 0 ) ;
temprect - > setZ ( - 20 ) ;
temprect - > setZ ( - 20 ) ;
@ -2447,16 +2447,16 @@ void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e )
{
{
mouseDown = false ;
mouseDown = false ;
switch ( e - > button ( ) ) {
switch ( e - > button ( ) ) {
case Qt: : LeftButton :
case T Qt: : LeftButton :
mouseDown = true ;
mouseDown = true ;
beginMouseDown = e - > pos ( ) . x ( ) ;
beginMouseDown = e - > pos ( ) . x ( ) ;
endMouseDown = e - > pos ( ) . x ( ) ;
endMouseDown = e - > pos ( ) . x ( ) ;
break ;
break ;
case Qt: : RightButton :
case T Qt: : RightButton :
if ( flagShowPopupMenu )
if ( flagShowPopupMenu )
myPopupMenu - > popup ( e - > globalPos ( ) ) ;
myPopupMenu - > popup ( e - > globalPos ( ) ) ;
break ;
break ;
case Qt: : MidButton :
case T Qt: : MidButton :
break ;
break ;
default :
default :
break ;
break ;
@ -2539,7 +2539,7 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
KDLegendWidget : : KDLegendWidget ( TQWidget * parent ,
KDLegendWidget : : KDLegendWidget ( TQWidget * parent ,
KDGanttMinimizeSplitter * legendParent ) :
KDGanttMinimizeSplitter * legendParent ) :
KDGanttSemiSizingControl ( KDGanttSemiSizingControl : : Before , Qt: : Vertical ,
KDGanttSemiSizingControl ( KDGanttSemiSizingControl : : Before , T Qt: : Vertical ,
parent )
parent )
{
{
myLegendParent = legendParent ;
myLegendParent = legendParent ;
@ -2645,9 +2645,9 @@ void KDLegendWidget::clearLegend ( )
{
{
if ( myLegend ) delete myLegend ;
if ( myLegend ) delete myLegend ;
if ( dock )
if ( dock )
myLegend = new TQGroupBox ( 1 , Qt: : Horizontal , scroll - > viewport ( ) ) ;
myLegend = new TQGroupBox ( 1 , T Qt: : Horizontal , scroll - > viewport ( ) ) ;
else
else
myLegend = new TQGroupBox ( 1 , Qt: : Horizontal , i18n ( " Legend " ) , scroll - > viewport ( ) ) ;
myLegend = new TQGroupBox ( 1 , T Qt: : Horizontal , i18n ( " Legend " ) , scroll - > viewport ( ) ) ;
myLegend - > setBackgroundColor ( TQt : : white ) ;
myLegend - > setBackgroundColor ( TQt : : white ) ;
myLegend - > setFont ( font ( ) ) ;
myLegend - > setFont ( font ( ) ) ;
scroll - > addChild ( myLegend ) ;
scroll - > addChild ( myLegend ) ;
@ -3516,7 +3516,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
currentItem = 0 ;
currentItem = 0 ;
movingItem = 0 ;
movingItem = 0 ;
mouseDown = true ;
mouseDown = true ;
if ( e - > button ( ) = = Qt: : RightButton & & mySignalSender - > editable ( ) ) {
if ( e - > button ( ) = = T Qt: : RightButton & & mySignalSender - > editable ( ) ) {
lastClickedItem = ( KDGanttViewItem * ) mySignalSender - > myListView - > itemAt ( TQPoint ( 2 , e - > pos ( ) . y ( ) ) ) ;
lastClickedItem = ( KDGanttViewItem * ) mySignalSender - > myListView - > itemAt ( TQPoint ( 2 , e - > pos ( ) . y ( ) ) ) ;
if ( lastClickedItem ) {
if ( lastClickedItem ) {
if ( lastClickedItem - > displaySubitemsAsGroup ( ) & & ! lastClickedItem - > isOpen ( ) ) {
if ( lastClickedItem - > displaySubitemsAsGroup ( ) & & ! lastClickedItem - > isOpen ( ) ) {
@ -3537,7 +3537,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
TQCanvasItemList : : Iterator it ;
TQCanvasItemList : : Iterator it ;
for ( it = il . begin ( ) ; it ! = il . end ( ) ; + + it ) {
for ( it = il . begin ( ) ; it ! = il . end ( ) ; + + it ) {
switch ( e - > button ( ) ) {
switch ( e - > button ( ) ) {
case Qt: : LeftButton :
case T Qt: : LeftButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
currentItem = getItem ( * it ) ;
currentItem = getItem ( * it ) ;
@ -3590,7 +3590,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break ;
break ;
}
}
break ;
break ;
case Qt: : RightButton :
case T Qt: : RightButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
currentItem = getItem ( * it ) ;
currentItem = getItem ( * it ) ;
@ -3602,7 +3602,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break ;
break ;
}
}
break ;
break ;
case Qt: : MidButton :
case T Qt: : MidButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
currentItem = getItem ( * it ) ;
currentItem = getItem ( * it ) ;
@ -3618,10 +3618,10 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
break ;
break ;
}
}
}
}
if ( e - > button ( ) = = Qt: : RightButton ) {
if ( e - > button ( ) = = T Qt: : RightButton ) {
mySignalSender - > gvContextMenuRequested ( currentItem , e - > globalPos ( ) ) ;
mySignalSender - > gvContextMenuRequested ( currentItem , e - > globalPos ( ) ) ;
}
}
if ( autoScrollEnabled & & e - > button ( ) = = Qt: : LeftButton ) {
if ( autoScrollEnabled & & e - > button ( ) = = T Qt: : LeftButton ) {
myScrollTimer - > start ( 50 ) ;
myScrollTimer - > start ( 50 ) ;
}
}
}
}
@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
// if ( currentLink || currentItem )
// if ( currentLink || currentItem )
{
{
switch ( e - > button ( ) ) {
switch ( e - > button ( ) ) {
case Qt: : LeftButton :
case T Qt: : LeftButton :
myScrollTimer - > stop ( ) ;
myScrollTimer - > stop ( ) ;
{
{
mySignalSender - > itemLeftClicked ( currentItem ) ;
mySignalSender - > itemLeftClicked ( currentItem ) ;
@ -3675,7 +3675,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
movingGVItem = 0 ;
movingGVItem = 0 ;
}
}
break ;
break ;
case Qt: : RightButton :
case T Qt: : RightButton :
{
{
mySignalSender - > itemRightClicked ( currentItem ) ;
mySignalSender - > itemRightClicked ( currentItem ) ;
mySignalSender - > gvItemRightClicked ( currentItem ) ;
mySignalSender - > gvItemRightClicked ( currentItem ) ;
@ -3684,7 +3684,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
if ( currentLink )
if ( currentLink )
mySignalSender - > taskLinkRightClicked ( currentLink ) ;
mySignalSender - > taskLinkRightClicked ( currentLink ) ;
break ;
break ;
case Qt: : MidButton :
case T Qt: : MidButton :
{
{
mySignalSender - > itemMidClicked ( currentItem ) ;
mySignalSender - > itemMidClicked ( currentItem ) ;
mySignalSender - > gvItemMidClicked ( currentItem ) ;
mySignalSender - > gvItemMidClicked ( currentItem ) ;
@ -3713,7 +3713,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
{
TQCanvasItemList il = canvas ( ) - > collisions ( e - > pos ( ) ) ;
TQCanvasItemList il = canvas ( ) - > collisions ( e - > pos ( ) ) ;
if ( il . isEmpty ( ) & & e - > button ( ) = = Qt: : LeftButton ) {
if ( il . isEmpty ( ) & & e - > button ( ) = = T Qt: : LeftButton ) {
//not directly sending a signal here (encapsulation and whatnot)
//not directly sending a signal here (encapsulation and whatnot)
mySignalSender - > emptySpaceDoubleClicked ( e ) ;
mySignalSender - > emptySpaceDoubleClicked ( e ) ;
return ;
return ;
@ -3722,7 +3722,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
TQCanvasItemList : : Iterator it ;
TQCanvasItemList : : Iterator it ;
for ( it = il . begin ( ) ; it ! = il . end ( ) ; + + it ) {
for ( it = il . begin ( ) ; it ! = il . end ( ) ; + + it ) {
switch ( e - > button ( ) ) {
switch ( e - > button ( ) ) {
case Qt: : LeftButton :
case T Qt: : LeftButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
if ( getItem ( * it ) - > enabled ( ) )
if ( getItem ( * it ) - > enabled ( ) )
@ -3739,7 +3739,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
}
}
break ;
break ;
/*
/*
case Qt: : RightButton :
case T Qt: : RightButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
mySignalSender - > itemRightClicked ( getItem ( * it ) ) ;
mySignalSender - > itemRightClicked ( getItem ( * it ) ) ;
@ -3751,7 +3751,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
break ;
break ;
}
}
break ;
break ;
case Qt: : MidButton :
case T Qt: : MidButton :
switch ( getType ( * it ) ) {
switch ( getType ( * it ) ) {
case Type_is_KDGanttViewItem :
case Type_is_KDGanttViewItem :
mySignalSender - > itemMidClicked ( getItem ( * it ) ) ;
mySignalSender - > itemMidClicked ( getItem ( * it ) ) ;
@ -4025,7 +4025,7 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh
if ( right = = left )
if ( right = = left )
+ + right ;
+ + right ;
setPen ( TQPen ( TQPen : : NoPen ) ) ;
setPen ( TQPen ( TQPen : : NoPen ) ) ;
setBrush ( TQBrush ( mColor , Qt: : SolidPattern ) ) ;
setBrush ( TQBrush ( mColor , T Qt: : SolidPattern ) ) ;
setSize ( right - left , height ) ;
setSize ( right - left , height ) ;
move ( left , 0 ) ;
move ( left , 0 ) ;
show ( ) ;
show ( ) ;