summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp10
-rw-r--r--korganizer/kolistview.h1
-rw-r--r--korganizer/komonthview.cpp35
-rw-r--r--korganizer/komonthview.h6
4 files changed, 35 insertions, 17 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 1b4397f..db3f802 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -326,2 +326,4 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
326 SLOT( setCalendar( int ) )); 326 SLOT( setCalendar( int ) ));
327 QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this,
328 SLOT( catChanged( Incidence * ) ));
327 QPopupMenu * exportPO = new QPopupMenu ( this ); 329 QPopupMenu * exportPO = new QPopupMenu ( this );
@@ -382,2 +384,10 @@ KOListView::~KOListView()
382 384
385void KOListView::catChanged( Incidence* inc)
386{
387 KOListViewItem* item = getItemForEvent(inc);
388 if (item) {
389 ListItemVisitor v(item, mStartDate );
390 inc->accept(v);
391 }
392}
383QString KOListView::getWhatsThisText(QPoint p) 393QString KOListView::getWhatsThisText(QPoint p)
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index a54b550..99d0561 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -296,2 +296,3 @@ class KOListView : public KOEventView
296 void processSelectionChange(QListViewItem *); 296 void processSelectionChange(QListViewItem *);
297 void catChanged( Incidence* );
297 298
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4fc447e..2289977 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -204,3 +204,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
204 if ( count () ) { 204 if ( count () ) {
205 if ( currentItem()+1 == count () ) { 205 if ( ((uint)currentItem()+1) == count () ) {
206 emit nextCell(); 206 emit nextCell();
@@ -245,3 +245,3 @@ void KNoScrollListBox::oneDown()
245 if ( count () ) { 245 if ( count () ) {
246 if ( currentItem()+1 == count () ) { 246 if ( ((uint)currentItem()+1) == count () ) {
247 emit nextCell(); 247 emit nextCell();
@@ -1294,2 +1294,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1294 1294
1295 connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this,
1296 SLOT( catChanged( Incidence * ) ));
1295 1297
@@ -1350,2 +1352,6 @@ KOMonthView::~KOMonthView()
1350 1352
1353void KOMonthView::catChanged( Incidence * )
1354{
1355 updateView();
1356}
1351void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday ) 1357void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday )
@@ -1362,3 +1368,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1362 bool weekview = false; 1368 bool weekview = false;
1363 int index = 0; 1369 uint index = 0;
1364 for (uint i = 0; i < mCellsW.count(); ++i) { 1370 for (uint i = 0; i < mCellsW.count(); ++i) {
@@ -1388,3 +1394,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1388 1394
1389 int count = (*cells).count(); 1395 uint count = (*cells).count();
1390 bool goLeft = (mday > 1 && index > 0); 1396 bool goLeft = (mday > 1 && index > 0);
@@ -1401,3 +1407,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1401 if ( goRight ) { 1407 if ( goRight ) {
1402 int right = index + iii; 1408 uint right = index + iii;
1403 if ( right < count ) { 1409 if ( right < count ) {
@@ -1491,3 +1497,3 @@ DateList KOMonthView::selectedDates()
1491} 1497}
1492 1498#if 0
1493void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1499void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
@@ -1499,3 +1505,3 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1499} 1505}
1500 1506#endif
1501void KOMonthView::updateConfig() 1507void KOMonthView::updateConfig()
@@ -1585,3 +1591,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1585 QPtrVector<KOWeekButton> *weekLabels; 1591 QPtrVector<KOWeekButton> *weekLabels;
1586 int weekNum = 6; 1592 uint weekNum = 6;
1587 mStartDate = start; 1593 mStartDate = start;
@@ -1611,3 +1617,2 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1611 } 1617 }
1612 bool primary = false;
1613 uint i; 1618 uint i;
@@ -1681,3 +1686,2 @@ void KOMonthView::updateView()
1681 QDateTime dt; 1686 QDateTime dt;
1682 bool ok;
1683 QDate endDate = mStartDate.addDays( timeSpan ); 1687 QDate endDate = mStartDate.addDays( timeSpan );
@@ -1813,2 +1817,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e)
1813 mComputeLayoutTimer->start( 100 ); 1817 mComputeLayoutTimer->start( 100 );
1818 KOEventView::resizeEvent( e );
1814} 1819}
@@ -1863,3 +1868,2 @@ void KOMonthView::computeLayoutWeek()
1863 int colWid = wid / daysToShow; 1868 int colWid = wid / daysToShow;
1864 int lastCol = wid - ( colWid*6 );
1865 int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); 1869 int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
@@ -1907,3 +1911,4 @@ void KOMonthView::computeLayoutWeek()
1907 int max = 0; 1911 int max = 0;
1908 for ( i = 0; i < mCellsW.count(); ++i) { 1912 int w_count = mCellsW.count();
1913 for ( i = 0; i < w_count; ++i) {
1909 if ( i > 6 ) { 1914 if ( i > 6 ) {
@@ -1999,3 +2004,2 @@ void KOMonthView::computeLayout()
1999 int colWid = wid / daysToShow; 2004 int colWid = wid / daysToShow;
2000 int lastCol = wid - ( colWid*6 );
2001 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 2005 int dayLabelHei = mDayLabels[0]->sizeHint().height();
@@ -2034,3 +2038,4 @@ void KOMonthView::computeLayout()
2034 int max = 0; 2038 int max = 0;
2035 for ( i = 0; i < mCells.count(); ++i) { 2039 int mc_count = mCells.count();
2040 for ( i = 0; i < mc_count; ++i) {
2036 //qDebug("iii %d ", i); 2041 //qDebug("iii %d ", i);
@@ -2212,3 +2217,3 @@ void KOMonthView::nextCell()
2212{ 2217{
2213 bool res = focusNextPrevChild ( true ); 2218 focusNextPrevChild ( true );
2214} 2219}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index a41eb54..4d62e9b 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -198,3 +198,3 @@ public slots:
198 void repaintfinishUpdateCell(); 198 void repaintfinishUpdateCell();
199 protected slots: 199 protected slots:
200 void defaultAction( QListBoxItem * ); 200 void defaultAction( QListBoxItem * );
@@ -252,5 +252,6 @@ class KOMonthView: public KOEventView
252 virtual DateList selectedDates(); 252 virtual DateList selectedDates();
253 253#if 0
254 virtual void printPreview(CalPrinter *calPrinter, 254 virtual void printPreview(CalPrinter *calPrinter,
255 const QDate &, const QDate &); 255 const QDate &, const QDate &);
256#endif
256 bool isMonthView() { return !mShowWeekView; } 257 bool isMonthView() { return !mShowWeekView; }
@@ -283,2 +284,3 @@ class KOMonthView: public KOEventView
283 protected slots: 284 protected slots:
285 void catChanged( Incidence * );
284 void setKeyBoardFocus(); 286 void setKeyBoardFocus();