-rw-r--r-- | korganizer/kolistview.cpp | 10 | ||||
-rw-r--r-- | korganizer/kolistview.h | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 35 | ||||
-rw-r--r-- | korganizer/komonthview.h | 4 |
4 files changed, 34 insertions, 16 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, SLOT( setCalendar( int ) )); + QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, + SLOT( catChanged( Incidence * ) )); QPopupMenu * exportPO = new QPopupMenu ( this ); @@ -382,2 +384,10 @@ KOListView::~KOListView() +void KOListView::catChanged( Incidence* inc) +{ + KOListViewItem* item = getItemForEvent(inc); + if (item) { + ListItemVisitor v(item, mStartDate ); + inc->accept(v); + } +} QString 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 void processSelectionChange(QListViewItem *); + void catChanged( Incidence* ); 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) if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); @@ -245,3 +245,3 @@ void KNoScrollListBox::oneDown() if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); @@ -1294,2 +1294,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) + connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this, + SLOT( catChanged( Incidence * ) )); @@ -1350,2 +1352,6 @@ KOMonthView::~KOMonthView() +void KOMonthView::catChanged( Incidence * ) +{ + updateView(); +} void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday ) @@ -1362,3 +1368,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int bool weekview = false; - int index = 0; + uint index = 0; for (uint i = 0; i < mCellsW.count(); ++i) { @@ -1388,3 +1394,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int - int count = (*cells).count(); + uint count = (*cells).count(); bool goLeft = (mday > 1 && index > 0); @@ -1401,3 +1407,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int if ( goRight ) { - int right = index + iii; + uint right = index + iii; if ( right < count ) { @@ -1491,3 +1497,3 @@ DateList KOMonthView::selectedDates() } - +#if 0 void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, @@ -1499,3 +1505,3 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, } - +#endif void KOMonthView::updateConfig() @@ -1585,3 +1591,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &) QPtrVector<KOWeekButton> *weekLabels; - int weekNum = 6; + uint weekNum = 6; mStartDate = start; @@ -1611,3 +1617,2 @@ void KOMonthView::showDates(const QDate &start, const QDate &) } - bool primary = false; uint i; @@ -1681,3 +1686,2 @@ void KOMonthView::updateView() QDateTime dt; - bool ok; QDate endDate = mStartDate.addDays( timeSpan ); @@ -1813,2 +1817,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e) mComputeLayoutTimer->start( 100 ); + KOEventView::resizeEvent( e ); } @@ -1863,3 +1868,2 @@ void KOMonthView::computeLayoutWeek() int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); @@ -1907,3 +1911,4 @@ void KOMonthView::computeLayoutWeek() int max = 0; - for ( i = 0; i < mCellsW.count(); ++i) { + int w_count = mCellsW.count(); + for ( i = 0; i < w_count; ++i) { if ( i > 6 ) { @@ -1999,3 +2004,2 @@ void KOMonthView::computeLayout() int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabels[0]->sizeHint().height(); @@ -2034,3 +2038,4 @@ void KOMonthView::computeLayout() int max = 0; - for ( i = 0; i < mCells.count(); ++i) { + int mc_count = mCells.count(); + for ( i = 0; i < mc_count; ++i) { //qDebug("iii %d ", i); @@ -2212,3 +2217,3 @@ void KOMonthView::nextCell() { - bool res = focusNextPrevChild ( true ); + focusNextPrevChild ( true ); } diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index a41eb54..4d62e9b 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -252,5 +252,6 @@ class KOMonthView: public KOEventView virtual DateList selectedDates(); - +#if 0 virtual void printPreview(CalPrinter *calPrinter, const QDate &, const QDate &); +#endif bool isMonthView() { return !mShowWeekView; } @@ -283,2 +284,3 @@ class KOMonthView: public KOEventView protected slots: + void catChanged( Incidence * ); void setKeyBoardFocus(); |