Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 3934411..3d1bc0c 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp | |||
@@ -24,33 +24,35 @@ | |||
24 | 24 | ||
25 | #include "datebook.h" | 25 | #include "datebook.h" |
26 | #include "datebookday.h" | 26 | #include "datebookday.h" |
27 | #include "datebooksettings.h" | 27 | #include "datebooksettings.h" |
28 | #include "datebookweek.h" | 28 | #include "datebookweek.h" |
29 | #include "datebookweeklst.h" | 29 | #include "datebookweeklst.h" |
30 | #include "dateentryimpl.h" | 30 | #include "dateentryimpl.h" |
31 | 31 | ||
32 | #include <opie2/odebug.h> | ||
33 | |||
32 | #include <qpe/datebookmonth.h> | 34 | #include <qpe/datebookmonth.h> |
33 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
35 | #include <qpe/finddialog.h> | 37 | #include <qpe/finddialog.h> |
36 | #include <qpe/ir.h> | 38 | #include <qpe/ir.h> |
37 | #include <qpe/qpemessagebox.h> | 39 | #include <qpe/qpemessagebox.h> |
38 | #include <qpe/resource.h> | 40 | #include <qpe/resource.h> |
39 | #include <qpe/sound.h> | 41 | #include <qpe/sound.h> |
40 | #include <qtoolbar.h> | ||
41 | #include <qpe/tzselect.h> | 42 | #include <qpe/tzselect.h> |
42 | 43 | ||
43 | #include <qaction.h> | 44 | #include <qaction.h> |
44 | #include <qcopchannel_qws.h> | 45 | #include <qcopchannel_qws.h> |
45 | #include <qlayout.h> | 46 | #include <qlayout.h> |
46 | #include <qmessagebox.h> | 47 | #include <qmessagebox.h> |
47 | #include <qtimer.h> | 48 | #include <qtimer.h> |
48 | #include <qtl.h> | 49 | #include <qtl.h> |
50 | #include <qtoolbar.h> | ||
49 | #include <qwidgetstack.h> | 51 | #include <qwidgetstack.h> |
50 | 52 | ||
51 | #include <sys/stat.h> | 53 | #include <sys/stat.h> |
52 | #include <sys/types.h> | 54 | #include <sys/types.h> |
53 | #include <fcntl.h> | 55 | #include <fcntl.h> |
54 | #include <unistd.h> | 56 | #include <unistd.h> |
55 | 57 | ||
56 | #include <stdlib.h> | 58 | #include <stdlib.h> |
@@ -65,17 +67,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | |||
65 | syncing(FALSE), | 67 | syncing(FALSE), |
66 | inSearch(FALSE), | 68 | inSearch(FALSE), |
67 | alarmCounter(0) | 69 | alarmCounter(0) |
68 | { | 70 | { |
69 | bool needEvilHack= false; // if we need an Evil Hack | 71 | bool needEvilHack= false; // if we need an Evil Hack |
70 | QTime t; | 72 | QTime t; |
71 | t.start(); | 73 | t.start(); |
72 | db = new DateBookDBHack; | 74 | db = new DateBookDBHack; |
73 | qDebug("loading db t=%d", t.elapsed() ); | 75 | Opie::Core::odebug << "loading db t=" << t.elapsed() << oendl; |
74 | loadSettings(); | 76 | loadSettings(); |
75 | setCaption( tr("Calendar") ); | 77 | setCaption( tr("Calendar") ); |
76 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); | 78 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); |
77 | 79 | ||
78 | setToolBarsMovable( FALSE ); | 80 | setToolBarsMovable( FALSE ); |
79 | 81 | ||
80 | views = new QWidgetStack( this ); | 82 | views = new QWidgetStack( this ); |
81 | setCentralWidget( views ); | 83 | setCentralWidget( views ); |
@@ -169,17 +171,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | |||
169 | #if !defined(QT_NO_COP) | 171 | #if !defined(QT_NO_COP) |
170 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); | 172 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); |
171 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); | 173 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); |
172 | channel = new QCopChannel( "QPE/Datebook", this ); | 174 | channel = new QCopChannel( "QPE/Datebook", this ); |
173 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); | 175 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); |
174 | #endif | 176 | #endif |
175 | #endif | 177 | #endif |
176 | 178 | ||
177 | qDebug("done t=%d", t.elapsed() ); | 179 | Opie::Core::odebug << "done t=" << t.elapsed() << oendl; |
178 | 180 | ||
179 | connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); | 181 | connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); |
180 | connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); | 182 | connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); |
181 | /* | 183 | /* |
182 | * Here is a problem description: | 184 | * Here is a problem description: |
183 | * When Weekview is the default view | 185 | * When Weekview is the default view |
184 | * a DateBookWeekView get's created | 186 | * a DateBookWeekView get's created |
185 | * redraw() get's called. So what? | 187 | * redraw() get's called. So what? |
@@ -895,17 +897,17 @@ void DateBook::setDocument( const QString &filename ) | |||
895 | db->addEvent( *it ); | 897 | db->addEvent( *it ); |
896 | } | 898 | } |
897 | } | 899 | } |
898 | 900 | ||
899 | static const char * beamfile = "/tmp/obex/event.vcs"; | 901 | static const char * beamfile = "/tmp/obex/event.vcs"; |
900 | 902 | ||
901 | void DateBook::beamEvent( const Event &e ) | 903 | void DateBook::beamEvent( const Event &e ) |
902 | { | 904 | { |
903 | qDebug("trying to beamn"); | 905 | Opie::Core::odebug << "trying to beam" << oendl; |
904 | unlink( beamfile ); // delete if exists | 906 | unlink( beamfile ); // delete if exists |
905 | mkdir("/tmp/obex/", 0755); | 907 | mkdir("/tmp/obex/", 0755); |
906 | Event::writeVCalendar( beamfile, e ); | 908 | Event::writeVCalendar( beamfile, e ); |
907 | Ir *ir = new Ir( this ); | 909 | Ir *ir = new Ir( this ); |
908 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); | 910 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); |
909 | QString description = e.description(); | 911 | QString description = e.description(); |
910 | ir->send( beamfile, description, "text/x-vCalendar" ); | 912 | ir->send( beamfile, description, "text/x-vCalendar" ); |
911 | } | 913 | } |