summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4fc447e..2289977 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -203,5 +203,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
203 } 203 }
204 if ( count () ) { 204 if ( count () ) {
205 if ( currentItem()+1 == count () ) { 205 if ( ((uint)currentItem()+1) == count () ) {
206 emit nextCell(); 206 emit nextCell();
207 } else { 207 } else {
@@ -244,5 +244,5 @@ void KNoScrollListBox::oneDown()
244{ 244{
245 if ( count () ) { 245 if ( count () ) {
246 if ( currentItem()+1 == count () ) { 246 if ( ((uint)currentItem()+1) == count () ) {
247 emit nextCell(); 247 emit nextCell();
248 } else { 248 } else {
@@ -1293,4 +1293,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1293 SLOT(slotEditJournal()),false); 1293 SLOT(slotEditJournal()),false);
1294 1294
1295 connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this,
1296 SLOT( catChanged( Incidence * ) ));
1295 1297
1296 1298
@@ -1349,4 +1351,8 @@ KOMonthView::~KOMonthView()
1349} 1351}
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 )
1352{ 1358{
@@ -1361,5 +1367,5 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1361 1367
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) {
1365 if ( mCellsW[i] == mc ) { 1371 if ( mCellsW[i] == mc ) {
@@ -1387,5 +1393,5 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1387 return; 1393 return;
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);
1391 bool goRight = (mday < 3 && mday > 0 && index < count -1); 1397 bool goRight = (mday < 3 && mday > 0 && index < count -1);
@@ -1400,5 +1406,5 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1400 } 1406 }
1401 if ( goRight ) { 1407 if ( goRight ) {
1402 int right = index + iii; 1408 uint right = index + iii;
1403 if ( right < count ) { 1409 if ( right < count ) {
1404 if ( (*cells)[right]->doHighLight(inc) ) 1410 if ( (*cells)[right]->doHighLight(inc) )
@@ -1490,5 +1496,5 @@ DateList KOMonthView::selectedDates()
1490 return selected; 1496 return selected;
1491} 1497}
1492 1498#if 0
1493void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, 1499void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1494 const QDate &td) 1500 const QDate &td)
@@ -1498,5 +1504,5 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1498#endif 1504#endif
1499} 1505}
1500 1506#endif
1501void KOMonthView::updateConfig() 1507void KOMonthView::updateConfig()
1502{ 1508{
@@ -1584,5 +1590,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1584 QPtrVector<QLabel> *dayLabels; 1590 QPtrVector<QLabel> *dayLabels;
1585 QPtrVector<KOWeekButton> *weekLabels; 1591 QPtrVector<KOWeekButton> *weekLabels;
1586 int weekNum = 6; 1592 uint weekNum = 6;
1587 mStartDate = start; 1593 mStartDate = start;
1588 if ( mShowWeekView ) { 1594 if ( mShowWeekView ) {
@@ -1610,5 +1616,4 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1610 mStartDate = mStartDate.addDays( -1 ); 1616 mStartDate = mStartDate.addDays( -1 );
1611 } 1617 }
1612 bool primary = false;
1613 uint i; 1618 uint i;
1614 for( i = 0; i < (*cells).size(); ++i ) { 1619 for( i = 0; i < (*cells).size(); ++i ) {
@@ -1680,5 +1685,4 @@ void KOMonthView::updateView()
1680 Event *event; 1685 Event *event;
1681 QDateTime dt; 1686 QDateTime dt;
1682 bool ok;
1683 QDate endDate = mStartDate.addDays( timeSpan ); 1687 QDate endDate = mStartDate.addDays( timeSpan );
1684 for( event = events.first(); event; event = events.next() ) { // for event 1688 for( event = events.first(); event; event = events.next() ) { // for event
@@ -1812,4 +1816,5 @@ void KOMonthView::resizeEvent(QResizeEvent * e)
1812 } else 1816 } else
1813 mComputeLayoutTimer->start( 100 ); 1817 mComputeLayoutTimer->start( 100 );
1818 KOEventView::resizeEvent( e );
1814} 1819}
1815 1820
@@ -1862,5 +1867,4 @@ void KOMonthView::computeLayoutWeek()
1862 1867
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();
1866 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1870 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
@@ -1906,5 +1910,6 @@ void KOMonthView::computeLayoutWeek()
1906 h = cellHei; 1910 h = cellHei;
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 ) {
1910 mCellsW[i]->hide(); 1915 mCellsW[i]->hide();
@@ -1998,5 +2003,4 @@ void KOMonthView::computeLayout()
1998 2003
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();
2002 int cellHei = (hei - dayLabelHei) /6; 2006 int cellHei = (hei - dayLabelHei) /6;
@@ -2033,5 +2037,6 @@ void KOMonthView::computeLayout()
2033 h = cellHei ; 2037 h = cellHei ;
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);
2037 w = colWid; 2042 w = colWid;
@@ -2211,5 +2216,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2211void KOMonthView::nextCell() 2216void KOMonthView::nextCell()
2212{ 2217{
2213 bool res = focusNextPrevChild ( true ); 2218 focusNextPrevChild ( true );
2214} 2219}
2215void KOMonthView::prevCell() 2220void KOMonthView::prevCell()