-rw-r--r-- | microkde/KDGanttMinimizeSplitter.cpp | 10 | ||||
-rw-r--r-- | microkde/KDGanttMinimizeSplitter.h | 2 |
2 files changed, 12 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 | |||
@@ -163,12 +163,13 @@ void KDGanttSplitterHandle::toggle() | |||
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 | ||
171 | void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) | 172 | void 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 ) |
@@ -477,12 +478,21 @@ void KDGanttMinimizeSplitter::init() | |||
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 | ||
484 | void 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). |
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h index 75e0443..8120d14 100644 --- a/microkde/KDGanttMinimizeSplitter.h +++ b/microkde/KDGanttMinimizeSplitter.h | |||
@@ -77,12 +77,14 @@ public: | |||
77 | QSize minimumSizeHint() const; | 77 | QSize minimumSizeHint() const; |
78 | 78 | ||
79 | QValueList<int> sizes() const; | 79 | QValueList<int> sizes() const; |
80 | void setSizes( QValueList<int> ); | 80 | void setSizes( QValueList<int> ); |
81 | KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} | 81 | KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} |
82 | void expandPos( int id, int* min, int* max ); | 82 | void expandPos( int id, int* min, int* max ); |
83 | public slots: | ||
84 | void toggle(); | ||
83 | protected: | 85 | protected: |
84 | void childEvent( QChildEvent * ); | 86 | void childEvent( QChildEvent * ); |
85 | 87 | ||
86 | bool event( QEvent * ); | 88 | bool event( QEvent * ); |
87 | void resizeEvent( QResizeEvent * ); | 89 | void resizeEvent( QResizeEvent * ); |
88 | 90 | ||