summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
authorzautrix <zautrix>2005-07-02 17:31:20 (UTC)
committer zautrix <zautrix>2005-07-02 17:31:20 (UTC)
commit0233482f5f4baf7a0af45229b02c5deaab17a412 (patch) (side-by-side diff)
treef22927da2ae116c53dc87026ce60b56704309e56 /korganizer/komonthview.cpp
parent78866028c185f4227bfb653ee2050d7feb2e2b78 (diff)
downloadkdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.zip
kdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.tar.gz
kdepimpi-0233482f5f4baf7a0af45229b02c5deaab17a412.tar.bz2
mv warnings removed
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
@@ -202,7 +202,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
break;
}
if ( count () ) {
- if ( currentItem()+1 == count () ) {
+ if ( ((uint)currentItem()+1) == count () ) {
emit nextCell();
} else {
setCurrentItem((currentItem()+1)%count());
@@ -243,7 +243,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
void KNoScrollListBox::oneDown()
{
if ( count () ) {
- if ( currentItem()+1 == count () ) {
+ if ( ((uint)currentItem()+1) == count () ) {
emit nextCell();
} else {
resetOnFocusIn = false;
@@ -1292,6 +1292,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
i18n("Journal"),this,
SLOT(slotEditJournal()),false);
+ connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this,
+ SLOT( catChanged( Incidence * ) ));
QString pathString = "";
@@ -1348,6 +1350,10 @@ KOMonthView::~KOMonthView()
delete mContextMenu;
}
+void KOMonthView::catChanged( Incidence * )
+{
+ updateView();
+}
void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday )
{
static Incidence * lastInc = 0;
@@ -1360,7 +1366,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
//qDebug("KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday );
bool weekview = false;
- int index = 0;
+ uint index = 0;
for (uint i = 0; i < mCellsW.count(); ++i) {
if ( mCellsW[i] == mc ) {
weekview = true;
@@ -1386,7 +1392,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
if ( ! inc )
return;
- int count = (*cells).count();
+ uint count = (*cells).count();
bool goLeft = (mday > 1 && index > 0);
bool goRight = (mday < 3 && mday > 0 && index < count -1);
for (uint iii = 1; iii < count; ++iii) {
@@ -1399,7 +1405,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
goLeft = false;
}
if ( goRight ) {
- int right = index + iii;
+ uint right = index + iii;
if ( right < count ) {
if ( (*cells)[right]->doHighLight(inc) )
goRight = false;
@@ -1489,7 +1495,7 @@ DateList KOMonthView::selectedDates()
return selected;
}
-
+#if 0
void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
const QDate &td)
{
@@ -1497,7 +1503,7 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
calPrinter->preview(CalPrinter::Month, fd, td);
#endif
}
-
+#endif
void KOMonthView::updateConfig()
{
@@ -1583,7 +1589,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
QPtrVector<MonthViewCell> *cells;
QPtrVector<QLabel> *dayLabels;
QPtrVector<KOWeekButton> *weekLabels;
- int weekNum = 6;
+ uint weekNum = 6;
mStartDate = start;
if ( mShowWeekView ) {
weekNum = 1;
@@ -1609,7 +1615,6 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) {
mStartDate = mStartDate.addDays( -1 );
}
- bool primary = false;
uint i;
for( i = 0; i < (*cells).size(); ++i ) {
QDate date = mStartDate.addDays( i );
@@ -1679,7 +1684,6 @@ void KOMonthView::updateView()
QPtrList<Event> events = calendar()->events();
Event *event;
QDateTime dt;
- bool ok;
QDate endDate = mStartDate.addDays( timeSpan );
for( event = events.first(); event; event = events.next() ) { // for event
if ( event->doesRecur() ) {
@@ -1811,6 +1815,7 @@ void KOMonthView::resizeEvent(QResizeEvent * e)
slotComputeLayout();
} else
mComputeLayoutTimer->start( 100 );
+ KOEventView::resizeEvent( e );
}
void KOMonthView::slotComputeLayout()
@@ -1861,7 +1866,6 @@ void KOMonthView::computeLayoutWeek()
wid -= weeklabelwid;
int colWid = wid / daysToShow;
- int lastCol = wid - ( colWid*6 );
int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
int colModulo = wid % daysToShow;
@@ -1905,7 +1909,8 @@ void KOMonthView::computeLayoutWeek()
w = colWid;
h = cellHei;
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 ) {
mCellsW[i]->hide();
continue;
@@ -1997,7 +2002,6 @@ void KOMonthView::computeLayout()
wid -= weeklabelwid;
int colWid = wid / daysToShow;
- int lastCol = wid - ( colWid*6 );
int dayLabelHei = mDayLabels[0]->sizeHint().height();
int cellHei = (hei - dayLabelHei) /6;
int colModulo = wid % daysToShow;
@@ -2032,7 +2036,8 @@ void KOMonthView::computeLayout()
w = colWid;
h = cellHei ;
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);
w = colWid;
if ( ((i) % 7) >= 7-colModulo ) {
@@ -2210,7 +2215,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
void KOMonthView::nextCell()
{
- bool res = focusNextPrevChild ( true );
+ focusNextPrevChild ( true );
}
void KOMonthView::prevCell()
{