summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-28 22:56:28 (UTC)
committer harlekin <harlekin>2002-10-28 22:56:28 (UTC)
commit7aaf3d45d9156a126a753311ffdb220a550d47a5 (patch) (unidiff)
tree89bab2496a90d498848348c24a8186b4aba7285b
parent483941bdb352bccca2bcb344f3e2724e3a3eedab (diff)
downloadopie-7aaf3d45d9156a126a753311ffdb220a550d47a5.zip
opie-7aaf3d45d9156a126a753311ffdb220a550d47a5.tar.gz
opie-7aaf3d45d9156a126a753311ffdb220a550d47a5.tar.bz2
less qcop trouble on retial rom
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog2
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro5
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp28
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h1
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp5
5 files changed, 15 insertions, 26 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index eb2496a..93abdcb 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,109 +1,111 @@
10.5.2 10.5.2
2 2
3* refresh settings 3* refresh settings
4* only launch datebook config when clicked on a date ( opie only )
5* less qcop trouble on sharps retail rom
4 6
50.5.1 70.5.1
6 8
7* icons scalable and clickable again 9* icons scalable and clickable again
8 10
90.5 110.5
10 12
11* now fully plugin based 13* now fully plugin based
12 14
130.3.4 150.3.4
14 16
15* "fill our business card now a clickable label" 17* "fill our business card now a clickable label"
16* Several bugfixes regarding todo section. 18* Several bugfixes regarding todo section.
17 19
180.3.3 200.3.3
19 21
20* Changed the logo so it better scales to bigger display and also 22* Changed the logo so it better scales to bigger display and also
21 made the "Today" string translatable. 23 made the "Today" string translatable.
22* some am/pm fixes 24* some am/pm fixes
23* clickable labels now in libopie 25* clickable labels now in libopie
24 26
250.3.2 270.3.2
26 28
27* Autostart is now more configurable. You can decide how long 29* Autostart is now more configurable. You can decide how long
28 the ipaq has to has been suspended, before autostart is triggered.(Opie 30 the ipaq has to has been suspended, before autostart is triggered.(Opie
29 only) 31 only)
30* am/pm time optinal (autodetect) 32* am/pm time optinal (autodetect)
31 33
320.3.1 340.3.1
33 35
34* fixed the wrong color of the buttons 36* fixed the wrong color of the buttons
35* better translation (thanks carsten and others) 37* better translation (thanks carsten and others)
36* fixes memory leaks 38* fixes memory leaks
37* bugfixes in calendar part, now location and note are working again. 39* bugfixes in calendar part, now location and note are working again.
38 40
390.3.0 410.3.0
40 42
41* today uses now tododb from libopie. So major changes in the todo part: 43* today uses now tododb from libopie. So major changes in the todo part:
42 - overdue items on top 44 - overdue items on top
43 - then sorted by date, then by priority 45 - then sorted by date, then by priority
44* some cleanups 46* some cleanups
45* speed optimisations 47* speed optimisations
46 48
470.2.9 490.2.9
48 50
49* Many bugfixes. 51* Many bugfixes.
50* Today now apparently sorts the dates _allways_ right, i would assume it 52* Today now apparently sorts the dates _allways_ right, i would assume it
51to be a qt bug 53to be a qt bug
52 54
530.2.8 550.2.8
54 56
55* Appointments are now clickable (connection to datebook still missing) 57* Appointments are now clickable (connection to datebook still missing)
56* autostart support (opie only) 58* autostart support (opie only)
57 59
580.2.7 600.2.7
59 61
60* check if todolist.xml was changed before parsing it 62* check if todolist.xml was changed before parsing it
61* check only every 30 sec for changes. 63* check only every 30 sec for changes.
62* some visual stuff 64* some visual stuff
63* as usual many little improvements .-) 65* as usual many little improvements .-)
64 66
650.2.6 670.2.6
66 68
67* added scrollbars to dates and todo 69* added scrollbars to dates and todo
68* all day detection 70* all day detection
69* some smaller bugfixes 71* some smaller bugfixes
70 72
710.2.5 730.2.5
72 74
73* some other minor fixes regarding autoupdate 75* some other minor fixes regarding autoupdate
74* fixed segfault with todolist > 7 entries 76* fixed segfault with todolist > 7 entries
75* fixed the "ugly grey border around buttons" issue 77* fixed the "ugly grey border around buttons" issue
76* fixed the "empty calendar field" "bug" 78* fixed the "empty calendar field" "bug"
77* shown only later appointments as option 79* shown only later appointments as option
78 80
79 81
800.2.4 820.2.4
81 83
82* added support for email 84* added support for email
83* autoupdates after 1 min 85* autoupdates after 1 min
84* QCopEnvelope instead of system() 86* QCopEnvelope instead of system()
85* starting to use qvbox in gui 87* starting to use qvbox in gui
86 88
87 89
880.2.3 900.2.3
89 91
90* the 4 am release 92* the 4 am release
91* several bugfixes 93* several bugfixes
92 94
93 95
940.2.2 960.2.2
95 97
96* started working on calling other apps 98* started working on calling other apps
97* and finished it 99* and finished it
98 100
990.2.1 1010.2.1
100 102
101* images no more inline 103* images no more inline
102* config dialog 104* config dialog
103 105
1040.1.1 1060.1.1
105 107
106* started changelog. 108* started changelog.
107* fixed segfault on empty/nonexistant todolist.xml 109* fixed segfault on empty/nonexistant todolist.xml
108* better handling for file location 110* better handling for file location
109 111
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index 615059a..0bbdb77 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -1,19 +1,18 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt debug 3CONFIG += qt release
4
5# Input 4# Input
6HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ 5HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \
7 datebookevent.h datebookpluginwidget.h 6 datebookevent.h datebookpluginwidget.h
8SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ 7SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \
9 datebookevent.cpp datebookpluginwidget.cpp 8 datebookevent.cpp datebookpluginwidget.cpp
10 9
11INCLUDEPATH += $(OPIEDIR)/include \ 10INCLUDEPATH += $(OPIEDIR)/include \
12 ../ ../library 11 ../ ../library
13DEPENDPATH += $(OPIEDIR)/include \ 12DEPENDPATH += $(OPIEDIR)/include \
14 ../ ../library 13 ../ ../library
15 14
16LIBS+= -lqpe -lopie 15LIBS+= -lqpe -lopie
17 16
18DESTDIR = $(OPIEDIR)/plugins/today 17DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todaydatebookplugin \ No newline at end of file 18TARGET = todaydatebookplugin \ No newline at end of file
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index c37813b..0a0d186 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -1,122 +1,116 @@
1/* 1/*
2 * datebookevent.cpp 2 * datebookevent.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17#include "datebookevent.h" 17#include "datebookevent.h"
18#include <qpe/config.h> 18#include <qpe/config.h>
19#include <qpe/timestring.h> 19#include <qpe/timestring.h>
20#include <qpe/qcopenvelope_qws.h> 20#include <qpe/qcopenvelope_qws.h>
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22 22
23#include <opie/odevice.h>
24
25using namespace Opie;
26
23DateBookEvent::DateBookEvent(const EffectiveEvent &ev, 27DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
24 QWidget* parent, 28 QWidget* parent,
25 bool show_location, 29 bool show_location,
26 bool show_notes, 30 bool show_notes,
27 int maxCharClip, 31 int maxCharClip,
28 const char* name, 32 const char* name,
29 WFlags fl) : 33 WFlags fl) :
30 OClickableLabel(parent,name,fl), event(ev) { 34 OClickableLabel(parent,name,fl), event(ev) {
31 35
32 setAlignment( AlignTop ); 36 setAlignment( AlignTop );
33 37
34 QString msg; 38 QString msg;
35 39
36 Config config( "qpe" ); 40 Config config( "qpe" );
37 config.setGroup( "Time" ); 41 config.setGroup( "Time" );
38 // if 24 h format 42 // if 24 h format
39 ampm = config.readBoolEntry( "AMPM", TRUE ); 43 ampm = config.readBoolEntry( "AMPM", TRUE );
40 44
41 msg += "<B>" + (ev).description() + "</B>"; 45 msg += "<B>" + (ev).description() + "</B>";
42 if ( (ev).event().hasAlarm() ) { 46 if ( (ev).event().hasAlarm() ) {
43 msg += " <b>[with alarm]</b>"; 47 msg += " <b>[with alarm]</b>";
44 } 48 }
45 49
46 // include location or not 50 // include location or not
47 if ( show_location ) { 51 if ( show_location ) {
48 msg += "<BR><i>" + (ev).location() + "</i>"; 52 msg += "<BR><i>" + (ev).location() + "</i>";
49 } 53 }
50 54
51 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" ) 55 if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
52 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) { 56 && ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
53 msg += "<br>All day"; 57 msg += "<br>All day";
54 } else { 58 } else {
55 // start time of event 59 // start time of event
56 msg += "<br>" + ampmTime(QTime( (ev).event().start().time() ) ) 60 msg += "<br>" + ampmTime(QTime( (ev).event().start().time() ) )
57 // end time of event 61 // end time of event
58 + "<b> - </b>" + ampmTime(QTime( (ev).event().end().time() ) ); 62 + "<b> - </b>" + ampmTime(QTime( (ev).event().end().time() ) );
59 } 63 }
60 64
61 // include possible note or not 65 // include possible note or not
62 if ( show_notes ) { 66 if ( show_notes ) {
63 msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip ); 67 msg += "<br> <i>note</i>:" +( (ev).notes() ).mid( 0, maxCharClip );
64 } 68 }
65
66 setText( msg ); 69 setText( msg );
67 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) ); 70 connect( this, SIGNAL( clicked() ), this, SLOT( editMe() ) );
68 // setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) );
69} 71}
70 72
71 73
72/** 74/**
73 * AM/PM timestring conversion. 75 * AM/PM timestring conversion.
74 * @param tm the timestring 76 * @param tm the timestring
75 * @return formatted to am/pm is system is set to it 77 * @return formatted to am/pm is system is set to it
76 */ 78 */
77QString DateBookEvent::ampmTime( QTime tm ) { 79QString DateBookEvent::ampmTime( QTime tm ) {
78
79 QString s; 80 QString s;
80 if( ampm ) { 81 if( ampm ) {
81 int hour = tm.hour(); 82 int hour = tm.hour();
82 if ( hour == 0 ) { 83 if ( hour == 0 ) {
83 hour = 12; 84 hour = 12;
84 } 85 }
85 if ( hour > 12 ) { 86 if ( hour > 12 ) {
86 hour -= 12; 87 hour -= 12;
87 } 88 }
88 s.sprintf( "%2d:%02d %s", hour, tm.minute(), 89 s.sprintf( "%2d:%02d %s", hour, tm.minute(),
89 (tm.hour() >= 12) ? "PM" : "AM" ); 90 (tm.hour() >= 12) ? "PM" : "AM" );
90 return s; 91 return s;
91 } else { 92 } else {
92 s.sprintf( "%2d:%02d", tm.hour(), tm.minute() ); 93 s.sprintf( "%2d:%02d", tm.hour(), tm.minute() );
93 return s; 94 return s;
94 } 95 }
95
96} 96}
97 97
98 98
99/** 99/**
100 * starts the edit dialog as known from datebook 100 * starts the edit dialog as known from datebook
101 */ 101 */
102void DateBookEvent::editEventSlot( const Event &e ) { 102void DateBookEvent::editEventSlot( const Event &e ) {
103 startDatebook();
104 103
105 while( !QCopChannel::isRegistered( "QPE/Datebook" ) ) qApp->processEvents(); 104 if ( ODevice::inst()->system() == System_Zaurus ) {
106 QCopEnvelope env( "QPE/Datebook", "editEvent(int)" ); 105 QCopEnvelope env( "QPE/Application/datebook", "raise()" );
107 env << e.uid(); 106 } else {
107 QCopEnvelope env( "QPE/Datebook", "editEvent(int)" );
108 env << e.uid();
109 }
108} 110}
109 111
110 112
111/**
112 * launches datebook
113 */
114void DateBookEvent::startDatebook() {
115 QCopEnvelope e( "QPE/System", "execute(QString)" );
116 e << QString( "datebook" );
117}
118
119void DateBookEvent::editMe() { 113void DateBookEvent::editMe() {
120 emit editEvent( event.event() ); 114 emit editEvent( event.event() );
121} 115}
122 116
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 61c64f1..7b0371a 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -1,49 +1,48 @@
1/* 1/*
2 * datebookplugin.h 2 * datebookplugin.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17#ifndef DATEBOOKEVENT_PLUGIN_H 17#ifndef DATEBOOKEVENT_PLUGIN_H
18#define DATEBOOKEVENT_PLUGIN_H 18#define DATEBOOKEVENT_PLUGIN_H
19 19
20#include <opie/oclickablelabel.h> 20#include <opie/oclickablelabel.h>
21#include <qpe/datebookdb.h> 21#include <qpe/datebookdb.h>
22 22
23 23
24class DateBookEvent: public OClickableLabel { 24class DateBookEvent: public OClickableLabel {
25 25
26 Q_OBJECT 26 Q_OBJECT
27 27
28public: 28public:
29 DateBookEvent(const EffectiveEvent &ev, 29 DateBookEvent(const EffectiveEvent &ev,
30 QWidget* parent = 0, 30 QWidget* parent = 0,
31 bool show_location = 0, 31 bool show_location = 0,
32 bool show_notes = 0, 32 bool show_notes = 0,
33 int maxCharClip = 0, 33 int maxCharClip = 0,
34 const char* name = 0, 34 const char* name = 0,
35 WFlags fl = 0); 35 WFlags fl = 0);
36signals: 36signals:
37 void editEvent(const Event &e); 37 void editEvent(const Event &e);
38private slots: 38private slots:
39 void editEventSlot(const Event &e); 39 void editEventSlot(const Event &e);
40 void editMe(); 40 void editMe();
41private: 41private:
42 void startDatebook();
43 DateBookDB *db; 42 DateBookDB *db;
44 QString ampmTime(QTime); 43 QString ampmTime(QTime);
45 const EffectiveEvent event; 44 const EffectiveEvent event;
46 bool ampm; 45 bool ampm;
47}; 46};
48 47
49#endif 48#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 7948656..a8ce059 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -1,116 +1,111 @@
1/* 1/*
2 * datebookpluginwidget.cpp 2 * datebookpluginwidget.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17 17
18#include "datebookpluginwidget.h" 18#include "datebookpluginwidget.h"
19#include "datebookevent.h" 19#include "datebookevent.h"
20 20
21#include <qpe/timestring.h> 21#include <qpe/timestring.h>
22#include <qpe/config.h> 22#include <qpe/config.h>
23 23
24#include <qdatetime.h> 24#include <qdatetime.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qtl.h> 27#include <qtl.h>
28#include <qscrollview.h> 28#include <qscrollview.h>
29#include <qtimer.h> 29#include <qtimer.h>
30 30
31DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name) 31DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name)
32 : QWidget(parent, name ) { 32 : QWidget(parent, name ) {
33 db = 0l; 33 db = 0l;
34 readConfig(); 34 readConfig();
35 getDates(); 35 getDates();
36} 36}
37 37
38DatebookPluginWidget::~DatebookPluginWidget() { 38DatebookPluginWidget::~DatebookPluginWidget() {
39 delete db; 39 delete db;
40} 40}
41 41
42 42
43void DatebookPluginWidget::readConfig() { 43void DatebookPluginWidget::readConfig() {
44 Config cfg( "todaydatebookplugin" ); 44 Config cfg( "todaydatebookplugin" );
45 cfg.setGroup( "config" ); 45 cfg.setGroup( "config" );
46 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 46 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
47 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 47 m_show_location = cfg.readNumEntry( "showlocation", 1 );
48 m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 48 m_show_notes = cfg.readNumEntry( "shownotes", 0 );
49 m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 49 m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
50} 50}
51 51
52 52
53/** 53/**
54 * Get all events that are in the datebook xml file for today 54 * Get all events that are in the datebook xml file for today
55 */ 55 */
56void DatebookPluginWidget::getDates() { 56void DatebookPluginWidget::getDates() {
57 57
58 58
59 QDate date = QDate::currentDate(); 59 QDate date = QDate::currentDate();
60 60
61 QVBoxLayout* layoutDates = new QVBoxLayout( this ); 61 QVBoxLayout* layoutDates = new QVBoxLayout( this );
62 layoutDates->setSpacing( 1 ); 62 layoutDates->setSpacing( 1 );
63 layoutDates->setMargin( 1 ); 63 layoutDates->setMargin( 1 );
64 64
65 if ( db ) { 65 if ( db ) {
66 delete db; 66 delete db;
67 } 67 }
68 68
69 db = new DateBookDB; 69 db = new DateBookDB;
70 70
71 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date ); 71 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date );
72 72
73 qBubbleSort( list ); 73 qBubbleSort( list );
74 74
75 Config config( "qpe" ); 75 Config config( "qpe" );
76 76
77 int count=0; 77 int count=0;
78 78
79 if ( list.count() > 0 ) { 79 if ( list.count() > 0 ) {
80 80
81 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); it!=list.end(); ++it ) { 81 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); it!=list.end(); ++it ) {
82 82
83 if ( count <= m_max_lines_meet ) { 83 if ( count <= m_max_lines_meet ) {
84 QTime time = QTime::currentTime(); 84 QTime time = QTime::currentTime();
85 85
86 if ( !m_onlyLater ) { 86 if ( !m_onlyLater ) {
87 count++; 87 count++;
88 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); 88 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
89 layoutDates->addWidget( l ); 89 layoutDates->addWidget( l );
90 QObject::connect ( l, SIGNAL( editEvent( const Event &) ), l, SLOT( editEventSlot( const Event &) ) ); 90 QObject::connect ( l, SIGNAL( editEvent( const Event &) ), l, SLOT( editEventSlot( const Event &) ) );
91 } else if ( ( time.toString() <= TimeString::dateString( (*it).event().end() ) ) ) { 91 } else if ( ( time.toString() <= TimeString::dateString( (*it).event().end() ) ) ) {
92 count++; 92 count++;
93 // show only later appointments 93 // show only later appointments
94 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); 94 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
95 layoutDates->addWidget( l ); 95 layoutDates->addWidget( l );
96 QObject::connect ( l, SIGNAL( editEvent( const Event &) ), l, SLOT( editEventSlot( const Event &) ) ); 96 QObject::connect ( l, SIGNAL( editEvent( const Event &) ), l, SLOT( editEventSlot( const Event &) ) );
97 } 97 }
98 } 98 }
99 } 99 }
100 if ( m_onlyLater && count == 0 ) { 100 if ( m_onlyLater && count == 0 ) {
101 QLabel* noMoreEvents = new QLabel( this ); 101 QLabel* noMoreEvents = new QLabel( this );
102 noMoreEvents->setText( QObject::tr( "No more appointments today" ) ); 102 noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
103 layoutDates->addWidget( noMoreEvents ); 103 layoutDates->addWidget( noMoreEvents );
104 } 104 }
105 } else { 105 } else {
106 QLabel* noEvents = new QLabel( this ); 106 QLabel* noEvents = new QLabel( this );
107 noEvents->setText( QObject::tr( "No appointments today" ) ); 107 noEvents->setText( QObject::tr( "No appointments today" ) );
108 layoutDates->addWidget( noEvents ); 108 layoutDates->addWidget( noEvents );
109 } 109 }
110 //layoutDates->addStretch(0);
111// layoutDates->addItem( new QSpacerItem( 1,1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
112
113 // how often refresh - later have qcop update calls in *db
114 //QTimer::singleShot( 20*1000, this , SLOT( getDates() ) );
115} 110}
116 111