author | harlekin <harlekin> | 2002-02-20 20:04:58 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-02-20 20:04:58 (UTC) |
commit | 17e96f64d6b66fac5f0e206492149d461e2ad900 (patch) (unidiff) | |
tree | a2af1d60dc0a44e6e7991fc25d5ed8d9646e3620 | |
parent | f5ce2ee04b4b9aed2a93e9a730ad22ced791dfd8 (diff) | |
download | opie-17e96f64d6b66fac5f0e206492149d461e2ad900.zip opie-17e96f64d6b66fac5f0e206492149d461e2ad900.tar.gz opie-17e96f64d6b66fac5f0e206492149d461e2ad900.tar.bz2 |
new release fixing several bugs, look at changelog .-)
-rw-r--r-- | core/pim/today/TODO | 8 | ||||
-rw-r--r-- | core/pim/today/changelog | 9 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 58 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 53 | ||||
-rw-r--r-- | core/pim/today/todaybase.h | 1 |
6 files changed, 73 insertions, 58 deletions
diff --git a/core/pim/today/TODO b/core/pim/today/TODO index 91c933b..95b9b51 100644 --- a/core/pim/today/TODO +++ b/core/pim/today/TODO | |||
@@ -1,15 +1,17 @@ | |||
1 | TODO for today: | 1 | TODO for today: |
2 | 2 | ||
3 | * start the app on "resume" | 3 | * start the app on "resume" |
4 | 4 | ||
5 | * autoupdate | 5 | * show alarm icons on alarm events |
6 | 6 | ||
7 | * fix 23 pm bug (done??) | 7 | * problems with updating |
8 | |||
9 | * add am/pm mode instead of 24 h, take system default | ||
8 | 10 | ||
9 | * add mail support | 11 | * fix 23 pm bug (done??) |
10 | 12 | ||
11 | * scrollbar? | 13 | * scrollbar? |
12 | 14 | ||
13 | * qcop integration for updating events? | 15 | * qcop integration for updating events? |
14 | 16 | ||
15 | * sort todos by pri. \ No newline at end of file | 17 | * sort todos by pri. \ No newline at end of file |
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index dd4cfc1..3f99052 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,30 +1,39 @@ | |||
1 | 0.2.5 | ||
2 | |||
3 | * some other minor fixes regarding autoupdate | ||
4 | * fixed segfault with todolist > 7 entries | ||
5 | * fixed the "ugly grey border around buttons" issue | ||
6 | * fixed the "empty calendar field" "bug" | ||
7 | * shown only later appointments as option | ||
8 | |||
9 | |||
1 | 0.2.4 | 10 | 0.2.4 |
2 | 11 | ||
3 | * added support for email | 12 | * added support for email |
4 | * autoupdates after 1 min | 13 | * autoupdates after 1 min |
5 | * QCopEnvelope instead of system() | 14 | * QCopEnvelope instead of system() |
6 | * starting to use qvbox in gui | 15 | * starting to use qvbox in gui |
7 | 16 | ||
8 | 17 | ||
9 | 0.2.3 | 18 | 0.2.3 |
10 | 19 | ||
11 | * the 4 am release | 20 | * the 4 am release |
12 | * several bugfixes | 21 | * several bugfixes |
13 | 22 | ||
14 | 23 | ||
15 | 0.2.2 | 24 | 0.2.2 |
16 | 25 | ||
17 | * started working on calling other apps | 26 | * started working on calling other apps |
18 | * and finished it | 27 | * and finished it |
19 | 28 | ||
20 | 0.2.1 | 29 | 0.2.1 |
21 | 30 | ||
22 | * images no more inline | 31 | * images no more inline |
23 | * config dialog | 32 | * config dialog |
24 | 33 | ||
25 | 0.1.1 | 34 | 0.1.1 |
26 | 35 | ||
27 | * started changelog. | 36 | * started changelog. |
28 | * fixed segfault on empty/nonexistant todolist.xml | 37 | * fixed segfault on empty/nonexistant todolist.xml |
29 | * better handling for file location | 38 | * better handling for file location |
30 | 39 | ||
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 3362a54..72e8f2b 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png pics/today/mail.png | 1 | Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png pics/today/mail.png |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> | 4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.2.4 | 6 | Version: 0.2.5 |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | License: GPL | 8 | License: GPL |
9 | Description: today screen | 9 | Description: today screen |
10 | A short overview over current appointments and tasks. | 10 | A short overview over current appointments and tasks. |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 7a2d0c9..bed3a74 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -1,399 +1,411 @@ | |||
1 | /* | 1 | /* |
2 | * today.cpp : main class | 2 | * today.cpp : main class |
3 | * | 3 | * |
4 | * --------------------- | 4 | * --------------------- |
5 | * | 5 | * |
6 | * begin : Sun 10 17:20:00 CEST 2002 | 6 | * begin : Sun 10 17:20:00 CEST 2002 |
7 | * copyright : (c) 2002 by Maximilian Reiß | 7 | * copyright : (c) 2002 by Maximilian Reiß |
8 | * email : max.reiss@gmx.de | 8 | * email : max.reiss@gmx.de |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | /*************************************************************************** | 11 | /*************************************************************************** |
12 | * * | 12 | * * |
13 | * This program is free software; you can redistribute it and/or modify * | 13 | * This program is free software; you can redistribute it and/or modify * |
14 | * it under the terms of the GNU General Public License as published by * | 14 | * it under the terms of the GNU General Public License as published by * |
15 | * the Free Software Foundation; either version 2 of the License, or * | 15 | * the Free Software Foundation; either version 2 of the License, or * |
16 | * (at your option) any later version. * | 16 | * (at your option) any later version. * |
17 | * * | 17 | * * |
18 | ***************************************************************************/ | 18 | ***************************************************************************/ |
19 | 19 | ||
20 | #include "today.h" | 20 | #include "today.h" |
21 | #include "minidom.h" | 21 | #include "minidom.h" |
22 | #include "TodoItem.h" | 22 | #include "TodoItem.h" |
23 | 23 | ||
24 | #include <qpe/datebookdb.h> | 24 | #include <qpe/datebookdb.h> |
25 | #include <qpe/timestring.h> | 25 | #include <qpe/timestring.h> |
26 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
27 | #include <qpe/qcopenvelope_qws.h> | 27 | #include <qpe/qcopenvelope_qws.h> |
28 | #include <qpe/qprocess.h> | 28 | #include <qpe/qprocess.h> |
29 | #include <qpe/resource.h> | ||
29 | 30 | ||
30 | #include <qdir.h> | 31 | #include <qdir.h> |
31 | #include <qfile.h> | 32 | #include <qfile.h> |
32 | #include <qdatetime.h> | 33 | #include <qdatetime.h> |
33 | #include <qtextstream.h> | 34 | #include <qtextstream.h> |
34 | #include <qcheckbox.h> | 35 | #include <qcheckbox.h> |
35 | #include <qspinbox.h> | 36 | #include <qspinbox.h> |
36 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
37 | #include <qlabel.h> | 38 | #include <qlabel.h> |
38 | #include <qtimer.h> | 39 | #include <qtimer.h> |
40 | #include <qpixmap.h> | ||
39 | 41 | ||
40 | //#include <iostream.h> | 42 | //#include <iostream.h> |
41 | //#include <unistd.h> | 43 | //#include <unistd.h> |
42 | #include <stdlib.h> | 44 | #include <stdlib.h> |
43 | 45 | ||
44 | int MAX_LINES_TASK; | 46 | int MAX_LINES_TASK; |
45 | int MAX_CHAR_CLIP; | 47 | int MAX_CHAR_CLIP; |
46 | int MAX_LINES_MEET; | 48 | int MAX_LINES_MEET; |
47 | int SHOW_LOCATION; | 49 | int SHOW_LOCATION; |
48 | int SHOW_NOTES; | 50 | int SHOW_NOTES; |
49 | // show only later dates | 51 | // show only later dates |
50 | int ONLY_LATER; | 52 | int ONLY_LATER; |
51 | /* | 53 | /* |
52 | * Constructs a Example which is a child of 'parent', with the | 54 | * Constructs a Example which is a child of 'parent', with the |
53 | * name 'name' and widget flags set to 'f' | 55 | * name 'name' and widget flags set to 'f' |
54 | */ | 56 | */ |
55 | Today::Today( QWidget* parent, const char* name, WFlags fl ) | 57 | Today::Today( QWidget* parent, const char* name, WFlags fl ) |
56 | : TodayBase( parent, name, fl ) | 58 | : TodayBase( parent, name, fl ) |
57 | { | 59 | { |
58 | QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); | 60 | QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); |
59 | QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); | 61 | QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); |
60 | QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); | 62 | QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); |
61 | QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); | 63 | QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); |
62 | |||
63 | QDate date = QDate::currentDate(); | ||
64 | QString time = (date.toString()); | ||
65 | TextLabel1->setText(time); | ||
66 | db = new DateBookDB; | ||
67 | 64 | ||
68 | draw(); | 65 | draw(); |
69 | } | 66 | } |
70 | 67 | ||
71 | 68 | ||
72 | void Today::draw() | 69 | void Today::draw() |
73 | { | 70 | { |
74 | init(); | 71 | init(); |
75 | getDates(); | 72 | getDates(); |
76 | getMail(); | 73 | getMail(); |
77 | getTodo(); | 74 | getTodo(); |
78 | // how often refresh | 75 | // how often refresh |
79 | QTimer::singleShot( 30*1000, this, SLOT(draw()) ); | 76 | QTimer::singleShot( 5*1000, this, SLOT(draw()) ); |
80 | 77 | ||
81 | } | 78 | } |
82 | 79 | ||
83 | void Today::init() | 80 | void Today::init() |
84 | { | 81 | { |
82 | QDate date = QDate::currentDate(); | ||
83 | QString time = (date.toString()); | ||
84 | |||
85 | TextLabel1->setText("<qt><font color=white>" +time + "<font></qt>"); | ||
86 | db = new DateBookDB; | ||
87 | |||
85 | // read config | 88 | // read config |
86 | Config cfg("today"); | 89 | Config cfg("today"); |
87 | cfg.setGroup("BaseConfig"); | 90 | cfg.setGroup("BaseConfig"); |
88 | 91 | ||
89 | // how many lines should be showed in the task section | 92 | // how many lines should be showed in the task section |
90 | MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5); | 93 | MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5); |
91 | // after how many chars should the be cut off on tasks and notes | 94 | // after how many chars should the be cut off on tasks and notes |
92 | MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30); | 95 | MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30); |
93 | // how many lines should be showed in the datebook section | 96 | // how many lines should be showed in the datebook section |
94 | MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5); | 97 | MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5); |
95 | // If location is to be showed too, 1 to activate it. | 98 | // If location is to be showed too, 1 to activate it. |
96 | SHOW_LOCATION = cfg.readNumEntry("showlocation",1); | 99 | SHOW_LOCATION = cfg.readNumEntry("showlocation",1); |
97 | // if notes should be shown | 100 | // if notes should be shown |
98 | SHOW_NOTES = cfg.readNumEntry("shownotes",0); | 101 | SHOW_NOTES = cfg.readNumEntry("shownotes",0); |
99 | ONLY_LATER = cfg.readNumEntry("onlylater",1); | 102 | ONLY_LATER = cfg.readNumEntry("onlylater",1); |
100 | 103 | ||
101 | } | 104 | } |
102 | 105 | ||
103 | void Today::startConfig() | 106 | void Today::startConfig() |
104 | { | 107 | { |
105 | conf = new todayconfig ( this, "", true ); | 108 | conf = new todayconfig ( this, "", true ); |
106 | 109 | ||
107 | 110 | ||
108 | //Config cfg = new Config("today"); | 111 | //Config cfg = new Config("today"); |
109 | 112 | ||
110 | // read the config | 113 | // read the config |
111 | Config cfg("today"); | 114 | Config cfg("today"); |
112 | cfg.setGroup("BaseConfig"); | 115 | cfg.setGroup("BaseConfig"); |
113 | 116 | ||
114 | //init(); | 117 | //init(); |
115 | 118 | ||
116 | conf->SpinBox1->setValue(MAX_LINES_MEET); | 119 | conf->SpinBox1->setValue(MAX_LINES_MEET); |
117 | // location show box | 120 | // location show box |
118 | conf->CheckBox1->setChecked(SHOW_LOCATION); | 121 | conf->CheckBox1->setChecked(SHOW_LOCATION); |
119 | // notes show box | 122 | // notes show box |
120 | conf->CheckBox2->setChecked(SHOW_NOTES); | 123 | conf->CheckBox2->setChecked(SHOW_NOTES); |
121 | // task lines | 124 | // task lines |
122 | conf->SpinBox2->setValue(MAX_LINES_TASK); | 125 | conf->SpinBox2->setValue(MAX_LINES_TASK); |
123 | // clip when? | 126 | // clip when? |
124 | conf->SpinBox7->setValue(MAX_CHAR_CLIP); | 127 | conf->SpinBox7->setValue(MAX_CHAR_CLIP); |
125 | // only later | 128 | // only later |
126 | conf->CheckBox3->setChecked(ONLY_LATER); | 129 | conf->CheckBox3->setChecked(ONLY_LATER); |
127 | 130 | ||
128 | conf->exec(); | 131 | conf->exec(); |
129 | 132 | ||
130 | int maxlinestask = conf->SpinBox2->value(); | 133 | int maxlinestask = conf->SpinBox2->value(); |
131 | int maxmeet = conf->SpinBox1->value(); | 134 | int maxmeet = conf->SpinBox1->value(); |
132 | int location = conf->CheckBox1->isChecked(); | 135 | int location = conf->CheckBox1->isChecked(); |
133 | int notes = conf->CheckBox2->isChecked(); | 136 | int notes = conf->CheckBox2->isChecked(); |
134 | int maxcharclip = conf->SpinBox7->value(); | 137 | int maxcharclip = conf->SpinBox7->value(); |
135 | int onlylater = conf->CheckBox3->isChecked(); | 138 | int onlylater = conf->CheckBox3->isChecked(); |
136 | 139 | ||
137 | cfg.writeEntry("maxlinestask",maxlinestask); | 140 | cfg.writeEntry("maxlinestask",maxlinestask); |
138 | cfg.writeEntry("maxcharclip", maxcharclip); | 141 | cfg.writeEntry("maxcharclip", maxcharclip); |
139 | cfg.writeEntry("maxlinesmeet",maxmeet); | 142 | cfg.writeEntry("maxlinesmeet",maxmeet); |
140 | cfg.writeEntry("showlocation",location); | 143 | cfg.writeEntry("showlocation",location); |
141 | cfg.writeEntry("shownotes", notes); | 144 | cfg.writeEntry("shownotes", notes); |
142 | cfg.writeEntry("onlylater", onlylater); | 145 | cfg.writeEntry("onlylater", onlylater); |
143 | // sync it to "disk" | 146 | // sync it to "disk" |
144 | cfg.write(); | 147 | cfg.write(); |
145 | 148 | ||
146 | draw(); | 149 | draw(); |
147 | } | 150 | } |
148 | 151 | ||
149 | 152 | ||
153 | |||
150 | /* | 154 | /* |
151 | * Get all events that are in the datebook xml file for today | 155 | * Get all events that are in the datebook xml file for today |
152 | */ | 156 | */ |
153 | void Today::getDates() | 157 | void Today::getDates() |
154 | { | 158 | { |
155 | QDate date = QDate::currentDate(); | 159 | QDate date = QDate::currentDate(); |
156 | QTime time = QTime::currentTime(); | 160 | QTime time = QTime::currentTime(); |
157 | QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); | 161 | QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); |
158 | 162 | ||
159 | Config config( "qpe" ); | 163 | Config config( "qpe" ); |
160 | // if 24 h format | 164 | // if 24 h format |
161 | // bool ampm = config.readBoolEntry( "AMPM", TRUE ); | 165 | //bool ampm = config.readBoolEntry( "AMPM", TRUE ); |
162 | 166 | ||
163 | int count=0; | 167 | int count=0; |
164 | 168 | ||
165 | if ( list.count() > 0 ) { | 169 | if ( list.count() > 0 ) { |
166 | QString msg; | 170 | QString msg; |
167 | 171 | ||
168 | for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); | 172 | for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); |
169 | it!=list.end(); ++it ) { | 173 | it!=list.end(); ++it ) { |
170 | 174 | ||
171 | count++; | 175 | count++; |
172 | 176 | ||
173 | if ( count <= MAX_LINES_MEET ) | 177 | if ( count <= MAX_LINES_MEET ) |
174 | { | 178 | { |
175 | //only get events past current time (start or end??) | 179 | //only get events past current time (start or end??) |
176 | //cout << time.toString() << endl; | 180 | //cout << time.toString() << endl; |
177 | //cout << TimeString::dateString((*it).event().end()) << endl; | 181 | //cout << TimeString::dateString((*it).event().end()) << endl; |
178 | // still some bug in here, 1 h off | 182 | // still some bug in here, 1 h off |
179 | 183 | ||
180 | // decide if to get all day or only later appointments | 184 | // decide if to get all day or only later appointments |
181 | if (!ONLY_LATER) | 185 | if (!ONLY_LATER) |
182 | { | 186 | { |
183 | msg += "<B>" + (*it).description() + "</B>"; | 187 | msg += "<B>" + (*it).description() + "</B>"; |
184 | // include location or not | 188 | if ( (*it).event().hasAlarm() ) |
185 | if (SHOW_LOCATION == 1) | 189 | { |
186 | { | 190 | msg += " <b>[with alarm]</b>"; |
191 | } | ||
192 | // include location or not | ||
193 | if (SHOW_LOCATION == 1) | ||
194 | { | ||
187 | msg+= "<BR>" + (*it).location(); | 195 | msg+= "<BR>" + (*it).location(); |
188 | } | 196 | } |
189 | msg += "<BR>" | 197 | msg += "<BR>" |
190 | // start time of event | 198 | // start time of event |
191 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 199 | + TimeString::timeString(QTime((*it).event().start().time()) ) |
192 | // end time of event | 200 | // end time of event |
193 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 201 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) |
194 | + "<BR>"; | 202 | + "<BR>"; |
195 | // include possible note or not | 203 | // include possible note or not |
196 | if (SHOW_NOTES == 1) | 204 | if (SHOW_NOTES == 1) |
197 | { | 205 | { |
198 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 206 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
199 | } | 207 | } |
200 | } | 208 | } |
201 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) | 209 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) |
202 | { | 210 | { |
203 | msg += "<B>" + (*it).description() + "</B>"; | 211 | msg += "<B>" + (*it).description() + "</B>"; |
212 | if ( (*it).event().hasAlarm() ) | ||
213 | { | ||
214 | msg += " <b>[with alarm]</b>"; | ||
215 | } | ||
204 | // include location or not | 216 | // include location or not |
205 | if (SHOW_LOCATION == 1) | 217 | if (SHOW_LOCATION == 1) |
206 | { | 218 | { |
207 | msg+= "<BR>" + (*it).location(); | 219 | msg+= "<BR>" + (*it).location(); |
208 | } | 220 | } |
209 | msg += "<BR>" | 221 | msg += "<BR>" |
210 | // start time of event | 222 | // start time of event |
211 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 223 | + TimeString::timeString(QTime((*it).event().start().time()) ) |
212 | // end time of event | 224 | // end time of event |
213 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 225 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) |
214 | + "<BR>"; | 226 | + "<BR>"; |
215 | // include possible note or not | 227 | // include possible note or not |
216 | if (SHOW_NOTES == 1) | 228 | if (SHOW_NOTES == 1) |
217 | { | 229 | { |
218 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 230 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
219 | } | 231 | } |
220 | } | 232 | } |
221 | } | 233 | } |
222 | } | 234 | } |
223 | if (msg.isEmpty()) | 235 | if (msg.isEmpty()) |
224 | { | 236 | { |
225 | msg = "No more appointments today"; | 237 | msg = "No more appointments today"; |
226 | } | 238 | } |
227 | DatesField->setText(msg); | 239 | DatesField->setText(msg); |
228 | } | 240 | } |
229 | } | 241 | } |
230 | 242 | ||
231 | /* | 243 | /* |
232 | * Parse in the todolist.xml | 244 | * Parse in the todolist.xml |
233 | * | ||
234 | */ | 245 | */ |
235 | QList<TodoItem> Today::loadTodo(const char *filename) | 246 | QList<TodoItem> Today::loadTodo(const char *filename) |
236 | { | 247 | { |
237 | DOM *todo; | 248 | DOM *todo; |
238 | ELE *tasks; | 249 | ELE *tasks; |
239 | ELE **tasklist; | 250 | ELE **tasklist; |
240 | ATT **attlist; | 251 | ATT **attlist; |
241 | int i, j; | 252 | int i, j; |
242 | char *description; | 253 | char *description; |
243 | int completed; | 254 | int completed; |
244 | int priority; | 255 | int priority; |
245 | TodoItem *tmp; | 256 | TodoItem *tmp; |
246 | QList<TodoItem> loadtodolist; | 257 | QList<TodoItem> loadtodolist; |
247 | 258 | ||
248 | todo = minidom_load(filename); | 259 | todo = minidom_load(filename); |
249 | 260 | ||
250 | tasks = todo->el; | 261 | tasks = todo->el; |
251 | tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/ | 262 | tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/ |
252 | if(tasks) | 263 | if(tasks) |
253 | { | 264 | { |
254 | tasklist = tasks->el; | 265 | tasklist = tasks->el; |
255 | i = 0; | 266 | i = 0; |
256 | while((tasklist) && (tasklist[i])) | 267 | while((tasklist) && (tasklist[i])) |
257 | { | 268 | { |
258 | attlist = tasklist[i]->at; | 269 | attlist = tasklist[i]->at; |
259 | j = 0; | 270 | j = 0; |
260 | description = NULL; | 271 | description = NULL; |
261 | priority = -1; | 272 | priority = -1; |
262 | completed = -1; | 273 | completed = -1; |
263 | while((attlist) && (attlist[j])) | 274 | while((attlist) && (attlist[j])) |
264 | { | 275 | { |
265 | if(!attlist[i]->name) continue; | 276 | // SEGFAULT HERE WITH MORE THAN 7 ENTRIES |
277 | if(!attlist[j]->name) continue; | ||
266 | if(!strcmp(attlist[j]->name, "Description")) | 278 | if(!strcmp(attlist[j]->name, "Description")) |
267 | { | 279 | { |
268 | description = attlist[j]->value; | 280 | description = attlist[j]->value; |
269 | } | 281 | } |
270 | // get Completed tag (0 or 1) | 282 | // get Completed tag (0 or 1) |
271 | if(!strcmp(attlist[j]->name, "Completed")) | 283 | if(!strcmp(attlist[j]->name, "Completed")) |
272 | { | 284 | { |
273 | QString s = attlist[j]->name; | 285 | QString s = attlist[j]->name; |
274 | if(s == "Completed") | 286 | if(s == "Completed") |
275 | { | 287 | { |
276 | completed = QString(attlist[j]->value).toInt(); | 288 | completed = QString(attlist[j]->value).toInt(); |
277 | } | 289 | } |
278 | } | 290 | } |
279 | // get Priority (1 to 5) | 291 | // get Priority (1 to 5) |
280 | if(!strcmp(attlist[j]->name, "Priority")) | 292 | if(!strcmp(attlist[j]->name, "Priority")) |
281 | { | 293 | { |
282 | QString s = attlist[j]->name; | 294 | QString s = attlist[j]->name; |
283 | if(s == "Priority") | 295 | if(s == "Priority") |
284 | { | 296 | { |
285 | priority = QString(attlist[j]->value).toInt(); | 297 | priority = QString(attlist[j]->value).toInt(); |
286 | } | 298 | } |
287 | } | 299 | } |
288 | j++; | 300 | j++; |
289 | } | 301 | } |
290 | if(description) | 302 | if(description) |
291 | { | 303 | { |
292 | tmp = new TodoItem(description, completed, priority); | 304 | tmp = new TodoItem(description, completed, priority); |
293 | loadtodolist.append(tmp); | 305 | loadtodolist.append(tmp); |
294 | } | 306 | } |
295 | i++; | 307 | i++; |
296 | } | 308 | } |
297 | } | 309 | } |
298 | 310 | ||
299 | minidom_free(todo); | 311 | minidom_free(todo); |
300 | 312 | ||
301 | return loadtodolist; | 313 | return loadtodolist; |
302 | } | 314 | } |
303 | 315 | ||
304 | 316 | ||
305 | void Today::getMail() | 317 | void Today::getMail() |
306 | { | 318 | { |
307 | Config cfg("opiemail"); | 319 | Config cfg("opiemail"); |
308 | cfg.setGroup("today"); | 320 | cfg.setGroup("today"); |
309 | 321 | ||
310 | // how many lines should be showed in the task section | 322 | // how many lines should be showed in the task section |
311 | int NEW_MAILS = cfg.readNumEntry("newmails",0); | 323 | int NEW_MAILS = cfg.readNumEntry("newmails",0); |
312 | int OUTGOING = cfg.readNumEntry("outgoing",0); | 324 | int OUTGOING = cfg.readNumEntry("outgoing",0); |
313 | 325 | ||
314 | QString output = tr("<b>%1</b> new mails, <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING); | 326 | QString output = tr("<b>%1</b> new mails, <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING); |
315 | 327 | ||
316 | 328 | ||
317 | MailField->setText(output); | 329 | MailField->setText(output); |
318 | } | 330 | } |
319 | 331 | ||
320 | 332 | ||
321 | /* | 333 | /* |
322 | * Get the todos | 334 | * Get the todos |
323 | * | 335 | * |
324 | */ | 336 | */ |
325 | void Today::getTodo() | 337 | void Today::getTodo() |
326 | { | 338 | { |
327 | QString output; | 339 | QString output; |
328 | QString tmpout; | 340 | QString tmpout; |
329 | int count = 0; | 341 | int count = 0; |
330 | 342 | ||
331 | QDir dir; | 343 | QDir dir; |
332 | QString homedir = dir.homeDirPath (); | 344 | QString homedir = dir.homeDirPath (); |
333 | // see if todolist.xml does exist. | 345 | // see if todolist.xml does exist. |
334 | QFile f(homedir +"/Applications/todolist/todolist.xml"); | 346 | QFile f(homedir +"/Applications/todolist/todolist.xml"); |
335 | if ( f.exists() ) | 347 | if ( f.exists() ) |
336 | { | 348 | { |
337 | QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml"); | 349 | QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml"); |
338 | 350 | ||
339 | TodoItem *item; | 351 | TodoItem *item; |
340 | for( item = todolist.first(); item; item = todolist.next()) | 352 | for( item = todolist.first(); item; item = todolist.next()) |
341 | { | 353 | { |
342 | if (!(item->getCompleted() == 1) ) | 354 | if (!(item->getCompleted() == 1) ) |
343 | { | 355 | { |
344 | count++; | 356 | count++; |
345 | if (count <= MAX_LINES_TASK) | 357 | if (count <= MAX_LINES_TASK) |
346 | { | 358 | { |
347 | tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>"))); | 359 | tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>"))); |
348 | } | 360 | } |
349 | } | 361 | } |
350 | } | 362 | } |
351 | } | 363 | } |
352 | 364 | ||
353 | if (count > 0) | 365 | if (count > 0) |
354 | { | 366 | { |
355 | output = QString("There are <b> %1</b> active tasks: <br>").arg(count); | 367 | output = QString("There are <b> %1</b> active tasks: <br>").arg(count); |
356 | output += tmpout; | 368 | output += tmpout; |
357 | } | 369 | } |
358 | else | 370 | else |
359 | { | 371 | { |
360 | output = ("No active tasks"); | 372 | output = ("No active tasks"); |
361 | } | 373 | } |
362 | 374 | ||
363 | TodoField->setText(output); | 375 | TodoField->setText(output); |
364 | } | 376 | } |
365 | 377 | ||
366 | /* | 378 | /* |
367 | * launches datebook | 379 | * launches datebook |
368 | */ | 380 | */ |
369 | void Today::startDatebook() | 381 | void Today::startDatebook() |
370 | { | 382 | { |
371 | QCopEnvelope e("QPE/System", "execute(QString)"); | 383 | QCopEnvelope e("QPE/System", "execute(QString)"); |
372 | e << QString("datebook"); | 384 | e << QString("datebook"); |
373 | } | 385 | } |
374 | 386 | ||
375 | /* | 387 | /* |
376 | * launches todolist | 388 | * launches todolist |
377 | */ | 389 | */ |
378 | void Today::startTodo() | 390 | void Today::startTodo() |
379 | { | 391 | { |
380 | QCopEnvelope e("QPE/System", "execute(QString)"); | 392 | QCopEnvelope e("QPE/System", "execute(QString)"); |
381 | e << QString("todolist"); | 393 | e << QString("todolist"); |
382 | } | 394 | } |
383 | 395 | ||
384 | /* | 396 | /* |
385 | * launch opiemail | 397 | * launch opiemail |
386 | */ | 398 | */ |
387 | void Today::startMail() | 399 | void Today::startMail() |
388 | { | 400 | { |
389 | QCopEnvelope e("QPE/System", "execute(QString)"); | 401 | QCopEnvelope e("QPE/System", "execute(QString)"); |
390 | e << QString("opiemail"); | 402 | e << QString("opiemail"); |
391 | } | 403 | } |
392 | 404 | ||
393 | /* | 405 | /* |
394 | * Destroys the object and frees any allocated resources | 406 | * Destroys the object and frees any allocated resources |
395 | */ | 407 | */ |
396 | Today::~Today() | 408 | Today::~Today() |
397 | { | 409 | { |
398 | // no need to delete child widgets, Qt does it all for us | 410 | // no need to delete child widgets, Qt does it all for us |
399 | } | 411 | } |
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index b0de1bf..32b45f7 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -1,175 +1,166 @@ | |||
1 | /* | 1 | /* |
2 | * todaybase.cpp * | 2 | * todaybase.cpp * |
3 | * --------------------- | 3 | * --------------------- |
4 | * | 4 | * |
5 | * begin : Sun 10 17:20:00 CEST 2002 | 5 | * begin : Sun 10 17:20:00 CEST 2002 |
6 | * copyright : (c) 2002 by Maximilian Reiß | 6 | * copyright : (c) 2002 by Maximilian Reiß |
7 | * email : max.reiss@gmx.de | 7 | * email : max.reiss@gmx.de |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 12 | * This program is free software; you can redistribute it and/or modify * |
13 | * it under the terms of the GNU General Public License as published by * | 13 | * it under the terms of the GNU General Public License as published by * |
14 | * the Free Software Foundation; either version 2 of the License, or * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #include "todaybase.h" | 19 | #include "todaybase.h" |
20 | 20 | ||
21 | #include <qframe.h> | 21 | #include <qframe.h> |
22 | #include <qlabel.h> | 22 | #include <qlabel.h> |
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qvariant.h> | 25 | #include <qvariant.h> |
26 | #include <qtooltip.h> | 26 | #include <qtooltip.h> |
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | #include <qimage.h> | 28 | #include <qimage.h> |
29 | #include <qpixmap.h> | 29 | #include <qpixmap.h> |
30 | //#include <qscrollview.h> | 30 | #include <qscrollview.h> |
31 | #include <qvbox.h> | ||
31 | 32 | ||
32 | #include <qpe/resource.h> | 33 | #include <qpe/resource.h> |
33 | 34 | ||
34 | /* | 35 | /* |
35 | * Constructs a TodayBase which is a child of 'parent', with the | 36 | * Constructs a TodayBase which is a child of 'parent', with the |
36 | * name 'name' and widget flags set to 'f' | 37 | * name 'name' and widget flags set to 'f' |
37 | */ | 38 | */ |
38 | TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | 39 | TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) |
39 | : QWidget( parent, name, fl ) | 40 | : QWidget( parent, name, fl ) |
40 | { | 41 | { |
41 | // logo | 42 | // logo |
42 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); | 43 | QPixmap logo = Resource::loadPixmap( "today/today_logo"); |
43 | // datebook | 44 | // datebook |
44 | QPixmap datebook = Resource::loadPixmap("DateBook"); | 45 | QPixmap datebook = Resource::loadPixmap("DateBook"); |
45 | // todo | 46 | // todo |
46 | QPixmap todo = Resource::loadPixmap( "TodoList" ); | 47 | QPixmap todo = Resource::loadPixmap( "TodoList" ); |
47 | // config icon | 48 | // config icon |
48 | QPixmap config = Resource::loadPixmap( "today/config" ); | 49 | QPixmap config = Resource::loadPixmap( "today/config" ); |
49 | // mail icon | 50 | // mail icon |
50 | QPixmap mail = Resource::loadPixmap( "today/mail" ); | 51 | QPixmap mail = Resource::loadPixmap( "today/mail" ); |
51 | 52 | ||
52 | 53 | ||
53 | QPalette pal2; | 54 | QPalette pal2; |
54 | QColorGroup cg; | 55 | QColorGroup cg; |
55 | cg.setColor( QColorGroup::Text, white ); | 56 | cg.setColor( QColorGroup::Text, white ); |
56 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | 57 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); |
57 | pal2.setActive( cg ); | 58 | pal2.setActive( cg ); |
58 | 59 | ||
59 | 60 | ||
60 | QPalette pal = this->palette(); | 61 | QPalette pal = this->palette(); |
61 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); | 62 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); |
62 | pal.setColor(QPalette::Active, QColorGroup::Button, col); | 63 | pal.setColor(QPalette::Active, QColorGroup::Button, col); |
63 | this->setPalette(pal); | 64 | this->setPalette(pal); |
64 | 65 | ||
65 | QVBoxLayout * layout = new QVBoxLayout(this); | 66 | QVBoxLayout * layout = new QVBoxLayout(this); |
66 | 67 | ||
67 | |||
68 | Frame4 = new QFrame( this, "Frame4" ); | 68 | Frame4 = new QFrame( this, "Frame4" ); |
69 | Frame4->setPalette( pal ); | ||
69 | Frame4->setFrameShape( QScrollView::StyledPanel ); | 70 | Frame4->setFrameShape( QScrollView::StyledPanel ); |
70 | Frame4->setFrameShadow( QScrollView::Sunken ); | 71 | Frame4->setFrameShadow( QScrollView::Sunken ); |
71 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); | 72 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); |
72 | 73 | ||
73 | // hehe, qt is ... | 74 | // hehe, qt is ... |
74 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); | 75 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); |
75 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); | 76 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); |
76 | 77 | ||
77 | DatesButton = new QPushButton (Frame4, "DatesButton" ); | 78 | DatesButton = new QPushButton (Frame4, "DatesButton" ); |
78 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 79 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
79 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 80 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
80 | DatesButton->setPalette( pal ); | 81 | DatesButton->setPalette( pal ); |
81 | DatesButton->setPixmap( datebook ); | 82 | DatesButton->setPixmap( datebook ); |
82 | DatesButton->setFlat( TRUE ); | 83 | DatesButton->setFlat( TRUE ); |
83 | 84 | ||
84 | DatesField = new QLabel( Frame4, "DatesField" ); | 85 | DatesField = new QLabel( Frame4, "DatesField" ); |
85 | DatesField->setGeometry( QRect( 40, 4, 203, 120 ) ); | 86 | DatesField->setGeometry( QRect( 40, 4, 203, 120 ) ); |
86 | DatesField->setText( tr( "No appointments today" ) ); | 87 | DatesField->setText( tr( "No appointments today" ) ); |
87 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 88 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
88 | 89 | ||
89 | // today logo | 90 | // today logo |
90 | Frame = new QLabel( this, "Frame" ); | 91 | Frame = new QLabel( this, "Frame" ); |
91 | Frame->setPalette( pal2 ); | 92 | Frame->setPalette( pal2 ); |
92 | Frame->setFrameShape( QFrame::StyledPanel ); | 93 | Frame->setFrameShape( QFrame::StyledPanel ); |
93 | Frame->setFrameShadow( QFrame::Raised ); | 94 | Frame->setFrameShadow( QFrame::Raised ); |
94 | Frame->setLineWidth( 0 ); | 95 | Frame->setLineWidth( 0 ); |
95 | Frame->setMaximumHeight(50); | 96 | Frame->setMaximumHeight(50); |
96 | Frame->setMinimumHeight(50); | 97 | Frame->setMinimumHeight(50); |
97 | 98 | ||
98 | // date | 99 | // date |
99 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); | 100 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); |
100 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); | 101 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); |
101 | QFont TextLabel1_font( TextLabel1->font() ); | 102 | QFont TextLabel1_font( TextLabel1->font() ); |
102 | TextLabel1_font.setBold( TRUE ); | 103 | TextLabel1_font.setBold( TRUE ); |
103 | TextLabel1->setFont( TextLabel1_font ); | 104 | TextLabel1->setFont( TextLabel1_font ); |
104 | TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); | 105 | TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); |
105 | TextLabel1->setTextFormat( QLabel::AutoText ); | 106 | TextLabel1->setTextFormat( RichText ); |
106 | 107 | ||
107 | // todo | 108 | // todo |
108 | Frame15 = new QFrame( this, "Frame15" ); | 109 | Frame15 = new QFrame( this, "Frame15" ); |
109 | Frame15->setFrameShape( QFrame::StyledPanel ); | 110 | Frame15->setFrameShape( QFrame::StyledPanel ); |
110 | Frame15->setFrameShadow( QFrame::Sunken ); | 111 | Frame15->setFrameShadow( QFrame::Sunken ); |
111 | 112 | ||
112 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 113 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
113 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 114 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
114 | //TodoButton->setBackgroundMode(NoBackground); | ||
115 | TodoButton->setPalette( pal ); | 115 | TodoButton->setPalette( pal ); |
116 | //TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | ||
117 | TodoButton->setPixmap( todo ); | 116 | TodoButton->setPixmap( todo ); |
118 | TodoButton->setFlat( TRUE ); | 117 | TodoButton->setFlat( TRUE ); |
119 | 118 | ||
120 | TodoField = new QLabel( Frame15, "TodoField" ); | 119 | TodoField = new QLabel( Frame15, "TodoField" ); |
121 | TodoField->setGeometry( QRect( 40, 4, 196, 120 ) ); | 120 | TodoField->setGeometry( QRect( 40, 4, 196, 120 ) ); |
122 | TodoField->setFrameShadow( QLabel::Plain ); | 121 | TodoField->setFrameShadow( QLabel::Plain ); |
123 | TodoField->setText( tr( "No current todos" ) ); | 122 | TodoField->setText( tr( "No current todos" ) ); |
124 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 123 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
125 | 124 | ||
126 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 125 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
127 | PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); | 126 | PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); |
128 | //PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); | ||
129 | PushButton1->setPixmap( config ); | 127 | PushButton1->setPixmap( config ); |
130 | PushButton1->setPalette( pal ); | 128 | PushButton1->setPalette( pal ); |
131 | PushButton1->setAutoDefault( TRUE ); | 129 | PushButton1->setAutoDefault( TRUE ); |
132 | PushButton1->setFlat( TRUE ); | 130 | PushButton1->setFlat( TRUE ); |
133 | 131 | ||
134 | 132 | ||
135 | MailFrame = new QFrame( this ,"MailFrame" ); | 133 | MailFrame = new QFrame( this ,"MailFrame" ); |
136 | MailFrame->setFrameShape( QScrollView::StyledPanel ); | 134 | MailFrame->setFrameShape( QScrollView::StyledPanel ); |
137 | MailFrame->setFrameShadow( QScrollView::Sunken ); | 135 | MailFrame->setFrameShadow( QScrollView::Sunken ); |
138 | //MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 136 | |
139 | |||
140 | MailButton = new QPushButton (MailFrame, "MailButton" ); | 137 | MailButton = new QPushButton (MailFrame, "MailButton" ); |
141 | MailButton->setGeometry( QRect( 2, 10, 36, 19 ) ); | 138 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); |
142 | //MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | ||
143 | MailButton->setPalette( pal ); | 139 | MailButton->setPalette( pal ); |
144 | MailButton->setPixmap( mail ); | 140 | MailButton->setPixmap( mail ); |
145 | MailButton->setFlat( TRUE ); | 141 | MailButton->setFlat( TRUE ); |
146 | 142 | ||
147 | MailField = new QLabel( MailFrame, "DatesField" ); | 143 | MailField = new QLabel( MailFrame, "DatesField" ); |
148 | MailField->setGeometry( QRect( 40, 10, 203, 120 ) ); | 144 | MailField->setGeometry( QRect( 40, 4, 203, 120 ) ); |
149 | MailField->setText( tr( "Opiemail not installed" ) ); | 145 | MailField->setText( tr( "Opiemail not installed" ) ); |
150 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 146 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
151 | MailField->setMaximumHeight(15); | 147 | MailField->setMaximumHeight(40); |
152 | MailField->setMinimumHeight(10); | 148 | MailField->setMinimumHeight(30); |
153 | |||
154 | |||
155 | |||
156 | 149 | ||
157 | layout->addWidget(Frame); | 150 | layout->addWidget(Frame); |
158 | layout->addWidget(Frame4); | 151 | layout->addWidget(Frame4); |
159 | layout->addWidget(MailFrame); | 152 | layout->addWidget(MailFrame); |
160 | layout->addWidget(Frame15); | 153 | layout->addWidget(Frame15); |
161 | //layout->addWidget(split); | ||
162 | 154 | ||
163 | layout->setStretchFactor(Frame4,4); | 155 | layout->setStretchFactor(Frame4,5); |
164 | layout->setStretchFactor(MailFrame,1); | 156 | layout->setStretchFactor(MailFrame,1); |
165 | layout->setStretchFactor(Frame15,3); | 157 | layout->setStretchFactor(Frame15,4); |
166 | } | 158 | } |
167 | 159 | ||
168 | /* | 160 | /* |
169 | * Destroys the object and frees any allocated resources | 161 | * Destroys the object and frees any allocated resources |
170 | */ | 162 | */ |
171 | TodayBase::~TodayBase() | 163 | TodayBase::~TodayBase() |
172 | { | 164 | { |
173 | |||
174 | } | 165 | } |
175 | 166 | ||
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h index c84cc67..13fbb8d 100644 --- a/core/pim/today/todaybase.h +++ b/core/pim/today/todaybase.h | |||
@@ -1,51 +1,52 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form interface generated from reading ui file 'todaybase.ui' | 2 | ** Form interface generated from reading ui file 'todaybase.ui' |
3 | ** | 3 | ** |
4 | ** Created: Wed Feb 13 19:36:45 2002 | 4 | ** Created: Wed Feb 13 19:36:45 2002 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #ifndef TODAYBASE_H | 9 | #ifndef TODAYBASE_H |
10 | #define TODAYBASE_H | 10 | #define TODAYBASE_H |
11 | 11 | ||
12 | #include <qvariant.h> | 12 | #include <qvariant.h> |
13 | #include <qwidget.h> | 13 | #include <qwidget.h> |
14 | #include <qscrollview.h> | 14 | #include <qscrollview.h> |
15 | #include <qsplitter.h> | 15 | #include <qsplitter.h> |
16 | 16 | ||
17 | class QVBoxLayout; | 17 | class QVBoxLayout; |
18 | class QHBoxLayout; | 18 | class QHBoxLayout; |
19 | class QGridLayout; | 19 | class QGridLayout; |
20 | class QFrame; | 20 | class QFrame; |
21 | class QLabel; | 21 | class QLabel; |
22 | class QPushButton; | 22 | class QPushButton; |
23 | 23 | ||
24 | class TodayBase : public QWidget | 24 | class TodayBase : public QWidget |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | 27 | ||
28 | public: | 28 | public: |
29 | TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 29 | TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
30 | ~TodayBase(); | 30 | ~TodayBase(); |
31 | 31 | ||
32 | //QScrollView* Frame4; | ||
32 | QFrame* Frame4; | 33 | QFrame* Frame4; |
33 | QPushButton* DatesButton; | 34 | QPushButton* DatesButton; |
34 | QLabel* DatesField; | 35 | QLabel* DatesField; |
35 | QLabel* Frame; | 36 | QLabel* Frame; |
36 | QFrame* MailFrame; | 37 | QFrame* MailFrame; |
37 | QLabel* TextLabel1; | 38 | QLabel* TextLabel1; |
38 | QFrame* Frame15; | 39 | QFrame* Frame15; |
39 | QLabel* TodoField; | 40 | QLabel* TodoField; |
40 | QLabel* MailField; | 41 | QLabel* MailField; |
41 | QPushButton* PushButton1; | 42 | QPushButton* PushButton1; |
42 | QPushButton* TodoButton; | 43 | QPushButton* TodoButton; |
43 | QPushButton* MailButton; | 44 | QPushButton* MailButton; |
44 | QPushButton* getridoffuckingstrippeldlinesbutton; | 45 | QPushButton* getridoffuckingstrippeldlinesbutton; |
45 | 46 | ||
46 | protected: | 47 | protected: |
47 | 48 | ||
48 | 49 | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | #endif // TODAYBASE_H | 52 | #endif // TODAYBASE_H |