Diffstat (limited to 'core/pim/today/plugins/datebook') (more/less context) (ignore whitespace changes)
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 | |||
@@ -47,8 +47,10 @@ void DatebookPluginConfig::readConfig() { | |||
47 | m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) ); | 47 | m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) ); |
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 | ||
54 | void DatebookPluginConfig::writeConfig() { | 56 | void DatebookPluginConfig::writeConfig() { |
@@ -65,8 +67,10 @@ void DatebookPluginConfig::writeConfig() { | |||
65 | cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() ); | 67 | cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() ); |
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 | ||
72 | DatebookPluginConfig::~DatebookPluginConfig() { | 76 | DatebookPluginConfig::~DatebookPluginConfig() { |
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 | |||
@@ -55,8 +55,9 @@ private: | |||
55 | int m_show_notes; | 55 | int m_show_notes; |
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 | ||
62 | 63 | ||
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 | |||
@@ -10,9 +10,9 @@ | |||
10 | <name>geometry</name> | 10 | <name>geometry</name> |
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> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
@@ -22,18 +22,18 @@ | |||
22 | <property> | 22 | <property> |
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> |
30 | </property> | 30 | </property> |
31 | <property stdset="1"> | 31 | <property stdset="1"> |
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> |
39 | <cstring>CheckBox1</cstring> | 39 | <cstring>CheckBox1</cstring> |
@@ -46,9 +46,9 @@ | |||
46 | <name>whatsThis</name> | 46 | <name>whatsThis</name> |
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> |
54 | <cstring>CheckBox2</cstring> | 54 | <cstring>CheckBox2</cstring> |
@@ -61,9 +61,9 @@ | |||
61 | <name>whatsThis</name> | 61 | <name>whatsThis</name> |
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> |
69 | <cstring>CheckBox3</cstring> | 69 | <cstring>CheckBox3</cstring> |
@@ -76,9 +76,9 @@ | |||
76 | <name>whatsThis</name> | 76 | <name>whatsThis</name> |
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> |
84 | <cstring>CheckBox4</cstring> | 84 | <cstring>CheckBox4</cstring> |
@@ -87,9 +87,9 @@ | |||
87 | <name>text</name> | 87 | <name>text</name> |
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> |
95 | <cstring>Layout3</cstring> | 95 | <cstring>Layout3</cstring> |
@@ -137,9 +137,9 @@ | |||
137 | </property> | 137 | </property> |
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> |
145 | <cstring>Layout2</cstring> | 145 | <cstring>Layout2</cstring> |
@@ -191,9 +191,44 @@ | |||
191 | </property> | 191 | </property> |
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> |
199 | </property> | 234 | </property> |
@@ -212,7 +247,7 @@ | |||
212 | <height>20</height> | 247 | <height>20</height> |
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 | |||
@@ -53,8 +53,9 @@ void DatebookPluginWidget::readConfig() { | |||
53 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); | 53 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); |
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 | ||
59 | void DatebookPluginWidget::reinitialize() { | 60 | void DatebookPluginWidget::reinitialize() { |
60 | readConfig(); | 61 | readConfig(); |
@@ -95,9 +96,9 @@ void DatebookPluginWidget::getDates() { | |||
95 | 96 | ||
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&) ) ); |
103 | } else { | 104 | } else { |
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 | |||
@@ -56,7 +56,9 @@ private: | |||
56 | bool m_onlyLater; | 56 | bool m_onlyLater; |
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 |