summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-08-05 19:27:34 (UTC)
committer zautrix <zautrix>2005-08-05 19:27:34 (UTC)
commit78ae7e3faed42b510f4f0a60007115756cd06128 (patch) (unidiff)
tree16947ed0eda107673cb6b437e772a6194861548d /korganizer/koagenda.cpp
parent7c639808d3d78e323857e0a110237e6d77bf04c8 (diff)
downloadkdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.zip
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.gz
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.bz2
fixes
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index c738f7e..7e9fa71 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -78,25 +78,28 @@ MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
78 mTimeBox->setPalette(pal); 78 mTimeBox->setPalette(pal);
79 //mTimeBox->setAutoMask(true); 79 //mTimeBox->setAutoMask(true);
80 80
81 agenda->addChild(mTimeBox); 81 agenda->addChild(mTimeBox);
82 82
83 oldToday = -1; 83 oldToday = -1;
84} 84}
85 85
86MarcusBains::~MarcusBains() 86MarcusBains::~MarcusBains()
87{ 87{
88 //delete minutes; 88 //delete minutes;
89} 89}
90 90void MarcusBains::hideMe()
91{
92 hide(); mTimeBox->hide();
93}
91int MarcusBains::todayColumn() 94int MarcusBains::todayColumn()
92{ 95{
93 QDate currentDate = QDate::currentDate(); 96 QDate currentDate = QDate::currentDate();
94 97
95 DateList dateList = agenda->dateList(); 98 DateList dateList = agenda->dateList();
96 DateList::ConstIterator it; 99 DateList::ConstIterator it;
97 int col = 0; 100 int col = 0;
98 for(it = dateList.begin(); it != dateList.end(); ++it) { 101 for(it = dateList.begin(); it != dateList.end(); ++it) {
99 if((*it) == currentDate) 102 if((*it) == currentDate)
100 return KOGlobals::self()->reverseLayout() ? 103 return KOGlobals::self()->reverseLayout() ?
101 agenda->columns() - 1 - col : col; 104 agenda->columns() - 1 - col : col;
102 ++col; 105 ++col;
@@ -363,24 +366,25 @@ void KOAgenda::marcus_bains()
363} 366}
364 367
365 368
366void KOAgenda::changeColumns(int columns) 369void KOAgenda::changeColumns(int columns)
367{ 370{
368 if (columns == 0) { 371 if (columns == 0) {
369 qDebug("KOAgenda::changeColumns() called with argument 0 "); 372 qDebug("KOAgenda::changeColumns() called with argument 0 ");
370 return; 373 return;
371 } 374 }
372 clear(); 375 clear();
373 mColumns = columns; 376 mColumns = columns;
374 computeSizes(); 377 computeSizes();
378 if(mMarcusBains) mMarcusBains->hideMe();
375} 379}
376 380
377/* 381/*
378 This is the eventFilter function, which gets all events from the KOAgendaItems 382 This is the eventFilter function, which gets all events from the KOAgendaItems
379 contained in the agenda. It has to handle moving and resizing for all items. 383 contained in the agenda. It has to handle moving and resizing for all items.
380*/ 384*/
381bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) 385bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
382{ 386{
383 // kdDebug() << "KOAgenda::eventFilter" << endl; 387 // kdDebug() << "KOAgenda::eventFilter" << endl;
384 switch(event->type()) { 388 switch(event->type()) {
385 case QEvent::MouseButtonPress: 389 case QEvent::MouseButtonPress:
386 case QEvent::MouseButtonDblClick: 390 case QEvent::MouseButtonDblClick: