author | zautrix <zautrix> | 2005-05-24 22:30:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-05-24 22:30:39 (UTC) |
commit | c0ca8beceaa7a366a2d74a82504cad19f4ccd642 (patch) (unidiff) | |
tree | 80d7934f39d856801c2491d735455cea1b119e8b | |
parent | a3a535e57c53071eb15aa034472d402d619ca84d (diff) | |
download | kdepimpi-c0ca8beceaa7a366a2d74a82504cad19f4ccd642.zip kdepimpi-c0ca8beceaa7a366a2d74a82504cad19f4ccd642.tar.gz kdepimpi-c0ca8beceaa7a366a2d74a82504cad19f4ccd642.tar.bz2 |
todo fix
-rw-r--r-- | gammu/emb/gammu/gammu.pro | 5 | ||||
-rw-r--r-- | kaddressbook/kaddressbook.pro | 6 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/korganizer.pro | 10 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 5 |
6 files changed, 25 insertions, 8 deletions
diff --git a/gammu/emb/gammu/gammu.pro b/gammu/emb/gammu/gammu.pro index 55bfdec..c8aa3f0 100644 --- a/gammu/emb/gammu/gammu.pro +++ b/gammu/emb/gammu/gammu.pro | |||
@@ -1,64 +1,65 @@ | |||
1 | ###################################################################### | 1 | ###################################################################### |
2 | # Automatically generated by qmake (1.07a) Fri Jul 30 22:22:02 2004 | 2 | # Automatically generated by qmake (1.07a) Fri Jul 30 22:22:02 2004 |
3 | ###################################################################### | 3 | ###################################################################### |
4 | 4 | ||
5 | TEMPLATE = app | 5 | TEMPLATE = app |
6 | DEPENDPATH += msvc06.mak \ | 6 | DEPENDPATH += msvc06.mak \ |
7 | msvc2003.mak \ | 7 | msvc2003.mak \ |
8 | smsd \ | 8 | smsd \ |
9 | depend/nokia \ | 9 | depend/nokia \ |
10 | depend/siemens \ | 10 | depend/siemens \ |
11 | depend/nokia/dct3trac | 11 | depend/nokia/dct3trac |
12 | INCLUDEPATH += . smsd depend/nokia depend/nokia/dct3trac depend/siemens | 12 | INCLUDEPATH += . smsd depend/nokia depend/nokia/dct3trac depend/siemens |
13 | CONFIG = warn_off release console | 13 | CONFIG += warn_off console |
14 | # Input | 14 | # Input |
15 | 15 | ||
16 | include( ../../../variables.pri ) | ||
16 | HEADERS += gammu.h \ | 17 | HEADERS += gammu.h \ |
17 | sniff.h \ | 18 | sniff.h \ |
18 | smsd/s_files.h \ | 19 | smsd/s_files.h \ |
19 | smsd/s_mysql.h \ | 20 | smsd/s_mysql.h \ |
20 | smsd/smsdcore.h \ | 21 | smsd/smsdcore.h \ |
21 | depend/nokia/dct3.h \ | 22 | depend/nokia/dct3.h \ |
22 | depend/nokia/dct4.h \ | 23 | depend/nokia/dct4.h \ |
23 | depend/siemens/chiffre.h \ | 24 | depend/siemens/chiffre.h \ |
24 | depend/siemens/dsiemens.h \ | 25 | depend/siemens/dsiemens.h \ |
25 | depend/nokia/dct3trac/type-cc.h \ | 26 | depend/nokia/dct3trac/type-cc.h \ |
26 | depend/nokia/dct3trac/type-mm.h \ | 27 | depend/nokia/dct3trac/type-mm.h \ |
27 | depend/nokia/dct3trac/type-rr.h \ | 28 | depend/nokia/dct3trac/type-rr.h \ |
28 | depend/nokia/dct3trac/type-sms.h \ | 29 | depend/nokia/dct3trac/type-sms.h \ |
29 | depend/nokia/dct3trac/type-ss.h \ | 30 | depend/nokia/dct3trac/type-ss.h \ |
30 | depend/nokia/dct3trac/wmx-gsm.h \ | 31 | depend/nokia/dct3trac/wmx-gsm.h \ |
31 | depend/nokia/dct3trac/wmx-list.h \ | 32 | depend/nokia/dct3trac/wmx-list.h \ |
32 | depend/nokia/dct3trac/wmx-sim.h \ | 33 | depend/nokia/dct3trac/wmx-sim.h \ |
33 | depend/nokia/dct3trac/wmx-util.h \ | 34 | depend/nokia/dct3trac/wmx-util.h \ |
34 | depend/nokia/dct3trac/wmx.h | 35 | depend/nokia/dct3trac/wmx.h |
35 | SOURCES += gammu.c \ | 36 | SOURCES += gammu.c \ |
36 | sniff.c \ | 37 | sniff.c \ |
37 | smsd/s_files.c \ | 38 | smsd/s_files.c \ |
38 | smsd/smsdcore.c \ | 39 | smsd/smsdcore.c \ |
39 | depend/nokia/dct3.c \ | 40 | depend/nokia/dct3.c \ |
40 | depend/nokia/dct4.c \ | 41 | depend/nokia/dct4.c \ |
41 | depend/siemens/chiffre.c \ | 42 | depend/siemens/chiffre.c \ |
42 | depend/siemens/dsiemens.c \ | 43 | depend/siemens/dsiemens.c \ |
43 | depend/nokia/dct3trac/wmx-gsm.c \ | 44 | depend/nokia/dct3trac/wmx-gsm.c \ |
44 | depend/nokia/dct3trac/wmx-list.c \ | 45 | depend/nokia/dct3trac/wmx-list.c \ |
45 | depend/nokia/dct3trac/wmx-sim.c \ | 46 | depend/nokia/dct3trac/wmx-sim.c \ |
46 | depend/nokia/dct3trac/wmx-util.c \ | 47 | depend/nokia/dct3trac/wmx-util.c \ |
47 | depend/nokia/dct3trac/wmx.c | 48 | depend/nokia/dct3trac/wmx.c |
48 | unix : { | 49 | unix : { |
49 | LIBS += ../../../bin/libmicrogammu.so /usr/lib/libpthread.so | 50 | LIBS += ../../../bin/libmicrogammu.so /usr/lib/libpthread.so |
50 | # bluetooth disabled for now | 51 | # bluetooth disabled for now |
51 | #/usr/lib/libbluetooth.so /usr/lib/libsdp.so | 52 | #/usr/lib/libbluetooth.so /usr/lib/libsdp.so |
52 | OBJECTS_DIR = obj/unix | 53 | OBJECTS_DIR = obj/unix |
53 | } | 54 | } |
54 | win32 : { | 55 | win32 : { |
55 | CONFIG = qt warn_on | 56 | CONFIG += qt warn_on |
56 | #LIBS += mfc71u.lib | 57 | #LIBS += mfc71u.lib |
57 | LIBS += libc.lib | 58 | LIBS += libc.lib |
58 | #LIBS += msvcrt.lib | 59 | #LIBS += msvcrt.lib |
59 | QMAKE_LINK += /NODEFAULTLIB:msvcrt | 60 | QMAKE_LINK += /NODEFAULTLIB:msvcrt |
60 | LIBS += ../../../bin/microgammu.lib | 61 | LIBS += ../../../bin/microgammu.lib |
61 | OBJECTS_DIR = obj/win | 62 | OBJECTS_DIR = obj/win |
62 | } | 63 | } |
63 | DESTDIR = ../../../bin | 64 | DESTDIR = ../../../bin |
64 | TARGET = kammu | 65 | TARGET = kammu |
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index 7203eb3..f9d22d5 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro | |||
@@ -1,198 +1,202 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | TARGET = kapi | 3 | TARGET = kapi |
4 | DESTDIR= ../bin | 4 | DESTDIR= ../bin |
5 | 5 | ||
6 | include( ../variables.pri ) | 6 | include( ../variables.pri ) |
7 | 7 | ||
8 | 8 | ||
9 | INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces | 9 | INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../ interfaces |
10 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION | 10 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER DESKTOP_VERSION |
11 | 11 | ||
12 | unix : { | 12 | unix : { |
13 | 13 | ||
14 | staticlib: { | 14 | staticlib: { |
15 | LIBS += ../bin/libmicrokabc_qtopia.a | 15 | LIBS += ../bin/libmicrokabc_qtopia.a |
16 | LIBS += ../bin/libmicrokabc_file.a | 16 | LIBS += ../bin/libmicrokabc_file.a |
17 | LIBS += ../bin/libmicrokabc_dir.a | 17 | LIBS += ../bin/libmicrokabc_dir.a |
18 | LIBS += ../bin/libmicrokdepim.a | 18 | LIBS += ../bin/libmicrokdepim.a |
19 | LIBS += ../bin/libmicrokcal.a | 19 | LIBS += ../bin/libmicrokcal.a |
20 | LIBS += ../bin/libmicrokabc.a | 20 | LIBS += ../bin/libmicrokabc.a |
21 | LIBS += ../bin/libmicrokde.a | 21 | LIBS += ../bin/libmicrokde.a |
22 | LIBS += ../bin/libmicrokabc_qtopia.a | 22 | LIBS += ../bin/libmicrokabc_qtopia.a |
23 | LIBS += ../bin/libmicrokabc_file.a | 23 | LIBS += ../bin/libmicrokabc_file.a |
24 | LIBS += ../bin/libmicrokabc_dir.a | 24 | LIBS += ../bin/libmicrokabc_dir.a |
25 | LIBS += ../bin/libmicrokdepim.a | 25 | LIBS += ../bin/libmicrokdepim.a |
26 | LIBS += ../bin/libmicrokcal.a | 26 | LIBS += ../bin/libmicrokcal.a |
27 | LIBS += ../bin/libmicrokabc.a | 27 | LIBS += ../bin/libmicrokabc.a |
28 | LIBS += ../bin/libmicrokde.a | 28 | LIBS += ../bin/libmicrokde.a |
29 | LIBS += ../libical/lib/libical.a | 29 | LIBS += ../libical/lib/libical.a |
30 | LIBS += ../libical/lib/libicalss.a | 30 | LIBS += ../libical/lib/libicalss.a |
31 | 31 | ||
32 | } else { | 32 | } else { |
33 | LIBS += ../bin/libmicrokdepim.so | 33 | LIBS += ../bin/libmicrokdepim.so |
34 | LIBS += ../bin/libmicrokde.so | 34 | LIBS += ../bin/libmicrokde.so |
35 | LIBS += ../bin/libmicrokabc.so | 35 | LIBS += ../bin/libmicrokabc.so |
36 | LIBS += ../bin/libmicrokcal.so | 36 | LIBS += ../bin/libmicrokcal.so |
37 | #LIBS += -lldap | 37 | #LIBS += -lldap |
38 | } | 38 | } |
39 | OBJECTS_DIR = obj/unix | 39 | OBJECTS_DIR = obj/unix |
40 | MOC_DIR = moc/unix | 40 | MOC_DIR = moc/unix |
41 | } | 41 | } |
42 | win32: { | 42 | win32: { |
43 | RC_FILE = winicons.rc | 43 | RC_FILE = winicons.rc |
44 | DEFINES += _WIN32_ | 44 | DEFINES += _WIN32_ |
45 | LIBS += ../bin/microkdepim.lib | 45 | LIBS += ../bin/microkdepim.lib |
46 | LIBS += ../bin/microkcal.lib | 46 | LIBS += ../bin/microkcal.lib |
47 | LIBS += ../bin/microkde.lib | 47 | LIBS += ../bin/microkde.lib |
48 | LIBS += ../bin/microkabc.lib | 48 | LIBS += ../bin/microkabc.lib |
49 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 49 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
50 | OBJECTS_DIR = obj/win | 50 | OBJECTS_DIR = obj/win |
51 | MOC_DIR = moc/win | 51 | MOC_DIR = moc/win |
52 | #olimport section | 52 | #olimport section |
53 | #blabla: { | 53 | #blabla: { |
54 | 54 | debug: { | |
55 | LIBS += mfc71ud.lib | ||
56 | } | ||
57 | release: { | ||
55 | LIBS += mfc71u.lib | 58 | LIBS += mfc71u.lib |
59 | } | ||
56 | DEFINES += _OL_IMPORT_ | 60 | DEFINES += _OL_IMPORT_ |
57 | HEADERS = ../outport/msoutl9.h \ | 61 | HEADERS = ../outport/msoutl9.h \ |
58 | kaimportoldialog.h | 62 | kaimportoldialog.h |
59 | SOURCES = ../outport/msoutl9.cpp \ | 63 | SOURCES = ../outport/msoutl9.cpp \ |
60 | kaimportoldialog.cpp | 64 | kaimportoldialog.cpp |
61 | #} | 65 | #} |
62 | #olimport section end | 66 | #olimport section end |
63 | } | 67 | } |
64 | 68 | ||
65 | INTERFACES = \ | 69 | INTERFACES = \ |
66 | # filteredit_base.ui \ | 70 | # filteredit_base.ui \ |
67 | # kofilterview_base.ui \ | 71 | # kofilterview_base.ui \ |
68 | 72 | ||
69 | HEADERS += \ | 73 | HEADERS += \ |
70 | features/mergewidget.h \ | 74 | features/mergewidget.h \ |
71 | features/distributionlistwidget.h \ | 75 | features/distributionlistwidget.h \ |
72 | kcmconfigs/addresseewidget.h \ | 76 | kcmconfigs/addresseewidget.h \ |
73 | kcmconfigs/extensionconfigdialog.h \ | 77 | kcmconfigs/extensionconfigdialog.h \ |
74 | kcmconfigs/kcmkabconfig.h \ | 78 | kcmconfigs/kcmkabconfig.h \ |
75 | kcmconfigs/kabconfigwidget.h \ | 79 | kcmconfigs/kabconfigwidget.h \ |
76 | addresseeeditordialog.h \ | 80 | addresseeeditordialog.h \ |
77 | addresseeeditorwidget.h \ | 81 | addresseeeditorwidget.h \ |
78 | addresseditwidget.h \ | 82 | addresseditwidget.h \ |
79 | addresseeconfig.h \ | 83 | addresseeconfig.h \ |
80 | addresseeutil.h \ | 84 | addresseeutil.h \ |
81 | emaileditwidget.h \ | 85 | emaileditwidget.h \ |
82 | filtereditdialog.h \ | 86 | filtereditdialog.h \ |
83 | kaddressbookmain.h \ | 87 | kaddressbookmain.h \ |
84 | kabprefs.h \ | 88 | kabprefs.h \ |
85 | kabcore.h \ | 89 | kabcore.h \ |
86 | viewmanager.h \ | 90 | viewmanager.h \ |
87 | extensionmanager.h \ | 91 | extensionmanager.h \ |
88 | extensionwidget.h \ | 92 | extensionwidget.h \ |
89 | kaddressbookview.h \ | 93 | kaddressbookview.h \ |
90 | geowidget.h \ | 94 | geowidget.h \ |
91 | imagewidget.h \ | 95 | imagewidget.h \ |
92 | incsearchwidget.h \ | 96 | incsearchwidget.h \ |
93 | jumpbuttonbar.h \ | 97 | jumpbuttonbar.h \ |
94 | phoneeditwidget.h \ | 98 | phoneeditwidget.h \ |
95 | secrecywidget.h \ | 99 | secrecywidget.h \ |
96 | keywidget.h \ | 100 | keywidget.h \ |
97 | nameeditdialog.h \ | 101 | nameeditdialog.h \ |
98 | filter.h \ | 102 | filter.h \ |
99 | addviewdialog.h \ | 103 | addviewdialog.h \ |
100 | configurewidget.h \ | 104 | configurewidget.h \ |
101 | viewconfigurewidget.h \ | 105 | viewconfigurewidget.h \ |
102 | viewconfigurefieldspage.h \ | 106 | viewconfigurefieldspage.h \ |
103 | viewconfigurefilterpage.h \ | 107 | viewconfigurefilterpage.h \ |
104 | typecombo.h \ | 108 | typecombo.h \ |
105 | undo.h \ | 109 | undo.h \ |
106 | undocmds.h \ | 110 | undocmds.h \ |
107 | xxportmanager.h \ | 111 | xxportmanager.h \ |
108 | xxportobject.h \ | 112 | xxportobject.h \ |
109 | xxportselectdialog.h \ | 113 | xxportselectdialog.h \ |
110 | details/detailsviewcontainer.h \ | 114 | details/detailsviewcontainer.h \ |
111 | details/look_basic.h \ | 115 | details/look_basic.h \ |
112 | details/look_html.h \ | 116 | details/look_html.h \ |
113 | views/kaddressbookiconview.h \ | 117 | views/kaddressbookiconview.h \ |
114 | views/kaddressbooktableview.h \ | 118 | views/kaddressbooktableview.h \ |
115 | views/kaddressbookcardview.h \ | 119 | views/kaddressbookcardview.h \ |
116 | views/configuretableviewdialog.h \ | 120 | views/configuretableviewdialog.h \ |
117 | views/configurecardviewdialog.h \ | 121 | views/configurecardviewdialog.h \ |
118 | views/cardview.h \ | 122 | views/cardview.h \ |
119 | views/colorlistbox.h \ | 123 | views/colorlistbox.h \ |
120 | views/contactlistview.h \ | 124 | views/contactlistview.h \ |
121 | xxport/vcard_xxport.h \ | 125 | xxport/vcard_xxport.h \ |
122 | xxport/kde2_xxport.h \ | 126 | xxport/kde2_xxport.h \ |
123 | xxport/csv_xxport.h \ | 127 | xxport/csv_xxport.h \ |
124 | xxport/csvimportdialog.h \ | 128 | xxport/csvimportdialog.h \ |
125 | xxport/opie_xxport.h \ | 129 | xxport/opie_xxport.h \ |
126 | xxport/qtopia_xxport.h \ | 130 | xxport/qtopia_xxport.h \ |
127 | xxport/sharpdtm_xxport.h \ | 131 | xxport/sharpdtm_xxport.h \ |
128 | #details/look_details.h \ | 132 | #details/look_details.h \ |
129 | #mainwindoiw.h \ | 133 | #mainwindoiw.h \ |
130 | # alarmclient.h \ | 134 | # alarmclient.h \ |
131 | # calendarview.h \ | 135 | # calendarview.h \ |
132 | # customlistviewitem.h \ | 136 | # customlistviewitem.h \ |
133 | # datenavigator.h | 137 | # datenavigator.h |
134 | 138 | ||
135 | SOURCES += \ | 139 | SOURCES += \ |
136 | addresseeeditordialog.cpp \ | 140 | addresseeeditordialog.cpp \ |
137 | addresseeeditorwidget.cpp \ | 141 | addresseeeditorwidget.cpp \ |
138 | addresseditwidget.cpp \ | 142 | addresseditwidget.cpp \ |
139 | addresseeconfig.cpp \ | 143 | addresseeconfig.cpp \ |
140 | addresseeutil.cpp \ | 144 | addresseeutil.cpp \ |
141 | extensionmanager.cpp \ | 145 | extensionmanager.cpp \ |
142 | features/mergewidget.cpp \ | 146 | features/mergewidget.cpp \ |
143 | features/distributionlistwidget.cpp \ | 147 | features/distributionlistwidget.cpp \ |
144 | kcmconfigs/addresseewidget.cpp \ | 148 | kcmconfigs/addresseewidget.cpp \ |
145 | kcmconfigs/extensionconfigdialog.cpp \ | 149 | kcmconfigs/extensionconfigdialog.cpp \ |
146 | kcmconfigs/kcmkabconfig.cpp \ | 150 | kcmconfigs/kcmkabconfig.cpp \ |
147 | kcmconfigs/kabconfigwidget.cpp \ | 151 | kcmconfigs/kabconfigwidget.cpp \ |
148 | emaileditwidget.cpp \ | 152 | emaileditwidget.cpp \ |
149 | filtereditdialog.cpp \ | 153 | filtereditdialog.cpp \ |
150 | mainembedded.cpp \ | 154 | mainembedded.cpp \ |
151 | kaddressbookmain.cpp \ | 155 | kaddressbookmain.cpp \ |
152 | kabcore.cpp \ | 156 | kabcore.cpp \ |
153 | kabprefs.cpp \ | 157 | kabprefs.cpp \ |
154 | viewmanager.cpp \ | 158 | viewmanager.cpp \ |
155 | kaddressbookview.cpp \ | 159 | kaddressbookview.cpp \ |
156 | extensionwidget.cpp \ | 160 | extensionwidget.cpp \ |
157 | geowidget.cpp \ | 161 | geowidget.cpp \ |
158 | imagewidget.cpp \ | 162 | imagewidget.cpp \ |
159 | incsearchwidget.cpp \ | 163 | incsearchwidget.cpp \ |
160 | jumpbuttonbar.cpp \ | 164 | jumpbuttonbar.cpp \ |
161 | phoneeditwidget.cpp \ | 165 | phoneeditwidget.cpp \ |
162 | secrecywidget.cpp \ | 166 | secrecywidget.cpp \ |
163 | keywidget.cpp \ | 167 | keywidget.cpp \ |
164 | nameeditdialog.cpp \ | 168 | nameeditdialog.cpp \ |
165 | filter.cpp \ | 169 | filter.cpp \ |
166 | addviewdialog.cpp \ | 170 | addviewdialog.cpp \ |
167 | configurewidget.cpp \ | 171 | configurewidget.cpp \ |
168 | viewconfigurewidget.cpp \ | 172 | viewconfigurewidget.cpp \ |
169 | viewconfigurefieldspage.cpp \ | 173 | viewconfigurefieldspage.cpp \ |
170 | viewconfigurefilterpage.cpp \ | 174 | viewconfigurefilterpage.cpp \ |
171 | undo.cpp \ | 175 | undo.cpp \ |
172 | undocmds.cpp \ | 176 | undocmds.cpp \ |
173 | xxportmanager.cpp \ | 177 | xxportmanager.cpp \ |
174 | xxportobject.cpp \ | 178 | xxportobject.cpp \ |
175 | xxportselectdialog.cpp \ | 179 | xxportselectdialog.cpp \ |
176 | details/detailsviewcontainer.cpp \ | 180 | details/detailsviewcontainer.cpp \ |
177 | details/look_basic.cpp \ | 181 | details/look_basic.cpp \ |
178 | details/look_html.cpp \ | 182 | details/look_html.cpp \ |
179 | views/kaddressbookiconview.cpp \ | 183 | views/kaddressbookiconview.cpp \ |
180 | views/kaddressbooktableview.cpp \ | 184 | views/kaddressbooktableview.cpp \ |
181 | views/kaddressbookcardview.cpp \ | 185 | views/kaddressbookcardview.cpp \ |
182 | views/configuretableviewdialog.cpp \ | 186 | views/configuretableviewdialog.cpp \ |
183 | views/configurecardviewdialog.cpp \ | 187 | views/configurecardviewdialog.cpp \ |
184 | views/cardview.cpp \ | 188 | views/cardview.cpp \ |
185 | views/contactlistview.cpp \ | 189 | views/contactlistview.cpp \ |
186 | views/colorlistbox.cpp \ | 190 | views/colorlistbox.cpp \ |
187 | xxport/vcard_xxport.cpp \ | 191 | xxport/vcard_xxport.cpp \ |
188 | xxport/kde2_xxport.cpp \ | 192 | xxport/kde2_xxport.cpp \ |
189 | xxport/csv_xxport.cpp \ | 193 | xxport/csv_xxport.cpp \ |
190 | xxport/csvimportdialog.cpp \ | 194 | xxport/csvimportdialog.cpp \ |
191 | xxport/opie_xxport.cpp \ | 195 | xxport/opie_xxport.cpp \ |
192 | xxport/qtopia_xxport.cpp \ | 196 | xxport/qtopia_xxport.cpp \ |
193 | xxport/sharpdtm_xxport.cpp \ | 197 | xxport/sharpdtm_xxport.cpp \ |
194 | #details/look_details.cpp \ | 198 | #details/look_details.cpp \ |
195 | #mainwindow.cpp \ | 199 | #mainwindow.cpp \ |
196 | # calendarview.cpp \ | 200 | # calendarview.cpp \ |
197 | # timespanview.cpp | 201 | # timespanview.cpp |
198 | 202 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 904bbe2..a8ad467 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1405,514 +1405,516 @@ void CalendarView::syncExternal( int mode ) | |||
1405 | 1405 | ||
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | bool CalendarView::importBday() | 1408 | bool CalendarView::importBday() |
1409 | { | 1409 | { |
1410 | #ifndef KORG_NOKABC | 1410 | #ifndef KORG_NOKABC |
1411 | 1411 | ||
1412 | #ifdef DESKTOP_VERSION | 1412 | #ifdef DESKTOP_VERSION |
1413 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 1413 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
1414 | KABC::AddressBook::Iterator it; | 1414 | KABC::AddressBook::Iterator it; |
1415 | int count = 0; | 1415 | int count = 0; |
1416 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1416 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1417 | ++count; | 1417 | ++count; |
1418 | } | 1418 | } |
1419 | QProgressBar bar(count,0 ); | 1419 | QProgressBar bar(count,0 ); |
1420 | int w = 300; | 1420 | int w = 300; |
1421 | if ( QApplication::desktop()->width() < 320 ) | 1421 | if ( QApplication::desktop()->width() < 320 ) |
1422 | w = 220; | 1422 | w = 220; |
1423 | int h = bar.sizeHint().height() ; | 1423 | int h = bar.sizeHint().height() ; |
1424 | int dw = QApplication::desktop()->width(); | 1424 | int dw = QApplication::desktop()->width(); |
1425 | int dh = QApplication::desktop()->height(); | 1425 | int dh = QApplication::desktop()->height(); |
1426 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1426 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1427 | bar.show(); | 1427 | bar.show(); |
1428 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 1428 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
1429 | qApp->processEvents(); | 1429 | qApp->processEvents(); |
1430 | count = 0; | 1430 | count = 0; |
1431 | int addCount = 0; | 1431 | int addCount = 0; |
1432 | KCal::Attendee* a = 0; | 1432 | KCal::Attendee* a = 0; |
1433 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1433 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1434 | if ( ! bar.isVisible() ) | 1434 | if ( ! bar.isVisible() ) |
1435 | return false; | 1435 | return false; |
1436 | bar.setProgress( count++ ); | 1436 | bar.setProgress( count++ ); |
1437 | qApp->processEvents(); | 1437 | qApp->processEvents(); |
1438 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); | 1438 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); |
1439 | if ( (*it).birthday().date().isValid() ){ | 1439 | if ( (*it).birthday().date().isValid() ){ |
1440 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 1440 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
1441 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) | 1441 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) |
1442 | ++addCount; | 1442 | ++addCount; |
1443 | } | 1443 | } |
1444 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); | 1444 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); |
1445 | if ( anni.isValid() ){ | 1445 | if ( anni.isValid() ){ |
1446 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 1446 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
1447 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) | 1447 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) |
1448 | ++addCount; | 1448 | ++addCount; |
1449 | } | 1449 | } |
1450 | } | 1450 | } |
1451 | updateView(); | 1451 | updateView(); |
1452 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1452 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1453 | #else //DESKTOP_VERSION | 1453 | #else //DESKTOP_VERSION |
1454 | 1454 | ||
1455 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 1455 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
1456 | // the result should now arrive through method insertBirthdays | 1456 | // the result should now arrive through method insertBirthdays |
1457 | 1457 | ||
1458 | #endif //DESKTOP_VERSION | 1458 | #endif //DESKTOP_VERSION |
1459 | 1459 | ||
1460 | #endif //KORG_NOKABC | 1460 | #endif //KORG_NOKABC |
1461 | 1461 | ||
1462 | 1462 | ||
1463 | return true; | 1463 | return true; |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI | 1466 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI |
1467 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, | 1467 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, |
1468 | const QStringList& anniversaryList, const QStringList& realNameList, | 1468 | const QStringList& anniversaryList, const QStringList& realNameList, |
1469 | const QStringList& emailList, const QStringList& assembledNameList, | 1469 | const QStringList& emailList, const QStringList& assembledNameList, |
1470 | const QStringList& uidList) | 1470 | const QStringList& uidList) |
1471 | { | 1471 | { |
1472 | //qDebug("KO::CalendarView::insertBirthdays"); | 1472 | //qDebug("KO::CalendarView::insertBirthdays"); |
1473 | if (uid == this->name()) | 1473 | if (uid == this->name()) |
1474 | { | 1474 | { |
1475 | int count = birthdayList.count(); | 1475 | int count = birthdayList.count(); |
1476 | int addCount = 0; | 1476 | int addCount = 0; |
1477 | KCal::Attendee* a = 0; | 1477 | KCal::Attendee* a = 0; |
1478 | 1478 | ||
1479 | //qDebug("CalView 1 %i", count); | 1479 | //qDebug("CalView 1 %i", count); |
1480 | 1480 | ||
1481 | QProgressBar bar(count,0 ); | 1481 | QProgressBar bar(count,0 ); |
1482 | int w = 300; | 1482 | int w = 300; |
1483 | if ( QApplication::desktop()->width() < 320 ) | 1483 | if ( QApplication::desktop()->width() < 320 ) |
1484 | w = 220; | 1484 | w = 220; |
1485 | int h = bar.sizeHint().height() ; | 1485 | int h = bar.sizeHint().height() ; |
1486 | int dw = QApplication::desktop()->width(); | 1486 | int dw = QApplication::desktop()->width(); |
1487 | int dh = QApplication::desktop()->height(); | 1487 | int dh = QApplication::desktop()->height(); |
1488 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1488 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1489 | bar.show(); | 1489 | bar.show(); |
1490 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); | 1490 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); |
1491 | qApp->processEvents(); | 1491 | qApp->processEvents(); |
1492 | 1492 | ||
1493 | QDate birthday; | 1493 | QDate birthday; |
1494 | QDate anniversary; | 1494 | QDate anniversary; |
1495 | QString realName; | 1495 | QString realName; |
1496 | QString email; | 1496 | QString email; |
1497 | QString assembledName; | 1497 | QString assembledName; |
1498 | QString uid; | 1498 | QString uid; |
1499 | bool ok = true; | 1499 | bool ok = true; |
1500 | for ( int i = 0; i < count; i++) | 1500 | for ( int i = 0; i < count; i++) |
1501 | { | 1501 | { |
1502 | if ( ! bar.isVisible() ) | 1502 | if ( ! bar.isVisible() ) |
1503 | return; | 1503 | return; |
1504 | bar.setProgress( i ); | 1504 | bar.setProgress( i ); |
1505 | qApp->processEvents(); | 1505 | qApp->processEvents(); |
1506 | 1506 | ||
1507 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); | 1507 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); |
1508 | if (!ok) { | 1508 | if (!ok) { |
1509 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); | 1509 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); | 1512 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); |
1513 | if (!ok) { | 1513 | if (!ok) { |
1514 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); | 1514 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); |
1515 | } | 1515 | } |
1516 | realName = realNameList[i]; | 1516 | realName = realNameList[i]; |
1517 | email = emailList[i]; | 1517 | email = emailList[i]; |
1518 | assembledName = assembledNameList[i]; | 1518 | assembledName = assembledNameList[i]; |
1519 | uid = uidList[i]; | 1519 | uid = uidList[i]; |
1520 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); | 1520 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); |
1521 | 1521 | ||
1522 | if ( birthday.isValid() ){ | 1522 | if ( birthday.isValid() ){ |
1523 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1523 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1524 | KCal::Attendee::ReqParticipant,uid) ; | 1524 | KCal::Attendee::ReqParticipant,uid) ; |
1525 | if ( addAnniversary( birthday, assembledName, a, true ) ) | 1525 | if ( addAnniversary( birthday, assembledName, a, true ) ) |
1526 | ++addCount; | 1526 | ++addCount; |
1527 | } | 1527 | } |
1528 | 1528 | ||
1529 | if ( anniversary.isValid() ){ | 1529 | if ( anniversary.isValid() ){ |
1530 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1530 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1531 | KCal::Attendee::ReqParticipant,uid) ; | 1531 | KCal::Attendee::ReqParticipant,uid) ; |
1532 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 1532 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
1533 | ++addCount; | 1533 | ++addCount; |
1534 | } | 1534 | } |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | updateView(); | 1537 | updateView(); |
1538 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1538 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1539 | 1539 | ||
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | 1544 | ||
1545 | 1545 | ||
1546 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1546 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1547 | { | 1547 | { |
1548 | //qDebug("addAnni "); | 1548 | //qDebug("addAnni "); |
1549 | Event * ev = new Event(); | 1549 | Event * ev = new Event(); |
1550 | ev->setOrganizer(KOPrefs::instance()->email()); | 1550 | ev->setOrganizer(KOPrefs::instance()->email()); |
1551 | if ( a ) { | 1551 | if ( a ) { |
1552 | ev->addAttendee( a ); | 1552 | ev->addAttendee( a ); |
1553 | } | 1553 | } |
1554 | QString kind; | 1554 | QString kind; |
1555 | if ( birthday ) { | 1555 | if ( birthday ) { |
1556 | kind = i18n( "Birthday" ); | 1556 | kind = i18n( "Birthday" ); |
1557 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); | 1557 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
1558 | } | 1558 | } |
1559 | else { | 1559 | else { |
1560 | kind = i18n( "Anniversary" ); | 1560 | kind = i18n( "Anniversary" ); |
1561 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); | 1561 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
1562 | } | 1562 | } |
1563 | ev->setCategories( kind ); | 1563 | ev->setCategories( kind ); |
1564 | ev->setDtStart( QDateTime(date) ); | 1564 | ev->setDtStart( QDateTime(date) ); |
1565 | ev->setDtEnd( QDateTime(date) ); | 1565 | ev->setDtEnd( QDateTime(date) ); |
1566 | ev->setFloats( true ); | 1566 | ev->setFloats( true ); |
1567 | Recurrence * rec = ev->recurrence(); | 1567 | Recurrence * rec = ev->recurrence(); |
1568 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1568 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1569 | rec->addYearlyNum( date.month() ); | 1569 | rec->addYearlyNum( date.month() ); |
1570 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1570 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1571 | delete ev; | 1571 | delete ev; |
1572 | return false; | 1572 | return false; |
1573 | } | 1573 | } |
1574 | return true; | 1574 | return true; |
1575 | 1575 | ||
1576 | } | 1576 | } |
1577 | bool CalendarView::importQtopia( const QString &categories, | 1577 | bool CalendarView::importQtopia( const QString &categories, |
1578 | const QString &datebook, | 1578 | const QString &datebook, |
1579 | const QString &todolist ) | 1579 | const QString &todolist ) |
1580 | { | 1580 | { |
1581 | 1581 | ||
1582 | QtopiaFormat qtopiaFormat; | 1582 | QtopiaFormat qtopiaFormat; |
1583 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1583 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1584 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1584 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1585 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1585 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1586 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1586 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
1587 | 1587 | ||
1588 | updateView(); | 1588 | updateView(); |
1589 | return true; | 1589 | return true; |
1590 | 1590 | ||
1591 | #if 0 | 1591 | #if 0 |
1592 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 1592 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
1593 | mCurrentSyncDevice = "qtopia-XML"; | 1593 | mCurrentSyncDevice = "qtopia-XML"; |
1594 | if ( mSyncManager->mAskForPreferences ) | 1594 | if ( mSyncManager->mAskForPreferences ) |
1595 | edit_sync_options(); | 1595 | edit_sync_options(); |
1596 | qApp->processEvents(); | 1596 | qApp->processEvents(); |
1597 | CalendarLocal* calendar = new CalendarLocal(); | 1597 | CalendarLocal* calendar = new CalendarLocal(); |
1598 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1598 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1599 | bool syncOK = false; | 1599 | bool syncOK = false; |
1600 | QtopiaFormat qtopiaFormat; | 1600 | QtopiaFormat qtopiaFormat; |
1601 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1601 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1602 | bool loadOk = true; | 1602 | bool loadOk = true; |
1603 | if ( !categories.isEmpty() ) | 1603 | if ( !categories.isEmpty() ) |
1604 | loadOk = qtopiaFormat.load( calendar, categories ); | 1604 | loadOk = qtopiaFormat.load( calendar, categories ); |
1605 | if ( loadOk && !datebook.isEmpty() ) | 1605 | if ( loadOk && !datebook.isEmpty() ) |
1606 | loadOk = qtopiaFormat.load( calendar, datebook ); | 1606 | loadOk = qtopiaFormat.load( calendar, datebook ); |
1607 | if ( loadOk && !todolist.isEmpty() ) | 1607 | if ( loadOk && !todolist.isEmpty() ) |
1608 | loadOk = qtopiaFormat.load( calendar, todolist ); | 1608 | loadOk = qtopiaFormat.load( calendar, todolist ); |
1609 | 1609 | ||
1610 | if ( loadOk ) { | 1610 | if ( loadOk ) { |
1611 | getEventViewerDialog()->setSyncMode( true ); | 1611 | getEventViewerDialog()->setSyncMode( true ); |
1612 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1612 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1613 | getEventViewerDialog()->setSyncMode( false ); | 1613 | getEventViewerDialog()->setSyncMode( false ); |
1614 | qApp->processEvents(); | 1614 | qApp->processEvents(); |
1615 | if ( syncOK ) { | 1615 | if ( syncOK ) { |
1616 | if ( mSyncManager->mWriteBackFile ) | 1616 | if ( mSyncManager->mWriteBackFile ) |
1617 | { | 1617 | { |
1618 | // write back XML file | 1618 | // write back XML file |
1619 | 1619 | ||
1620 | } | 1620 | } |
1621 | setModified( true ); | 1621 | setModified( true ); |
1622 | } | 1622 | } |
1623 | } else { | 1623 | } else { |
1624 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 1624 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
1625 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 1625 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
1626 | question, i18n("Ok")) ; | 1626 | question, i18n("Ok")) ; |
1627 | } | 1627 | } |
1628 | delete calendar; | 1628 | delete calendar; |
1629 | updateView(); | 1629 | updateView(); |
1630 | return syncOK; | 1630 | return syncOK; |
1631 | 1631 | ||
1632 | 1632 | ||
1633 | #endif | 1633 | #endif |
1634 | 1634 | ||
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | void CalendarView::setSyncEventsReadOnly() | 1637 | void CalendarView::setSyncEventsReadOnly() |
1638 | { | 1638 | { |
1639 | Event * ev; | 1639 | Event * ev; |
1640 | QPtrList<Event> eL = mCalendar->rawEvents(); | 1640 | QPtrList<Event> eL = mCalendar->rawEvents(); |
1641 | ev = eL.first(); | 1641 | ev = eL.first(); |
1642 | while ( ev ) { | 1642 | while ( ev ) { |
1643 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) | 1643 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) |
1644 | ev->setReadOnly( true ); | 1644 | ev->setReadOnly( true ); |
1645 | ev = eL.next(); | 1645 | ev = eL.next(); |
1646 | } | 1646 | } |
1647 | } | 1647 | } |
1648 | bool CalendarView::openCalendar(QString filename, bool merge) | 1648 | bool CalendarView::openCalendar(QString filename, bool merge) |
1649 | { | 1649 | { |
1650 | 1650 | ||
1651 | if (filename.isEmpty()) { | 1651 | if (filename.isEmpty()) { |
1652 | return false; | 1652 | return false; |
1653 | } | 1653 | } |
1654 | 1654 | ||
1655 | if (!QFile::exists(filename)) { | 1655 | if (!QFile::exists(filename)) { |
1656 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); | 1656 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); |
1657 | return false; | 1657 | return false; |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | globalFlagBlockAgenda = 1; | 1660 | globalFlagBlockAgenda = 1; |
1661 | if (!merge) mCalendar->close(); | 1661 | if (!merge) { |
1662 | 1662 | mCalendar->close(); | |
1663 | mTodoList->clearList(); | ||
1664 | } | ||
1663 | mStorage->setFileName( filename ); | 1665 | mStorage->setFileName( filename ); |
1664 | 1666 | ||
1665 | if ( mStorage->load() ) { | 1667 | if ( mStorage->load() ) { |
1666 | if ( merge ) ;//setModified( true ); | 1668 | if ( merge ) ;//setModified( true ); |
1667 | else { | 1669 | else { |
1668 | //setModified( true ); | 1670 | //setModified( true ); |
1669 | mViewManager->setDocumentId( filename ); | 1671 | mViewManager->setDocumentId( filename ); |
1670 | mDialogManager->setDocumentId( filename ); | 1672 | mDialogManager->setDocumentId( filename ); |
1671 | mTodoList->setDocumentId( filename ); | 1673 | mTodoList->setDocumentId( filename ); |
1672 | } | 1674 | } |
1673 | globalFlagBlockAgenda = 2; | 1675 | globalFlagBlockAgenda = 2; |
1674 | // if ( getLastSyncEvent() ) | 1676 | // if ( getLastSyncEvent() ) |
1675 | // getLastSyncEvent()->setReadOnly( true ); | 1677 | // getLastSyncEvent()->setReadOnly( true ); |
1676 | mCalendar->reInitAlarmSettings(); | 1678 | mCalendar->reInitAlarmSettings(); |
1677 | setSyncEventsReadOnly(); | 1679 | setSyncEventsReadOnly(); |
1678 | updateUnmanagedViews(); | 1680 | updateUnmanagedViews(); |
1679 | updateView(); | 1681 | updateView(); |
1680 | if ( filename != MainWindow::defaultFileName() ) { | 1682 | if ( filename != MainWindow::defaultFileName() ) { |
1681 | saveCalendar( MainWindow::defaultFileName() ); | 1683 | saveCalendar( MainWindow::defaultFileName() ); |
1682 | } else { | 1684 | } else { |
1683 | QFileInfo finf ( MainWindow::defaultFileName()); | 1685 | QFileInfo finf ( MainWindow::defaultFileName()); |
1684 | if ( finf.exists() ) { | 1686 | if ( finf.exists() ) { |
1685 | setLoadedFileVersion( finf.lastModified () ); | 1687 | setLoadedFileVersion( finf.lastModified () ); |
1686 | } | 1688 | } |
1687 | } | 1689 | } |
1688 | return true; | 1690 | return true; |
1689 | } else { | 1691 | } else { |
1690 | // while failing to load, the calendar object could | 1692 | // while failing to load, the calendar object could |
1691 | // have become partially populated. Clear it out. | 1693 | // have become partially populated. Clear it out. |
1692 | if ( !merge ) { | 1694 | if ( !merge ) { |
1693 | mCalendar->close(); | 1695 | mCalendar->close(); |
1694 | mViewManager->setDocumentId( filename ); | 1696 | mViewManager->setDocumentId( filename ); |
1695 | mDialogManager->setDocumentId( filename ); | 1697 | mDialogManager->setDocumentId( filename ); |
1696 | mTodoList->setDocumentId( filename ); | 1698 | mTodoList->setDocumentId( filename ); |
1697 | } | 1699 | } |
1698 | 1700 | ||
1699 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); | 1701 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); |
1700 | 1702 | ||
1701 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); | 1703 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); |
1702 | globalFlagBlockAgenda = 2; | 1704 | globalFlagBlockAgenda = 2; |
1703 | mCalendar->reInitAlarmSettings(); | 1705 | mCalendar->reInitAlarmSettings(); |
1704 | setSyncEventsReadOnly(); | 1706 | setSyncEventsReadOnly(); |
1705 | updateUnmanagedViews(); | 1707 | updateUnmanagedViews(); |
1706 | updateView(); | 1708 | updateView(); |
1707 | } | 1709 | } |
1708 | return false; | 1710 | return false; |
1709 | } | 1711 | } |
1710 | void CalendarView::showOpenError() | 1712 | void CalendarView::showOpenError() |
1711 | { | 1713 | { |
1712 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); | 1714 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); |
1713 | } | 1715 | } |
1714 | void CalendarView::setLoadedFileVersion(QDateTime dt) | 1716 | void CalendarView::setLoadedFileVersion(QDateTime dt) |
1715 | { | 1717 | { |
1716 | loadedFileVersion = dt; | 1718 | loadedFileVersion = dt; |
1717 | } | 1719 | } |
1718 | bool CalendarView::checkFileChanged(QString fn) | 1720 | bool CalendarView::checkFileChanged(QString fn) |
1719 | { | 1721 | { |
1720 | QFileInfo finf ( fn ); | 1722 | QFileInfo finf ( fn ); |
1721 | if ( !finf.exists() ) | 1723 | if ( !finf.exists() ) |
1722 | return true; | 1724 | return true; |
1723 | QDateTime dt = finf.lastModified (); | 1725 | QDateTime dt = finf.lastModified (); |
1724 | if ( dt <= loadedFileVersion ) | 1726 | if ( dt <= loadedFileVersion ) |
1725 | return false; | 1727 | return false; |
1726 | return true; | 1728 | return true; |
1727 | 1729 | ||
1728 | } | 1730 | } |
1729 | void CalendarView::watchSavedFile() | 1731 | void CalendarView::watchSavedFile() |
1730 | { | 1732 | { |
1731 | QFileInfo finf ( MainWindow::defaultFileName()); | 1733 | QFileInfo finf ( MainWindow::defaultFileName()); |
1732 | if ( !finf.exists() ) | 1734 | if ( !finf.exists() ) |
1733 | return; | 1735 | return; |
1734 | QDateTime dt = finf.lastModified (); | 1736 | QDateTime dt = finf.lastModified (); |
1735 | if ( dt < loadedFileVersion ) { | 1737 | if ( dt < loadedFileVersion ) { |
1736 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); | 1738 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); |
1737 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); | 1739 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); |
1738 | return; | 1740 | return; |
1739 | } | 1741 | } |
1740 | loadedFileVersion = dt; | 1742 | loadedFileVersion = dt; |
1741 | } | 1743 | } |
1742 | 1744 | ||
1743 | bool CalendarView::checkFileVersion(QString fn) | 1745 | bool CalendarView::checkFileVersion(QString fn) |
1744 | { | 1746 | { |
1745 | QFileInfo finf ( fn ); | 1747 | QFileInfo finf ( fn ); |
1746 | if ( !finf.exists() ) | 1748 | if ( !finf.exists() ) |
1747 | return true; | 1749 | return true; |
1748 | QDateTime dt = finf.lastModified (); | 1750 | QDateTime dt = finf.lastModified (); |
1749 | //qDebug("loaded file version %s",loadedFileVersion.toString().latin1()); | 1751 | //qDebug("loaded file version %s",loadedFileVersion.toString().latin1()); |
1750 | //qDebug("file on disk version %s",dt.toString().latin1()); | 1752 | //qDebug("file on disk version %s",dt.toString().latin1()); |
1751 | if ( dt <= loadedFileVersion ) | 1753 | if ( dt <= loadedFileVersion ) |
1752 | return true; | 1754 | return true; |
1753 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , | 1755 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , |
1754 | i18n("KO/Pi Warning"),i18n("Overwrite"), | 1756 | i18n("KO/Pi Warning"),i18n("Overwrite"), |
1755 | i18n("Sync+save")); | 1757 | i18n("Sync+save")); |
1756 | 1758 | ||
1757 | if ( km == KMessageBox::Cancel ) | 1759 | if ( km == KMessageBox::Cancel ) |
1758 | return false; | 1760 | return false; |
1759 | if ( km == KMessageBox::Yes ) | 1761 | if ( km == KMessageBox::Yes ) |
1760 | return true; | 1762 | return true; |
1761 | 1763 | ||
1762 | setSyncDevice("deleteaftersync" ); | 1764 | setSyncDevice("deleteaftersync" ); |
1763 | mSyncManager->mAskForPreferences = true; | 1765 | mSyncManager->mAskForPreferences = true; |
1764 | mSyncManager->mSyncAlgoPrefs = 3; | 1766 | mSyncManager->mSyncAlgoPrefs = 3; |
1765 | mSyncManager->mWriteBackFile = false; | 1767 | mSyncManager->mWriteBackFile = false; |
1766 | mSyncManager->mWriteBackExistingOnly = false; | 1768 | mSyncManager->mWriteBackExistingOnly = false; |
1767 | mSyncManager->mShowSyncSummary = false; | 1769 | mSyncManager->mShowSyncSummary = false; |
1768 | syncCalendar( fn, 3 ); | 1770 | syncCalendar( fn, 3 ); |
1769 | Event * e = getLastSyncEvent(); | 1771 | Event * e = getLastSyncEvent(); |
1770 | mCalendar->deleteEvent ( e ); | 1772 | mCalendar->deleteEvent ( e ); |
1771 | updateView(); | 1773 | updateView(); |
1772 | return true; | 1774 | return true; |
1773 | } | 1775 | } |
1774 | 1776 | ||
1775 | bool CalendarView::saveCalendar( QString filename ) | 1777 | bool CalendarView::saveCalendar( QString filename ) |
1776 | { | 1778 | { |
1777 | 1779 | ||
1778 | // Store back all unsaved data into calendar object | 1780 | // Store back all unsaved data into calendar object |
1779 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); | 1781 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); |
1780 | if ( mViewManager->currentView() ) | 1782 | if ( mViewManager->currentView() ) |
1781 | mViewManager->currentView()->flushView(); | 1783 | mViewManager->currentView()->flushView(); |
1782 | 1784 | ||
1783 | 1785 | ||
1784 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); | 1786 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); |
1785 | mStorage->setSaveFormat( new ICalFormat() ); | 1787 | mStorage->setSaveFormat( new ICalFormat() ); |
1786 | mStorage->setFileName( filename ); | 1788 | mStorage->setFileName( filename ); |
1787 | bool success; | 1789 | bool success; |
1788 | success = mStorage->save(); | 1790 | success = mStorage->save(); |
1789 | if ( !success ) { | 1791 | if ( !success ) { |
1790 | return false; | 1792 | return false; |
1791 | } | 1793 | } |
1792 | if ( filename == MainWindow::defaultFileName() ) { | 1794 | if ( filename == MainWindow::defaultFileName() ) { |
1793 | setLoadedFileVersion( lfv ); | 1795 | setLoadedFileVersion( lfv ); |
1794 | watchSavedFile(); | 1796 | watchSavedFile(); |
1795 | } | 1797 | } |
1796 | return true; | 1798 | return true; |
1797 | } | 1799 | } |
1798 | 1800 | ||
1799 | void CalendarView::closeCalendar() | 1801 | void CalendarView::closeCalendar() |
1800 | { | 1802 | { |
1801 | 1803 | ||
1802 | // child windows no longer valid | 1804 | // child windows no longer valid |
1803 | emit closingDown(); | 1805 | emit closingDown(); |
1804 | 1806 | ||
1805 | mCalendar->close(); | 1807 | mCalendar->close(); |
1806 | setModified(false); | 1808 | setModified(false); |
1807 | updateView(); | 1809 | updateView(); |
1808 | } | 1810 | } |
1809 | 1811 | ||
1810 | void CalendarView::archiveCalendar() | 1812 | void CalendarView::archiveCalendar() |
1811 | { | 1813 | { |
1812 | mDialogManager->showArchiveDialog(); | 1814 | mDialogManager->showArchiveDialog(); |
1813 | } | 1815 | } |
1814 | 1816 | ||
1815 | 1817 | ||
1816 | void CalendarView::readSettings() | 1818 | void CalendarView::readSettings() |
1817 | { | 1819 | { |
1818 | 1820 | ||
1819 | 1821 | ||
1820 | // mViewManager->showAgendaView(); | 1822 | // mViewManager->showAgendaView(); |
1821 | QString str; | 1823 | QString str; |
1822 | //qDebug("CalendarView::readSettings() "); | 1824 | //qDebug("CalendarView::readSettings() "); |
1823 | // read settings from the KConfig, supplying reasonable | 1825 | // read settings from the KConfig, supplying reasonable |
1824 | // defaults where none are to be found | 1826 | // defaults where none are to be found |
1825 | KConfig *config = KOGlobals::config(); | 1827 | KConfig *config = KOGlobals::config(); |
1826 | #ifndef KORG_NOSPLITTER | 1828 | #ifndef KORG_NOSPLITTER |
1827 | config->setGroup("KOrganizer Geometry"); | 1829 | config->setGroup("KOrganizer Geometry"); |
1828 | 1830 | ||
1829 | QValueList<int> sizes = config->readIntListEntry("Separator1"); | 1831 | QValueList<int> sizes = config->readIntListEntry("Separator1"); |
1830 | if (sizes.count() != 2) { | 1832 | if (sizes.count() != 2) { |
1831 | sizes << mDateNavigator->minimumSizeHint().width(); | 1833 | sizes << mDateNavigator->minimumSizeHint().width(); |
1832 | sizes << 300; | 1834 | sizes << 300; |
1833 | } | 1835 | } |
1834 | mPanner->setSizes(sizes); | 1836 | mPanner->setSizes(sizes); |
1835 | 1837 | ||
1836 | sizes = config->readIntListEntry("Separator2"); | 1838 | sizes = config->readIntListEntry("Separator2"); |
1837 | if ( ( mResourceView && sizes.count() == 4 ) || | 1839 | if ( ( mResourceView && sizes.count() == 4 ) || |
1838 | ( !mResourceView && sizes.count() == 3 ) ) { | 1840 | ( !mResourceView && sizes.count() == 3 ) ) { |
1839 | mLeftSplitter->setSizes(sizes); | 1841 | mLeftSplitter->setSizes(sizes); |
1840 | } | 1842 | } |
1841 | #endif | 1843 | #endif |
1842 | globalFlagBlockAgenda = 1; | 1844 | globalFlagBlockAgenda = 1; |
1843 | mViewManager->showAgendaView(); | 1845 | mViewManager->showAgendaView(); |
1844 | //mViewManager->readSettings( config ); | 1846 | //mViewManager->readSettings( config ); |
1845 | mTodoList->restoreLayout(config,QString("Todo Layout")); | 1847 | mTodoList->restoreLayout(config,QString("Todo Layout")); |
1846 | readFilterSettings(config); | 1848 | readFilterSettings(config); |
1847 | 1849 | ||
1848 | #ifdef DESKTOP_VERSION | 1850 | #ifdef DESKTOP_VERSION |
1849 | config->setGroup("WidgetLayout"); | 1851 | config->setGroup("WidgetLayout"); |
1850 | QStringList list; | 1852 | QStringList list; |
1851 | list = config->readListEntry("MainLayout"); | 1853 | list = config->readListEntry("MainLayout"); |
1852 | int x,y,w,h; | 1854 | int x,y,w,h; |
1853 | if ( ! list.isEmpty() ) { | 1855 | if ( ! list.isEmpty() ) { |
1854 | x = list[0].toInt(); | 1856 | x = list[0].toInt(); |
1855 | y = list[1].toInt(); | 1857 | y = list[1].toInt(); |
1856 | w = list[2].toInt(); | 1858 | w = list[2].toInt(); |
1857 | h = list[3].toInt(); | 1859 | h = list[3].toInt(); |
1858 | KApplication::testCoords( &x,&y,&w,&h ); | 1860 | KApplication::testCoords( &x,&y,&w,&h ); |
1859 | topLevelWidget()->setGeometry(x,y,w,h); | 1861 | topLevelWidget()->setGeometry(x,y,w,h); |
1860 | 1862 | ||
1861 | } else { | 1863 | } else { |
1862 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | 1864 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); |
1863 | } | 1865 | } |
1864 | list = config->readListEntry("EditEventLayout"); | 1866 | list = config->readListEntry("EditEventLayout"); |
1865 | if ( ! list.isEmpty() ) { | 1867 | if ( ! list.isEmpty() ) { |
1866 | x = list[0].toInt(); | 1868 | x = list[0].toInt(); |
1867 | y = list[1].toInt(); | 1869 | y = list[1].toInt(); |
1868 | w = list[2].toInt(); | 1870 | w = list[2].toInt(); |
1869 | h = list[3].toInt(); | 1871 | h = list[3].toInt(); |
1870 | KApplication::testCoords( &x,&y,&w,&h ); | 1872 | KApplication::testCoords( &x,&y,&w,&h ); |
1871 | mEventEditor->setGeometry(x,y,w,h); | 1873 | mEventEditor->setGeometry(x,y,w,h); |
1872 | 1874 | ||
1873 | } | 1875 | } |
1874 | list = config->readListEntry("EditTodoLayout"); | 1876 | list = config->readListEntry("EditTodoLayout"); |
1875 | if ( ! list.isEmpty() ) { | 1877 | if ( ! list.isEmpty() ) { |
1876 | x = list[0].toInt(); | 1878 | x = list[0].toInt(); |
1877 | y = list[1].toInt(); | 1879 | y = list[1].toInt(); |
1878 | w = list[2].toInt(); | 1880 | w = list[2].toInt(); |
1879 | h = list[3].toInt(); | 1881 | h = list[3].toInt(); |
1880 | KApplication::testCoords( &x,&y,&w,&h ); | 1882 | KApplication::testCoords( &x,&y,&w,&h ); |
1881 | mTodoEditor->setGeometry(x,y,w,h); | 1883 | mTodoEditor->setGeometry(x,y,w,h); |
1882 | 1884 | ||
1883 | } | 1885 | } |
1884 | list = config->readListEntry("ViewerLayout"); | 1886 | list = config->readListEntry("ViewerLayout"); |
1885 | if ( ! list.isEmpty() ) { | 1887 | if ( ! list.isEmpty() ) { |
1886 | x = list[0].toInt(); | 1888 | x = list[0].toInt(); |
1887 | y = list[1].toInt(); | 1889 | y = list[1].toInt(); |
1888 | w = list[2].toInt(); | 1890 | w = list[2].toInt(); |
1889 | h = list[3].toInt(); | 1891 | h = list[3].toInt(); |
1890 | KApplication::testCoords( &x,&y,&w,&h ); | 1892 | KApplication::testCoords( &x,&y,&w,&h ); |
1891 | getEventViewerDialog()->setGeometry(x,y,w,h); | 1893 | getEventViewerDialog()->setGeometry(x,y,w,h); |
1892 | } | 1894 | } |
1893 | #endif | 1895 | #endif |
1894 | config->setGroup( "Views" ); | 1896 | config->setGroup( "Views" ); |
1895 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); | 1897 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); |
1896 | 1898 | ||
1897 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); | 1899 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); |
1898 | 1900 | ||
1899 | int resetval = 0; | 1901 | int resetval = 0; |
1900 | int maxVal = 0; | 1902 | int maxVal = 0; |
1901 | if (sizes.count() != 3) { | 1903 | if (sizes.count() != 3) { |
1902 | if ( KOPrefs::instance()->mVerticalScreen ) { | 1904 | if ( KOPrefs::instance()->mVerticalScreen ) { |
1903 | resetval = mDateNavigator->sizeHint().width()+2; | 1905 | resetval = mDateNavigator->sizeHint().width()+2; |
1904 | } else { | 1906 | } else { |
1905 | resetval = mDateNavigator->sizeHint().height()+2; | 1907 | resetval = mDateNavigator->sizeHint().height()+2; |
1906 | } | 1908 | } |
1907 | } | 1909 | } |
1908 | if ( resetval ) { | 1910 | if ( resetval ) { |
1909 | sizes.clear(); | 1911 | sizes.clear(); |
1910 | if ( KOPrefs::instance()->mVerticalScreen ) { | 1912 | if ( KOPrefs::instance()->mVerticalScreen ) { |
1911 | maxVal = QApplication::desktop()->width() -10; | 1913 | maxVal = QApplication::desktop()->width() -10; |
1912 | } else { | 1914 | } else { |
1913 | maxVal = QApplication::desktop()->height()-10; | 1915 | maxVal = QApplication::desktop()->height()-10; |
1914 | } | 1916 | } |
1915 | sizes << resetval; | 1917 | sizes << resetval; |
1916 | if ( maxVal < resetval + resetval) | 1918 | if ( maxVal < resetval + resetval) |
1917 | resetval = maxVal - resetval; | 1919 | resetval = maxVal - resetval; |
1918 | sizes << resetval; | 1920 | sizes << resetval; |
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index d88c300..32ad10a 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro | |||
@@ -1,208 +1,214 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | TARGET = kopi | 3 | TARGET = kopi |
4 | OBJECTS_DIR = _obj/ | 4 | OBJECTS_DIR = _obj/ |
5 | MOC_DIR = _moc | 5 | MOC_DIR = _moc |
6 | DESTDIR= ../bin | 6 | DESTDIR= ../bin |
7 | 7 | ||
8 | include( ../variables.pri ) | 8 | include( ../variables.pri ) |
9 | 9 | ||
10 | INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim | 10 | INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim |
11 | #../qtcompat | 11 | #../qtcompat |
12 | DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL | 12 | DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL |
13 | DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER | 13 | DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER |
14 | #KORG_NOPRINTER KORG_NOKABC KORG_NODND | 14 | #KORG_NOPRINTER KORG_NOKABC KORG_NODND |
15 | DEFINES += KORG_NOLVALTERNATION | 15 | DEFINES += KORG_NOLVALTERNATION |
16 | DEFINES += DESKTOP_VERSION | 16 | DEFINES += DESKTOP_VERSION |
17 | unix : { | 17 | unix : { |
18 | staticlib: { | 18 | staticlib: { |
19 | LIBS += ../bin/libmicrokabc_qtopia.a | 19 | LIBS += ../bin/libmicrokabc_qtopia.a |
20 | LIBS += ../bin/libmicrokabc_file.a | 20 | LIBS += ../bin/libmicrokabc_file.a |
21 | LIBS += ../bin/libmicrokabc_dir.a | 21 | LIBS += ../bin/libmicrokabc_dir.a |
22 | LIBS += ../bin/libmicrokdepim.a | 22 | LIBS += ../bin/libmicrokdepim.a |
23 | LIBS += ../bin/libmicrokcal.a | 23 | LIBS += ../bin/libmicrokcal.a |
24 | LIBS += ../bin/libmicrokabc.a | 24 | LIBS += ../bin/libmicrokabc.a |
25 | LIBS += ../bin/libmicrokde.a | 25 | LIBS += ../bin/libmicrokde.a |
26 | LIBS += ../bin/libmicrokabc_qtopia.a | 26 | LIBS += ../bin/libmicrokabc_qtopia.a |
27 | LIBS += ../bin/libmicrokabc_file.a | 27 | LIBS += ../bin/libmicrokabc_file.a |
28 | LIBS += ../bin/libmicrokabc_dir.a | 28 | LIBS += ../bin/libmicrokabc_dir.a |
29 | LIBS += ../bin/libmicrokdepim.a | 29 | LIBS += ../bin/libmicrokdepim.a |
30 | LIBS += ../bin/libmicrokcal.a | 30 | LIBS += ../bin/libmicrokcal.a |
31 | LIBS += ../bin/libmicrokabc.a | 31 | LIBS += ../bin/libmicrokabc.a |
32 | LIBS += ../bin/libmicrokde.a | 32 | LIBS += ../bin/libmicrokde.a |
33 | LIBS += ../libical/lib/libical.a | 33 | LIBS += ../libical/lib/libical.a |
34 | LIBS += ../libical/lib/libicalss.a | 34 | LIBS += ../libical/lib/libicalss.a |
35 | } else { | 35 | } else { |
36 | LIBS += ../bin/libmicrokdepim.so | 36 | LIBS += ../bin/libmicrokdepim.so |
37 | LIBS += ../bin/libmicrokcal.so | 37 | LIBS += ../bin/libmicrokcal.so |
38 | LIBS += ../bin/libmicrokde.so | 38 | LIBS += ../bin/libmicrokde.so |
39 | LIBS += ../bin/libmicrokabc.so | 39 | LIBS += ../bin/libmicrokabc.so |
40 | #LIBS += -lbluetooth | 40 | #LIBS += -lbluetooth |
41 | #LIBS += -lsdp | 41 | #LIBS += -lsdp |
42 | 42 | ||
43 | #LIBS += -lldap | 43 | #LIBS += -lldap |
44 | } | 44 | } |
45 | OBJECTS_DIR = obj/unix | 45 | OBJECTS_DIR = obj/unix |
46 | MOC_DIR = moc/unix | 46 | MOC_DIR = moc/unix |
47 | } | 47 | } |
48 | win32: { | 48 | win32: { |
49 | RC_FILE = winicons.rc | 49 | RC_FILE = winicons.rc |
50 | DEFINES += _WIN32_ | 50 | DEFINES += _WIN32_ |
51 | LIBS += ../bin/microkdepim.lib | 51 | LIBS += ../bin/microkdepim.lib |
52 | LIBS += ../bin/microkcal.lib | 52 | LIBS += ../bin/microkcal.lib |
53 | LIBS += ../bin/microkde.lib | 53 | LIBS += ../bin/microkde.lib |
54 | LIBS += ../bin/microkabc.lib | 54 | LIBS += ../bin/microkabc.lib |
55 | LIBS += ../libical/lib/ical.lib | 55 | LIBS += ../libical/lib/ical.lib |
56 | LIBS += ../libical/lib/icalss.lib | 56 | LIBS += ../libical/lib/icalss.lib |
57 | #LIBS += atls.lib | 57 | #LIBS += atls.lib |
58 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 58 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
59 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT | 59 | QMAKE_LINK += /NODEFAULTLIB:MSVCRT |
60 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib | 60 | QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib |
61 | OBJECTS_DIR = obj/win | 61 | OBJECTS_DIR = obj/win |
62 | MOC_DIR = moc/win | 62 | MOC_DIR = moc/win |
63 | #olimport section | 63 | #olimport section |
64 | #blabla: { | 64 | #blabla: { |
65 | debug: { | ||
66 | LIBS += mfc71ud.lib | ||
67 | } | ||
68 | release: { | ||
65 | LIBS += mfc71u.lib | 69 | LIBS += mfc71u.lib |
70 | } | ||
66 | DEFINES += _OL_IMPORT_ | 71 | DEFINES += _OL_IMPORT_ |
67 | 72 | ||
68 | HEADERS += ../outport/msoutl9.h \ | 73 | HEADERS += ../outport/msoutl9.h \ |
69 | koimportoldialog.h | 74 | koimportoldialog.h |
75 | |||
70 | SOURCES += ../outport/msoutl9.cpp \ | 76 | SOURCES += ../outport/msoutl9.cpp \ |
71 | koimportoldialog.cpp | 77 | koimportoldialog.cpp |
72 | #} | 78 | #} |
73 | #olimport section end | 79 | #olimport section end |
74 | 80 | ||
75 | } | 81 | } |
76 | 82 | ||
77 | 83 | ||
78 | INTERFACES = kofilterview_base.ui | 84 | INTERFACES = kofilterview_base.ui |
79 | #filteredit_base.ui | 85 | #filteredit_base.ui |
80 | 86 | ||
81 | # kdateedit.h \ | 87 | # kdateedit.h \ |
82 | 88 | ||
83 | HEADERS += datenavigatorcontainer.h \ | 89 | HEADERS += datenavigatorcontainer.h \ |
84 | filteredit_base.h \ | 90 | filteredit_base.h \ |
85 | alarmclient.h \ | 91 | alarmclient.h \ |
86 | calendarview.h \ | 92 | calendarview.h \ |
87 | customlistviewitem.h \ | 93 | customlistviewitem.h \ |
88 | datenavigator.h \ | 94 | datenavigator.h \ |
89 | docprefs.h \ | 95 | docprefs.h \ |
90 | filtereditdialog.h \ | 96 | filtereditdialog.h \ |
91 | incomingdialog.h \ | 97 | incomingdialog.h \ |
92 | incomingdialog_base.h \ | 98 | incomingdialog_base.h \ |
93 | interfaces/korganizer/baseview.h \ | 99 | interfaces/korganizer/baseview.h \ |
94 | interfaces/korganizer/calendarviewbase.h \ | 100 | interfaces/korganizer/calendarviewbase.h \ |
95 | journalentry.h \ | 101 | journalentry.h \ |
96 | kdatenavigator.h \ | 102 | kdatenavigator.h \ |
97 | koagenda.h \ | 103 | koagenda.h \ |
98 | koagendaitem.h \ | 104 | koagendaitem.h \ |
99 | koagendaview.h \ | 105 | koagendaview.h \ |
100 | kocounterdialog.h \ | 106 | kocounterdialog.h \ |
101 | kodaymatrix.h \ | 107 | kodaymatrix.h \ |
102 | kodialogmanager.h \ | 108 | kodialogmanager.h \ |
103 | koeditordetails.h \ | 109 | koeditordetails.h \ |
104 | koeditorgeneral.h \ | 110 | koeditorgeneral.h \ |
105 | koeditorgeneralevent.h \ | 111 | koeditorgeneralevent.h \ |
106 | koeditorgeneraltodo.h \ | 112 | koeditorgeneraltodo.h \ |
107 | koeditorrecurrence.h \ | 113 | koeditorrecurrence.h \ |
108 | koeventeditor.h \ | 114 | koeventeditor.h \ |
109 | koeventpopupmenu.h \ | 115 | koeventpopupmenu.h \ |
110 | koeventview.h \ | 116 | koeventview.h \ |
111 | koeventviewer.h \ | 117 | koeventviewer.h \ |
112 | koeventviewerdialog.h \ | 118 | koeventviewerdialog.h \ |
113 | kofilterview.h \ | 119 | kofilterview.h \ |
114 | koglobals.h \ | 120 | koglobals.h \ |
115 | koincidenceeditor.h \ | 121 | koincidenceeditor.h \ |
116 | kojournalview.h \ | 122 | kojournalview.h \ |
117 | kolistview.h \ | 123 | kolistview.h \ |
118 | kolocationbox.h \ | 124 | kolocationbox.h \ |
119 | komonthview.h \ | 125 | komonthview.h \ |
120 | koprefs.h \ | 126 | koprefs.h \ |
121 | koprefsdialog.h \ | 127 | koprefsdialog.h \ |
122 | kotimespanview.h \ | 128 | kotimespanview.h \ |
123 | kotodoeditor.h \ | 129 | kotodoeditor.h \ |
124 | kotodoview.h \ | 130 | kotodoview.h \ |
125 | kotodoviewitem.h \ | 131 | kotodoviewitem.h \ |
126 | koviewmanager.h \ | 132 | koviewmanager.h \ |
127 | kowhatsnextview.h \ | 133 | kowhatsnextview.h \ |
128 | ktimeedit.h \ | 134 | ktimeedit.h \ |
129 | lineview.h \ | 135 | lineview.h \ |
130 | mainwindow.h \ | 136 | mainwindow.h \ |
131 | navigatorbar.h \ | 137 | navigatorbar.h \ |
132 | outgoingdialog.h \ | 138 | outgoingdialog.h \ |
133 | outgoingdialog_base.h \ | 139 | outgoingdialog_base.h \ |
134 | publishdialog.h \ | 140 | publishdialog.h \ |
135 | publishdialog_base.h \ | 141 | publishdialog_base.h \ |
136 | savetemplatedialog.h \ | 142 | savetemplatedialog.h \ |
137 | searchdialog.h \ | 143 | searchdialog.h \ |
138 | statusdialog.h \ | 144 | statusdialog.h \ |
139 | timeline.h \ | 145 | timeline.h \ |
140 | timespanview.h \ | 146 | timespanview.h \ |
141 | version.h \ | 147 | version.h \ |
142 | ../kalarmd/alarmdialog.h \ | 148 | ../kalarmd/alarmdialog.h \ |
143 | 149 | ||
144 | 150 | ||
145 | SOURCES += datenavigatorcontainer.cpp \ | 151 | SOURCES += datenavigatorcontainer.cpp \ |
146 | filteredit_base.cpp \ | 152 | filteredit_base.cpp \ |
147 | calendarview.cpp \ | 153 | calendarview.cpp \ |
148 | datenavigator.cpp \ | 154 | datenavigator.cpp \ |
149 | docprefs.cpp \ | 155 | docprefs.cpp \ |
150 | filtereditdialog.cpp \ | 156 | filtereditdialog.cpp \ |
151 | incomingdialog.cpp \ | 157 | incomingdialog.cpp \ |
152 | incomingdialog_base.cpp \ | 158 | incomingdialog_base.cpp \ |
153 | journalentry.cpp \ | 159 | journalentry.cpp \ |
154 | kdatenavigator.cpp \ | 160 | kdatenavigator.cpp \ |
155 | koagenda.cpp \ | 161 | koagenda.cpp \ |
156 | koagendaitem.cpp \ | 162 | koagendaitem.cpp \ |
157 | koagendaview.cpp \ | 163 | koagendaview.cpp \ |
158 | kocounterdialog.cpp \ | 164 | kocounterdialog.cpp \ |
159 | kodaymatrix.cpp \ | 165 | kodaymatrix.cpp \ |
160 | kodialogmanager.cpp \ | 166 | kodialogmanager.cpp \ |
161 | koeditordetails.cpp \ | 167 | koeditordetails.cpp \ |
162 | koeditorgeneral.cpp \ | 168 | koeditorgeneral.cpp \ |
163 | koeditorgeneralevent.cpp \ | 169 | koeditorgeneralevent.cpp \ |
164 | koeditorgeneraltodo.cpp \ | 170 | koeditorgeneraltodo.cpp \ |
165 | koeditorrecurrence.cpp \ | 171 | koeditorrecurrence.cpp \ |
166 | koeventeditor.cpp \ | 172 | koeventeditor.cpp \ |
167 | koeventpopupmenu.cpp \ | 173 | koeventpopupmenu.cpp \ |
168 | koeventview.cpp \ | 174 | koeventview.cpp \ |
169 | koeventviewer.cpp \ | 175 | koeventviewer.cpp \ |
170 | koeventviewerdialog.cpp \ | 176 | koeventviewerdialog.cpp \ |
171 | kofilterview.cpp \ | 177 | kofilterview.cpp \ |
172 | koglobals.cpp \ | 178 | koglobals.cpp \ |
173 | koincidenceeditor.cpp \ | 179 | koincidenceeditor.cpp \ |
174 | kojournalview.cpp \ | 180 | kojournalview.cpp \ |
175 | kolistview.cpp \ | 181 | kolistview.cpp \ |
176 | kolocationbox.cpp \ | 182 | kolocationbox.cpp \ |
177 | komonthview.cpp \ | 183 | komonthview.cpp \ |
178 | koprefs.cpp \ | 184 | koprefs.cpp \ |
179 | koprefsdialog.cpp \ | 185 | koprefsdialog.cpp \ |
180 | kotimespanview.cpp \ | 186 | kotimespanview.cpp \ |
181 | kotodoeditor.cpp \ | 187 | kotodoeditor.cpp \ |
182 | kotodoview.cpp \ | 188 | kotodoview.cpp \ |
183 | kotodoviewitem.cpp \ | 189 | kotodoviewitem.cpp \ |
184 | koviewmanager.cpp \ | 190 | koviewmanager.cpp \ |
185 | kowhatsnextview.cpp \ | 191 | kowhatsnextview.cpp \ |
186 | ktimeedit.cpp \ | 192 | ktimeedit.cpp \ |
187 | lineview.cpp \ | 193 | lineview.cpp \ |
188 | main.cpp \ | 194 | main.cpp \ |
189 | mainwindow.cpp \ | 195 | mainwindow.cpp \ |
190 | navigatorbar.cpp \ | 196 | navigatorbar.cpp \ |
191 | outgoingdialog.cpp \ | 197 | outgoingdialog.cpp \ |
192 | outgoingdialog_base.cpp \ | 198 | outgoingdialog_base.cpp \ |
193 | publishdialog.cpp \ | 199 | publishdialog.cpp \ |
194 | publishdialog_base.cpp \ | 200 | publishdialog_base.cpp \ |
195 | savetemplatedialog.cpp \ | 201 | savetemplatedialog.cpp \ |
196 | searchdialog.cpp \ | 202 | searchdialog.cpp \ |
197 | statusdialog.cpp \ | 203 | statusdialog.cpp \ |
198 | timeline.cpp \ | 204 | timeline.cpp \ |
199 | timespanview.cpp \ | 205 | timespanview.cpp \ |
200 | ../kalarmd/alarmdialog.cpp | 206 | ../kalarmd/alarmdialog.cpp |
201 | 207 | ||
202 | HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h | 208 | HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h |
203 | INTERFACES += calprintdayconfig_base.ui \ | 209 | INTERFACES += calprintdayconfig_base.ui \ |
204 | calprintmonthconfig_base.ui \ | 210 | calprintmonthconfig_base.ui \ |
205 | calprinttodoconfig_base.ui \ | 211 | calprinttodoconfig_base.ui \ |
206 | calprintweekconfig_base.ui | 212 | calprintweekconfig_base.ui |
207 | SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp | 213 | SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp |
208 | 214 | ||
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index d368513..1ffc34a 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -1,264 +1,265 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOTODOVIEW_H | 23 | #ifndef KOTODOVIEW_H |
24 | #define KOTODOVIEW_H | 24 | #define KOTODOVIEW_H |
25 | 25 | ||
26 | #include <qfont.h> | 26 | #include <qfont.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qptrlist.h> | 29 | #include <qptrlist.h> |
30 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
31 | #include <qlistbox.h> | 31 | #include <qlistbox.h> |
32 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | #include <qlistview.h> | 35 | #include <qlistview.h> |
36 | #include <klistview.h> | 36 | #include <klistview.h> |
37 | 37 | ||
38 | #include <libkcal/calendar.h> | 38 | #include <libkcal/calendar.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | 40 | ||
41 | #include <korganizer/baseview.h> | 41 | #include <korganizer/baseview.h> |
42 | 42 | ||
43 | #include "kotodoviewitem.h" | 43 | #include "kotodoviewitem.h" |
44 | #include "koprefs.h" | 44 | #include "koprefs.h" |
45 | #include "koglobals.h" | 45 | #include "koglobals.h" |
46 | #include "datenavigator.h" | 46 | #include "datenavigator.h" |
47 | 47 | ||
48 | class QDragEnterEvent; | 48 | class QDragEnterEvent; |
49 | class QDragMoveEvent; | 49 | class QDragMoveEvent; |
50 | class QDragLeaveEvent; | 50 | class QDragLeaveEvent; |
51 | class QDropEvent; | 51 | class QDropEvent; |
52 | class KOTodoViewWhatsThis; | 52 | class KOTodoViewWhatsThis; |
53 | 53 | ||
54 | class DocPrefs; | 54 | class DocPrefs; |
55 | 55 | ||
56 | class KOTodoListView : public KListView | 56 | class KOTodoListView : public KListView |
57 | { | 57 | { |
58 | Q_OBJECT | 58 | Q_OBJECT |
59 | public: | 59 | public: |
60 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 60 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
61 | virtual ~KOTodoListView() {} | 61 | virtual ~KOTodoListView() {} |
62 | 62 | ||
63 | signals: | 63 | signals: |
64 | void paintNeeded(); | 64 | void paintNeeded(); |
65 | void todoDropped(Todo *, int); | 65 | void todoDropped(Todo *, int); |
66 | void double_Clicked(QListViewItem *item); | 66 | void double_Clicked(QListViewItem *item); |
67 | void reparentTodoSignal( Todo *,Todo * ); | 67 | void reparentTodoSignal( Todo *,Todo * ); |
68 | void unparentTodoSignal(Todo *); | 68 | void unparentTodoSignal(Todo *); |
69 | void deleteTodo( Todo * ); | 69 | void deleteTodo( Todo * ); |
70 | protected: | 70 | protected: |
71 | void wheelEvent (QWheelEvent *e); | 71 | void wheelEvent (QWheelEvent *e); |
72 | void contentsDragEnterEvent(QDragEnterEvent *); | 72 | void contentsDragEnterEvent(QDragEnterEvent *); |
73 | void contentsDragMoveEvent(QDragMoveEvent *); | 73 | void contentsDragMoveEvent(QDragMoveEvent *); |
74 | void contentsDragLeaveEvent(QDragLeaveEvent *); | 74 | void contentsDragLeaveEvent(QDragLeaveEvent *); |
75 | void contentsDropEvent(QDropEvent *); | 75 | void contentsDropEvent(QDropEvent *); |
76 | 76 | ||
77 | void contentsMousePressEvent(QMouseEvent *); | 77 | void contentsMousePressEvent(QMouseEvent *); |
78 | void contentsMouseMoveEvent(QMouseEvent *); | 78 | void contentsMouseMoveEvent(QMouseEvent *); |
79 | void contentsMouseReleaseEvent(QMouseEvent *); | 79 | void contentsMouseReleaseEvent(QMouseEvent *); |
80 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 80 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
81 | 81 | ||
82 | private: | 82 | private: |
83 | void paintEvent(QPaintEvent * pevent); | 83 | void paintEvent(QPaintEvent * pevent); |
84 | bool internalDrop; | 84 | bool internalDrop; |
85 | QString mName; | 85 | QString mName; |
86 | Calendar *mCalendar; | 86 | Calendar *mCalendar; |
87 | QPoint mPressPos; | 87 | QPoint mPressPos; |
88 | bool mMousePressed; | 88 | bool mMousePressed; |
89 | QListViewItem *mOldCurrent; | 89 | QListViewItem *mOldCurrent; |
90 | bool mFlagKeyPressed; | 90 | bool mFlagKeyPressed; |
91 | void keyPressEvent ( QKeyEvent * ) ; | 91 | void keyPressEvent ( QKeyEvent * ) ; |
92 | void keyReleaseEvent ( QKeyEvent * ) ; | 92 | void keyReleaseEvent ( QKeyEvent * ) ; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | 95 | ||
96 | /** | 96 | /** |
97 | This is the line-edit on top of the todoview for fast addition of new todos | 97 | This is the line-edit on top of the todoview for fast addition of new todos |
98 | */ | 98 | */ |
99 | class KOQuickTodo : public QLineEdit | 99 | class KOQuickTodo : public QLineEdit |
100 | { | 100 | { |
101 | public: | 101 | public: |
102 | KOQuickTodo(QWidget *parent=0); | 102 | KOQuickTodo(QWidget *parent=0); |
103 | protected: | 103 | protected: |
104 | void focusInEvent(QFocusEvent *ev); | 104 | void focusInEvent(QFocusEvent *ev); |
105 | void focusOutEvent(QFocusEvent *ev); | 105 | void focusOutEvent(QFocusEvent *ev); |
106 | }; | 106 | }; |
107 | 107 | ||
108 | 108 | ||
109 | /** | 109 | /** |
110 | This class provides a multi-column list view of todo events. | 110 | This class provides a multi-column list view of todo events. |
111 | 111 | ||
112 | @short multi-column list view of todo events. | 112 | @short multi-column list view of todo events. |
113 | @author Cornelius Schumacher <schumacher@kde.org> | 113 | @author Cornelius Schumacher <schumacher@kde.org> |
114 | */ | 114 | */ |
115 | class KOTodoView : public KOrg::BaseView | 115 | class KOTodoView : public KOrg::BaseView |
116 | { | 116 | { |
117 | Q_OBJECT | 117 | Q_OBJECT |
118 | public: | 118 | public: |
119 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 119 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
120 | ~KOTodoView(); | 120 | ~KOTodoView(); |
121 | 121 | ||
122 | QPtrList<Incidence> selectedIncidences(); | 122 | QPtrList<Incidence> selectedIncidences(); |
123 | QPtrList<Todo> selectedTodos(); | 123 | QPtrList<Todo> selectedTodos(); |
124 | 124 | ||
125 | DateList selectedDates() | 125 | DateList selectedDates() |
126 | {DateList q; | 126 | {DateList q; |
127 | return q;} | 127 | return q;} |
128 | 128 | ||
129 | /** Return number of shown dates. TodoView does not show dates, */ | 129 | /** Return number of shown dates. TodoView does not show dates, */ |
130 | int currentDateCount() { return 0; } | 130 | int currentDateCount() { return 0; } |
131 | 131 | ||
132 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 132 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |
133 | 133 | ||
134 | void setDocumentId( const QString & ); | 134 | void setDocumentId( const QString & ); |
135 | 135 | ||
136 | void saveLayout(KConfig *config, const QString &group) const; | 136 | void saveLayout(KConfig *config, const QString &group) const; |
137 | void restoreLayout(KConfig *config, const QString &group); | 137 | void restoreLayout(KConfig *config, const QString &group); |
138 | /** Create a popup menu to set categories */ | 138 | /** Create a popup menu to set categories */ |
139 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | 139 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); |
140 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} | 140 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} |
141 | QString getWhatsThisText(QPoint p); | 141 | QString getWhatsThisText(QPoint p); |
142 | void clearList() {mTodoListView->clear(); } | ||
142 | 143 | ||
143 | public slots: | 144 | public slots: |
144 | void updateView(); | 145 | void updateView(); |
145 | void updateConfig(); | 146 | void updateConfig(); |
146 | 147 | ||
147 | void changeEventDisplay(Event *, int); | 148 | void changeEventDisplay(Event *, int); |
148 | 149 | ||
149 | void showDates(const QDate &start, const QDate &end); | 150 | void showDates(const QDate &start, const QDate &end); |
150 | void showEvents(QPtrList<Event> eventList); | 151 | void showEvents(QPtrList<Event> eventList); |
151 | 152 | ||
152 | void clearSelection(); | 153 | void clearSelection(); |
153 | void jumpToDate (); | 154 | void jumpToDate (); |
154 | 155 | ||
155 | void editItem(QListViewItem *item); | 156 | void editItem(QListViewItem *item); |
156 | void showItem(QListViewItem *item,const QPoint &,int); | 157 | void showItem(QListViewItem *item,const QPoint &,int); |
157 | void popupMenu(QListViewItem *item,const QPoint &,int); | 158 | void popupMenu(QListViewItem *item,const QPoint &,int); |
158 | void newTodo(); | 159 | void newTodo(); |
159 | void newSubTodo(); | 160 | void newSubTodo(); |
160 | void unparentTodo(); | 161 | void unparentTodo(); |
161 | void reparentTodo(); | 162 | void reparentTodo(); |
162 | void showTodo(); | 163 | void showTodo(); |
163 | void editTodo(); | 164 | void editTodo(); |
164 | void cloneTodo(); | 165 | void cloneTodo(); |
165 | void cancelTodo(); | 166 | void cancelTodo(); |
166 | void moveTodo(); | 167 | void moveTodo(); |
167 | void beamTodo(); | 168 | void beamTodo(); |
168 | void deleteTodo(); | 169 | void deleteTodo(); |
169 | 170 | ||
170 | void setNewPriority(int); | 171 | void setNewPriority(int); |
171 | void setNewPercentage(int); | 172 | void setNewPercentage(int); |
172 | void changedCategories(int); | 173 | void changedCategories(int); |
173 | 174 | ||
174 | void setAllOpen(); | 175 | void setAllOpen(); |
175 | void setAllClose(); | 176 | void setAllClose(); |
176 | void setAllFlat(); | 177 | void setAllFlat(); |
177 | void displayAllFlat(); | 178 | void displayAllFlat(); |
178 | 179 | ||
179 | void purgeCompleted(); | 180 | void purgeCompleted(); |
180 | void toggleCompleted(); | 181 | void toggleCompleted(); |
181 | void toggleRunning(); | 182 | void toggleRunning(); |
182 | void toggleQuickTodo(); | 183 | void toggleQuickTodo(); |
183 | void updateTodo( Todo *, int ); | 184 | void updateTodo( Todo *, int ); |
184 | 185 | ||
185 | void itemClicked(QListViewItem *); | 186 | void itemClicked(QListViewItem *); |
186 | void itemStateChanged(QListViewItem *); | 187 | void itemStateChanged(QListViewItem *); |
187 | void modified(bool); | 188 | void modified(bool); |
188 | void itemDoubleClicked(QListViewItem *item); | 189 | void itemDoubleClicked(QListViewItem *item); |
189 | 190 | ||
190 | signals: | 191 | signals: |
191 | void newTodoSignal(); | 192 | void newTodoSignal(); |
192 | void newSubTodoSignal(Todo *); | 193 | void newSubTodoSignal(Todo *); |
193 | void unparentTodoSignal(Todo *); | 194 | void unparentTodoSignal(Todo *); |
194 | void reparentTodoSignal( Todo *,Todo * ); | 195 | void reparentTodoSignal( Todo *,Todo * ); |
195 | void showTodoSignal(Todo *); | 196 | void showTodoSignal(Todo *); |
196 | 197 | ||
197 | void editTodoSignal(Todo *); | 198 | void editTodoSignal(Todo *); |
198 | void deleteTodoSignal(Todo *); | 199 | void deleteTodoSignal(Todo *); |
199 | void todoModifiedSignal (Todo *, int); | 200 | void todoModifiedSignal (Todo *, int); |
200 | 201 | ||
201 | void isModified(bool); | 202 | void isModified(bool); |
202 | void cloneTodoSignal( Incidence * ); | 203 | void cloneTodoSignal( Incidence * ); |
203 | void cancelTodoSignal( Incidence * ); | 204 | void cancelTodoSignal( Incidence * ); |
204 | void moveTodoSignal( Incidence * ); | 205 | void moveTodoSignal( Incidence * ); |
205 | void beamTodoSignal( Incidence * ); | 206 | void beamTodoSignal( Incidence * ); |
206 | void purgeCompletedSignal(); | 207 | void purgeCompletedSignal(); |
207 | 208 | ||
208 | protected slots: | 209 | protected slots: |
209 | void toggleRunningItem(); | 210 | void toggleRunningItem(); |
210 | void paintNeeded(); | 211 | void paintNeeded(); |
211 | void processSelectionChange(); | 212 | void processSelectionChange(); |
212 | void addQuickTodo(); | 213 | void addQuickTodo(); |
213 | void setTodoModified( Todo* ); | 214 | void setTodoModified( Todo* ); |
214 | void todoModified(Todo *, int ); | 215 | void todoModified(Todo *, int ); |
215 | 216 | ||
216 | private: | 217 | private: |
217 | /* | 218 | /* |
218 | * the TodoEditor approach is rather unscaling in the long | 219 | * the TodoEditor approach is rather unscaling in the long |
219 | * run. | 220 | * run. |
220 | * Korganizer keeps it in memory and we need to update | 221 | * Korganizer keeps it in memory and we need to update |
221 | * 1. make KOTodoViewItem a QObject again? | 222 | * 1. make KOTodoViewItem a QObject again? |
222 | * 2. add a public method for setting one todo modified? | 223 | * 2. add a public method for setting one todo modified? |
223 | * 3. add a private method for setting a todo modified + friend here? | 224 | * 3. add a private method for setting a todo modified + friend here? |
224 | * -- zecke 2002-07-08 | 225 | * -- zecke 2002-07-08 |
225 | */ | 226 | */ |
226 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; | 227 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; |
227 | friend class KOTodoListView; | 228 | friend class KOTodoListView; |
228 | void paintEvent(QPaintEvent * pevent); | 229 | void paintEvent(QPaintEvent * pevent); |
229 | bool mPendingUpdateBeforeRepaint; | 230 | bool mPendingUpdateBeforeRepaint; |
230 | friend class KOTodoViewItem; | 231 | friend class KOTodoViewItem; |
231 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 232 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
232 | void restoreItemState( QListViewItem * ); | 233 | void restoreItemState( QListViewItem * ); |
233 | 234 | ||
234 | bool checkTodo( Todo * ); | 235 | bool checkTodo( Todo * ); |
235 | bool isFlatDisplay; | 236 | bool isFlatDisplay; |
236 | void setOpen( QListViewItem*, bool setOpen); | 237 | void setOpen( QListViewItem*, bool setOpen); |
237 | KOTodoListView *mTodoListView; | 238 | KOTodoListView *mTodoListView; |
238 | QPopupMenu *mItemPopupMenu; | 239 | QPopupMenu *mItemPopupMenu; |
239 | QPopupMenu *mPopupMenu; | 240 | QPopupMenu *mPopupMenu; |
240 | QPopupMenu *mPriorityPopupMenu; | 241 | QPopupMenu *mPriorityPopupMenu; |
241 | QPopupMenu *mPercentageCompletedPopupMenu; | 242 | QPopupMenu *mPercentageCompletedPopupMenu; |
242 | QPopupMenu *mCategoryPopupMenu; | 243 | QPopupMenu *mCategoryPopupMenu; |
243 | 244 | ||
244 | QMap<int, int> mPercentage; | 245 | QMap<int, int> mPercentage; |
245 | QMap<int, int> mPriority; | 246 | QMap<int, int> mPriority; |
246 | QMap<int, QString> mCategory; | 247 | QMap<int, QString> mCategory; |
247 | KOTodoViewItem *mActiveItem; | 248 | KOTodoViewItem *mActiveItem; |
248 | 249 | ||
249 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 250 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
250 | QString mName; | 251 | QString mName; |
251 | 252 | ||
252 | DocPrefs *mDocPrefs; | 253 | DocPrefs *mDocPrefs; |
253 | QString mCurrentDoc; | 254 | QString mCurrentDoc; |
254 | KOQuickTodo *mQuickAdd; | 255 | KOQuickTodo *mQuickAdd; |
255 | bool mBlockUpdate; | 256 | bool mBlockUpdate; |
256 | void keyPressEvent ( QKeyEvent * ) ; | 257 | void keyPressEvent ( QKeyEvent * ) ; |
257 | KOTodoViewItem * pendingSubtodo; | 258 | KOTodoViewItem * pendingSubtodo; |
258 | DateNavigator* mNavigator; | 259 | DateNavigator* mNavigator; |
259 | void storeCurrentItem(); | 260 | void storeCurrentItem(); |
260 | void resetCurrentItem(); | 261 | void resetCurrentItem(); |
261 | Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; | 262 | Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove; |
262 | }; | 263 | }; |
263 | 264 | ||
264 | #endif | 265 | #endif |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 2e5a943..fb4de37 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -578,258 +578,261 @@ void KOViewManager::showNextXView() | |||
578 | mCurrentAgendaView = -1; | 578 | mCurrentAgendaView = -1; |
579 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 579 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
580 | globalFlagBlockAgenda = 2; | 580 | globalFlagBlockAgenda = 2; |
581 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 581 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
582 | KOPrefs::instance()->mNextXDays ); | 582 | KOPrefs::instance()->mNextXDays ); |
583 | mFlagShowNextxDays = true; | 583 | mFlagShowNextxDays = true; |
584 | mCurrentAgendaView = 3 ; | 584 | mCurrentAgendaView = 3 ; |
585 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | 585 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; |
586 | } | 586 | } |
587 | bool KOViewManager::showsNextDays() | 587 | bool KOViewManager::showsNextDays() |
588 | { | 588 | { |
589 | return mFlagShowNextxDays; | 589 | return mFlagShowNextxDays; |
590 | } | 590 | } |
591 | void KOViewManager::createMonthView() | 591 | void KOViewManager::createMonthView() |
592 | { | 592 | { |
593 | if (!mMonthView) { | 593 | if (!mMonthView) { |
594 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); | 594 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); |
595 | 595 | ||
596 | addView(mMonthView); | 596 | addView(mMonthView); |
597 | // mMonthView->show(); | 597 | // mMonthView->show(); |
598 | // SIGNALS/SLOTS FOR MONTH VIEW | 598 | // SIGNALS/SLOTS FOR MONTH VIEW |
599 | 599 | ||
600 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); | 600 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); |
601 | 601 | ||
602 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), | 602 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), |
603 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); | 603 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); |
604 | 604 | ||
605 | 605 | ||
606 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), | 606 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), |
607 | mMainView, SLOT(newEvent(QDateTime))); | 607 | mMainView, SLOT(newEvent(QDateTime))); |
608 | 608 | ||
609 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), | 609 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), |
610 | mMainView, SLOT(showIncidence(Incidence *))); | 610 | mMainView, SLOT(showIncidence(Incidence *))); |
611 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), | 611 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), |
612 | mMainView, SLOT(editIncidence(Incidence *))); | 612 | mMainView, SLOT(editIncidence(Incidence *))); |
613 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 613 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
614 | mMainView, SLOT(deleteIncidence(Incidence *))); | 614 | mMainView, SLOT(deleteIncidence(Incidence *))); |
615 | 615 | ||
616 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), | 616 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), |
617 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 617 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
618 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 618 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
619 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 619 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
620 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 620 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
621 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 621 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
622 | 622 | ||
623 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 623 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
624 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 624 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
625 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 625 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
626 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 626 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
627 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 627 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
628 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); | 628 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); |
629 | connect( mMonthView, SIGNAL( selectMonth() ), | 629 | connect( mMonthView, SIGNAL( selectMonth() ), |
630 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); | 630 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); |
631 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 631 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |
632 | mMainView, SLOT ( showDay( QDate ) ) ); | 632 | mMainView, SLOT ( showDay( QDate ) ) ); |
633 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 633 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
634 | connect( mMonthView, SIGNAL(nextMonth() ), | 634 | connect( mMonthView, SIGNAL(nextMonth() ), |
635 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 635 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
636 | connect( mMonthView, SIGNAL(prevMonth() ), | 636 | connect( mMonthView, SIGNAL(prevMonth() ), |
637 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 637 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
638 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), | 638 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), |
639 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); | 639 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); |
640 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), | 640 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), |
641 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); | 641 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); |
642 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), | 642 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), |
643 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); | 643 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); |
644 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), | 644 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), |
645 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); | 645 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); |
646 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), | 646 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), |
647 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); | 647 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); |
648 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), | 648 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), |
649 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); | 649 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); |
650 | 650 | ||
651 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 651 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
652 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); | 652 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); |
653 | 653 | ||
654 | 654 | ||
655 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), | 655 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), |
656 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); | 656 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); |
657 | 657 | ||
658 | } | 658 | } |
659 | } | 659 | } |
660 | void KOViewManager::showMonthViewWeek() | 660 | void KOViewManager::showMonthViewWeek() |
661 | { | 661 | { |
662 | createMonthView(); | 662 | createMonthView(); |
663 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | 663 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; |
664 | globalFlagBlockAgenda = 1; | 664 | globalFlagBlockAgenda = 1; |
665 | bool full = true; | 665 | bool full = true; |
666 | if ( mCurrentView == mMonthView) | 666 | if ( mCurrentView == mMonthView) |
667 | full = mMainView->leftFrame()->isVisible(); | 667 | full = mMainView->leftFrame()->isVisible(); |
668 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 668 | if ( !KOPrefs::instance()->mMonthViewWeek ) { |
669 | mMonthView->switchView(); | 669 | mMonthView->switchView(); |
670 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 670 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
671 | full = false; | 671 | full = false; |
672 | else | 672 | else |
673 | full = true; | 673 | full = true; |
674 | } | 674 | } |
675 | mMainView->dateNavigator()->selectWeek(); | 675 | mMainView->dateNavigator()->selectWeek(); |
676 | showView(mMonthView, full ); | 676 | showView(mMonthView, full ); |
677 | mMonthView->setKeyBFocus(); | 677 | mMonthView->setKeyBFocus(); |
678 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | 678 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; |
679 | } | 679 | } |
680 | 680 | ||
681 | void KOViewManager::showMonth( const QDate & date ) | 681 | void KOViewManager::showMonth( const QDate & date ) |
682 | { | 682 | { |
683 | mMainView->dateNavigator()->blockSignals( true ); | 683 | mMainView->dateNavigator()->blockSignals( true ); |
684 | mMainView->dateNavigator()->selectDate( date ); | 684 | mMainView->dateNavigator()->selectDate( date ); |
685 | mMainView->dateNavigator()->blockSignals( false ); | 685 | mMainView->dateNavigator()->blockSignals( false ); |
686 | showMonthView(); | 686 | showMonthView(); |
687 | } | 687 | } |
688 | void KOViewManager::showMonthView() | 688 | void KOViewManager::showMonthView() |
689 | { | 689 | { |
690 | 690 | ||
691 | createMonthView(); | 691 | createMonthView(); |
692 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | 692 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; |
693 | globalFlagBlockAgenda = 1; | 693 | globalFlagBlockAgenda = 1; |
694 | //mFlagShowNextxDays = false; | 694 | //mFlagShowNextxDays = false; |
695 | bool full = true; | 695 | bool full = true; |
696 | if ( mCurrentView == mMonthView) | 696 | if ( mCurrentView == mMonthView) |
697 | full = mMainView->leftFrame()->isVisible(); | 697 | full = mMainView->leftFrame()->isVisible(); |
698 | // if(mMonthView == mCurrentView) return; | 698 | // if(mMonthView == mCurrentView) return; |
699 | if ( KOPrefs::instance()->mMonthViewWeek ) { | 699 | if ( KOPrefs::instance()->mMonthViewWeek ) { |
700 | mMonthView->switchView(); | 700 | mMonthView->switchView(); |
701 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 701 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
702 | full = false; | 702 | full = false; |
703 | else | 703 | else |
704 | full = true; | 704 | full = true; |
705 | } | 705 | } |
706 | mMainView->dateNavigator()->selectMonth(); | 706 | mMainView->dateNavigator()->selectMonth(); |
707 | 707 | ||
708 | showView(mMonthView, full ); | 708 | showView(mMonthView, full ); |
709 | mMonthView->setKeyBFocus(); | 709 | mMonthView->setKeyBFocus(); |
710 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | 710 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; |
711 | 711 | ||
712 | } | 712 | } |
713 | 713 | ||
714 | void KOViewManager::showTodoView() | 714 | void KOViewManager::showTodoView() |
715 | { | 715 | { |
716 | //mFlagShowNextxDays = false; | 716 | //mFlagShowNextxDays = false; |
717 | if ( !mTodoView ) { | 717 | if ( !mTodoView ) { |
718 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 718 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |
719 | "KOViewManager::TodoView" ); | 719 | "KOViewManager::TodoView" ); |
720 | 720 | ||
721 | addView( mTodoView ); | 721 | addView( mTodoView ); |
722 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); | 722 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); |
723 | 723 | ||
724 | // SIGNALS/SLOTS FOR TODO VIEW | 724 | // SIGNALS/SLOTS FOR TODO VIEW |
725 | connect( mTodoView, SIGNAL( newTodoSignal() ), | 725 | connect( mTodoView, SIGNAL( newTodoSignal() ), |
726 | mMainView, SLOT( newTodo() ) ); | 726 | mMainView, SLOT( newTodo() ) ); |
727 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), | 727 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), |
728 | mMainView, SLOT( newSubTodo( Todo *) ) ); | 728 | mMainView, SLOT( newSubTodo( Todo *) ) ); |
729 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), | 729 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), |
730 | mMainView, SLOT( showTodo( Todo * ) ) ); | 730 | mMainView, SLOT( showTodo( Todo * ) ) ); |
731 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), | 731 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), |
732 | mMainView, SLOT( editTodo( Todo * ) ) ); | 732 | mMainView, SLOT( editTodo( Todo * ) ) ); |
733 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), | 733 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), |
734 | mMainView, SLOT( deleteTodo( Todo * ) ) ); | 734 | mMainView, SLOT( deleteTodo( Todo * ) ) ); |
735 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), | 735 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), |
736 | mMainView, SLOT( purgeCompleted() ) ); | 736 | mMainView, SLOT( purgeCompleted() ) ); |
737 | 737 | ||
738 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), | 738 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), |
739 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 739 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
740 | 740 | ||
741 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, | 741 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, |
742 | SLOT( updateConfig() ) ); | 742 | SLOT( updateConfig() ) ); |
743 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, | 743 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, |
744 | SLOT( updateTodo( Todo *, int ) ) ); | 744 | SLOT( updateTodo( Todo *, int ) ) ); |
745 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 745 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
746 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); | 746 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); |
747 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), | 747 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), |
748 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 748 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
749 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), | 749 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), |
750 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 750 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
751 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), | 751 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), |
752 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); | 752 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); |
753 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | 753 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), |
754 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); | 754 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); |
755 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), | 755 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), |
756 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 756 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
757 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), | 757 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), |
758 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 758 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
759 | KConfig *config = KOGlobals::config(); | 759 | KConfig *config = KOGlobals::config(); |
760 | mTodoView->restoreLayout(config,"Todo View"); | 760 | mTodoView->restoreLayout(config,"Todo View"); |
761 | mTodoView->setNavigator( mMainView->dateNavigator() ); | 761 | mTodoView->setNavigator( mMainView->dateNavigator() ); |
762 | } | 762 | } |
763 | 763 | ||
764 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; | 764 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; |
765 | globalFlagBlockAgenda = 1; | 765 | globalFlagBlockAgenda = 1; |
766 | showView( mTodoView, true ); | 766 | showView( mTodoView, true ); |
767 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; | 767 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; |
768 | 768 | ||
769 | } | 769 | } |
770 | 770 | ||
771 | void KOViewManager::showJournalView() | 771 | void KOViewManager::showJournalView() |
772 | { | 772 | { |
773 | //mFlagShowNextxDays = false; | 773 | //mFlagShowNextxDays = false; |
774 | if (!mJournalView) { | 774 | if (!mJournalView) { |
775 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), | 775 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), |
776 | "KOViewManager::JournalView"); | 776 | "KOViewManager::JournalView"); |
777 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, | 777 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, |
778 | SLOT( updateConfig() ) ); | 778 | SLOT( updateConfig() ) ); |
779 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); | 779 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); |
780 | addView(mJournalView); | 780 | addView(mJournalView); |
781 | } | 781 | } |
782 | 782 | ||
783 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; | 783 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; |
784 | showView(mJournalView); | 784 | showView(mJournalView); |
785 | mMainView->dateNavigator()->selectDates( 1 ); | 785 | mMainView->dateNavigator()->selectDates( 1 ); |
786 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; | 786 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; |
787 | } | 787 | } |
788 | 788 | ||
789 | void KOViewManager::showTimeSpanView() | 789 | void KOViewManager::showTimeSpanView() |
790 | { | 790 | { |
791 | //mFlagShowNextxDays = false; | 791 | //mFlagShowNextxDays = false; |
792 | if (!mTimeSpanView) { | 792 | if (!mTimeSpanView) { |
793 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), | 793 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), |
794 | "KOViewManager::TimeSpanView"); | 794 | "KOViewManager::TimeSpanView"); |
795 | addView(mTimeSpanView); | 795 | addView(mTimeSpanView); |
796 | 796 | ||
797 | mTimeSpanView->readSettings(); | 797 | mTimeSpanView->readSettings(); |
798 | } | 798 | } |
799 | 799 | ||
800 | showView(mTimeSpanView); | 800 | showView(mTimeSpanView); |
801 | } | 801 | } |
802 | 802 | ||
803 | Incidence *KOViewManager::currentSelection() | 803 | Incidence *KOViewManager::currentSelection() |
804 | { | 804 | { |
805 | if (!mCurrentView) return 0; | 805 | if (!mCurrentView) return 0; |
806 | if ( mCurrentView == mListView ) { | 806 | if ( mCurrentView == mListView ) { |
807 | if ( mListView->currentItem() ) | 807 | if ( mListView->currentItem() ) |
808 | return mListView->currentItem(); | 808 | return mListView->currentItem(); |
809 | } | 809 | } |
810 | return mCurrentView->selectedIncidences().first(); | 810 | return mCurrentView->selectedIncidences().first(); |
811 | } | 811 | } |
812 | 812 | ||
813 | QDate KOViewManager::currentSelectionDate() | 813 | QDate KOViewManager::currentSelectionDate() |
814 | { | 814 | { |
815 | QDate qd; | 815 | QDate qd; |
816 | if (mCurrentView) { | 816 | if (mCurrentView) { |
817 | DateList qvl = mCurrentView->selectedDates(); | 817 | DateList qvl = mCurrentView->selectedDates(); |
818 | if (!qvl.isEmpty()) qd = qvl.first(); | 818 | if (!qvl.isEmpty()) qd = qvl.first(); |
819 | } | 819 | } |
820 | return qd; | 820 | return qd; |
821 | } | 821 | } |
822 | 822 | ||
823 | void KOViewManager::addView(KOrg::BaseView *view) | 823 | void KOViewManager::addView(KOrg::BaseView *view) |
824 | { | 824 | { |
825 | #if QT_VERSION >= 0x030000 | 825 | #if QT_VERSION >= 0x030000 |
826 | mMainView->viewStack()->addWidget( view ); | 826 | mMainView->viewStack()->addWidget( view ); |
827 | #else | 827 | #else |
828 | mMainView->viewStack()->addWidget( view, 1 ); | 828 | mMainView->viewStack()->addWidget( view, 1 ); |
829 | #endif | 829 | #endif |
830 | } | 830 | } |
831 | 831 | ||
832 | void KOViewManager::setDocumentId( const QString &id ) | 832 | void KOViewManager::setDocumentId( const QString &id ) |
833 | { | 833 | { |
834 | if (mTodoView) mTodoView->setDocumentId( id ); | 834 | if (mTodoView) { |
835 | mTodoView->clearList(); | ||
836 | mTodoView->setDocumentId( id ); | ||
837 | } | ||
835 | } | 838 | } |