summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp26
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h5
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp3
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h6
4 files changed, 22 insertions, 18 deletions
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index d4e8e1e..c37813b 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -23,7 +23,6 @@
23DateBookEvent::DateBookEvent(const EffectiveEvent &ev, 23DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
24 QWidget* parent, 24 QWidget* parent,
25 int show_location, 25 bool show_location,
26 int show_notes, 26 bool show_notes,
27 // int onlyLater,
28 int maxCharClip, 27 int maxCharClip,
29 const char* name, 28 const char* name,
@@ -46,10 +45,10 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
46 45
47 // include location or not 46 // include location or not
48 if ( show_location == 1) { 47 if ( show_location ) {
49 msg += "<BR><i>" + (ev).location() + "</i>"; 48 msg += "<BR><i>" + (ev).location() + "</i>";
50 } 49 }
51 50
52 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" ) 51 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
53 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59") ) { 52 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
54 msg += "<br>All day"; 53 msg += "<br>All day";
55 } else { 54 } else {
@@ -61,5 +60,5 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
61 60
62 // include possible note or not 61 // include possible note or not
63 if ( show_notes == 1) { 62 if ( show_notes ) {
64 msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); 63 msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip );
65 } 64 }
@@ -67,8 +66,13 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
67 setText( msg ); 66 setText( msg );
68 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) ); 67 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) );
69 setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); 68 // setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) );
70} 69}
71 70
72 71
72/**
73 * AM/PM timestring conversion.
74 * @param tm the timestring
75 * @return formatted to am/pm is system is set to it
76 */
73QString DateBookEvent::ampmTime( QTime tm ) { 77QString DateBookEvent::ampmTime( QTime tm ) {
74 78
@@ -93,5 +97,5 @@ QString DateBookEvent::ampmTime( QTime tm ) {
93 97
94 98
95/* 99/**
96 * starts the edit dialog as known from datebook 100 * starts the edit dialog as known from datebook
97 */ 101 */
@@ -109,10 +113,10 @@ void DateBookEvent::editEventSlot( const Event &e ) {
109 */ 113 */
110void DateBookEvent::startDatebook() { 114void DateBookEvent::startDatebook() {
111 QCopEnvelope e("QPE/System", "execute(QString)"); 115 QCopEnvelope e( "QPE/System", "execute(QString)" );
112 e << QString("datebook"); 116 e << QString( "datebook" );
113} 117}
114 118
115void DateBookEvent::editMe() { 119void DateBookEvent::editMe() {
116 emit editEvent(event.event()); 120 emit editEvent( event.event() );
117} 121}
118 122
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 1168f7c..61c64f1 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -29,7 +29,6 @@ public:
29 DateBookEvent(const EffectiveEvent &ev, 29 DateBookEvent(const EffectiveEvent &ev,
30 QWidget* parent = 0, 30 QWidget* parent = 0,
31 int show_location = 0, 31 bool show_location = 0,
32 int show_notes = 0, 32 bool show_notes = 0,
33 // int onlyLater = 0,
34 int maxCharClip = 0, 33 int maxCharClip = 0,
35 const char* name = 0, 34 const char* name = 0,
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 9800e61..07f5005 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -1,2 +1,3 @@
1
1/* 2/*
2 * datebookplugin.cpp 3 * datebookplugin.cpp
@@ -34,5 +35,5 @@ QString DatebookPlugin::pluginName() const {
34 35
35double DatebookPlugin::versionNumber() const { 36double DatebookPlugin::versionNumber() const {
36 return 0.1; 37 return 1.0;
37} 38}
38 39
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index e0213ec..1720bb2 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -42,9 +42,9 @@ private:
42 int m_max_lines_meet; 42 int m_max_lines_meet;
43 // If location is to be showed too, 1 to activate it. 43 // If location is to be showed too, 1 to activate it.
44 int m_show_location; 44 bool m_show_location;
45 // if notes should be shown 45 // if notes should be shown
46 int m_show_notes; 46 bool m_show_notes;
47 // should only later appointments be shown or all for the current day. 47 // should only later appointments be shown or all for the current day.
48 int m_onlyLater; 48 bool m_onlyLater;
49 49
50}; 50};