summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.cpp
Unidiff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 567ae54..84edc0d 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -161,16 +161,17 @@ void KDGanttSplitterHandle::toggle()
161 _origPos = s->pick(mapToParent( QPoint( 0,0 ) )); 161 _origPos = s->pick(mapToParent( QPoint( 0,0 ) ));
162 s->moveSplitter( pos, id() ); 162 s->moveSplitter( pos, id() );
163 _collapsed = true; 163 _collapsed = true;
164 } 164 }
165 else { 165 else {
166 s->moveSplitter( _origPos, id() ); 166 s->moveSplitter( _origPos, id() );
167 _collapsed = false; 167 _collapsed = false;
168 } 168 }
169 repaint();
169} 170}
170 171
171void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) 172void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
172{ 173{
173 if ( _activeButton != 0 ) { 174 if ( _activeButton != 0 ) {
174 if ( onButton( e->pos() ) == _activeButton ) 175 if ( onButton( e->pos() ) == _activeButton )
175 { 176 {
176 toggle(); 177 toggle();
@@ -475,16 +476,25 @@ void KDGanttMinimizeSplitter::init()
475 if ( orient == Horizontal ) 476 if ( orient == Horizontal )
476 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); 477 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
477 else 478 else
478 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) ); 479 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) );
479} 480}
480#endif 481#endif
481 482
482 483
484void KDGanttMinimizeSplitter::toggle()
485{
486 if ( mFirstHandle )
487 mFirstHandle->toggle();
488 else
489 qDebug("KDGanttMinimizeSplitter::toggle::sorry, handle not available ");
490
491}
492
483 493
484/*! 494/*!
485 \brief the orientation of the splitter 495 \brief the orientation of the splitter
486 496
487 By default the orientation is horizontal (the widgets are side by side). 497 By default the orientation is horizontal (the widgets are side by side).
488 The possible orientations are Qt:Vertical and Qt::Horizontal (the default). 498 The possible orientations are Qt:Vertical and Qt::Horizontal (the default).
489*/ 499*/
490void KDGanttMinimizeSplitter::setOrientation( Orientation o ) 500void KDGanttMinimizeSplitter::setOrientation( Orientation o )