Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 24affd0..af26302 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp | |||
@@ -1,112 +1,97 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | ** $Id$ | 19 | ** $Id$ |
20 | ** | 20 | ** |
21 | **********************************************************************/ | 21 | **********************************************************************/ |
22 | 22 | ||
23 | #define QTOPIA_INTERNAL_FD | 23 | #define QTOPIA_INTERNAL_FD |
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 <qpe/datebookmonth.h> | 32 | #include <qpe/datebookmonth.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
35 | #include <qpe/qpedebug.h> | ||
36 | #include <qpe/event.h> | ||
37 | #include <qpe/finddialog.h> | 35 | #include <qpe/finddialog.h> |
38 | #include <qpe/ir.h> | 36 | #include <qpe/ir.h> |
39 | #include <qmenubar.h> | ||
40 | #include <qpe/qpemessagebox.h> | 37 | #include <qpe/qpemessagebox.h> |
41 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
42 | #include <qpe/sound.h> | 39 | #include <qpe/sound.h> |
43 | #include <qpe/timestring.h> | ||
44 | #include <qtoolbar.h> | 40 | #include <qtoolbar.h> |
45 | #include <qpe/tzselect.h> | 41 | #include <qpe/tzselect.h> |
46 | #include <qpe/xmlreader.h> | ||
47 | 42 | ||
48 | #include <qaction.h> | 43 | #include <qaction.h> |
49 | #include <qcopchannel_qws.h> | 44 | #include <qcopchannel_qws.h> |
50 | #include <qdatetime.h> | ||
51 | #include <qdialog.h> | ||
52 | #include <qfile.h> | ||
53 | #include <qlabel.h> | ||
54 | #include <qlayout.h> | 45 | #include <qlayout.h> |
55 | #include <qmessagebox.h> | 46 | #include <qmessagebox.h> |
56 | #include <qpopupmenu.h> | ||
57 | #include <qpushbutton.h> | ||
58 | #include <qregexp.h> | ||
59 | #include <qtextcodec.h> | ||
60 | #include <qtextstream.h> | ||
61 | #include <qtimer.h> | 47 | #include <qtimer.h> |
62 | #include <qtl.h> | 48 | #include <qtl.h> |
63 | #include <qwidgetstack.h> | 49 | #include <qwidgetstack.h> |
64 | #include <qwindowsystem_qws.h> | ||
65 | 50 | ||
66 | #include <sys/stat.h> | 51 | #include <sys/stat.h> |
67 | #include <sys/types.h> | 52 | #include <sys/types.h> |
68 | #include <fcntl.h> | 53 | #include <fcntl.h> |
69 | #include <unistd.h> | 54 | #include <unistd.h> |
70 | 55 | ||
71 | #include <stdlib.h> | 56 | #include <stdlib.h> |
72 | 57 | ||
73 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | 58 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) |
74 | : QMainWindow( parent, "datebook", f ), | 59 | : QMainWindow( parent, "datebook", f ), |
75 | aPreset( FALSE ), | 60 | aPreset( FALSE ), |
76 | presetTime( -1 ), | 61 | presetTime( -1 ), |
77 | startTime( 8 ), // an acceptable default | 62 | startTime( 8 ), // an acceptable default |
78 | rowStyle( 0 ), | 63 | rowStyle( 0 ), |
79 | bJumpToCurTime(FALSE), | 64 | bJumpToCurTime(FALSE), |
80 | syncing(FALSE), | 65 | syncing(FALSE), |
81 | inSearch(FALSE), | 66 | inSearch(FALSE), |
82 | alarmCounter(0) | 67 | alarmCounter(0) |
83 | { | 68 | { |
84 | bool needEvilHack= false; // if we need an Evil Hack | 69 | bool needEvilHack= false; // if we need an Evil Hack |
85 | QTime t; | 70 | QTime t; |
86 | t.start(); | 71 | t.start(); |
87 | db = new DateBookDBHack; | 72 | db = new DateBookDBHack; |
88 | qDebug("loading db t=%d", t.elapsed() ); | 73 | qDebug("loading db t=%d", t.elapsed() ); |
89 | loadSettings(); | 74 | loadSettings(); |
90 | setCaption( tr("Calendar") ); | 75 | setCaption( tr("Calendar") ); |
91 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); | 76 | setIcon( Resource::loadPixmap( "datebook_icon" ) ); |
92 | 77 | ||
93 | setToolBarsMovable( FALSE ); | 78 | setToolBarsMovable( FALSE ); |
94 | 79 | ||
95 | views = new QWidgetStack( this ); | 80 | views = new QWidgetStack( this ); |
96 | setCentralWidget( views ); | 81 | setCentralWidget( views ); |
97 | 82 | ||
98 | dayView = 0; | 83 | dayView = 0; |
99 | weekView = 0; | 84 | weekView = 0; |
100 | weekLstView = 0; | 85 | weekLstView = 0; |
101 | monthView = 0; | 86 | monthView = 0; |
102 | 87 | ||
103 | // QToolBar *bar = new QToolBar( this ); | 88 | // QToolBar *bar = new QToolBar( this ); |
104 | // bar->setHorizontalStretchable( TRUE ); | 89 | // bar->setHorizontalStretchable( TRUE ); |
105 | 90 | ||
106 | // QMenuBar *mb = new QMenuBar( bar ); | 91 | // QMenuBar *mb = new QMenuBar( bar ); |
107 | // mb->setMargin( 0 ); | 92 | // mb->setMargin( 0 ); |
108 | 93 | ||
109 | // QPopupMenu *view = new QPopupMenu( this ); | 94 | // QPopupMenu *view = new QPopupMenu( this ); |
110 | // mb->insertItem( tr( "View" ), view ); | 95 | // mb->insertItem( tr( "View" ), view ); |
111 | 96 | ||
112 | QToolBar *sub_bar = new QToolBar(this); | 97 | QToolBar *sub_bar = new QToolBar(this); |