summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-17 21:31:18 (UTC)
committer zautrix <zautrix>2005-02-17 21:31:18 (UTC)
commit8e8d2bd0c31eb272a7f26756252ff4930d0602bc (patch) (unidiff)
tree8392e9ca561d1444bcd949e9f1aaf78f698cde98 /korganizer
parent002e4f8cea2352e4b9a046b98f66be946fbeb5fc (diff)
downloadkdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.zip
kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.gz
kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp5
-rw-r--r--korganizer/koeventviewer.cpp31
-rw-r--r--korganizer/kolistview.cpp5
-rw-r--r--korganizer/komonthview.cpp6
-rw-r--r--korganizer/koprefs.cpp8
-rw-r--r--korganizer/koprefs.h8
-rw-r--r--korganizer/koprefsdialog.cpp32
-rw-r--r--korganizer/kotodoview.cpp5
8 files changed, 86 insertions, 14 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 6a312b3..cead612 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -90,7 +90,10 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
90QString KOAgendaItem::getWhatsThisText() 90QString KOAgendaItem::getWhatsThisText()
91{ 91{
92 if ( mIncidence ) 92 if ( mIncidence )
93 return KIncidenceFormatter::instance()->getFormattedText( mIncidence ); 93 return KIncidenceFormatter::instance()->getFormattedText( mIncidence,
94 KOPrefs::instance()->mWTshowDetails,
95 KOPrefs::instance()->mWTshowCreated,
96 KOPrefs::instance()->mWTshowChanged);
94 return "KOAgendaItem::getWhatsThisText()::internal error"; 97 return "KOAgendaItem::getWhatsThisText()::internal error";
95} 98}
96void KOAgendaItem::init ( Incidence *incidence, QDate qd ) 99void KOAgendaItem::init ( Incidence *incidence, QDate qd )
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index f6c9624..d87938a 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -339,16 +339,29 @@ void KOEventViewer::appendEvent(Event *event, int mode )
339 339
340 addTag("b",i18n("Access: ")); 340 addTag("b",i18n("Access: "));
341 mText.append(event->secrecyStr()+"<br>"); 341 mText.append(event->secrecyStr()+"<br>");
342 if (!event->description().isEmpty()) { 342
343 addTag("p",i18n("<b>Details: </b>"));
344 addTag("p",event->description());
345 }
346 343
344 if ( KOPrefs::instance()->mEVshowDetails ) {
345 if (!event->description().isEmpty()) {
346 addTag("p",i18n("<b>Details: </b>"));
347 addTag("p",event->description());
348 }
349 }
347 formatCategories(event); 350 formatCategories(event);
348 351
349 formatReadOnly(event); 352 formatReadOnly(event);
350 formatAttendees(event); 353 formatAttendees(event);
351 354
355 if ( KOPrefs::instance()->mEVshowCreated ) {
356 addTag("p",i18n("<b>Created: ") +" </b>");
357 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
358
359 }
360 if ( KOPrefs::instance()->mEVshowChanged ) {
361 addTag("p",i18n("<b>Last modified: ") +" </b>");
362 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
363
364 }
352 setText(mText); 365 setText(mText);
353 //QWhatsThis::add(this,mText); 366 //QWhatsThis::add(this,mText);
354 367
@@ -418,9 +431,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
418 } 431 }
419 addTag("b",i18n("Access: ")); 432 addTag("b",i18n("Access: "));
420 mText.append(event->secrecyStr()+"<br>"); 433 mText.append(event->secrecyStr()+"<br>");
421 if (!event->description().isEmpty()) { 434 if ( KOPrefs::instance()->mEVshowDetails ) {
422 addTag("p",i18n("<b>Details: </b>")); 435 if (!event->description().isEmpty()) {
423 addTag("p",event->description()); 436 addTag("p",i18n("<b>Details: </b>"));
437 addTag("p",event->description());
438 }
424 } 439 }
425 440
426 formatCategories(event); 441 formatCategories(event);
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d8e940b..1f5afc0 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -325,7 +325,10 @@ QString KOListView::getWhatsThisText(QPoint p)
325{ 325{
326 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); 326 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
327 if ( item ) 327 if ( item )
328 return KIncidenceFormatter::instance()->getFormattedText( item->data() ); 328 return KIncidenceFormatter::instance()->getFormattedText( item->data(),
329 KOPrefs::instance()->mWTshowDetails,
330 KOPrefs::instance()->mWTshowCreated,
331 KOPrefs::instance()->mWTshowChanged);
329 return i18n("That is the list view" ); 332 return i18n("That is the list view" );
330 333
331} 334}
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index f9bc1ca..2fe80af 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -94,7 +94,10 @@ QString KNoScrollListBox::getWhatsThisText(QPoint p)
94 if ( ! item ) { 94 if ( ! item ) {
95 return i18n("Click in the cell\nto add an event!"); 95 return i18n("Click in the cell\nto add an event!");
96 } 96 }
97 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence()); 97 return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(),
98 KOPrefs::instance()->mWTshowDetails,
99 KOPrefs::instance()->mWTshowCreated,
100 KOPrefs::instance()->mWTshowChanged);
98} 101}
99void KNoScrollListBox::keyPressEvent(QKeyEvent *e) 102void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
100{ 103{
@@ -195,7 +198,6 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
195 198
196 mIncidence = incidence; 199 mIncidence = incidence;
197 mDate = qd; 200 mDate = qd;
198 // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
199 mRecur = false; 201 mRecur = false;
200 mAlarm = false; 202 mAlarm = false;
201 mReply = false; 203 mReply = false;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5efc247..a91074f 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -291,7 +291,13 @@ KOPrefs::KOPrefs() :
291 291
292 addItemInt("DestinationPolicy",&mDestination,standardDestination); 292 addItemInt("DestinationPolicy",&mDestination,standardDestination);
293 293
294 294 KPrefs::setCurrentGroup( "ViewOptions" );
295 addItemBool("EVshowDetails",&mEVshowDetails,true);
296 addItemBool("EVshowCreated",&mEVshowCreated,true);
297 addItemBool("EVshowChanged",&mEVshowChanged,true);
298 addItemBool("WTshowDetails",&mWTshowDetails,false);
299 addItemBool("WTshowCreated",&mWTshowCreated,false);
300 addItemBool("WTshowChanged",&mWTshowChanged,false);
295 301
296} 302}
297 303
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index e300067..e4e3dd7 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -269,6 +269,14 @@ class KOPrefs : public KPimPrefs
269 QString mActiveSyncPort; 269 QString mActiveSyncPort;
270 QString mActiveSyncIP; 270 QString mActiveSyncIP;
271 271
272 // settings for eventviewer
273 bool mEVshowDetails;
274 bool mEVshowCreated;
275 bool mEVshowChanged;
276 bool mWTshowDetails;
277 bool mWTshowCreated;
278 bool mWTshowChanged;
279
272 private: 280 private:
273 QDict<QColor> mCategoryColors; 281 QDict<QColor> mCategoryColors;
274 QColor mDefaultCategoryColor; 282 QColor mDefaultCategoryColor;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 452d019..443508d 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -904,6 +904,38 @@ dummy =
904 topLayout->addWidget(dummy->checkBox(),ii++,0); 904 topLayout->addWidget(dummy->checkBox(),ii++,0);
905 905
906 906
907 topFrame = addPage(i18n("View Options"),0,0);
908
909 topLayout = new QGridLayout(topFrame,4,1);
910 topLayout->setSpacing(spacingHint());
911 topLayout->setMargin(marginHint());
912 ii = 0;
913 lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
914 topLayout->addWidget(lab ,ii++,0);
915
916 dummy = addWidBool(i18n("Details"),
917 &(KOPrefs::instance()->mEVshowDetails),topFrame);
918 topLayout->addWidget(dummy->checkBox(),ii++,0);
919 dummy = addWidBool(i18n("Created time"),
920 &(KOPrefs::instance()->mEVshowCreated),topFrame);
921 topLayout->addWidget(dummy->checkBox(),ii++,0);
922 dummy = addWidBool(i18n("Last modified time"),
923 &(KOPrefs::instance()->mEVshowChanged),topFrame);
924 topLayout->addWidget(dummy->checkBox(),ii++,0);
925
926
927 lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
928 topLayout->addWidget(lab ,ii++,0);
929
930 dummy = addWidBool(i18n("Details"),
931 &(KOPrefs::instance()->mWTshowDetails),topFrame);
932 topLayout->addWidget(dummy->checkBox(),ii++,0);
933 dummy = addWidBool(i18n("Created time"),
934 &(KOPrefs::instance()->mWTshowCreated),topFrame);
935 topLayout->addWidget(dummy->checkBox(),ii++,0);
936 dummy = addWidBool(i18n("Last modified time"),
937 &(KOPrefs::instance()->mWTshowChanged),topFrame);
938 topLayout->addWidget(dummy->checkBox(),ii++,0);
907 939
908 940
909 topFrame = addPage(i18n("Alarm"),0,0); 941 topFrame = addPage(i18n("Alarm"),0,0);
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 3011458..3483e95 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -556,7 +556,10 @@ QString KOTodoView::getWhatsThisText(QPoint p)
556{ 556{
557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
558 if ( item ) 558 if ( item )
559 return KIncidenceFormatter::instance()->getFormattedText( item->todo() ); 559 return KIncidenceFormatter::instance()->getFormattedText( item->todo(),
560 KOPrefs::instance()->mWTshowDetails,
561 KOPrefs::instance()->mWTshowCreated,
562 KOPrefs::instance()->mWTshowChanged);
560 return i18n("That is the todo view" ); 563 return i18n("That is the todo view" );
561 564
562} 565}