author | hakan <hakan> | 2002-05-07 15:27:34 (UTC) |
---|---|---|
committer | hakan <hakan> | 2002-05-07 15:27:34 (UTC) |
commit | ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb (patch) (unidiff) | |
tree | 60d75877abb05a322b265d8b50621f3f7f75c9d1 | |
parent | 8ba0398d93f0e70ea2de254a4090d8bd02f593cd (diff) | |
download | opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.zip opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.tar.gz opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.tar.bz2 |
Added separate note editor dialog (currently only a QMultiLineEdit)
-rw-r--r-- | core/pim/datebook/.cvsignore | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebook.pro | 9 | ||||
-rw-r--r-- | core/pim/datebook/dateentry.ui | 13 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 26 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.h | 4 | ||||
-rw-r--r-- | core/pim/datebook/noteentry.ui | 68 | ||||
-rw-r--r-- | core/pim/datebook/noteentryimpl.cpp | 16 | ||||
-rw-r--r-- | core/pim/datebook/noteentryimpl.h | 18 |
8 files changed, 148 insertions, 8 deletions
diff --git a/core/pim/datebook/.cvsignore b/core/pim/datebook/.cvsignore index d2e4975..74ec374 100644 --- a/core/pim/datebook/.cvsignore +++ b/core/pim/datebook/.cvsignore | |||
@@ -1,16 +1,18 @@ | |||
1 | moc_* | 1 | moc_* |
2 | Makefile* | 2 | Makefile* |
3 | dateentry.h | 3 | dateentry.h |
4 | datebookdayheader.h | 4 | datebookdayheader.h |
5 | dateentry.cpp | 5 | dateentry.cpp |
6 | datebookdayheader.cpp | 6 | datebookdayheader.cpp |
7 | datebookweekheader.cpp | 7 | datebookweekheader.cpp |
8 | datebookweekheader.h | 8 | datebookweekheader.h |
9 | datebooksettingsbase.h | 9 | datebooksettingsbase.h |
10 | datebooksettingsbase.cpp | 10 | datebooksettingsbase.cpp |
11 | repeatentrybase.cpp | 11 | repeatentrybase.cpp |
12 | repeatentrybase.h | 12 | repeatentrybase.h |
13 | datebookweeklstdayhdr.cpp | 13 | datebookweeklstdayhdr.cpp |
14 | datebookweeklstdayhdr.h | 14 | datebookweeklstdayhdr.h |
15 | datebookweeklstheader.cpp | 15 | datebookweeklstheader.cpp |
16 | datebookweeklstheader.h | 16 | datebookweeklstheader.h |
17 | noteentry.cpp | ||
18 | noteentry.h | ||
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro index 9383053..60c2b08 100644 --- a/core/pim/datebook/datebook.pro +++ b/core/pim/datebook/datebook.pro | |||
@@ -1,53 +1,56 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | 4 | ||
5 | HEADERS= datebookday.h \ | 5 | HEADERS= datebookday.h \ |
6 | datebook.h \ | 6 | datebook.h \ |
7 | dateentryimpl.h \ | 7 | dateentryimpl.h \ |
8 | datebookdayheaderimpl.h \ | 8 | datebookdayheaderimpl.h \ |
9 | datebooksettings.h \ | 9 | datebooksettings.h \ |
10 | datebookweek.h \ | 10 | datebookweek.h \ |
11 | datebookweeklst.h \ | 11 | datebookweeklst.h \ |
12 | datebookweekheaderimpl.h \ | 12 | datebookweekheaderimpl.h \ |
13 | repeatentry.h \ | 13 | repeatentry.h \ |
14 | timepicker.h | 14 | timepicker.h \ |
15 | noteentryimpl.h | ||
15 | 16 | ||
16 | SOURCES= main.cpp \ | 17 | SOURCES= main.cpp \ |
17 | datebookday.cpp \ | 18 | datebookday.cpp \ |
18 | datebook.cpp \ | 19 | datebook.cpp \ |
19 | dateentryimpl.cpp \ | 20 | dateentryimpl.cpp \ |
20 | datebookdayheaderimpl.cpp \ | 21 | datebookdayheaderimpl.cpp \ |
21 | datebooksettings.cpp \ | 22 | datebooksettings.cpp \ |
22 | datebookweek.cpp \ | 23 | datebookweek.cpp \ |
23 | datebookweeklst.cpp \ | 24 | datebookweeklst.cpp \ |
24 | datebookweekheaderimpl.cpp \ | 25 | datebookweekheaderimpl.cpp \ |
25 | repeatentry.cpp \ | 26 | repeatentry.cpp \ |
26 | timepicker.cpp | 27 | timepicker.cpp \ |
28 | noteentryimpl.cpp | ||
27 | 29 | ||
28 | INTERFACES= dateentry.ui \ | 30 | INTERFACES= dateentry.ui \ |
29 | datebookdayheader.ui \ | 31 | datebookdayheader.ui \ |
30 | datebooksettingsbase.ui \ | 32 | datebooksettingsbase.ui \ |
31 | datebookweekheader.ui \ | 33 | datebookweekheader.ui \ |
32 | datebookweeklstheader.ui \ | 34 | datebookweeklstheader.ui \ |
33 | datebookweeklstdayhdr.ui \ | 35 | datebookweeklstdayhdr.ui \ |
34 | repeatentrybase.ui | 36 | repeatentrybase.ui \ |
37 | noteentry.ui | ||
35 | 38 | ||
36 | INCLUDEPATH += $(OPIEDIR)/include | 39 | INCLUDEPATH += $(OPIEDIR)/include |
37 | DEPENDPATH+= $(OPIEDIR)/include | 40 | DEPENDPATH+= $(OPIEDIR)/include |
38 | LIBS += -lqpe -lopie | 41 | LIBS += -lqpe -lopie |
39 | 42 | ||
40 | TARGET = datebook | 43 | TARGET = datebook |
41 | 44 | ||
42 | TRANSLATIONS = ../i18n/pt_BR/datebook.ts | 45 | TRANSLATIONS = ../i18n/pt_BR/datebook.ts |
43 | TRANSLATIONS += ../i18n/de/datebook.ts | 46 | TRANSLATIONS += ../i18n/de/datebook.ts |
44 | TRANSLATIONS += ../i18n/en/datebook.ts | 47 | TRANSLATIONS += ../i18n/en/datebook.ts |
45 | TRANSLATIONS += ../i18n/hu/datebook.ts | 48 | TRANSLATIONS += ../i18n/hu/datebook.ts |
46 | TRANSLATIONS += ../i18n/pl/datebook.ts | 49 | TRANSLATIONS += ../i18n/pl/datebook.ts |
47 | TRANSLATIONS += ../i18n/sl/datebook.ts | 50 | TRANSLATIONS += ../i18n/sl/datebook.ts |
48 | TRANSLATIONS += ../i18n/ja/datebook.ts | 51 | TRANSLATIONS += ../i18n/ja/datebook.ts |
49 | TRANSLATIONS += ../i18n/ko/datebook.ts | 52 | TRANSLATIONS += ../i18n/ko/datebook.ts |
50 | TRANSLATIONS += ../i18n/no/datebook.ts | 53 | TRANSLATIONS += ../i18n/no/datebook.ts |
51 | TRANSLATIONS += ../i18n/zh_CN/datebook.ts | 54 | TRANSLATIONS += ../i18n/zh_CN/datebook.ts |
52 | TRANSLATIONS += ../i18n/zh_TW/datebook.ts | 55 | TRANSLATIONS += ../i18n/zh_TW/datebook.ts |
53 | TRANSLATIONS += ../i18n/fr/datebook.ts | 56 | TRANSLATIONS += ../i18n/fr/datebook.ts |
diff --git a/core/pim/datebook/dateentry.ui b/core/pim/datebook/dateentry.ui index 1a712ec..fadbc35 100644 --- a/core/pim/datebook/dateentry.ui +++ b/core/pim/datebook/dateentry.ui | |||
@@ -1,616 +1,627 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>DateEntryBase</class> | 2 | <class>DateEntryBase</class> |
3 | <comment>********************************************************************* | 3 | <comment>********************************************************************* |
4 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 4 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This file is part of Qtopia Environment. | 6 | ** This file is part of Qtopia Environment. |
7 | ** | 7 | ** |
8 | ** This file may be distributed and/or modified under the terms of the | 8 | ** This file may be distributed and/or modified under the terms of the |
9 | ** GNU General Public License version 2 as published by the Free Software | 9 | ** GNU General Public License version 2 as published by the Free Software |
10 | ** Foundation and appearing in the file LICENSE.GPL included in the | 10 | ** Foundation and appearing in the file LICENSE.GPL included in the |
11 | ** packaging of this file. | 11 | ** packaging of this file. |
12 | ** | 12 | ** |
13 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 13 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
14 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 14 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
15 | ** | 15 | ** |
16 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 16 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
17 | ** | 17 | ** |
18 | ** Contact info@trolltech.com if any conditions of this licensing are | 18 | ** Contact info@trolltech.com if any conditions of this licensing are |
19 | ** not clear to you. | 19 | ** not clear to you. |
20 | ** | 20 | ** |
21 | ** $Id$ | 21 | ** $Id$ |
22 | ** | 22 | ** |
23 | *********************************************************************</comment> | 23 | *********************************************************************</comment> |
24 | <widget> | 24 | <widget> |
25 | <class>QWidget</class> | 25 | <class>QWidget</class> |
26 | <property stdset="1"> | 26 | <property stdset="1"> |
27 | <name>name</name> | 27 | <name>name</name> |
28 | <cstring>DateEntryBase</cstring> | 28 | <cstring>DateEntryBase</cstring> |
29 | </property> | 29 | </property> |
30 | <property stdset="1"> | 30 | <property stdset="1"> |
31 | <name>geometry</name> | 31 | <name>geometry</name> |
32 | <rect> | 32 | <rect> |
33 | <x>0</x> | 33 | <x>0</x> |
34 | <y>0</y> | 34 | <y>0</y> |
35 | <width>242</width> | 35 | <width>242</width> |
36 | <height>339</height> | 36 | <height>339</height> |
37 | </rect> | 37 | </rect> |
38 | </property> | 38 | </property> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>caption</name> | 40 | <name>caption</name> |
41 | <string>New Event</string> | 41 | <string>New Event</string> |
42 | </property> | 42 | </property> |
43 | <grid> | 43 | <grid> |
44 | <property stdset="1"> | 44 | <property stdset="1"> |
45 | <name>margin</name> | 45 | <name>margin</name> |
46 | <number>2</number> | 46 | <number>2</number> |
47 | </property> | 47 | </property> |
48 | <property stdset="1"> | 48 | <property stdset="1"> |
49 | <name>spacing</name> | 49 | <name>spacing</name> |
50 | <number>0</number> | 50 | <number>0</number> |
51 | </property> | 51 | </property> |
52 | <widget row="1" column="0" > | 52 | <widget row="1" column="0" > |
53 | <class>QLabel</class> | 53 | <class>QLabel</class> |
54 | <property stdset="1"> | 54 | <property stdset="1"> |
55 | <name>name</name> | 55 | <name>name</name> |
56 | <cstring>TextLabel2</cstring> | 56 | <cstring>TextLabel2</cstring> |
57 | </property> | 57 | </property> |
58 | <property stdset="1"> | 58 | <property stdset="1"> |
59 | <name>frameShape</name> | 59 | <name>frameShape</name> |
60 | <enum>MShape</enum> | 60 | <enum>MShape</enum> |
61 | </property> | 61 | </property> |
62 | <property stdset="1"> | 62 | <property stdset="1"> |
63 | <name>frameShadow</name> | 63 | <name>frameShadow</name> |
64 | <enum>MShadow</enum> | 64 | <enum>MShadow</enum> |
65 | </property> | 65 | </property> |
66 | <property stdset="1"> | 66 | <property stdset="1"> |
67 | <name>text</name> | 67 | <name>text</name> |
68 | <string>Location</string> | 68 | <string>Location</string> |
69 | </property> | 69 | </property> |
70 | </widget> | 70 | </widget> |
71 | <widget row="2" column="0" > | 71 | <widget row="2" column="0" > |
72 | <class>QLabel</class> | 72 | <class>QLabel</class> |
73 | <property stdset="1"> | 73 | <property stdset="1"> |
74 | <name>name</name> | 74 | <name>name</name> |
75 | <cstring>TextLabel2_2</cstring> | 75 | <cstring>TextLabel2_2</cstring> |
76 | </property> | 76 | </property> |
77 | <property stdset="1"> | 77 | <property stdset="1"> |
78 | <name>text</name> | 78 | <name>text</name> |
79 | <string>Category</string> | 79 | <string>Category</string> |
80 | </property> | 80 | </property> |
81 | <property> | 81 | <property> |
82 | <name>buddy</name> | 82 | <name>buddy</name> |
83 | <cstring>comboPriority</cstring> | 83 | <cstring>comboPriority</cstring> |
84 | </property> | 84 | </property> |
85 | </widget> | 85 | </widget> |
86 | <widget row="0" column="1" rowspan="1" colspan="3" > | 86 | <widget row="0" column="1" rowspan="1" colspan="3" > |
87 | <class>QComboBox</class> | 87 | <class>QComboBox</class> |
88 | <item> | 88 | <item> |
89 | <property> | 89 | <property> |
90 | <name>text</name> | 90 | <name>text</name> |
91 | <string></string> | 91 | <string></string> |
92 | </property> | 92 | </property> |
93 | </item> | 93 | </item> |
94 | <item> | 94 | <item> |
95 | <property> | 95 | <property> |
96 | <name>text</name> | 96 | <name>text</name> |
97 | <string>Meeting</string> | 97 | <string>Meeting</string> |
98 | </property> | 98 | </property> |
99 | </item> | 99 | </item> |
100 | <item> | 100 | <item> |
101 | <property> | 101 | <property> |
102 | <name>text</name> | 102 | <name>text</name> |
103 | <string>Lunch</string> | 103 | <string>Lunch</string> |
104 | </property> | 104 | </property> |
105 | </item> | 105 | </item> |
106 | <item> | 106 | <item> |
107 | <property> | 107 | <property> |
108 | <name>text</name> | 108 | <name>text</name> |
109 | <string>Dinner</string> | 109 | <string>Dinner</string> |
110 | </property> | 110 | </property> |
111 | </item> | 111 | </item> |
112 | <item> | 112 | <item> |
113 | <property> | 113 | <property> |
114 | <name>text</name> | 114 | <name>text</name> |
115 | <string>Travel</string> | 115 | <string>Travel</string> |
116 | </property> | 116 | </property> |
117 | </item> | 117 | </item> |
118 | <property stdset="1"> | 118 | <property stdset="1"> |
119 | <name>name</name> | 119 | <name>name</name> |
120 | <cstring>comboDescription</cstring> | 120 | <cstring>comboDescription</cstring> |
121 | </property> | 121 | </property> |
122 | <property stdset="1"> | 122 | <property stdset="1"> |
123 | <name>sizePolicy</name> | 123 | <name>sizePolicy</name> |
124 | <sizepolicy> | 124 | <sizepolicy> |
125 | <hsizetype>7</hsizetype> | 125 | <hsizetype>7</hsizetype> |
126 | <vsizetype>0</vsizetype> | 126 | <vsizetype>0</vsizetype> |
127 | </sizepolicy> | 127 | </sizepolicy> |
128 | </property> | 128 | </property> |
129 | <property stdset="1"> | 129 | <property stdset="1"> |
130 | <name>editable</name> | 130 | <name>editable</name> |
131 | <bool>true</bool> | 131 | <bool>true</bool> |
132 | </property> | 132 | </property> |
133 | <property stdset="1"> | 133 | <property stdset="1"> |
134 | <name>currentItem</name> | 134 | <name>currentItem</name> |
135 | <number>0</number> | 135 | <number>0</number> |
136 | </property> | 136 | </property> |
137 | <property stdset="1"> | 137 | <property stdset="1"> |
138 | <name>duplicatesEnabled</name> | 138 | <name>duplicatesEnabled</name> |
139 | <bool>false</bool> | 139 | <bool>false</bool> |
140 | </property> | 140 | </property> |
141 | </widget> | 141 | </widget> |
142 | <widget row="0" column="0" > | 142 | <widget row="0" column="0" > |
143 | <class>QLabel</class> | 143 | <class>QLabel</class> |
144 | <property stdset="1"> | 144 | <property stdset="1"> |
145 | <name>name</name> | 145 | <name>name</name> |
146 | <cstring>TextLabel1</cstring> | 146 | <cstring>TextLabel1</cstring> |
147 | </property> | 147 | </property> |
148 | <property stdset="1"> | 148 | <property stdset="1"> |
149 | <name>text</name> | 149 | <name>text</name> |
150 | <string>Description </string> | 150 | <string>Description </string> |
151 | </property> | 151 | </property> |
152 | </widget> | 152 | </widget> |
153 | <widget row="1" column="1" rowspan="1" colspan="3" > | 153 | <widget row="1" column="1" rowspan="1" colspan="3" > |
154 | <class>QComboBox</class> | 154 | <class>QComboBox</class> |
155 | <item> | 155 | <item> |
156 | <property> | 156 | <property> |
157 | <name>text</name> | 157 | <name>text</name> |
158 | <string></string> | 158 | <string></string> |
159 | </property> | 159 | </property> |
160 | </item> | 160 | </item> |
161 | <item> | 161 | <item> |
162 | <property> | 162 | <property> |
163 | <name>text</name> | 163 | <name>text</name> |
164 | <string>Office</string> | 164 | <string>Office</string> |
165 | </property> | 165 | </property> |
166 | </item> | 166 | </item> |
167 | <item> | 167 | <item> |
168 | <property> | 168 | <property> |
169 | <name>text</name> | 169 | <name>text</name> |
170 | <string>Home</string> | 170 | <string>Home</string> |
171 | </property> | 171 | </property> |
172 | </item> | 172 | </item> |
173 | <property stdset="1"> | 173 | <property stdset="1"> |
174 | <name>name</name> | 174 | <name>name</name> |
175 | <cstring>comboLocation</cstring> | 175 | <cstring>comboLocation</cstring> |
176 | </property> | 176 | </property> |
177 | <property stdset="1"> | 177 | <property stdset="1"> |
178 | <name>sizePolicy</name> | 178 | <name>sizePolicy</name> |
179 | <sizepolicy> | 179 | <sizepolicy> |
180 | <hsizetype>7</hsizetype> | 180 | <hsizetype>7</hsizetype> |
181 | <vsizetype>0</vsizetype> | 181 | <vsizetype>0</vsizetype> |
182 | </sizepolicy> | 182 | </sizepolicy> |
183 | </property> | 183 | </property> |
184 | <property stdset="1"> | 184 | <property stdset="1"> |
185 | <name>editable</name> | 185 | <name>editable</name> |
186 | <bool>true</bool> | 186 | <bool>true</bool> |
187 | </property> | 187 | </property> |
188 | <property stdset="1"> | 188 | <property stdset="1"> |
189 | <name>currentItem</name> | 189 | <name>currentItem</name> |
190 | <number>0</number> | 190 | <number>0</number> |
191 | </property> | 191 | </property> |
192 | <property stdset="1"> | 192 | <property stdset="1"> |
193 | <name>duplicatesEnabled</name> | 193 | <name>duplicatesEnabled</name> |
194 | <bool>false</bool> | 194 | <bool>false</bool> |
195 | </property> | 195 | </property> |
196 | </widget> | 196 | </widget> |
197 | <widget row="2" column="1" rowspan="1" colspan="3" > | 197 | <widget row="2" column="1" rowspan="1" colspan="3" > |
198 | <class>CategorySelect</class> | 198 | <class>CategorySelect</class> |
199 | <property stdset="1"> | 199 | <property stdset="1"> |
200 | <name>name</name> | 200 | <name>name</name> |
201 | <cstring>comboCategory</cstring> | 201 | <cstring>comboCategory</cstring> |
202 | </property> | 202 | </property> |
203 | </widget> | 203 | </widget> |
204 | <widget row="3" column="0" rowspan="2"> | 204 | <widget row="3" column="0" rowspan="2"> |
205 | <class>QLabel</class> | 205 | <class>QLabel</class> |
206 | <property stdset="1"> | 206 | <property stdset="1"> |
207 | <name>name</name> | 207 | <name>name</name> |
208 | <cstring>TextLabel3</cstring> | 208 | <cstring>TextLabel3</cstring> |
209 | </property> | 209 | </property> |
210 | <property stdset="1"> | 210 | <property stdset="1"> |
211 | <name>text</name> | 211 | <name>text</name> |
212 | <string>Start - End </string> | 212 | <string>Start - End </string> |
213 | </property> | 213 | </property> |
214 | </widget> | 214 | </widget> |
215 | <widget row="3" column="1" > | 215 | <widget row="3" column="1" > |
216 | <class>QPushButton</class> | 216 | <class>QPushButton</class> |
217 | <property stdset="1"> | 217 | <property stdset="1"> |
218 | <name>name</name> | 218 | <name>name</name> |
219 | <cstring>buttonStart</cstring> | 219 | <cstring>buttonStart</cstring> |
220 | </property> | 220 | </property> |
221 | <property stdset="1"> | 221 | <property stdset="1"> |
222 | <name>text</name> | 222 | <name>text</name> |
223 | <string>Jan 02 00</string> | 223 | <string>Jan 02 00</string> |
224 | </property> | 224 | </property> |
225 | <property stdset="1"> | 225 | <property stdset="1"> |
226 | <name>minimumSize</name> | 226 | <name>minimumSize</name> |
227 | <size> | 227 | <size> |
228 | <width>70</width> | 228 | <width>70</width> |
229 | <height>0</height> | 229 | <height>0</height> |
230 | </size> | 230 | </size> |
231 | </property> | 231 | </property> |
232 | <property stdset="1"> | 232 | <property stdset="1"> |
233 | <name>maximumSize</name> | 233 | <name>maximumSize</name> |
234 | <size> | 234 | <size> |
235 | <width>70</width> | 235 | <width>70</width> |
236 | <height>32767</height> | 236 | <height>32767</height> |
237 | </size> | 237 | </size> |
238 | </property> | 238 | </property> |
239 | </widget> | 239 | </widget> |
240 | <widget row="4" column="1" rowspan="1" colspan="1" > | 240 | <widget row="4" column="1" rowspan="1" colspan="1" > |
241 | <class>QLineEdit</class> | 241 | <class>QLineEdit</class> |
242 | <property stdset="1"> | 242 | <property stdset="1"> |
243 | <name>name</name> | 243 | <name>name</name> |
244 | <cstring>comboStart</cstring> | 244 | <cstring>comboStart</cstring> |
245 | </property> | 245 | </property> |
246 | <property stdset="1"> | 246 | <property stdset="1"> |
247 | <name>minimumSize</name> | 247 | <name>minimumSize</name> |
248 | <size> | 248 | <size> |
249 | <width>70</width> | 249 | <width>70</width> |
250 | <height>0</height> | 250 | <height>0</height> |
251 | </size> | 251 | </size> |
252 | </property> | 252 | </property> |
253 | <property stdset="1"> | 253 | <property stdset="1"> |
254 | <name>maximumSize</name> | 254 | <name>maximumSize</name> |
255 | <size> | 255 | <size> |
256 | <width>70</width> | 256 | <width>70</width> |
257 | <height>32767</height> | 257 | <height>32767</height> |
258 | </size> | 258 | </size> |
259 | </property> | 259 | </property> |
260 | <property stdset="1"> | 260 | <property stdset="1"> |
261 | <name>alignment</name> | 261 | <name>alignment</name> |
262 | <set>AlignHCenter</set> | 262 | <set>AlignHCenter</set> |
263 | </property> | 263 | </property> |
264 | <property> | 264 | <property> |
265 | <name>hAlign</name> | 265 | <name>hAlign</name> |
266 | </property> | 266 | </property> |
267 | </widget> | 267 | </widget> |
268 | <spacer row="3" column="2" rowspan="2" colspan="1" > | 268 | <spacer row="3" column="2" rowspan="2" colspan="1" > |
269 | <property> | 269 | <property> |
270 | <name>name</name> | 270 | <name>name</name> |
271 | <cstring>Spacer1_2</cstring> | 271 | <cstring>Spacer1_2</cstring> |
272 | </property> | 272 | </property> |
273 | <property stdset="1"> | 273 | <property stdset="1"> |
274 | <name>orientation</name> | 274 | <name>orientation</name> |
275 | <enum>Horizontal</enum> | 275 | <enum>Horizontal</enum> |
276 | </property> | 276 | </property> |
277 | <property stdset="1"> | 277 | <property stdset="1"> |
278 | <name>sizeType</name> | 278 | <name>sizeType</name> |
279 | <enum>Expanding</enum> | 279 | <enum>Expanding</enum> |
280 | </property> | 280 | </property> |
281 | <property> | 281 | <property> |
282 | <name>sizeHint</name> | 282 | <name>sizeHint</name> |
283 | <size> | 283 | <size> |
284 | <width>20</width> | 284 | <width>20</width> |
285 | <height>20</height> | 285 | <height>20</height> |
286 | </size> | 286 | </size> |
287 | </property> | 287 | </property> |
288 | </spacer> | 288 | </spacer> |
289 | 289 | ||
290 | <widget row="5" column="1" colspan="3"> | 290 | <widget row="5" column="1" colspan="3"> |
291 | <class>TimePicker</class> | 291 | <class>TimePicker</class> |
292 | <property stdset="1"> | 292 | <property stdset="1"> |
293 | <name>name</name> | 293 | <name>name</name> |
294 | <cstring>timePickerStart</cstring> | 294 | <cstring>timePickerStart</cstring> |
295 | </property> | 295 | </property> |
296 | </widget> | 296 | </widget> |
297 | <widget row="3" column="3" colspan="1"> | 297 | <widget row="3" column="3" colspan="1"> |
298 | <class>QPushButton</class> | 298 | <class>QPushButton</class> |
299 | <property stdset="1"> | 299 | <property stdset="1"> |
300 | <name>name</name> | 300 | <name>name</name> |
301 | <cstring>buttonEnd</cstring> | 301 | <cstring>buttonEnd</cstring> |
302 | </property> | 302 | </property> |
303 | <property stdset="1"> | 303 | <property stdset="1"> |
304 | <name>text</name> | 304 | <name>text</name> |
305 | <string>Jan 02 00</string> | 305 | <string>Jan 02 00</string> |
306 | </property> | 306 | </property> |
307 | <property stdset="1"> | 307 | <property stdset="1"> |
308 | <name>minimumSize</name> | 308 | <name>minimumSize</name> |
309 | <size> | 309 | <size> |
310 | <width>70</width> | 310 | <width>70</width> |
311 | <height>0</height> | 311 | <height>0</height> |
312 | </size> | 312 | </size> |
313 | </property> | 313 | </property> |
314 | <property stdset="1"> | 314 | <property stdset="1"> |
315 | <name>maximumSize</name> | 315 | <name>maximumSize</name> |
316 | <size> | 316 | <size> |
317 | <width>70</width> | 317 | <width>70</width> |
318 | <height>32767</height> | 318 | <height>32767</height> |
319 | </size> | 319 | </size> |
320 | </property> | 320 | </property> |
321 | </widget> | 321 | </widget> |
322 | <widget row="4" column="3" colspan="1"> | 322 | <widget row="4" column="3" colspan="1"> |
323 | <class>QLineEdit</class> | 323 | <class>QLineEdit</class> |
324 | <property stdset="1"> | 324 | <property stdset="1"> |
325 | <name>name</name> | 325 | <name>name</name> |
326 | <cstring>comboEnd</cstring> | 326 | <cstring>comboEnd</cstring> |
327 | </property> | 327 | </property> |
328 | <property stdset="1"> | 328 | <property stdset="1"> |
329 | <name>minimumSize</name> | 329 | <name>minimumSize</name> |
330 | <size> | 330 | <size> |
331 | <width>70</width> | 331 | <width>70</width> |
332 | <height>0</height> | 332 | <height>0</height> |
333 | </size> | 333 | </size> |
334 | </property> | 334 | </property> |
335 | <property stdset="1"> | 335 | <property stdset="1"> |
336 | <name>maximumSize</name> | 336 | <name>maximumSize</name> |
337 | <size> | 337 | <size> |
338 | <width>70</width> | 338 | <width>70</width> |
339 | <height>32767</height> | 339 | <height>32767</height> |
340 | </size> | 340 | </size> |
341 | </property> | 341 | </property> |
342 | <property stdset="1"> | 342 | <property stdset="1"> |
343 | <name>alignment</name> | 343 | <name>alignment</name> |
344 | <set>AlignHCenter</set> | 344 | <set>AlignHCenter</set> |
345 | </property> | 345 | </property> |
346 | <property> | 346 | <property> |
347 | <name>hAlign</name> | 347 | <name>hAlign</name> |
348 | </property> | 348 | </property> |
349 | </widget> | 349 | </widget> |
350 | <widget row="5" column="0" > | 350 | <widget row="5" column="0" > |
351 | <class>QLabel</class> | 351 | <class>QLabel</class> |
352 | <property stdset="1"> | 352 | <property stdset="1"> |
353 | <name>name</name> | 353 | <name>name</name> |
354 | <cstring>TimePickerLabel</cstring> | 354 | <cstring>TimePickerLabel</cstring> |
355 | </property> | 355 | </property> |
356 | <property stdset="1"> | 356 | <property stdset="1"> |
357 | <name>text</name> | 357 | <name>text</name> |
358 | <string>Start time</string> | 358 | <string>Start time</string> |
359 | </property> | 359 | </property> |
360 | </widget> | 360 | </widget> |
361 | <widget row="6" column="0" > | 361 | <widget row="6" column="0" > |
362 | <class>QCheckBox</class> | 362 | <class>QCheckBox</class> |
363 | <property stdset="1"> | 363 | <property stdset="1"> |
364 | <name>name</name> | 364 | <name>name</name> |
365 | <cstring>checkAllDay</cstring> | 365 | <cstring>checkAllDay</cstring> |
366 | </property> | 366 | </property> |
367 | <property stdset="1"> | 367 | <property stdset="1"> |
368 | <name>text</name> | 368 | <name>text</name> |
369 | <string>All day</string> | 369 | <string>All day</string> |
370 | </property> | 370 | </property> |
371 | </widget> | 371 | </widget> |
372 | <widget row="7" column="0" > | 372 | <widget row="7" column="0" > |
373 | <class>QLabel</class> | 373 | <class>QLabel</class> |
374 | <property stdset="1"> | 374 | <property stdset="1"> |
375 | <name>name</name> | 375 | <name>name</name> |
376 | <cstring>TextLabel3_2_2</cstring> | 376 | <cstring>TextLabel3_2_2</cstring> |
377 | </property> | 377 | </property> |
378 | <property stdset="1"> | 378 | <property stdset="1"> |
379 | <name>text</name> | 379 | <name>text</name> |
380 | <string>Time zone</string> | 380 | <string>Time zone</string> |
381 | </property> | 381 | </property> |
382 | </widget> | 382 | </widget> |
383 | <widget row="7" column="1" rowspan="1" colspan="3" > | 383 | <widget row="7" column="1" rowspan="1" colspan="3" > |
384 | <class>TimeZoneSelector</class> | 384 | <class>TimeZoneSelector</class> |
385 | <property stdset="1"> | 385 | <property stdset="1"> |
386 | <name>name</name> | 386 | <name>name</name> |
387 | <cstring>timezone</cstring> | 387 | <cstring>timezone</cstring> |
388 | </property> | 388 | </property> |
389 | </widget> | 389 | </widget> |
390 | <widget row="8" column="0" > | 390 | <widget row="8" column="0" > |
391 | <class>QCheckBox</class> | 391 | <class>QCheckBox</class> |
392 | <property stdset="1"> | 392 | <property stdset="1"> |
393 | <name>name</name> | 393 | <name>name</name> |
394 | <cstring>checkAlarm</cstring> | 394 | <cstring>checkAlarm</cstring> |
395 | </property> | 395 | </property> |
396 | <property stdset="1"> | 396 | <property stdset="1"> |
397 | <name>enabled</name> | 397 | <name>enabled</name> |
398 | <bool>true</bool> | 398 | <bool>true</bool> |
399 | </property> | 399 | </property> |
400 | <property stdset="1"> | 400 | <property stdset="1"> |
401 | <name>autoMask</name> | 401 | <name>autoMask</name> |
402 | <bool>false</bool> | 402 | <bool>false</bool> |
403 | </property> | 403 | </property> |
404 | <property stdset="1"> | 404 | <property stdset="1"> |
405 | <name>text</name> | 405 | <name>text</name> |
406 | <string>&Alarm</string> | 406 | <string>&Alarm</string> |
407 | </property> | 407 | </property> |
408 | <property stdset="1"> | 408 | <property stdset="1"> |
409 | <name>checked</name> | 409 | <name>checked</name> |
410 | <bool>false</bool> | 410 | <bool>false</bool> |
411 | </property> | 411 | </property> |
412 | </widget> | 412 | </widget> |
413 | <widget row="8" column="1" rowspan="1" colspan="2" > | 413 | <widget row="8" column="1" rowspan="1" colspan="2" > |
414 | <class>QSpinBox</class> | 414 | <class>QSpinBox</class> |
415 | <property stdset="1"> | 415 | <property stdset="1"> |
416 | <name>name</name> | 416 | <name>name</name> |
417 | <cstring>spinAlarm</cstring> | 417 | <cstring>spinAlarm</cstring> |
418 | </property> | 418 | </property> |
419 | <property stdset="1"> | 419 | <property stdset="1"> |
420 | <name>enabled</name> | 420 | <name>enabled</name> |
421 | <bool>false</bool> | 421 | <bool>false</bool> |
422 | </property> | 422 | </property> |
423 | <property stdset="1"> | 423 | <property stdset="1"> |
424 | <name>suffix</name> | 424 | <name>suffix</name> |
425 | <string> minutes</string> | 425 | <string> minutes</string> |
426 | </property> | 426 | </property> |
427 | <property stdset="1"> | 427 | <property stdset="1"> |
428 | <name>maxValue</name> | 428 | <name>maxValue</name> |
429 | <number>180</number> | 429 | <number>180</number> |
430 | </property> | 430 | </property> |
431 | <property stdset="1"> | 431 | <property stdset="1"> |
432 | <name>minValue</name> | 432 | <name>minValue</name> |
433 | <number>0</number> | 433 | <number>0</number> |
434 | </property> | 434 | </property> |
435 | <property stdset="1"> | 435 | <property stdset="1"> |
436 | <name>lineStep</name> | 436 | <name>lineStep</name> |
437 | <number>5</number> | 437 | <number>5</number> |
438 | </property> | 438 | </property> |
439 | <property stdset="1"> | 439 | <property stdset="1"> |
440 | <name>value</name> | 440 | <name>value</name> |
441 | <number>5</number> | 441 | <number>5</number> |
442 | </property> | 442 | </property> |
443 | </widget> | 443 | </widget> |
444 | <widget row="8" column="3" > | 444 | <widget row="8" column="3" > |
445 | <class>QComboBox</class> | 445 | <class>QComboBox</class> |
446 | <item> | 446 | <item> |
447 | <property> | 447 | <property> |
448 | <name>text</name> | 448 | <name>text</name> |
449 | <string>Silent</string> | 449 | <string>Silent</string> |
450 | </property> | 450 | </property> |
451 | </item> | 451 | </item> |
452 | <item> | 452 | <item> |
453 | <property> | 453 | <property> |
454 | <name>text</name> | 454 | <name>text</name> |
455 | <string>Loud</string> | 455 | <string>Loud</string> |
456 | </property> | 456 | </property> |
457 | </item> | 457 | </item> |
458 | <property stdset="1"> | 458 | <property stdset="1"> |
459 | <name>name</name> | 459 | <name>name</name> |
460 | <cstring>comboSound</cstring> | 460 | <cstring>comboSound</cstring> |
461 | </property> | 461 | </property> |
462 | <property stdset="1"> | 462 | <property stdset="1"> |
463 | <name>enabled</name> | 463 | <name>enabled</name> |
464 | <bool>false</bool> | 464 | <bool>false</bool> |
465 | </property> | 465 | </property> |
466 | </widget> | 466 | </widget> |
467 | <widget row="9" column="0" > | 467 | <widget row="9" column="0" > |
468 | <class>QLabel</class> | 468 | <class>QLabel</class> |
469 | <property stdset="1"> | 469 | <property stdset="1"> |
470 | <name>name</name> | 470 | <name>name</name> |
471 | <cstring>lblRepeat</cstring> | 471 | <cstring>lblRepeat</cstring> |
472 | </property> | 472 | </property> |
473 | <property stdset="1"> | 473 | <property stdset="1"> |
474 | <name>text</name> | 474 | <name>text</name> |
475 | <string>Repeat</string> | 475 | <string>Repeat</string> |
476 | </property> | 476 | </property> |
477 | </widget> | 477 | </widget> |
478 | <widget row="9" column="1" rowspan="1" colspan="3" > | 478 | <widget row="9" column="1" rowspan="1" colspan="3" > |
479 | <class>QToolButton</class> | 479 | <class>QToolButton</class> |
480 | <property stdset="1"> | 480 | <property stdset="1"> |
481 | <name>name</name> | 481 | <name>name</name> |
482 | <cstring>cmdRepeat</cstring> | 482 | <cstring>cmdRepeat</cstring> |
483 | </property> | 483 | </property> |
484 | <property stdset="1"> | 484 | <property stdset="1"> |
485 | <name>focusPolicy</name> | 485 | <name>focusPolicy</name> |
486 | <enum>TabFocus</enum> | 486 | <enum>TabFocus</enum> |
487 | </property> | 487 | </property> |
488 | <property stdset="1"> | 488 | <property stdset="1"> |
489 | <name>text</name> | 489 | <name>text</name> |
490 | <string>No Repeat...</string> | 490 | <string>No Repeat...</string> |
491 | </property> | 491 | </property> |
492 | <property stdset="1"> | ||
493 | <name>sizePolicy</name> | ||
494 | <sizepolicy> | ||
495 | <hsizetype>7</hsizetype> | ||
496 | <vsizetype>0</vsizetype> | ||
497 | </sizepolicy> | ||
498 | </property> | ||
492 | </widget> | 499 | </widget> |
493 | <widget row="10" column="0" rowspan="1" colspan="4" > | 500 | <widget row="10" column="0" rowspan="1" colspan="4" > |
494 | <class>QMultiLineEdit</class> | 501 | <class>QToolButton</class> |
495 | <property stdset="1"> | 502 | <property stdset="1"> |
496 | <name>name</name> | 503 | <name>name</name> |
497 | <cstring>editNote</cstring> | 504 | <cstring>editNote</cstring> |
498 | </property> | 505 | </property> |
506 | <property stdset="1"> | ||
507 | <name>text</name> | ||
508 | <string>Note...</string> | ||
509 | </property> | ||
499 | </widget> | 510 | </widget> |
500 | </grid> | 511 | </grid> |
501 | </widget> | 512 | </widget> |
502 | <customwidgets> | 513 | <customwidgets> |
503 | <customwidget> | 514 | <customwidget> |
504 | <class>TimeZoneSelector</class> | 515 | <class>TimeZoneSelector</class> |
505 | <header location="global">qpe/tzselect.h</header> | 516 | <header location="global">qpe/tzselect.h</header> |
506 | <sizehint> | 517 | <sizehint> |
507 | <width>21</width> | 518 | <width>21</width> |
508 | <height>10</height> | 519 | <height>10</height> |
509 | </sizehint> | 520 | </sizehint> |
510 | <container>0</container> | 521 | <container>0</container> |
511 | <sizepolicy> | 522 | <sizepolicy> |
512 | <hordata>7</hordata> | 523 | <hordata>7</hordata> |
513 | <verdata>1</verdata> | 524 | <verdata>1</verdata> |
514 | </sizepolicy> | 525 | </sizepolicy> |
515 | <pixmap>image0</pixmap> | 526 | <pixmap>image0</pixmap> |
516 | </customwidget> | 527 | </customwidget> |
517 | <customwidget> | 528 | <customwidget> |
518 | <class>CategorySelect</class> | 529 | <class>CategorySelect</class> |
519 | <header location="global">qpe/categoryselect.h</header> | 530 | <header location="global">qpe/categoryselect.h</header> |
520 | <sizehint> | 531 | <sizehint> |
521 | <width>-1</width> | 532 | <width>-1</width> |
522 | <height>-1</height> | 533 | <height>-1</height> |
523 | </sizehint> | 534 | </sizehint> |
524 | <container>0</container> | 535 | <container>0</container> |
525 | <sizepolicy> | 536 | <sizepolicy> |
526 | <hordata>7</hordata> | 537 | <hordata>7</hordata> |
527 | <verdata>1</verdata> | 538 | <verdata>1</verdata> |
528 | </sizepolicy> | 539 | </sizepolicy> |
529 | <pixmap>image1</pixmap> | 540 | <pixmap>image1</pixmap> |
530 | </customwidget> | 541 | </customwidget> |
531 | <customwidget> | 542 | <customwidget> |
532 | <class>TimePicker</class> | 543 | <class>TimePicker</class> |
533 | <header location="local">timepicker.h</header> | 544 | <header location="local">timepicker.h</header> |
534 | <sizehint> | 545 | <sizehint> |
535 | <width>-1</width> | 546 | <width>-1</width> |
536 | <height>-1</height> | 547 | <height>-1</height> |
537 | </sizehint> | 548 | </sizehint> |
538 | <container>0</container> | 549 | <container>0</container> |
539 | <sizepolicy> | 550 | <sizepolicy> |
540 | <hordata>7</hordata> | 551 | <hordata>7</hordata> |
541 | <verdata>1</verdata> | 552 | <verdata>1</verdata> |
542 | </sizepolicy> | 553 | </sizepolicy> |
543 | <pixmap>image1</pixmap> | 554 | <pixmap>image1</pixmap> |
544 | </customwidget> | 555 | </customwidget> |
545 | </customwidgets> | 556 | </customwidgets> |
546 | <images> | 557 | <images> |
547 | <image> | 558 | <image> |
548 | <name>image0</name> | 559 | <name>image0</name> |
549 | <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data> | 560 | <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data> |
550 | </image> | 561 | </image> |
551 | <image> | 562 | <image> |
552 | <name>image1</name> | 563 | <name>image1</name> |
553 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 564 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
554 | </image> | 565 | </image> |
555 | </images> | 566 | </images> |
556 | <connections> | 567 | <connections> |
557 | <connection> | 568 | <connection> |
558 | <sender>checkAlarm</sender> | 569 | <sender>checkAlarm</sender> |
559 | <signal>toggled(bool)</signal> | 570 | <signal>toggled(bool)</signal> |
560 | <receiver>spinAlarm</receiver> | 571 | <receiver>spinAlarm</receiver> |
561 | <slot>setEnabled(bool)</slot> | 572 | <slot>setEnabled(bool)</slot> |
562 | </connection> | 573 | </connection> |
563 | <connection> | 574 | <connection> |
564 | <sender>comboEnd</sender> | 575 | <sender>comboEnd</sender> |
565 | <signal>textChanged(const QString&)</signal> | 576 | <signal>textChanged(const QString&)</signal> |
566 | <receiver>DateEntryBase</receiver> | 577 | <receiver>DateEntryBase</receiver> |
567 | <slot>endTimeChanged( const QString & )</slot> | 578 | <slot>endTimeChanged( const QString & )</slot> |
568 | </connection> | 579 | </connection> |
569 | <connection> | 580 | <connection> |
570 | <sender>cmdRepeat</sender> | 581 | <sender>cmdRepeat</sender> |
571 | <signal>clicked()</signal> | 582 | <signal>clicked()</signal> |
572 | <receiver>DateEntryBase</receiver> | 583 | <receiver>DateEntryBase</receiver> |
573 | <slot>slotRepeat()</slot> | 584 | <slot>slotRepeat()</slot> |
574 | </connection> | 585 | </connection> |
575 | <connection> | 586 | <connection> |
576 | <sender>comboStart</sender> | 587 | <sender>comboStart</sender> |
577 | <signal>textChanged(const QString &)</signal> | 588 | <signal>textChanged(const QString &)</signal> |
578 | <receiver>DateEntryBase</receiver> | 589 | <receiver>DateEntryBase</receiver> |
579 | <slot>startTimeEdited( const QString & )</slot> | 590 | <slot>startTimeEdited( const QString & )</slot> |
580 | </connection> | 591 | </connection> |
581 | <connection> | 592 | <connection> |
582 | <sender>checkAllDay</sender> | 593 | <sender>checkAllDay</sender> |
583 | <signal>toggled(bool)</signal> | 594 | <signal>toggled(bool)</signal> |
584 | <receiver>comboEnd</receiver> | 595 | <receiver>comboEnd</receiver> |
585 | <slot>setDisabled(bool)</slot> | 596 | <slot>setDisabled(bool)</slot> |
586 | </connection> | 597 | </connection> |
587 | <connection> | 598 | <connection> |
588 | <sender>checkAllDay</sender> | 599 | <sender>checkAllDay</sender> |
589 | <signal>toggled(bool)</signal> | 600 | <signal>toggled(bool)</signal> |
590 | <receiver>timePickerStart</receiver> | 601 | <receiver>timePickerStart</receiver> |
591 | <slot>setDisabled(bool)</slot> | 602 | <slot>setDisabled(bool)</slot> |
592 | </connection> | 603 | </connection> |
593 | <connection> | 604 | <connection> |
594 | <sender>checkAlarm</sender> | 605 | <sender>checkAlarm</sender> |
595 | <signal>toggled(bool)</signal> | 606 | <signal>toggled(bool)</signal> |
596 | <receiver>comboSound</receiver> | 607 | <receiver>comboSound</receiver> |
597 | <slot>setEnabled(bool)</slot> | 608 | <slot>setEnabled(bool)</slot> |
598 | </connection> | 609 | </connection> |
599 | <connection> | 610 | <connection> |
600 | <sender>checkAllDay</sender> | 611 | <sender>checkAllDay</sender> |
601 | <signal>toggled(bool)</signal> | 612 | <signal>toggled(bool)</signal> |
602 | <receiver>comboStart</receiver> | 613 | <receiver>comboStart</receiver> |
603 | <slot>setDisabled(bool)</slot> | 614 | <slot>setDisabled(bool)</slot> |
604 | </connection> | 615 | </connection> |
605 | <slot access="public">endDateChanged( const QString & )</slot> | 616 | <slot access="public">endDateChanged( const QString & )</slot> |
606 | <slot access="public">endDateChanged( int, int, int )</slot> | 617 | <slot access="public">endDateChanged( int, int, int )</slot> |
607 | <slot access="public">endTimeChanged( const QString & )</slot> | 618 | <slot access="public">endTimeChanged( const QString & )</slot> |
608 | <slot access="public">slotRepeat()</slot> | 619 | <slot access="public">slotRepeat()</slot> |
609 | <slot access="public">slotWait( int )</slot> | 620 | <slot access="public">slotWait( int )</slot> |
610 | <slot access="public">startDateChanged( const QString & )</slot> | 621 | <slot access="public">startDateChanged( const QString & )</slot> |
611 | <slot access="public">startDateChanged(int, int, int)</slot> | 622 | <slot access="public">startDateChanged(int, int, int)</slot> |
612 | <slot access="public">startTimeEdited( const QString & )</slot> | 623 | <slot access="public">startTimeEdited( const QString & )</slot> |
613 | <slot access="public">typeChanged( const QString & )</slot> | 624 | <slot access="public">typeChanged( const QString & )</slot> |
614 | <slot access="public">tzexecute(void)</slot> | 625 | <slot access="public">tzexecute(void)</slot> |
615 | </connections> | 626 | </connections> |
616 | </UI> | 627 | </UI> |
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index c4f6c68..9cc5073 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp | |||
@@ -1,553 +1,571 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "dateentryimpl.h" | 21 | #include "dateentryimpl.h" |
22 | #include "repeatentry.h" | 22 | #include "repeatentry.h" |
23 | 23 | ||
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/categoryselect.h> | 25 | #include <qpe/categoryselect.h> |
26 | #include <qpe/datebookmonth.h> | 26 | #include <qpe/datebookmonth.h> |
27 | #include <qpe/global.h> | 27 | #include <qpe/global.h> |
28 | #include <qpe/timeconversion.h> | 28 | #include <qpe/timeconversion.h> |
29 | #include <qpe/timestring.h> | 29 | #include <qpe/timestring.h> |
30 | #include <qpe/tzselect.h> | 30 | #include <qpe/tzselect.h> |
31 | 31 | ||
32 | #include <qevent.h> | 32 | #include <qevent.h> |
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qmultilineedit.h> | 37 | #include <qmultilineedit.h> |
38 | #include <qpopupmenu.h> | 38 | #include <qpopupmenu.h> |
39 | #include <qscrollview.h> | 39 | #include <qscrollview.h> |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #include <qtoolbutton.h> | 41 | #include <qtoolbutton.h> |
42 | 42 | ||
43 | #include "timepicker.h" | 43 | #include "timepicker.h" |
44 | 44 | ||
45 | #include <stdlib.h> | 45 | #include <stdlib.h> |
46 | #include <stdio.h> | 46 | #include <stdio.h> |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * Constructs a DateEntry which is a child of 'parent', with the | 49 | * Constructs a DateEntry which is a child of 'parent', with the |
50 | * name 'name' and widget flags set to 'f' | 50 | * name 'name' and widget flags set to 'f' |
51 | * | 51 | * |
52 | * The dialog will by default be modeless, unless you set 'modal' to | 52 | * The dialog will by default be modeless, unless you set 'modal' to |
53 | * TRUE to construct a modal dialog. | 53 | * TRUE to construct a modal dialog. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, | 56 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, |
57 | const QDateTime &end, bool whichClock, QWidget* parent, | 57 | const QDateTime &end, bool whichClock, QWidget* parent, |
58 | const char* name ) | 58 | const char* name ) |
59 | : DateEntryBase( parent, name ), | 59 | : DateEntryBase( parent, name ), |
60 | ampm( whichClock ), | 60 | ampm( whichClock ), |
61 | startWeekOnMonday( startOnMonday ), | 61 | startWeekOnMonday( startOnMonday ), |
62 | m_showStart(true) | 62 | m_showStart(true) |
63 | { | 63 | { |
64 | init(); | 64 | init(); |
65 | setDates(start,end); | 65 | setDates(start,end); |
66 | setFocusProxy(comboDescription); | 66 | setFocusProxy(comboDescription); |
67 | } | 67 | } |
68 | 68 | ||
69 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) | 69 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) |
70 | { | 70 | { |
71 | if( ev->type() == QEvent::FocusIn ){ | 71 | if( ev->type() == QEvent::FocusIn ){ |
72 | if( obj == comboStart ){ | 72 | if( obj == comboStart ){ |
73 | timePickerStart->setHour(startTime.hour()); | 73 | timePickerStart->setHour(startTime.hour()); |
74 | timePickerStart->setMinute(startTime.minute()); | 74 | timePickerStart->setMinute(startTime.minute()); |
75 | TimePickerLabel->setText( tr("Start Time" ) ); | 75 | TimePickerLabel->setText( tr("Start Time" ) ); |
76 | m_showStart= true; | 76 | m_showStart= true; |
77 | }else if( obj == comboEnd ){ | 77 | }else if( obj == comboEnd ){ |
78 | timePickerStart->setHour(endTime.hour()); | 78 | timePickerStart->setHour(endTime.hour()); |
79 | timePickerStart->setMinute(endTime.minute()); | 79 | timePickerStart->setMinute(endTime.minute()); |
80 | TimePickerLabel->setText( tr("End Time") ); | 80 | TimePickerLabel->setText( tr("End Time") ); |
81 | m_showStart = false; | 81 | m_showStart = false; |
82 | } | 82 | } |
83 | } else if( ev->type() == QEvent::FocusOut ){ | 83 | } else if( ev->type() == QEvent::FocusOut ){ |
84 | if( obj == comboEnd ){ | 84 | if( obj == comboEnd ){ |
85 | QString s; | 85 | QString s; |
86 | s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute()); | 86 | s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute()); |
87 | comboEnd->setText(s); | 87 | comboEnd->setText(s); |
88 | } | 88 | } |
89 | else if( obj == comboStart ){ | 89 | else if( obj == comboStart ){ |
90 | QString s; | 90 | QString s; |
91 | s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); | 91 | s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); |
92 | comboStart->setText(s); | 92 | comboStart->setText(s); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ||
96 | return false; | 96 | return false; |
97 | } | 97 | } |
98 | 98 | ||
99 | static void addOrPick( QComboBox* combo, const QString& t ) | 99 | static void addOrPick( QComboBox* combo, const QString& t ) |
100 | { | 100 | { |
101 | // Pick an item if one excists | 101 | // Pick an item if one excists |
102 | for (int i=0; i<combo->count(); i++) { | 102 | for (int i=0; i<combo->count(); i++) { |
103 | if ( combo->text(i) == t ) { | 103 | if ( combo->text(i) == t ) { |
104 | combo->setCurrentItem(i); | 104 | combo->setCurrentItem(i); |
105 | return; | 105 | return; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | // Else add one | 109 | // Else add one |
110 | combo->insertItem(t); | 110 | combo->insertItem(t); |
111 | combo->setCurrentItem(combo->count()-1); | 111 | combo->setCurrentItem(combo->count()-1); |
112 | } | 112 | } |
113 | 113 | ||
114 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, | 114 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, |
115 | QWidget* parent, const char* name ) | 115 | QWidget* parent, const char* name ) |
116 | : DateEntryBase( parent, name ), | 116 | : DateEntryBase( parent, name ), |
117 | ampm( whichClock ), | 117 | ampm( whichClock ), |
118 | startWeekOnMonday( startOnMonday ), | 118 | startWeekOnMonday( startOnMonday ), |
119 | m_showStart(true) | 119 | m_showStart(true) |
120 | 120 | ||
121 | { | 121 | { |
122 | init(); | 122 | init(); |
123 | setDates(event.start(),event.end()); | 123 | setDates(event.start(),event.end()); |
124 | comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); | 124 | comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); |
125 | if(!event.description().isEmpty()) | 125 | if(!event.description().isEmpty()) |
126 | addOrPick( comboDescription, event.description() ); | 126 | addOrPick( comboDescription, event.description() ); |
127 | if(!event.location().isEmpty()) | 127 | if(!event.location().isEmpty()) |
128 | addOrPick( comboLocation, event.location() ); | 128 | addOrPick( comboLocation, event.location() ); |
129 | checkAlarm->setChecked( event.hasAlarm() ); | 129 | checkAlarm->setChecked( event.hasAlarm() ); |
130 | checkAllDay->setChecked( event.type() == Event::AllDay ); | 130 | checkAllDay->setChecked( event.type() == Event::AllDay ); |
131 | if(!event.notes().isEmpty()) | 131 | if(!event.notes().isEmpty()) noteStr=event.notes(); |
132 | editNote->setText(event.notes()); | 132 | else noteStr=""; |
133 | spinAlarm->setValue(event.alarmTime()); | 133 | spinAlarm->setValue(event.alarmTime()); |
134 | if ( event.alarmSound() != Event::Silent ) | 134 | if ( event.alarmSound() != Event::Silent ) |
135 | comboSound->setCurrentItem( 1 ); | 135 | comboSound->setCurrentItem( 1 ); |
136 | if ( event.hasRepeat() ) { | 136 | if ( event.hasRepeat() ) { |
137 | rp = event.repeatPattern(); | 137 | rp = event.repeatPattern(); |
138 | cmdRepeat->setText( tr("Repeat...") ); | 138 | cmdRepeat->setText( tr("Repeat...") ); |
139 | } | 139 | } |
140 | setRepeatLabel(); | 140 | setRepeatLabel(); |
141 | } | 141 | } |
142 | 142 | ||
143 | void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) | 143 | void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) |
144 | { | 144 | { |
145 | startDate = s.date(); | 145 | startDate = s.date(); |
146 | endDate = e.date(); | 146 | endDate = e.date(); |
147 | startTime = s.time(); | 147 | startTime = s.time(); |
148 | endTime = e.time(); | 148 | endTime = e.time(); |
149 | 149 | ||
150 | startDateChanged( s.date().year(), s.date().month(), s.date().day() ); | 150 | startDateChanged( s.date().year(), s.date().month(), s.date().day() ); |
151 | endDateChanged( e.date().year(), e.date().month(), e.date().day() ); | 151 | endDateChanged( e.date().year(), e.date().month(), e.date().day() ); |
152 | 152 | ||
153 | updateTimeEdit(true,true); | 153 | updateTimeEdit(true,true); |
154 | } | 154 | } |
155 | 155 | ||
156 | void DateEntry::updateTimeEdit(bool s, bool e) { | 156 | void DateEntry::updateTimeEdit(bool s, bool e) { |
157 | 157 | ||
158 | // Comboboxes | 158 | // Comboboxes |
159 | QString strStart, strEnd; | 159 | QString strStart, strEnd; |
160 | int shour, ehour; | 160 | int shour, ehour; |
161 | if ( ampm ) { | 161 | if ( ampm ) { |
162 | shour = startTime.hour(); | 162 | shour = startTime.hour(); |
163 | ehour = endTime.hour(); | 163 | ehour = endTime.hour(); |
164 | if ( shour >= 12 ) { | 164 | if ( shour >= 12 ) { |
165 | if ( shour > 12 ) | 165 | if ( shour > 12 ) |
166 | shour -= 12; | 166 | shour -= 12; |
167 | strStart.sprintf( "%d:%02d PM", shour, startTime.minute() ); | 167 | strStart.sprintf( "%d:%02d PM", shour, startTime.minute() ); |
168 | } else { | 168 | } else { |
169 | if ( shour == 0 ) | 169 | if ( shour == 0 ) |
170 | shour = 12; | 170 | shour = 12; |
171 | strStart.sprintf( "%d:%02d AM", shour, startTime.minute() ); | 171 | strStart.sprintf( "%d:%02d AM", shour, startTime.minute() ); |
172 | } | 172 | } |
173 | if ( ehour == 24 && endTime.minute() == 0 ) { | 173 | if ( ehour == 24 && endTime.minute() == 0 ) { |
174 | strEnd = "11:59 PM"; // or "midnight" | 174 | strEnd = "11:59 PM"; // or "midnight" |
175 | } else if ( ehour >= 12 ) { | 175 | } else if ( ehour >= 12 ) { |
176 | if ( ehour > 12 ) | 176 | if ( ehour > 12 ) |
177 | ehour -= 12; | 177 | ehour -= 12; |
178 | strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() ); | 178 | strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() ); |
179 | } else { | 179 | } else { |
180 | if ( ehour == 0 ) | 180 | if ( ehour == 0 ) |
181 | ehour = 12; | 181 | ehour = 12; |
182 | strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); | 182 | strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); |
183 | } | 183 | } |
184 | } else { | 184 | } else { |
185 | strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); | 185 | strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); |
186 | strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); | 186 | strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); |
187 | } | 187 | } |
188 | 188 | ||
189 | if (s) comboStart->setText(strStart); | 189 | if (s) comboStart->setText(strStart); |
190 | if (e) comboEnd->setText(strEnd); | 190 | if (e) comboEnd->setText(strEnd); |
191 | } | 191 | } |
192 | 192 | ||
193 | void DateEntry::init() | 193 | void DateEntry::init() |
194 | { | 194 | { |
195 | comboDescription->setInsertionPolicy(QComboBox::AtCurrent); | 195 | comboDescription->setInsertionPolicy(QComboBox::AtCurrent); |
196 | comboLocation->setInsertionPolicy(QComboBox::AtCurrent); | 196 | comboLocation->setInsertionPolicy(QComboBox::AtCurrent); |
197 | 197 | ||
198 | initCombos(); | 198 | initCombos(); |
199 | QPopupMenu *m1 = new QPopupMenu( this ); | 199 | QPopupMenu *m1 = new QPopupMenu( this ); |
200 | startPicker = new DateBookMonth( m1, 0, TRUE ); | 200 | startPicker = new DateBookMonth( m1, 0, TRUE ); |
201 | m1->insertItem( startPicker ); | 201 | m1->insertItem( startPicker ); |
202 | buttonStart->setPopup( m1 ); | 202 | buttonStart->setPopup( m1 ); |
203 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), | 203 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), |
204 | this, SLOT( startDateChanged( int, int, int ) ) ); | 204 | this, SLOT( startDateChanged( int, int, int ) ) ); |
205 | 205 | ||
206 | //Let start button change both start and end dates | 206 | //Let start button change both start and end dates |
207 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), | 207 | connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), |
208 | this, SLOT( endDateChanged( int, int, int ) ) ); | 208 | this, SLOT( endDateChanged( int, int, int ) ) ); |
209 | connect( qApp, SIGNAL( clockChanged( bool ) ), | 209 | connect( qApp, SIGNAL( clockChanged( bool ) ), |
210 | this, SLOT( slotChangeClock( bool ) ) ); | 210 | this, SLOT( slotChangeClock( bool ) ) ); |
211 | connect( qApp, SIGNAL(weekChanged(bool)), | 211 | connect( qApp, SIGNAL(weekChanged(bool)), |
212 | this, SLOT(slotChangeStartOfWeek(bool)) ); | 212 | this, SLOT(slotChangeStartOfWeek(bool)) ); |
213 | |||
214 | connect( editNote, SIGNAL(clicked()), | ||
215 | this, SLOT(slotEditNote()) ); | ||
213 | 216 | ||
214 | QPopupMenu *m2 = new QPopupMenu( this ); | 217 | QPopupMenu *m2 = new QPopupMenu( this ); |
215 | endPicker = new DateBookMonth( m2, 0, TRUE ); | 218 | endPicker = new DateBookMonth( m2, 0, TRUE ); |
216 | m2->insertItem( endPicker ); | 219 | m2->insertItem( endPicker ); |
217 | buttonEnd->setPopup( m2 ); | 220 | buttonEnd->setPopup( m2 ); |
218 | connect( endPicker, SIGNAL( dateClicked( int, int, int ) ), | 221 | connect( endPicker, SIGNAL( dateClicked( int, int, int ) ), |
219 | this, SLOT( endDateChanged( int, int, int ) ) ); | 222 | this, SLOT( endDateChanged( int, int, int ) ) ); |
220 | 223 | ||
221 | connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ), | 224 | connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ), |
222 | this, SLOT( startTimePicked(const QTime &) )); | 225 | this, SLOT( startTimePicked(const QTime &) )); |
223 | editNote->setFixedVisibleLines(3); | ||
224 | // install eventFilters | 226 | // install eventFilters |
225 | comboEnd->installEventFilter( this ); | 227 | comboEnd->installEventFilter( this ); |
226 | comboStart->installEventFilter( this ); | 228 | comboStart->installEventFilter( this ); |
227 | } | 229 | } |
228 | 230 | ||
229 | /* | 231 | /* |
230 | * Destroys the object and frees any allocated resources | 232 | * Destroys the object and frees any allocated resources |
231 | */ | 233 | */ |
232 | DateEntry::~DateEntry() | 234 | DateEntry::~DateEntry() |
233 | { | 235 | { |
234 | // no need to delete child widgets, Qt does it all for us | 236 | // no need to delete child widgets, Qt does it all for us |
235 | //cout << "Del: " << comboStart->currentText() << endl; | 237 | //cout << "Del: " << comboStart->currentText() << endl; |
236 | } | 238 | } |
237 | 239 | ||
238 | /* | 240 | /* |
239 | * public slot | 241 | * public slot |
240 | */ | 242 | */ |
243 | |||
244 | void DateEntry::slotEditNote() { | ||
245 | QString s; | ||
246 | s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); | ||
247 | NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, | ||
248 | this,0,TRUE); | ||
249 | |||
250 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | ||
251 | noteDlg.showMaximized(); | ||
252 | #endif | ||
253 | if (noteDlg.exec() ) { | ||
254 | noteStr=noteDlg.note->text(); | ||
255 | } | ||
256 | |||
257 | } | ||
258 | |||
241 | void DateEntry::endDateChanged( int y, int m, int d ) | 259 | void DateEntry::endDateChanged( int y, int m, int d ) |
242 | { | 260 | { |
243 | endDate.setYMD( y, m, d ); | 261 | endDate.setYMD( y, m, d ); |
244 | if ( endDate < startDate ) { | 262 | if ( endDate < startDate ) { |
245 | endDate = startDate; | 263 | endDate = startDate; |
246 | } | 264 | } |
247 | 265 | ||
248 | buttonEnd->setText( TimeString::shortDate( endDate ) ); | 266 | buttonEnd->setText( TimeString::shortDate( endDate ) ); |
249 | 267 | ||
250 | endPicker->setDate( endDate.year(), endDate.month(), endDate.day() ); | 268 | endPicker->setDate( endDate.year(), endDate.month(), endDate.day() ); |
251 | } | 269 | } |
252 | 270 | ||
253 | static QTime parseTime( const QString& s, bool ampm ) | 271 | static QTime parseTime( const QString& s, bool ampm ) |
254 | { | 272 | { |
255 | QTime tmpTime; | 273 | QTime tmpTime; |
256 | QStringList l = QStringList::split( ':', s ); | 274 | QStringList l = QStringList::split( ':', s ); |
257 | int hour = l[0].toInt(); | 275 | int hour = l[0].toInt(); |
258 | if ( ampm ) { | 276 | if ( ampm ) { |
259 | int i=0; | 277 | int i=0; |
260 | while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9') | 278 | while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9') |
261 | i++; | 279 | i++; |
262 | QString digits = l[1].left(i); | 280 | QString digits = l[1].left(i); |
263 | if ( l[1].contains( "PM", FALSE ) ) { | 281 | if ( l[1].contains( "PM", FALSE ) ) { |
264 | if ( hour != 12 ) | 282 | if ( hour != 12 ) |
265 | hour += 12; | 283 | hour += 12; |
266 | } else { | 284 | } else { |
267 | if ( hour == 12 ) | 285 | if ( hour == 12 ) |
268 | hour = 0; | 286 | hour = 0; |
269 | } | 287 | } |
270 | l[1] = digits; | 288 | l[1] = digits; |
271 | } | 289 | } |
272 | int minute = l[1].toInt(); | 290 | int minute = l[1].toInt(); |
273 | if ( minute > 59 ) | 291 | if ( minute > 59 ) |
274 | minute = 59; | 292 | minute = 59; |
275 | else if ( minute < 0 ) | 293 | else if ( minute < 0 ) |
276 | minute = 0; | 294 | minute = 0; |
277 | if ( hour > 23 ) { | 295 | if ( hour > 23 ) { |
278 | hour = 23; | 296 | hour = 23; |
279 | minute = 59; | 297 | minute = 59; |
280 | } else if ( hour < 0 ) | 298 | } else if ( hour < 0 ) |
281 | hour = 0; | 299 | hour = 0; |
282 | tmpTime.setHMS( hour, minute, 0 ); | 300 | tmpTime.setHMS( hour, minute, 0 ); |
283 | return tmpTime; | 301 | return tmpTime; |
284 | } | 302 | } |
285 | 303 | ||
286 | /* | 304 | /* |
287 | * public slot | 305 | * public slot |
288 | */ | 306 | */ |
289 | void DateEntry::endTimeChanged( const QString &s ) | 307 | void DateEntry::endTimeChanged( const QString &s ) |
290 | { | 308 | { |
291 | endTimeChanged( parseTime(s,ampm) ); | 309 | endTimeChanged( parseTime(s,ampm) ); |
292 | } | 310 | } |
293 | 311 | ||
294 | void DateEntry::endTimeChanged( const QTime &t ) { | 312 | void DateEntry::endTimeChanged( const QTime &t ) { |
295 | if ( endDate > startDate || t >= startTime ) { | 313 | if ( endDate > startDate || t >= startTime ) { |
296 | endTime = t; | 314 | endTime = t; |
297 | } else { | 315 | } else { |
298 | endTime = startTime; | 316 | endTime = startTime; |
299 | //comboEnd->setCurrentItem( comboStart->currentItem() ); | 317 | //comboEnd->setCurrentItem( comboStart->currentItem() ); |
300 | } | 318 | } |
301 | timePickerStart->setHour(endTime.hour()); | 319 | timePickerStart->setHour(endTime.hour()); |
302 | timePickerStart->setMinute(endTime.minute()); | 320 | timePickerStart->setMinute(endTime.minute()); |
303 | } | 321 | } |
304 | 322 | ||
305 | /* | 323 | /* |
306 | * public slot | 324 | * public slot |
307 | */ | 325 | */ |
308 | void DateEntry::startDateChanged( int y, int m, int d ) | 326 | void DateEntry::startDateChanged( int y, int m, int d ) |
309 | { | 327 | { |
310 | QDate prev = startDate; | 328 | QDate prev = startDate; |
311 | startDate.setYMD( y, m, d ); | 329 | startDate.setYMD( y, m, d ); |
312 | if ( rp.type == Event::Weekly && | 330 | if ( rp.type == Event::Weekly && |
313 | startDate.dayOfWeek() != prev.dayOfWeek() ) { | 331 | startDate.dayOfWeek() != prev.dayOfWeek() ) { |
314 | // if we change the start of a weekly repeating event | 332 | // if we change the start of a weekly repeating event |
315 | // set the repeating day appropriately | 333 | // set the repeating day appropriately |
316 | char mask = 1 << (prev.dayOfWeek()-1); | 334 | char mask = 1 << (prev.dayOfWeek()-1); |
317 | rp.days &= (~mask); | 335 | rp.days &= (~mask); |
318 | rp.days |= 1 << (startDate.dayOfWeek()-1); | 336 | rp.days |= 1 << (startDate.dayOfWeek()-1); |
319 | } | 337 | } |
320 | 338 | ||
321 | buttonStart->setText( TimeString::shortDate( startDate ) ); | 339 | buttonStart->setText( TimeString::shortDate( startDate ) ); |
322 | 340 | ||
323 | // our pickers must be reset... | 341 | // our pickers must be reset... |
324 | startPicker->setDate( y, m, d ); | 342 | startPicker->setDate( y, m, d ); |
325 | endPicker->setDate( y, m, d ); | 343 | endPicker->setDate( y, m, d ); |
326 | } | 344 | } |
327 | 345 | ||
328 | /* | 346 | /* |
329 | * public slot | 347 | * public slot |
330 | */ | 348 | */ |
331 | void DateEntry::startTimeEdited( const QString &s ) | 349 | void DateEntry::startTimeEdited( const QString &s ) |
332 | { | 350 | { |
333 | startTimeChanged(parseTime(s,ampm)); | 351 | startTimeChanged(parseTime(s,ampm)); |
334 | updateTimeEdit(false,true); | 352 | updateTimeEdit(false,true); |
335 | timePickerStart->setHour(startTime.hour()); | 353 | timePickerStart->setHour(startTime.hour()); |
336 | timePickerStart->setMinute(startTime.minute()); | 354 | timePickerStart->setMinute(startTime.minute()); |
337 | } | 355 | } |
338 | 356 | ||
339 | void DateEntry::startTimeChanged( const QTime &t ) | 357 | void DateEntry::startTimeChanged( const QTime &t ) |
340 | { | 358 | { |
341 | int duration=startTime.secsTo(endTime); | 359 | int duration=startTime.secsTo(endTime); |
342 | startTime = t; | 360 | startTime = t; |
343 | endTime=t.addSecs(duration); | 361 | endTime=t.addSecs(duration); |
344 | } | 362 | } |
345 | void DateEntry::startTimePicked( const QTime &t ) { | 363 | void DateEntry::startTimePicked( const QTime &t ) { |
346 | if(m_showStart ){ | 364 | if(m_showStart ){ |
347 | startTimeChanged(t); | 365 | startTimeChanged(t); |
348 | updateTimeEdit(true,true); | 366 | updateTimeEdit(true,true); |
349 | }else{ | 367 | }else{ |
350 | endTimeChanged(t); | 368 | endTimeChanged(t); |
351 | updateTimeEdit(false, true ); | 369 | updateTimeEdit(false, true ); |
352 | } | 370 | } |
353 | } | 371 | } |
354 | 372 | ||
355 | /* | 373 | /* |
356 | * public slot | 374 | * public slot |
357 | */ | 375 | */ |
358 | void DateEntry::typeChanged( const QString &s ) | 376 | void DateEntry::typeChanged( const QString &s ) |
359 | { | 377 | { |
360 | bool b = s != "All Day"; | 378 | bool b = s != "All Day"; |
361 | buttonStart->setEnabled( b ); | 379 | buttonStart->setEnabled( b ); |
362 | comboStart->setEnabled( b ); | 380 | comboStart->setEnabled( b ); |
363 | comboEnd->setEnabled( b ); | 381 | comboEnd->setEnabled( b ); |
364 | } | 382 | } |
365 | 383 | ||
366 | void DateEntry::slotRepeat() | 384 | void DateEntry::slotRepeat() |
367 | { | 385 | { |
368 | // Work around for compiler Bug.. | 386 | // Work around for compiler Bug.. |
369 | RepeatEntry *e; | 387 | RepeatEntry *e; |
370 | 388 | ||
371 | // it is better in my opinion to just grab this from the mother, | 389 | // it is better in my opinion to just grab this from the mother, |
372 | // since, this dialog doesn't need to keep track of it... | 390 | // since, this dialog doesn't need to keep track of it... |
373 | if ( rp.type != Event::NoRepeat ) | 391 | if ( rp.type != Event::NoRepeat ) |
374 | e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); | 392 | e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); |
375 | else | 393 | else |
376 | e = new RepeatEntry( startWeekOnMonday, startDate, this ); | 394 | e = new RepeatEntry( startWeekOnMonday, startDate, this ); |
377 | 395 | ||
378 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 396 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
379 | e->showMaximized(); | 397 | e->showMaximized(); |
380 | #endif | 398 | #endif |
381 | if ( e->exec() ) { | 399 | if ( e->exec() ) { |
382 | rp = e->repeatPattern(); | 400 | rp = e->repeatPattern(); |
383 | setRepeatLabel(); | 401 | setRepeatLabel(); |
384 | } | 402 | } |
385 | } | 403 | } |
386 | 404 | ||
387 | void DateEntry::slotChangeStartOfWeek( bool onMonday ) | 405 | void DateEntry::slotChangeStartOfWeek( bool onMonday ) |
388 | { | 406 | { |
389 | startWeekOnMonday = onMonday; | 407 | startWeekOnMonday = onMonday; |
390 | } | 408 | } |
391 | 409 | ||
392 | Event DateEntry::event() | 410 | Event DateEntry::event() |
393 | { | 411 | { |
394 | Event ev; | 412 | Event ev; |
395 | Event::SoundTypeChoice st; | 413 | Event::SoundTypeChoice st; |
396 | ev.setDescription( comboDescription->currentText() ); | 414 | ev.setDescription( comboDescription->currentText() ); |
397 | ev.setLocation( comboLocation->currentText() ); | 415 | ev.setLocation( comboLocation->currentText() ); |
398 | ev.setCategories( comboCategory->currentCategories() ); | 416 | ev.setCategories( comboCategory->currentCategories() ); |
399 | ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal ); | 417 | ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal ); |
400 | if ( startDate > endDate ) { | 418 | if ( startDate > endDate ) { |
401 | QDate tmp = endDate; | 419 | QDate tmp = endDate; |
402 | endDate = startDate; | 420 | endDate = startDate; |
403 | startDate = tmp; | 421 | startDate = tmp; |
404 | } | 422 | } |
405 | 423 | ||
406 | // This is now done in the changed slots | 424 | // This is now done in the changed slots |
407 | // startTime = parseTime( comboStart->text(), ampm ); | 425 | // startTime = parseTime( comboStart->text(), ampm ); |
408 | //endTime = parseTime( comboEnd->text(), ampm ); | 426 | //endTime = parseTime( comboEnd->text(), ampm ); |
409 | 427 | ||
410 | if ( startTime > endTime && endDate == startDate ) { | 428 | if ( startTime > endTime && endDate == startDate ) { |
411 | QTime tmp = endTime; | 429 | QTime tmp = endTime; |
412 | endTime = startTime; | 430 | endTime = startTime; |
413 | startTime = tmp; | 431 | startTime = tmp; |
414 | } | 432 | } |
415 | // don't set the time if theres no need too | 433 | // don't set the time if theres no need too |
416 | if ( ev.type() == Event::AllDay ) { | 434 | if ( ev.type() == Event::AllDay ) { |
417 | startTime.setHMS( 0, 0, 0 ); | 435 | startTime.setHMS( 0, 0, 0 ); |
418 | endTime.setHMS( 23, 59, 59 ); | 436 | endTime.setHMS( 23, 59, 59 ); |
419 | } | 437 | } |
420 | 438 | ||
421 | // adjust start and end times based on timezone | 439 | // adjust start and end times based on timezone |
422 | QDateTime start( startDate, startTime ); | 440 | QDateTime start( startDate, startTime ); |
423 | QDateTime end( endDate, endTime ); | 441 | QDateTime end( endDate, endTime ); |
424 | time_t start_utc, end_utc; | 442 | time_t start_utc, end_utc; |
425 | 443 | ||
426 | // qDebug( "tz: %s", timezone->currentZone().latin1() ); | 444 | // qDebug( "tz: %s", timezone->currentZone().latin1() ); |
427 | 445 | ||
428 | // get real timezone | 446 | // get real timezone |
429 | QString realTZ; | 447 | QString realTZ; |
430 | realTZ = QString::fromLocal8Bit( getenv("TZ") ); | 448 | realTZ = QString::fromLocal8Bit( getenv("TZ") ); |
431 | 449 | ||
432 | // set timezone | 450 | // set timezone |
433 | if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) | 451 | if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) |
434 | qWarning( "There was a problem setting the timezone." ); | 452 | qWarning( "There was a problem setting the timezone." ); |
435 | 453 | ||
436 | // convert to UTC based on selected TZ (calling tzset internally) | 454 | // convert to UTC based on selected TZ (calling tzset internally) |
437 | start_utc = TimeConversion::toUTC( start ); | 455 | start_utc = TimeConversion::toUTC( start ); |
438 | end_utc = TimeConversion::toUTC( end ); | 456 | end_utc = TimeConversion::toUTC( end ); |
439 | 457 | ||
440 | // done playing around... put it all back | 458 | // done playing around... put it all back |
441 | unsetenv( "TZ" ); | 459 | unsetenv( "TZ" ); |
442 | if ( !realTZ.isNull() ) | 460 | if ( !realTZ.isNull() ) |
443 | if ( setenv( "TZ", realTZ, true ) != 0 ) | 461 | if ( setenv( "TZ", realTZ, true ) != 0 ) |
444 | qWarning( "There was a problem setting the timezone." ); | 462 | qWarning( "There was a problem setting the timezone." ); |
445 | 463 | ||
446 | // convert UTC to local time (calling tzset internally) | 464 | // convert UTC to local time (calling tzset internally) |
447 | ev.setStart( TimeConversion::fromUTC( start_utc ) ); | 465 | ev.setStart( TimeConversion::fromUTC( start_utc ) ); |
448 | ev.setEnd( TimeConversion::fromUTC( end_utc ) ); | 466 | ev.setEnd( TimeConversion::fromUTC( end_utc ) ); |
449 | 467 | ||
450 | // we only have one type of sound at the moment... LOUD!!! | 468 | // we only have one type of sound at the moment... LOUD!!! |
451 | if ( comboSound->currentItem() != 0 ) | 469 | if ( comboSound->currentItem() != 0 ) |
452 | st = Event::Loud; | 470 | st = Event::Loud; |
453 | else | 471 | else |
454 | st = Event::Silent; | 472 | st = Event::Silent; |
455 | ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st ); | 473 | ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st ); |
456 | if ( rp.type != Event::NoRepeat ) | 474 | if ( rp.type != Event::NoRepeat ) |
457 | ev.setRepeat( TRUE, rp ); | 475 | ev.setRepeat( TRUE, rp ); |
458 | ev.setNotes( editNote->text() ); | 476 | ev.setNotes( noteStr ); |
459 | 477 | ||
460 | //cout << "Start: " << comboStart->currentText() << endl; | 478 | //cout << "Start: " << comboStart->currentText() << endl; |
461 | 479 | ||
462 | return ev; | 480 | return ev; |
463 | } | 481 | } |
464 | 482 | ||
465 | void DateEntry::setRepeatLabel() | 483 | void DateEntry::setRepeatLabel() |
466 | { | 484 | { |
467 | 485 | ||
468 | switch( rp.type ) { | 486 | switch( rp.type ) { |
469 | case Event::Daily: | 487 | case Event::Daily: |
470 | cmdRepeat->setText( tr("Daily...") ); | 488 | cmdRepeat->setText( tr("Daily...") ); |
471 | break; | 489 | break; |
472 | case Event::Weekly: | 490 | case Event::Weekly: |
473 | cmdRepeat->setText( tr("Weekly...") ); | 491 | cmdRepeat->setText( tr("Weekly...") ); |
474 | break; | 492 | break; |
475 | case Event::MonthlyDay: | 493 | case Event::MonthlyDay: |
476 | case Event::MonthlyDate: | 494 | case Event::MonthlyDate: |
477 | cmdRepeat->setText( tr("Monthly...") ); | 495 | cmdRepeat->setText( tr("Monthly...") ); |
478 | break; | 496 | break; |
479 | case Event::Yearly: | 497 | case Event::Yearly: |
480 | cmdRepeat->setText( tr("Yearly...") ); | 498 | cmdRepeat->setText( tr("Yearly...") ); |
481 | break; | 499 | break; |
482 | default: | 500 | default: |
483 | cmdRepeat->setText( tr("No Repeat...") ); | 501 | cmdRepeat->setText( tr("No Repeat...") ); |
484 | } | 502 | } |
485 | } | 503 | } |
486 | 504 | ||
487 | void DateEntry::setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice sound ) | 505 | void DateEntry::setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice sound ) |
488 | { | 506 | { |
489 | checkAlarm->setChecked( alarmPreset ); | 507 | checkAlarm->setChecked( alarmPreset ); |
490 | spinAlarm->setValue( presetTime ); | 508 | spinAlarm->setValue( presetTime ); |
491 | if ( sound != Event::Silent ) | 509 | if ( sound != Event::Silent ) |
492 | comboSound->setCurrentItem( 1 ); | 510 | comboSound->setCurrentItem( 1 ); |
493 | else | 511 | else |
494 | comboSound->setCurrentItem( 0 ); | 512 | comboSound->setCurrentItem( 0 ); |
495 | } | 513 | } |
496 | 514 | ||
497 | void DateEntry::initCombos() | 515 | void DateEntry::initCombos() |
498 | { | 516 | { |
499 | /* | 517 | /* |
500 | comboStart->clear(); | 518 | comboStart->clear(); |
501 | comboEnd->clear(); | 519 | comboEnd->clear(); |
502 | if ( ampm ) { | 520 | if ( ampm ) { |
503 | for ( int i = 0; i < 24; i++ ) { | 521 | for ( int i = 0; i < 24; i++ ) { |
504 | if ( i == 0 ) { | 522 | if ( i == 0 ) { |
505 | comboStart->insertItem( "12:00 AM" ); | 523 | comboStart->insertItem( "12:00 AM" ); |
506 | comboStart->insertItem( "12:30 AM" ); | 524 | comboStart->insertItem( "12:30 AM" ); |
507 | comboEnd->insertItem( "12:00 AM" ); | 525 | comboEnd->insertItem( "12:00 AM" ); |
508 | comboEnd->insertItem( "12:30 AM" ); | 526 | comboEnd->insertItem( "12:30 AM" ); |
509 | } else if ( i == 12 ) { | 527 | } else if ( i == 12 ) { |
510 | comboStart->insertItem( "12:00 PM" ); | 528 | comboStart->insertItem( "12:00 PM" ); |
511 | comboStart->insertItem( "12:30 PM" ); | 529 | comboStart->insertItem( "12:30 PM" ); |
512 | comboEnd->insertItem( "12:00 PM" ); | 530 | comboEnd->insertItem( "12:00 PM" ); |
513 | comboEnd->insertItem( "12:30 PM" ); | 531 | comboEnd->insertItem( "12:30 PM" ); |
514 | } else if ( i > 12 ) { | 532 | } else if ( i > 12 ) { |
515 | comboStart->insertItem( QString::number( i - 12 ) + ":00 PM" ); | 533 | comboStart->insertItem( QString::number( i - 12 ) + ":00 PM" ); |
516 | comboStart->insertItem( QString::number( i - 12 ) + ":30 PM" ); | 534 | comboStart->insertItem( QString::number( i - 12 ) + ":30 PM" ); |
517 | comboEnd->insertItem( QString::number( i - 12 ) + ":00 PM" ); | 535 | comboEnd->insertItem( QString::number( i - 12 ) + ":00 PM" ); |
518 | comboEnd->insertItem( QString::number( i - 12 ) + ":30 PM" ); | 536 | comboEnd->insertItem( QString::number( i - 12 ) + ":30 PM" ); |
519 | } else { | 537 | } else { |
520 | comboStart->insertItem( QString::number( i) + ":00 AM" ); | 538 | comboStart->insertItem( QString::number( i) + ":00 AM" ); |
521 | comboStart->insertItem( QString::number( i ) + ":30 AM" ); | 539 | comboStart->insertItem( QString::number( i ) + ":30 AM" ); |
522 | comboEnd->insertItem( QString::number( i ) + ":00 AM" ); | 540 | comboEnd->insertItem( QString::number( i ) + ":00 AM" ); |
523 | comboEnd->insertItem( QString::number( i ) + ":30 AM" ); | 541 | comboEnd->insertItem( QString::number( i ) + ":30 AM" ); |
524 | } | 542 | } |
525 | } | 543 | } |
526 | } else { | 544 | } else { |
527 | for ( int i = 0; i < 24; i++ ) { | 545 | for ( int i = 0; i < 24; i++ ) { |
528 | if ( i < 10 ) { | 546 | if ( i < 10 ) { |
529 | comboStart->insertItem( QString("0") | 547 | comboStart->insertItem( QString("0") |
530 | + QString::number(i) + ":00" ); | 548 | + QString::number(i) + ":00" ); |
531 | comboStart->insertItem( QString("0") | 549 | comboStart->insertItem( QString("0") |
532 | + QString::number(i) + ":30" ); | 550 | + QString::number(i) + ":30" ); |
533 | comboEnd->insertItem( QString("0") | 551 | comboEnd->insertItem( QString("0") |
534 | + QString::number(i) + ":00" ); | 552 | + QString::number(i) + ":00" ); |
535 | comboEnd->insertItem( QString("0") | 553 | comboEnd->insertItem( QString("0") |
536 | + QString::number(i) + ":30" ); | 554 | + QString::number(i) + ":30" ); |
537 | } else { | 555 | } else { |
538 | comboStart->insertItem( QString::number(i) + ":00" ); | 556 | comboStart->insertItem( QString::number(i) + ":00" ); |
539 | comboStart->insertItem( QString::number(i) + ":30" ); | 557 | comboStart->insertItem( QString::number(i) + ":30" ); |
540 | comboEnd->insertItem( QString::number(i) + ":00" ); | 558 | comboEnd->insertItem( QString::number(i) + ":00" ); |
541 | comboEnd->insertItem( QString::number(i) + ":30" ); | 559 | comboEnd->insertItem( QString::number(i) + ":30" ); |
542 | } | 560 | } |
543 | } | 561 | } |
544 | } | 562 | } |
545 | */ | 563 | */ |
546 | } | 564 | } |
547 | 565 | ||
548 | void DateEntry::slotChangeClock( bool whichClock ) | 566 | void DateEntry::slotChangeClock( bool whichClock ) |
549 | { | 567 | { |
550 | ampm = whichClock; | 568 | ampm = whichClock; |
551 | initCombos(); | 569 | initCombos(); |
552 | setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); | 570 | setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); |
553 | } | 571 | } |
diff --git a/core/pim/datebook/dateentryimpl.h b/core/pim/datebook/dateentryimpl.h index 4eb24b4..a3c4668 100644 --- a/core/pim/datebook/dateentryimpl.h +++ b/core/pim/datebook/dateentryimpl.h | |||
@@ -1,75 +1,79 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef DATEENTRY_H | 20 | #ifndef DATEENTRY_H |
21 | #define DATEENTRY_H | 21 | #define DATEENTRY_H |
22 | 22 | ||
23 | #include "dateentry.h" | 23 | #include "dateentry.h" |
24 | #include "noteentryimpl.h" | ||
24 | 25 | ||
25 | #include <qpe/event.h> | 26 | #include <qpe/event.h> |
26 | 27 | ||
27 | #include <qdatetime.h> | 28 | #include <qdatetime.h> |
28 | 29 | ||
29 | class DateBookMonth; | 30 | class DateBookMonth; |
30 | 31 | ||
31 | class DateEntry : public DateEntryBase | 32 | class DateEntry : public DateEntryBase |
32 | { | 33 | { |
33 | Q_OBJECT | 34 | Q_OBJECT |
34 | 35 | ||
35 | public: | 36 | public: |
36 | DateEntry( bool startOnMonday, const QDateTime &start, | 37 | DateEntry( bool startOnMonday, const QDateTime &start, |
37 | const QDateTime &end, bool whichClock = FALSE, | 38 | const QDateTime &end, bool whichClock = FALSE, |
38 | QWidget* parent = 0, const char* name = 0 ); | 39 | QWidget* parent = 0, const char* name = 0 ); |
39 | DateEntry( bool startOnMonday, const Event &event, bool whichCLock = FALSE, | 40 | DateEntry( bool startOnMonday, const Event &event, bool whichCLock = FALSE, |
40 | QWidget* parent = 0, const char* name = 0 ); | 41 | QWidget* parent = 0, const char* name = 0 ); |
41 | ~DateEntry(); | 42 | ~DateEntry(); |
42 | 43 | ||
43 | Event event(); | 44 | Event event(); |
44 | void setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice ); | 45 | void setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice ); |
45 | virtual bool eventFilter( QObject *, QEvent * ); | 46 | virtual bool eventFilter( QObject *, QEvent * ); |
46 | public slots: | 47 | public slots: |
47 | void endDateChanged( int, int, int ); | 48 | void endDateChanged( int, int, int ); |
48 | void endTimeChanged( const QString & ); | 49 | void endTimeChanged( const QString & ); |
49 | void endTimeChanged( const QTime & ); | 50 | void endTimeChanged( const QTime & ); |
50 | void startDateChanged(int, int, int); | 51 | void startDateChanged(int, int, int); |
51 | void startTimeEdited( const QString & ); | 52 | void startTimeEdited( const QString & ); |
52 | void startTimeChanged( const QTime & ); | 53 | void startTimeChanged( const QTime & ); |
53 | void startTimePicked( const QTime & ); | 54 | void startTimePicked( const QTime & ); |
54 | void typeChanged( const QString & ); | 55 | void typeChanged( const QString & ); |
55 | void slotRepeat(); | 56 | void slotRepeat(); |
56 | void slotChangeClock( bool ); | 57 | void slotChangeClock( bool ); |
57 | void slotChangeStartOfWeek( bool ); | 58 | void slotChangeStartOfWeek( bool ); |
59 | void slotEditNote(); | ||
58 | 60 | ||
59 | private: | 61 | private: |
60 | void init(); | 62 | void init(); |
61 | void initCombos(); | 63 | void initCombos(); |
62 | void setDates( const QDateTime& s, const QDateTime& e ); | 64 | void setDates( const QDateTime& s, const QDateTime& e ); |
63 | void setRepeatLabel(); | 65 | void setRepeatLabel(); |
64 | void updateTimeEdit(bool,bool); | 66 | void updateTimeEdit(bool,bool); |
65 | 67 | ||
66 | DateBookMonth *startPicker, *endPicker; | 68 | DateBookMonth *startPicker, *endPicker; |
67 | QDate startDate, endDate; | 69 | QDate startDate, endDate; |
68 | QTime startTime, endTime; | 70 | QTime startTime, endTime; |
69 | Event::RepeatPattern rp; | 71 | Event::RepeatPattern rp; |
70 | bool ampm:1; | 72 | bool ampm:1; |
71 | bool startWeekOnMonday:1; | 73 | bool startWeekOnMonday:1; |
72 | bool m_showStart:1; | 74 | bool m_showStart:1; |
75 | |||
76 | QString noteStr; | ||
73 | }; | 77 | }; |
74 | 78 | ||
75 | #endif // DATEENTRY_H | 79 | #endif // DATEENTRY_H |
diff --git a/core/pim/datebook/noteentry.ui b/core/pim/datebook/noteentry.ui new file mode 100644 index 0000000..ce3c4ad --- a/dev/null +++ b/core/pim/datebook/noteentry.ui | |||
@@ -0,0 +1,68 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>NoteEntryBase</class> | ||
3 | <widget> | ||
4 | <class>QDialog</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>NoteEntryBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>465</width> | ||
15 | <height>500</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>Edit Note</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>layoutMargin</name> | ||
24 | </property> | ||
25 | <property> | ||
26 | <name>layoutSpacing</name> | ||
27 | </property> | ||
28 | <vbox> | ||
29 | <property stdset="1"> | ||
30 | <name>margin</name> | ||
31 | <number>2</number> | ||
32 | </property> | ||
33 | <property stdset="1"> | ||
34 | <name>spacing</name> | ||
35 | <number>0</number> | ||
36 | </property> | ||
37 | <widget> | ||
38 | <class>QLabel</class> | ||
39 | <property stdset="1"> | ||
40 | <name>name</name> | ||
41 | <cstring>eventLabel</cstring> | ||
42 | </property> | ||
43 | <property stdset="1"> | ||
44 | <name>text</name> | ||
45 | <string><b>1/10</b> Lunch</string> | ||
46 | </property> | ||
47 | <property stdset="1"> | ||
48 | <name>alignment</name> | ||
49 | <set>AlignCenter</set> | ||
50 | </property> | ||
51 | <property> | ||
52 | <name>hAlign</name> | ||
53 | </property> | ||
54 | </widget> | ||
55 | <widget> | ||
56 | <class>QMultiLineEdit</class> | ||
57 | <property stdset="1"> | ||
58 | <name>name</name> | ||
59 | <cstring>note</cstring> | ||
60 | </property> | ||
61 | <property stdset="1"> | ||
62 | <name>wordWrap</name> | ||
63 | <enum>WidgetWidth</enum> | ||
64 | </property> | ||
65 | </widget> | ||
66 | </vbox> | ||
67 | </widget> | ||
68 | </UI> | ||
diff --git a/core/pim/datebook/noteentryimpl.cpp b/core/pim/datebook/noteentryimpl.cpp new file mode 100644 index 0000000..9e1abb9 --- a/dev/null +++ b/core/pim/datebook/noteentryimpl.cpp | |||
@@ -0,0 +1,16 @@ | |||
1 | #include "noteentryimpl.h" | ||
2 | #include "qstring.h" | ||
3 | #include "qmultilinedit.h" | ||
4 | #include "qlabel.h" | ||
5 | |||
6 | NoteEntry::NoteEntry(const QString &title, const QString ¬eStr, | ||
7 | QWidget* parent, const char* name, bool modal, | ||
8 | WFlags fl) : | ||
9 | NoteEntryBase(parent, name, modal, fl) { | ||
10 | |||
11 | |||
12 | eventLabel->setText(title); | ||
13 | note->setText(noteStr); | ||
14 | int l=note->length(); | ||
15 | note->setCursorPosition(l,l,false); | ||
16 | } | ||
diff --git a/core/pim/datebook/noteentryimpl.h b/core/pim/datebook/noteentryimpl.h new file mode 100644 index 0000000..f3adfa6 --- a/dev/null +++ b/core/pim/datebook/noteentryimpl.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef noteentryimpl_h | ||
2 | #define noteentryimpl_h | ||
3 | |||
4 | #include "noteentry.h" | ||
5 | |||
6 | class QString; | ||
7 | |||
8 | class NoteEntry : public NoteEntryBase | ||
9 | { | ||
10 | Q_OBJECT | ||
11 | |||
12 | public: | ||
13 | NoteEntry(const QString &title, const QString ¬eStr, | ||
14 | QWidget* parent = 0, const char* name = 0, | ||
15 | bool modal=TRUE, WFlags fl=0); | ||
16 | }; | ||
17 | |||
18 | #endif | ||