summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-01-28 03:22:17 (UTC)
committer zautrix <zautrix>2005-01-28 03:22:17 (UTC)
commit94f0e8140c07696174dc3774dc2c11efad2ffa68 (patch) (unidiff)
treed95cc80e5c5221e8d9ce1cbf4b01cbf78fdf843a /microkde
parent6fb044008531ec883fc25a3ef2b43904930cfff6 (diff)
downloadkdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.zip
kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.gz
kdepimpi-94f0e8140c07696174dc3774dc2c11efad2ffa68.tar.bz2
missing config
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp10
-rw-r--r--microkde/KDGanttMinimizeSplitter.h2
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
@@ -157,24 +157,25 @@ void KDGanttSplitterHandle::toggle()
157 else { 157 else {
158 pos = max; 158 pos = max;
159 } 159 }
160 160
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();
177 } 178 }
178 _activeButton = 0; 179 _activeButton = 0;
179 updateCursor( e->pos() ); 180 updateCursor( e->pos() );
180 } 181 }
@@ -471,24 +472,33 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
471#if QT_VERSION >= 232 472#if QT_VERSION >= 232
472void KDGanttMinimizeSplitter::init() 473void KDGanttMinimizeSplitter::init()
473{ 474{
474 data = new QSplitterData; 475 data = new QSplitterData;
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 )
491{ 501{
492#if QT_VERSION >= 232 502#if QT_VERSION >= 232
493 if ( orient == o ) 503 if ( orient == o )
494 return; 504 return;
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 75e0443..8120d14 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -71,24 +71,26 @@ public:
71 71
72 void moveToFirst( QWidget * ); 72 void moveToFirst( QWidget * );
73 void moveToLast( QWidget * ); 73 void moveToLast( QWidget * );
74 74
75 void refresh() { recalc( TRUE ); } 75 void refresh() { recalc( TRUE ); }
76 QSize sizeHint() const; 76 QSize sizeHint() const;
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 );
83public slots:
84 void toggle();
83protected: 85protected:
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
89 int idAfter( QWidget* ) const; 91 int idAfter( QWidget* ) const;
90 92
91 void moveSplitter( QCOORD pos, int id ); 93 void moveSplitter( QCOORD pos, int id );
92 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, 94 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
93 QCOORD w, QCOORD h ); 95 QCOORD w, QCOORD h );
94 void styleChange( QStyle& ); 96 void styleChange( QStyle& );