summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-04-10 12:45:59 (UTC)
committer skyhusker <skyhusker>2005-04-10 12:45:59 (UTC)
commit7a49d0610ae9bc1cadacf9d572c671009cb3c088 (patch) (unidiff)
tree31d98c05af90dc9a3dce9eb01a5af51778ec64fc
parent713db174943e9184bfa68fa430123c52ad3c3b2b (diff)
downloadopie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.zip
opie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.tar.gz
opie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.tar.bz2
Added configuration option for max characters displayed in notes. Fixes bug 1635
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h1
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfigbase.ui55
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp3
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h2
5 files changed, 54 insertions, 11 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index 5fd5221..6b7c3ce 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -48,6 +48,8 @@ void DatebookPluginConfig::readConfig() {
48 m_gui->CheckBox3->setChecked( m_only_later ); 48 m_gui->CheckBox3->setChecked( m_only_later );
49 m_more_days = cfg.readNumEntry( "moredays", 0 ); 49 m_more_days = cfg.readNumEntry( "moredays", 0 );
50 m_gui->SpinBox2->setValue( m_more_days ); 50 m_gui->SpinBox2->setValue( m_more_days );
51 m_maxCharClip = cfg.readNumEntry( "maxcharclip" , 38 );
52 m_gui->SpinBox3->setValue( m_maxCharClip );
51} 53}
52 54
53 55
@@ -66,6 +68,8 @@ void DatebookPluginConfig::writeConfig() {
66 cfg.writeEntry( "onlylater", m_only_later ); 68 cfg.writeEntry( "onlylater", m_only_later );
67 m_more_days = m_gui->SpinBox2->value(); 69 m_more_days = m_gui->SpinBox2->value();
68 cfg.writeEntry( "moredays", m_more_days ); 70 cfg.writeEntry( "moredays", m_more_days );
71 m_maxCharClip = m_gui->SpinBox3->value();
72 cfg.writeEntry( "maxcharclip", m_maxCharClip );
69 cfg.write(); 73 cfg.write();
70} 74}
71 75
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h
index 4f4e3f1..61e31e0 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.h
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h
@@ -56,6 +56,7 @@ private:
56 // should only later appointments be shown or all for the current day. 56 // should only later appointments be shown or all for the current day.
57 int m_only_later; 57 int m_only_later;
58 int m_more_days; 58 int m_more_days;
59 int m_maxCharClip;
59 60
60}; 61};
61 62
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui
index 943e8ec..004204a 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui
+++ b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>228</width> 14 <width>224</width>
15 <height>267</height> 15 <height>267</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -23,7 +23,7 @@
23 <name>whatsThis</name> 23 <name>whatsThis</name>
24 <string></string> 24 <string></string>
25 </property> 25 </property>
26 <vbox> 26 <grid>
27 <property stdset="1"> 27 <property stdset="1">
28 <name>margin</name> 28 <name>margin</name>
29 <number>11</number> 29 <number>11</number>
@@ -32,7 +32,7 @@
32 <name>spacing</name> 32 <name>spacing</name>
33 <number>6</number> 33 <number>6</number>
34 </property> 34 </property>
35 <widget> 35 <widget row="0" column="0" >
36 <class>QCheckBox</class> 36 <class>QCheckBox</class>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>name</name> 38 <name>name</name>
@@ -47,7 +47,7 @@
47 <string>Check this if the location of an appointment should be shown for each one</string> 47 <string>Check this if the location of an appointment should be shown for each one</string>
48 </property> 48 </property>
49 </widget> 49 </widget>
50 <widget> 50 <widget row="1" column="0" >
51 <class>QCheckBox</class> 51 <class>QCheckBox</class>
52 <property stdset="1"> 52 <property stdset="1">
53 <name>name</name> 53 <name>name</name>
@@ -62,7 +62,7 @@
62 <string>Check this if the note attached to an appointment should be shown for each one</string> 62 <string>Check this if the note attached to an appointment should be shown for each one</string>
63 </property> 63 </property>
64 </widget> 64 </widget>
65 <widget> 65 <widget row="2" column="0" >
66 <class>QCheckBox</class> 66 <class>QCheckBox</class>
67 <property stdset="1"> 67 <property stdset="1">
68 <name>name</name> 68 <name>name</name>
@@ -77,7 +77,7 @@
77 <string>Check this if only appointments later then current time should be shown</string> 77 <string>Check this if only appointments later then current time should be shown</string>
78 </property> 78 </property>
79 </widget> 79 </widget>
80 <widget> 80 <widget row="3" column="0" >
81 <class>QCheckBox</class> 81 <class>QCheckBox</class>
82 <property stdset="1"> 82 <property stdset="1">
83 <name>name</name> 83 <name>name</name>
@@ -88,7 +88,7 @@
88 <string>Show time in extra line</string> 88 <string>Show time in extra line</string>
89 </property> 89 </property>
90 </widget> 90 </widget>
91 <widget> 91 <widget row="4" column="0" >
92 <class>QLayoutWidget</class> 92 <class>QLayoutWidget</class>
93 <property stdset="1"> 93 <property stdset="1">
94 <name>name</name> 94 <name>name</name>
@@ -138,7 +138,7 @@
138 </widget> 138 </widget>
139 </hbox> 139 </hbox>
140 </widget> 140 </widget>
141 <widget> 141 <widget row="5" column="0" >
142 <class>QLayoutWidget</class> 142 <class>QLayoutWidget</class>
143 <property stdset="1"> 143 <property stdset="1">
144 <name>name</name> 144 <name>name</name>
@@ -192,7 +192,42 @@
192 </widget> 192 </widget>
193 </hbox> 193 </hbox>
194 </widget> 194 </widget>
195 <spacer> 195 <widget row="6" column="0" >
196 <class>QLayoutWidget</class>
197 <property stdset="1">
198 <name>name</name>
199 <cstring>Layout6</cstring>
200 </property>
201 <hbox>
202 <property stdset="1">
203 <name>margin</name>
204 <number>0</number>
205 </property>
206 <property stdset="1">
207 <name>spacing</name>
208 <number>6</number>
209 </property>
210 <widget>
211 <class>QSpinBox</class>
212 <property stdset="1">
213 <name>name</name>
214 <cstring>SpinBox3</cstring>
215 </property>
216 </widget>
217 <widget>
218 <class>QLabel</class>
219 <property stdset="1">
220 <name>name</name>
221 <cstring>TextLabel1_2</cstring>
222 </property>
223 <property stdset="1">
224 <name>text</name>
225 <string>Clip line after X chars</string>
226 </property>
227 </widget>
228 </hbox>
229 </widget>
230 <spacer row="7" column="0" >
196 <property> 231 <property>
197 <name>name</name> 232 <name>name</name>
198 <cstring>Spacer2</cstring> 233 <cstring>Spacer2</cstring>
@@ -213,6 +248,6 @@
213 </size> 248 </size>
214 </property> 249 </property>
215 </spacer> 250 </spacer>
216 </vbox> 251 </grid>
217</widget> 252</widget>
218</UI> 253</UI>
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 0820802..eb6d47a 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -54,6 +54,7 @@ void DatebookPluginWidget::readConfig() {
54 m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 54 m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
55 m_moreDays = cfg.readNumEntry( "moredays", 0 ); 55 m_moreDays = cfg.readNumEntry( "moredays", 0 );
56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 ); 56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
57 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
57} 58}
58 59
59void DatebookPluginWidget::reinitialize() { 60void DatebookPluginWidget::reinitialize() {
@@ -96,7 +97,7 @@ void DatebookPluginWidget::getDates() {
96 if ( count < m_max_lines_meet ) { 97 if ( count < m_max_lines_meet ) {
97 if ( !m_onlyLater ) { 98 if ( !m_onlyLater ) {
98 count++; 99 count++;
99 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); 100 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine, m_maxCharClip );
100 m_eventsList.append( l ); 101 m_eventsList.append( l );
101 l->show(); 102 l->show();
102 QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) ); 103 QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index f8ed89e..65e060e 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -57,6 +57,8 @@ private:
57 int m_moreDays; 57 int m_moreDays;
58 // true if time of an appointment should be an extra line 58 // true if time of an appointment should be an extra line
59 bool m_timeExtraLine; 59 bool m_timeExtraLine;
60 //max characters displayed in notes
61 int m_maxCharClip;
60}; 62};
61 63
62#endif 64#endif