author | zautrix <zautrix> | 2005-02-08 23:15:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-08 23:15:22 (UTC) |
commit | d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a (patch) (unidiff) | |
tree | 751d52e216392132e8ad36ba9e8a23ae64083951 /korganizer | |
parent | 2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6 (diff) | |
download | kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.zip kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.tar.gz kdepimpi-d0ab37d35ca9a9d919c9fc4856f3314bfef6dd5a.tar.bz2 |
fff
-rw-r--r-- | korganizer/komonthview.cpp | 7 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 02d2585..da81586 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -912,29 +912,36 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
912 | mWidthLongDayLabel = 0; | 912 | mWidthLongDayLabel = 0; |
913 | for (int i = 0; i < 7; i++) { | 913 | for (int i = 0; i < 7; i++) { |
914 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); | 914 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); |
915 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; | 915 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; |
916 | } | 916 | } |
917 | 917 | ||
918 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); | 918 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
919 | 919 | ||
920 | #if 0 | ||
920 | if ( mShowWeekView ) | 921 | if ( mShowWeekView ) |
921 | mWidStack->raiseWidget( mWeekView ); | 922 | mWidStack->raiseWidget( mWeekView ); |
922 | else | 923 | else |
923 | mWidStack->raiseWidget( mMonthView ); | 924 | mWidStack->raiseWidget( mMonthView ); |
925 | #endif | ||
924 | 926 | ||
925 | emit incidenceSelected( 0 ); | 927 | emit incidenceSelected( 0 ); |
926 | #ifndef DESKTOP_VERSION | 928 | #ifndef DESKTOP_VERSION |
927 | resize( QApplication::desktop()->size() ); | 929 | resize( QApplication::desktop()->size() ); |
928 | #else | 930 | #else |
929 | resize(640, 480 ); | 931 | resize(640, 480 ); |
932 | updatePossible = true; | ||
930 | #endif | 933 | #endif |
931 | computeLayout(); | 934 | computeLayout(); |
932 | 935 | ||
936 | if ( mShowWeekView ) | ||
937 | mWidStack->raiseWidget( mWeekView ); | ||
938 | else | ||
939 | mWidStack->raiseWidget( mMonthView ); | ||
933 | } | 940 | } |
934 | 941 | ||
935 | KOMonthView::~KOMonthView() | 942 | KOMonthView::~KOMonthView() |
936 | { | 943 | { |
937 | delete mContextMenu; | 944 | delete mContextMenu; |
938 | } | 945 | } |
939 | 946 | ||
940 | void KOMonthView::selectInternalWeekNum ( int n ) | 947 | void KOMonthView::selectInternalWeekNum ( int n ) |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 78d4027..44db209 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -261,17 +261,17 @@ void KOTodoViewItem::stateChange(bool state) | |||
261 | } | 261 | } |
262 | mTodoView->modified(true); | 262 | mTodoView->modified(true); |
263 | setMyPixmap(); | 263 | setMyPixmap(); |
264 | mTodoView->setTodoModified( mTodo ); | 264 | mTodoView->setTodoModified( mTodo ); |
265 | } | 265 | } |
266 | 266 | ||
267 | bool KOTodoViewItem::isAlternate() | 267 | bool KOTodoViewItem::isAlternate() |
268 | { | 268 | { |
269 | #ifndef KORG_NOLVALTERNATION | 269 | |
270 | KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); | 270 | KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); |
271 | if (lv && lv->alternateBackground().isValid()) | 271 | if (lv && lv->alternateBackground().isValid()) |
272 | { | 272 | { |
273 | KOTodoViewItem *above = 0; | 273 | KOTodoViewItem *above = 0; |
274 | above = dynamic_cast<KOTodoViewItem *>(itemAbove()); | 274 | above = dynamic_cast<KOTodoViewItem *>(itemAbove()); |
275 | m_known = above ? above->m_known : true; | 275 | m_known = above ? above->m_known : true; |
276 | if (m_known) | 276 | if (m_known) |
277 | { | 277 | { |
@@ -298,32 +298,29 @@ bool KOTodoViewItem::isAlternate() | |||
298 | item->m_odd = previous = !previous; | 298 | item->m_odd = previous = !previous; |
299 | item->m_known = true; | 299 | item->m_known = true; |
300 | item = dynamic_cast<KOTodoViewItem *>(item->nextSibling()); | 300 | item = dynamic_cast<KOTodoViewItem *>(item->nextSibling()); |
301 | } | 301 | } |
302 | } | 302 | } |
303 | return m_odd; | 303 | return m_odd; |
304 | } | 304 | } |
305 | return false; | 305 | return false; |
306 | #else | ||
307 | return false; | ||
308 | #endif | ||
309 | } | 306 | } |
310 | 307 | ||
311 | void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) | 308 | void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) |
312 | { | 309 | { |
313 | QColorGroup _cg = cg; | 310 | QColorGroup _cg = cg; |
314 | QColorGroup::ColorRole role; | 311 | QColorGroup::ColorRole role; |
315 | if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) | 312 | if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) |
316 | role = QColorGroup::Text; | 313 | role = QColorGroup::Text; |
317 | else | 314 | else |
318 | role = QColorGroup::Base; | 315 | role = QColorGroup::Base; |
319 | //#ifndef KORG_NOLVALTERNATION | 316 | //#ifndef KORG_NOLVALTERNATION |
320 | // if (isAlternate()) | 317 | if (isAlternate()) |
321 | // _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); | 318 | _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); |
322 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; | 319 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; |
323 | QColor colorToSet; | 320 | QColor colorToSet; |
324 | if ( setColor ) { | 321 | if ( setColor ) { |
325 | QStringList categories = mTodo->categories(); | 322 | QStringList categories = mTodo->categories(); |
326 | QString cat = categories.first(); | 323 | QString cat = categories.first(); |
327 | if ( !cat.isEmpty()) { | 324 | if ( !cat.isEmpty()) { |
328 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); | 325 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); |
329 | } else | 326 | } else |
@@ -371,17 +368,17 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i | |||
371 | } | 368 | } |
372 | return; | 369 | return; |
373 | } | 370 | } |
374 | 371 | ||
375 | int align = alignment; | 372 | int align = alignment; |
376 | 373 | ||
377 | if ( !p ) | 374 | if ( !p ) |
378 | return; | 375 | return; |
379 | 376 | ||
380 | p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); | 377 | p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); |
381 | 378 | ||
382 | QListView *lv = listView(); | 379 | QListView *lv = listView(); |
383 | if ( !lv ) | 380 | if ( !lv ) |
384 | return; | 381 | return; |
385 | int marg = 2;//lv->itemMargin(); | 382 | int marg = 2;//lv->itemMargin(); |
386 | int r = 0; | 383 | int r = 0; |
387 | QCheckListItem::Type myType = QCheckListItem::CheckBox; | 384 | QCheckListItem::Type myType = QCheckListItem::CheckBox; |