-rw-r--r-- | korganizer/koagendaview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index eb3a6cd..5508210 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -246,48 +246,49 @@ void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) | |||
246 | void TimeLabels::paintEvent(QPaintEvent*) | 246 | void TimeLabels::paintEvent(QPaintEvent*) |
247 | { | 247 | { |
248 | 248 | ||
249 | // kdDebug() << "paintevent..." << endl; | 249 | // kdDebug() << "paintevent..." << endl; |
250 | // this is another hack! | 250 | // this is another hack! |
251 | // QPainter painter(this); | 251 | // QPainter painter(this); |
252 | //QString c | 252 | //QString c |
253 | repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); | 253 | repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight()); |
254 | } | 254 | } |
255 | 255 | ||
256 | //////////////////////////////////////////////////////////////////////////// | 256 | //////////////////////////////////////////////////////////////////////////// |
257 | 257 | ||
258 | EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) | 258 | EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) |
259 | : QFrame(parent,name) | 259 | : QFrame(parent,name) |
260 | { | 260 | { |
261 | mColumns = 1; | 261 | mColumns = 1; |
262 | mTopBox = 0; | 262 | mTopBox = 0; |
263 | mLocation = loc; | 263 | mLocation = loc; |
264 | mTopLayout = 0; | 264 | mTopLayout = 0; |
265 | mPaintWidget = 0; | 265 | mPaintWidget = 0; |
266 | mXOffset = 0; | 266 | mXOffset = 0; |
267 | if (mLocation == Top) mPixmap = SmallIcon("1uparrow"); | 267 | if (mLocation == Top) mPixmap = SmallIcon("1uparrow"); |
268 | else mPixmap = SmallIcon("1downarrow"); | 268 | else mPixmap = SmallIcon("1downarrow"); |
269 | mEnabled.resize(mColumns); | 269 | mEnabled.resize(mColumns); |
270 | mEnabled.fill( false ); | ||
270 | setMinimumHeight(mPixmap.height()); | 271 | setMinimumHeight(mPixmap.height()); |
271 | } | 272 | } |
272 | 273 | ||
273 | EventIndicator::~EventIndicator() | 274 | EventIndicator::~EventIndicator() |
274 | { | 275 | { |
275 | } | 276 | } |
276 | 277 | ||
277 | void EventIndicator::drawContents(QPainter *p) | 278 | void EventIndicator::drawContents(QPainter *p) |
278 | { | 279 | { |
279 | 280 | ||
280 | // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl; | 281 | // kdDebug() << "======== top: " << contentsRect().top() << " bottom " << // contentsRect().bottom() << " left " << contentsRect().left() << " right " << contentsRect().right() << endl; |
281 | KDGanttSplitterHandle* han = 0; | 282 | KDGanttSplitterHandle* han = 0; |
282 | if ( mPaintWidget ) | 283 | if ( mPaintWidget ) |
283 | han = mPaintWidget->firstHandle(); | 284 | han = mPaintWidget->firstHandle(); |
284 | if ( ! han ) { | 285 | if ( ! han ) { |
285 | int i; | 286 | int i; |
286 | for(i=0;i<mColumns;++i) { | 287 | for(i=0;i<mColumns;++i) { |
287 | if (mEnabled[i]) { | 288 | if (mEnabled[i]) { |
288 | int cellWidth = contentsRect().right()/mColumns; | 289 | int cellWidth = contentsRect().right()/mColumns; |
289 | int xOffset = KOGlobals::self()->reverseLayout() ? | 290 | int xOffset = KOGlobals::self()->reverseLayout() ? |
290 | (mColumns - 1 - i)*cellWidth + (cellWidth -mPixmap.width())/2 : | 291 | (mColumns - 1 - i)*cellWidth + (cellWidth -mPixmap.width())/2 : |
291 | i*cellWidth + (cellWidth -mPixmap.width()) /2; | 292 | i*cellWidth + (cellWidth -mPixmap.width()) /2; |
292 | p->drawPixmap(QPoint(1+xOffset,0),mPixmap); | 293 | p->drawPixmap(QPoint(1+xOffset,0),mPixmap); |
293 | } | 294 | } |