author | harlekin <harlekin> | 2002-03-11 15:05:28 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-11 15:05:28 (UTC) |
commit | 07177b1aa8b5c6979fe06874da903a9d17debb65 (patch) (unidiff) | |
tree | 3cd6fef4b53355e861ae1d3db923c9ee92436a47 /core/pim/today | |
parent | cb57d1df6804ab3739f96ba1881ffc8110e3caa9 (diff) | |
download | opie-07177b1aa8b5c6979fe06874da903a9d17debb65.zip opie-07177b1aa8b5c6979fe06874da903a9d17debb65.tar.gz opie-07177b1aa8b5c6979fe06874da903a9d17debb65.tar.bz2 |
some new features like clickable appointments, but not connected to datebook yet
-rw-r--r-- | core/pim/today/TODO | 11 | ||||
-rw-r--r-- | core/pim/today/changelog | 4 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 159 | ||||
-rw-r--r-- | core/pim/today/today.h | 25 | ||||
-rw-r--r-- | core/pim/today/today.pro | 5 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 16 | ||||
-rw-r--r-- | core/pim/today/todaybase.h | 6 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 2 |
8 files changed, 147 insertions, 81 deletions
diff --git a/core/pim/today/TODO b/core/pim/today/TODO index 5876e2b..a3b01d2 100644 --- a/core/pim/today/TODO +++ b/core/pim/today/TODO | |||
@@ -1,13 +1,14 @@ | |||
1 | TODO for today: | 1 | TODO for today: |
2 | 2 | ||
3 | * start the app on "resume" | 3 | * start the app on "resume" (partly done) |
4 | 4 | ||
5 | * show alarm icons on alarm events | 5 | * show alarm icons on alarm events (partly done) |
6 | 6 | ||
7 | * add am/pm mode instead of 24 h, take system default | 7 | * add am/pm mode instead of 24 h, take system default |
8 | 8 | ||
9 | * fix 23 pm bug (done??) | ||
10 | |||
11 | * qcop integration for updating events? | 9 | * qcop integration for updating events? |
12 | 10 | ||
13 | * sort todos by pri. \ No newline at end of file | 11 | * sort todos by pri. |
12 | |||
13 | * make Opiezilla a clickable label wich is allway on the far right side of | ||
14 | the screen , klick will open credits ,) \ No newline at end of file | ||
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index 7111154..333326d 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,6 +1,10 @@ | |||
1 | |||
2 | * Appointments are now clickable (connection to datebook still missing) | ||
3 | * autostart support (opie only) | ||
4 | |||
1 | 0.2.7 | 5 | 0.2.7 |
2 | 6 | ||
3 | * check if todolist.xml was changed before parsing it | 7 | * check if todolist.xml was changed before parsing it |
4 | * check only every 30 sec for changes. | 8 | * check only every 30 sec for changes. |
5 | * some visual stuff | 9 | * some visual stuff |
6 | * as usual many little improvements .-) | 10 | * as usual many little improvements .-) |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index d715fc1..69bcb68 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -36,26 +36,30 @@ | |||
36 | #include <qspinbox.h> | 36 | #include <qspinbox.h> |
37 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qtimer.h> | 39 | #include <qtimer.h> |
40 | #include <qpixmap.h> | 40 | #include <qpixmap.h> |
41 | #include <qfileinfo.h> | 41 | #include <qfileinfo.h> |
42 | #include <qlayout.h> | ||
42 | 43 | ||
43 | //#include <iostream.h> | 44 | //#include <iostream.h> |
44 | //#include <unistd.h> | 45 | //#include <unistd.h> |
45 | #include <stdlib.h> | 46 | #include <stdlib.h> |
46 | 47 | ||
47 | 48 | ||
49 | |||
48 | int MAX_LINES_TASK; | 50 | int MAX_LINES_TASK; |
49 | int MAX_CHAR_CLIP; | 51 | int MAX_CHAR_CLIP; |
50 | int MAX_LINES_MEET; | 52 | int MAX_LINES_MEET; |
51 | int SHOW_LOCATION; | 53 | int SHOW_LOCATION; |
52 | int SHOW_NOTES; | 54 | int SHOW_NOTES; |
53 | // show only later dates | 55 | // show only later dates |
54 | int ONLY_LATER; | 56 | int ONLY_LATER; |
55 | int AUTOSTART; | 57 | int AUTOSTART; |
58 | |||
59 | int NEW_START=1; | ||
56 | /* | 60 | /* |
57 | * Constructs a Example which is a child of 'parent', with the | 61 | * Constructs a Example which is a child of 'parent', with the |
58 | * name 'name' and widget flags set to 'f' | 62 | * name 'name' and widget flags set to 'f' |
59 | */ | 63 | */ |
60 | Today::Today( QWidget* parent, const char* name, WFlags fl ) | 64 | Today::Today( QWidget* parent, const char* name, WFlags fl ) |
61 | : TodayBase( parent, name, fl ) { | 65 | : TodayBase( parent, name, fl ) { |
@@ -66,13 +70,12 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
66 | 70 | ||
67 | 71 | ||
68 | autoStart(); | 72 | autoStart(); |
69 | draw(); | 73 | draw(); |
70 | } | 74 | } |
71 | 75 | ||
72 | |||
73 | void Today::autoStart() { | 76 | void Today::autoStart() { |
74 | Config cfg("today"); | 77 | Config cfg("today"); |
75 | cfg.setGroup("Autostart"); | 78 | cfg.setGroup("Autostart"); |
76 | AUTOSTART = cfg.readNumEntry("autostart",1); | 79 | AUTOSTART = cfg.readNumEntry("autostart",1); |
77 | if (AUTOSTART) { | 80 | if (AUTOSTART) { |
78 | QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); | 81 | QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); |
@@ -200,13 +203,16 @@ void Today::startConfig() { | |||
200 | 203 | ||
201 | /* | 204 | /* |
202 | * Get all events that are in the datebook xml file for today | 205 | * Get all events that are in the datebook xml file for today |
203 | */ | 206 | */ |
204 | void Today::getDates() { | 207 | void Today::getDates() { |
205 | QDate date = QDate::currentDate(); | 208 | QDate date = QDate::currentDate(); |
206 | QTime time = QTime::currentTime(); | 209 | QWidget* AllDateBookEvents = new QWidget( ); |
210 | QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents); | ||
211 | //QTime time = QTime::currentTime(); | ||
212 | |||
207 | QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); | 213 | QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); |
208 | 214 | ||
209 | Config config( "qpe" ); | 215 | Config config( "qpe" ); |
210 | // if 24 h format | 216 | // if 24 h format |
211 | //bool ampm = config.readBoolEntry( "AMPM", TRUE ); | 217 | //bool ampm = config.readBoolEntry( "AMPM", TRUE ); |
212 | 218 | ||
@@ -218,74 +224,31 @@ void Today::getDates() { | |||
218 | for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); | 224 | for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); |
219 | it!=list.end(); ++it ) { | 225 | it!=list.end(); ++it ) { |
220 | 226 | ||
221 | count++; | 227 | count++; |
222 | 228 | ||
223 | if ( count <= MAX_LINES_MEET ) { | 229 | if ( count <= MAX_LINES_MEET ) { |
224 | //cout << time.toString() << endl; | 230 | |
225 | //cout << TimeString::dateString((*it).event().end()) << endl; | 231 | |
226 | 232 | DateBookEvent *l=new DateBookEvent(*it, AllDateBookEvents); | |
227 | // decide if to get all day or only later appointments | 233 | layoutDates->addWidget(l); |
228 | if (!ONLY_LATER) { | 234 | connect (l, SIGNAL(editEvent(const Event &)), |
229 | msg += "<B>" + (*it).description() + "</B>"; | 235 | this, SIGNAL(editEvent(const Event &))); |
230 | if ( (*it).event().hasAlarm() ) { | ||
231 | msg += " <b>[with alarm]</b>"; | ||
232 | } | ||
233 | // include location or not | ||
234 | if (SHOW_LOCATION == 1) { | ||
235 | msg += "<BR><i>" + (*it).location(); | ||
236 | msg += "</i>"; | ||
237 | } | ||
238 | |||
239 | if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) { | ||
240 | msg += "<br>All day"; | ||
241 | } else { | ||
242 | // start time of event | ||
243 | msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) ) | ||
244 | // end time of event | ||
245 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); | ||
246 | } | ||
247 | msg += "<BR>"; | ||
248 | // include possible note or not | ||
249 | if (SHOW_NOTES == 1) { | ||
250 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | ||
251 | } | ||
252 | } else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) { | ||
253 | msg += "<B>" + (*it).description() + "</B>"; | ||
254 | if ( (*it).event().hasAlarm() ) { | ||
255 | msg += " <b>[with alarm]</b>"; | ||
256 | } | ||
257 | // include location or not | ||
258 | if (SHOW_LOCATION == 1) { | ||
259 | msg+= "<BR><i>" + (*it).location(); | ||
260 | msg += "</i>"; | ||
261 | } | ||
262 | |||
263 | if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) { | ||
264 | msg += "<br>All day"; | ||
265 | } else { | ||
266 | // start time of event | ||
267 | msg += "<br>" + TimeString::timeString(QTime((*it).event().start().time()) ) | ||
268 | // end time of event | ||
269 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); | ||
270 | } | ||
271 | msg += "<BR>"; | ||
272 | // include possible note or not | ||
273 | if (SHOW_NOTES == 1) { | ||
274 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | ||
275 | } | ||
276 | } | ||
277 | } | 236 | } |
278 | } | 237 | |
279 | if (msg.isEmpty()) { | 238 | } |
280 | msg = tr("No more appointments today"); | 239 | layoutDates->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); |
281 | } | 240 | sv1->addChild(AllDateBookEvents); |
282 | DatesField->setText(msg); | 241 | |
242 | //if (msg.isEmpty()) { | ||
243 | // msg = tr("No more appointments today"); | ||
244 | //} | ||
245 | //DatesField->setText(msg); | ||
283 | } | 246 | } |
284 | } | 247 | } |
285 | 248 | ||
286 | /* | 249 | /* |
287 | * Parse in the todolist.xml | 250 | * Parse in the todolist.xml |
288 | */ | 251 | */ |
289 | QList<TodoItem> Today::loadTodo(const char *filename) { | 252 | QList<TodoItem> Today::loadTodo(const char *filename) { |
290 | DOM *todo; | 253 | DOM *todo; |
291 | ELE *tasks; | 254 | ELE *tasks; |
@@ -368,15 +331,16 @@ void Today::getMail() { | |||
368 | * Get the todos | 331 | * Get the todos |
369 | * | 332 | * |
370 | */ | 333 | */ |
371 | void Today::getTodo() { | 334 | void Today::getTodo() { |
372 | 335 | ||
373 | // if the todolist.xml file was not modified in between, do not parse it. | 336 | // if the todolist.xml file was not modified in between, do not parse it. |
374 | if (!checkIfModified()) { | 337 | if (!checkIfModified() && !NEW_START) { |
375 | return; | 338 | return; |
376 | } | 339 | } |
340 | NEW_START=0; | ||
377 | 341 | ||
378 | QString output; | 342 | QString output; |
379 | QString tmpout; | 343 | QString tmpout; |
380 | int count = 0; | 344 | int count = 0; |
381 | 345 | ||
382 | QDir dir; | 346 | QDir dir; |
@@ -438,6 +402,77 @@ void Today::startMail() { | |||
438 | /* | 402 | /* |
439 | * Destroys the object and frees any allocated resources | 403 | * Destroys the object and frees any allocated resources |
440 | */ | 404 | */ |
441 | Today::~Today() { | 405 | Today::~Today() { |
442 | // no need to delete child widgets, Qt does it all for us | 406 | // no need to delete child widgets, Qt does it all for us |
443 | } | 407 | } |
408 | |||
409 | |||
410 | DateBookEvent::DateBookEvent(const EffectiveEvent &ev, | ||
411 | QWidget* parent = 0, | ||
412 | const char* name = 0, | ||
413 | WFlags fl = 0) : | ||
414 | ClickableLabel(parent,name,fl), event(ev) { | ||
415 | |||
416 | QString msg; | ||
417 | QTime time = QTime::currentTime(); | ||
418 | |||
419 | if (!ONLY_LATER) { | ||
420 | msg += "<B>" + (ev).description() + "</B>"; | ||
421 | if ( (ev).event().hasAlarm() ) { | ||
422 | msg += " <b>[with alarm]</b>"; | ||
423 | } | ||
424 | // include location or not | ||
425 | if (SHOW_LOCATION == 1) { | ||
426 | msg += "<BR><i>" + (ev).location(); | ||
427 | msg += "</i>"; | ||
428 | } | ||
429 | |||
430 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { | ||
431 | msg += "<br>All day"; | ||
432 | } else { | ||
433 | // start time of event | ||
434 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) | ||
435 | // end time of event | ||
436 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); | ||
437 | } | ||
438 | msg += "<BR>"; | ||
439 | // include possible note or not | ||
440 | if (SHOW_NOTES == 1) { | ||
441 | msg += " <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | ||
442 | } | ||
443 | } else if ((time.toString() <= TimeString::dateString((ev).event().end())) ) { | ||
444 | msg += "<B>" + (ev).description() + "</B>"; | ||
445 | if ( (ev).event().hasAlarm() ) { | ||
446 | msg += " <b>[with alarm]</b>"; | ||
447 | } | ||
448 | // include location or not | ||
449 | if (SHOW_LOCATION == 1) { | ||
450 | msg+= "<BR><i>" + (ev).location(); | ||
451 | msg += "</i>"; | ||
452 | } | ||
453 | |||
454 | if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { | ||
455 | msg += "<br>All day"; | ||
456 | } else { | ||
457 | // start time of event | ||
458 | msg += "<br>" + TimeString::timeString(QTime((ev).event().start().time()) ) | ||
459 | // end time of event | ||
460 | + "<b> - </b>" + TimeString::timeString(QTime((ev).event().end().time()) ); | ||
461 | } | ||
462 | // include possible note or not | ||
463 | if (SHOW_NOTES == 1) { | ||
464 | msg += "<br> <i>note</i>:" +((ev).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | ||
465 | } | ||
466 | } | ||
467 | |||
468 | setText(msg); | ||
469 | connect(this, SIGNAL(clicked()), this, SLOT(editMe())); | ||
470 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); | ||
471 | } | ||
472 | |||
473 | void DateBookEvent::editMe() { | ||
474 | emit editEvent(event.event()); | ||
475 | } | ||
476 | |||
477 | |||
478 | |||
diff --git a/core/pim/today/today.h b/core/pim/today/today.h index b3b7d01..0a0837c 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h | |||
@@ -17,23 +17,27 @@ | |||
17 | * * | 17 | * * |
18 | ***************************************************************************/ | 18 | ***************************************************************************/ |
19 | 19 | ||
20 | 20 | ||
21 | #ifndef TODAY_H | 21 | #ifndef TODAY_H |
22 | #define TODAY_H | 22 | #define TODAY_H |
23 | #include "todaybase.h" | ||
24 | 23 | ||
25 | #include <qpe/datebookdb.h> | 24 | #include <qpe/datebookdb.h> |
25 | #include <qpe/event.h> | ||
26 | 26 | ||
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qlist.h> | 28 | #include <qlist.h> |
29 | |||
29 | #include "TodoItem.h" | 30 | #include "TodoItem.h" |
30 | #include "todayconfig.h" | 31 | #include "todayconfig.h" |
32 | #include "todaybase.h" | ||
33 | #include "clickablelabel.h" | ||
34 | |||
35 | class QVBoxLayout; | ||
31 | 36 | ||
32 | class Today : public TodayBase | 37 | class Today : public TodayBase { |
33 | { | ||
34 | Q_OBJECT | 38 | Q_OBJECT |
35 | 39 | ||
36 | public: | 40 | public: |
37 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 41 | Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
38 | ~Today(); | 42 | ~Today(); |
39 | 43 | ||
@@ -58,8 +62,23 @@ class Today : public TodayBase | |||
58 | int MAX_LINES_TASK; | 62 | int MAX_LINES_TASK; |
59 | int MAX_CHAR_CLIP; | 63 | int MAX_CHAR_CLIP; |
60 | int MAX_LINES_MEET; | 64 | int MAX_LINES_MEET; |
61 | int SHOW_LOCATION; | 65 | int SHOW_LOCATION; |
62 | int SHOW_NOTES; | 66 | int SHOW_NOTES; |
63 | }; | 67 | }; |
68 | |||
69 | class DateBookEvent: public ClickableLabel { | ||
70 | Q_OBJECT | ||
71 | public: | ||
72 | DateBookEvent(const EffectiveEvent &ev, | ||
73 | QWidget* parent = 0, const char* name = 0, | ||
74 | WFlags fl = 0); | ||
75 | signals: | ||
76 | void editEvent(const Event &e); | ||
77 | private slots: | ||
78 | void editMe(); | ||
79 | private: | ||
80 | const EffectiveEvent event; | ||
81 | }; | ||
82 | |||
64 | #endif // TODAY_H | 83 | #endif // TODAY_H |
65 | 84 | ||
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro index 7d56e71..454b3ff 100644 --- a/core/pim/today/today.pro +++ b/core/pim/today/today.pro | |||
@@ -1,11 +1,12 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | #CONFIG = qt warn_on debug | 2 | #CONFIG = qt warn_on debug |
3 | CONFIG = qt warn_on release | 3 | CONFIG = qt warn_on release |
4 | HEADERS = today.h TodoItem.h minidom.h todaybase.h todayconfig.h | 4 | HEADERS = today.h TodoItem.h minidom.h todaybase.h todayconfig.h clickablelabel.h |
5 | SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp minidom.c TodoItem.cpp | 5 | SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp minidom.c TodoItem.cpp clickablelabel.cpp |
6 | |||
6 | INCLUDEPATH+= $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
7 | DEPENDPATH+= $(OPIEDIR)/include | 8 | DEPENDPATH+= $(OPIEDIR)/include |
8 | LIBS += -lqpe | 9 | LIBS += -lqpe |
9 | INTERFACES= | 10 | INTERFACES= |
10 | TARGET = today | 11 | TARGET = today |
11 | DESTDIR = $(OPIEDIR)/bin | 12 | DESTDIR = $(OPIEDIR)/bin |
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index 5c1dc24..552e2eb 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -48,12 +48,13 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
48 | 48 | ||
49 | QPalette pal = this->palette(); | 49 | QPalette pal = this->palette(); |
50 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); | 50 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); |
51 | pal.setColor(QPalette::Active, QColorGroup::Button, col); | 51 | pal.setColor(QPalette::Active, QColorGroup::Button, col); |
52 | this->setPalette(pal); | 52 | this->setPalette(pal); |
53 | 53 | ||
54 | |||
54 | QWidget *d = QApplication::desktop(); | 55 | QWidget *d = QApplication::desktop(); |
55 | int w=d->width(); | 56 | int w=d->width(); |
56 | int h=d->height(); | 57 | int h=d->height(); |
57 | resize( w , h ); | 58 | resize( w , h ); |
58 | 59 | ||
59 | // hehe, qt is ... | 60 | // hehe, qt is ... |
@@ -92,13 +93,14 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
92 | Frame4->setFrameShape( QScrollView::StyledPanel ); | 93 | Frame4->setFrameShape( QScrollView::StyledPanel ); |
93 | Frame4->setFrameShadow( QScrollView::Sunken ); | 94 | Frame4->setFrameShadow( QScrollView::Sunken ); |
94 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); | 95 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); |
95 | Frame4->setFrameStyle( QFrame::NoFrame ); | 96 | Frame4->setFrameStyle( QFrame::NoFrame ); |
96 | Frame4->setGeometry (QRect( 0, 0, this->width() , this->height()) ); | 97 | Frame4->setGeometry (QRect( 0, 0, this->width() , this->height()) ); |
97 | 98 | ||
98 | QScrollView* sv1 = new QScrollView( Frame4 ); | 99 | // QScrollView* sv1 = new QScrollView( Frame4 ); |
100 | sv1 = new QScrollView( Frame4 ); | ||
99 | sv1->setResizePolicy(QScrollView::AutoOneFit); | 101 | sv1->setResizePolicy(QScrollView::AutoOneFit); |
100 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); | 102 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); |
101 | // need to find a better way!!! | 103 | // need to find a better way!!! |
102 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); | 104 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); |
103 | sv1->setFrameShape(QFrame::NoFrame); | 105 | sv1->setFrameShape(QFrame::NoFrame); |
104 | 106 | ||
@@ -106,19 +108,21 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
106 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 108 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
107 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 109 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
108 | DatesButton->setPalette( pal ); | 110 | DatesButton->setPalette( pal ); |
109 | DatesButton->setPixmap( datebook ); | 111 | DatesButton->setPixmap( datebook ); |
110 | DatesButton->setFlat( TRUE ); | 112 | DatesButton->setFlat( TRUE ); |
111 | 113 | ||
112 | DatesField = new QLabel( sv1->viewport(), "DatesField" ); | 114 | //DatesField = new QLabel( sv1->viewport(), "DatesField" ); |
113 | sv1->addChild(DatesField); | 115 | //DatesField = new QVBox(sv1->viewport()); |
114 | DatesField->setText( tr( "No appointments today" ) ); | 116 | //QWidget *dummy = new QWidget(sv1->viewport()); |
115 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 117 | //sv1->addChild(DatesField); |
118 | //DatesField->setText( tr( "No appointments today" ) ); | ||
119 | // DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | ||
116 | 120 | ||
117 | 121 | ||
118 | // --- mail section --- | 122 | // --- mail section ---) |
119 | MailFrame = new QFrame( this ,"MailFrame" ); | 123 | MailFrame = new QFrame( this ,"MailFrame" ); |
120 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 124 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); |
121 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); | 125 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); |
122 | MailFrame->setFrameStyle( QFrame::NoFrame ); | 126 | MailFrame->setFrameStyle( QFrame::NoFrame ); |
123 | 127 | ||
124 | QFrame* Line1 = new QFrame( MailFrame); | 128 | QFrame* Line1 = new QFrame( MailFrame); |
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h index 13fbb8d..8840125 100644 --- a/core/pim/today/todaybase.h +++ b/core/pim/today/todaybase.h | |||
@@ -11,13 +11,13 @@ | |||
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 QVBox; |
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 | ||
@@ -29,16 +29,18 @@ 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 | //QScrollView* Frame4; |
33 | QFrame* Frame4; | 33 | QFrame* Frame4; |
34 | QPushButton* DatesButton; | 34 | QPushButton* DatesButton; |
35 | QLabel* DatesField; | 35 | //QLabel* DatesField; |
36 | QLabel* Frame; | 36 | QLabel* Frame; |
37 | QFrame* MailFrame; | 37 | QFrame* MailFrame; |
38 | QLabel* TextLabel1; | 38 | QLabel* TextLabel1; |
39 | QScrollView* sv1; | ||
40 | QVBox* DatesField; | ||
39 | QFrame* Frame15; | 41 | QFrame* Frame15; |
40 | QLabel* TodoField; | 42 | QLabel* TodoField; |
41 | QLabel* MailField; | 43 | QLabel* MailField; |
42 | QPushButton* PushButton1; | 44 | QPushButton* PushButton1; |
43 | QPushButton* TodoButton; | 45 | QPushButton* TodoButton; |
44 | QPushButton* MailButton; | 46 | QPushButton* MailButton; |
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h index 020097d..4739b5a 100644 --- a/core/pim/today/todayconfig.h +++ b/core/pim/today/todayconfig.h | |||
@@ -8,13 +8,13 @@ | |||
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #ifndef TODAYCONFIG_H | 9 | #ifndef TODAYCONFIG_H |
10 | #define TODAYCONFIG_H | 10 | #define TODAYCONFIG_H |
11 | 11 | ||
12 | #include <qvariant.h> | 12 | #include <qvariant.h> |
13 | #include <qdialog.h> | 13 | #include <qdialog.h> |
14 | class QVBoxLayout; | 14 | //class QVBoxLayout; |
15 | class QHBoxLayout; | 15 | class QHBoxLayout; |
16 | class QGridLayout; | 16 | class QGridLayout; |
17 | class QCheckBox; | 17 | class QCheckBox; |
18 | class QFrame; | 18 | class QFrame; |
19 | class QLabel; | 19 | class QLabel; |
20 | class QSpinBox; | 20 | class QSpinBox; |