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) (side-by-side diff)
tree8392e9ca561d1444bcd949e9f1aaf78f698cde98 /korganizer
parent002e4f8cea2352e4b9a046b98f66be946fbeb5fc (diff)
downloadkdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.zip
kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.gz
kdepimpi-8e8d2bd0c31eb272a7f26756252ff4930d0602bc.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp5
-rw-r--r--korganizer/koeventviewer.cpp17
-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, 79 insertions, 7 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
QString KOAgendaItem::getWhatsThisText()
{
if ( mIncidence )
- return KIncidenceFormatter::instance()->getFormattedText( mIncidence );
+ return KIncidenceFormatter::instance()->getFormattedText( mIncidence,
+ KOPrefs::instance()->mWTshowDetails,
+ KOPrefs::instance()->mWTshowCreated,
+ KOPrefs::instance()->mWTshowChanged);
return "KOAgendaItem::getWhatsThisText()::internal error";
}
void 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 )
addTag("b",i18n("Access: "));
mText.append(event->secrecyStr()+"<br>");
+
+
+ if ( KOPrefs::instance()->mEVshowDetails ) {
if (!event->description().isEmpty()) {
addTag("p",i18n("<b>Details: </b>"));
addTag("p",event->description());
}
-
+ }
formatCategories(event);
formatReadOnly(event);
formatAttendees(event);
+ if ( KOPrefs::instance()->mEVshowCreated ) {
+ addTag("p",i18n("<b>Created: ") +" </b>");
+ addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
+
+ }
+ if ( KOPrefs::instance()->mEVshowChanged ) {
+ addTag("p",i18n("<b>Last modified: ") +" </b>");
+ addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
+
+ }
setText(mText);
//QWhatsThis::add(this,mText);
@@ -418,10 +431,12 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
}
addTag("b",i18n("Access: "));
mText.append(event->secrecyStr()+"<br>");
+ if ( KOPrefs::instance()->mEVshowDetails ) {
if (!event->description().isEmpty()) {
addTag("p",i18n("<b>Details: </b>"));
addTag("p",event->description());
}
+ }
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)
{
KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
if ( item )
- return KIncidenceFormatter::instance()->getFormattedText( item->data() );
+ return KIncidenceFormatter::instance()->getFormattedText( item->data(),
+ KOPrefs::instance()->mWTshowDetails,
+ KOPrefs::instance()->mWTshowCreated,
+ KOPrefs::instance()->mWTshowChanged);
return i18n("That is the list view" );
}
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)
if ( ! item ) {
return i18n("Click in the cell\nto add an event!");
}
- return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence());
+ return KIncidenceFormatter::instance()->getFormattedText(((MonthViewItem*) item)->incidence(),
+ KOPrefs::instance()->mWTshowDetails,
+ KOPrefs::instance()->mWTshowCreated,
+ KOPrefs::instance()->mWTshowChanged);
}
void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
{
@@ -195,7 +198,6 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
mIncidence = incidence;
mDate = qd;
- // QWhatsThis::add(this,KIncidenceFormatter::instance()->getFormattedText( mIncidence ));
mRecur = false;
mAlarm = false;
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() :
addItemInt("DestinationPolicy",&mDestination,standardDestination);
-
+ KPrefs::setCurrentGroup( "ViewOptions" );
+ addItemBool("EVshowDetails",&mEVshowDetails,true);
+ addItemBool("EVshowCreated",&mEVshowCreated,true);
+ addItemBool("EVshowChanged",&mEVshowChanged,true);
+ addItemBool("WTshowDetails",&mWTshowDetails,false);
+ addItemBool("WTshowCreated",&mWTshowCreated,false);
+ addItemBool("WTshowChanged",&mWTshowChanged,false);
}
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
QString mActiveSyncPort;
QString mActiveSyncIP;
+ // settings for eventviewer
+ bool mEVshowDetails;
+ bool mEVshowCreated;
+ bool mEVshowChanged;
+ bool mWTshowDetails;
+ bool mWTshowCreated;
+ bool mWTshowChanged;
+
private:
QDict<QColor> mCategoryColors;
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 =
topLayout->addWidget(dummy->checkBox(),ii++,0);
+ topFrame = addPage(i18n("View Options"),0,0);
+
+ topLayout = new QGridLayout(topFrame,4,1);
+ topLayout->setSpacing(spacingHint());
+ topLayout->setMargin(marginHint());
+ ii = 0;
+ lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
+ topLayout->addWidget(lab ,ii++,0);
+
+ dummy = addWidBool(i18n("Details"),
+ &(KOPrefs::instance()->mEVshowDetails),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
+ dummy = addWidBool(i18n("Created time"),
+ &(KOPrefs::instance()->mEVshowCreated),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
+ dummy = addWidBool(i18n("Last modified time"),
+ &(KOPrefs::instance()->mEVshowChanged),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
+
+
+ lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame);
+ topLayout->addWidget(lab ,ii++,0);
+
+ dummy = addWidBool(i18n("Details"),
+ &(KOPrefs::instance()->mWTshowDetails),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
+ dummy = addWidBool(i18n("Created time"),
+ &(KOPrefs::instance()->mWTshowCreated),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
+ dummy = addWidBool(i18n("Last modified time"),
+ &(KOPrefs::instance()->mWTshowChanged),topFrame);
+ topLayout->addWidget(dummy->checkBox(),ii++,0);
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)
{
KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
if ( item )
- return KIncidenceFormatter::instance()->getFormattedText( item->todo() );
+ return KIncidenceFormatter::instance()->getFormattedText( item->todo(),
+ KOPrefs::instance()->mWTshowDetails,
+ KOPrefs::instance()->mWTshowCreated,
+ KOPrefs::instance()->mWTshowChanged);
return i18n("That is the todo view" );
}