author | drw <drw> | 2005-04-06 21:39:47 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-06 21:39:47 (UTC) |
commit | 9ea956870ddf74ddc70b83ed529ebb3b36e9231e (patch) (unidiff) | |
tree | 599da226b62023d6c51c1f00867e3dffde9977ec | |
parent | 2b0e27b45eb9ff5563f786c5e45d53db49afb9f9 (diff) | |
download | opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.zip opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.tar.gz opie-9ea956870ddf74ddc70b83ed529ebb3b36e9231e.tar.bz2 |
Use OResource for loading images and fix headers
39 files changed, 1092 insertions, 441 deletions
diff --git a/core/pim/todo/main.cpp b/core/pim/todo/main.cpp index a336ba3..e12326e 100644 --- a/core/pim/todo/main.cpp +++ b/core/pim/todo/main.cpp | |||
@@ -1,43 +1,53 @@ | |||
1 | /********************************************************************** | 1 | /* |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | ** | 3 | |
4 | ** This file is part of Qtopia Environment. | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | ** | 5 | =. |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | .=l. |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | Â Â Â Â Â Â .>+-= |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | ** packaging of this file. | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ** | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | ** | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | ** | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ** not clear to you. | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ** | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | **********************************************************************/ | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
20 | 30 | ||
21 | #include "mainwindow.h" | 31 | #include "mainwindow.h" |
22 | 32 | ||
23 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
24 | 34 | ||
25 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
26 | 36 | ||
27 | void myMessages( QtMsgType, const char* ) { | 37 | void myMessages( QtMsgType, const char* ) { |
28 | 38 | ||
29 | } | 39 | } |
30 | 40 | ||
31 | int main( int argc, char **argv ) | 41 | int main( int argc, char **argv ) |
32 | { | 42 | { |
33 | qInstallMsgHandler( myMessages ); | 43 | qInstallMsgHandler( myMessages ); |
34 | QPEApplication a( argc, argv ); | 44 | QPEApplication a( argc, argv ); |
35 | 45 | ||
36 | QTime time; | 46 | QTime time; |
37 | time.start(); | 47 | time.start(); |
38 | Todo::MainWindow mw; | 48 | Todo::MainWindow mw; |
39 | int t = time.elapsed(); | 49 | int t = time.elapsed(); |
40 | mw.setCaption( QObject::tr("Opie Todolist")); | 50 | mw.setCaption( QObject::tr("Opie Todolist")); |
41 | QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); | 51 | QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); |
42 | QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); | 52 | QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); |
43 | 53 | ||
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 9013522..b6ee16f 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -1,64 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include <unistd.h> | 31 | #include <unistd.h> |
30 | 32 | ||
31 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
32 | #include <opie2/opimrecurrence.h> | 34 | #include <opie2/opimrecurrence.h> |
33 | #include <opie2/opimnotifymanager.h> | 35 | #include <opie2/opimnotifymanager.h> |
34 | #include <opie2/otodoaccessvcal.h> | 36 | #include <opie2/otodoaccessvcal.h> |
35 | #include <opie2/oapplicationfactory.h> | 37 | #include <opie2/oapplicationfactory.h> |
36 | 38 | ||
37 | #include <qpe/applnk.h> | 39 | #include <qpe/applnk.h> |
38 | #include <qpe/config.h> | 40 | #include <qpe/config.h> |
39 | #include <qpe/ir.h> | 41 | #include <qpe/ir.h> |
40 | #include <qpe/resource.h> | ||
41 | #include <qpe/qpemessagebox.h> | 42 | #include <qpe/qpemessagebox.h> |
42 | #include <qpe/alarmserver.h> | 43 | #include <qpe/alarmserver.h> |
43 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
44 | 45 | ||
45 | #include <qaction.h> | 46 | #include <qaction.h> |
46 | #include <qlayout.h> | 47 | #include <qlayout.h> |
47 | #include <qmenubar.h> | 48 | #include <qmenubar.h> |
48 | #include <qmessagebox.h> | 49 | #include <qmessagebox.h> |
49 | #include <qpushbutton.h> | 50 | #include <qpushbutton.h> |
50 | #include <qstringlist.h> | 51 | #include <qstringlist.h> |
51 | #include <qtimer.h> | 52 | #include <qtimer.h> |
52 | #include <qwhatsthis.h> | 53 | #include <qwhatsthis.h> |
53 | 54 | ||
54 | #include "quickeditimpl.h" | 55 | #include "quickeditimpl.h" |
55 | #include "todotemplatemanager.h" | 56 | #include "todotemplatemanager.h" |
56 | #include "templatedialogimpl.h" | 57 | #include "templatedialogimpl.h" |
57 | #include "tableview.h" | 58 | #include "tableview.h" |
58 | 59 | ||
59 | #include "textviewshow.h" | 60 | #include "textviewshow.h" |
60 | #include "todoeditor.h" | 61 | #include "todoeditor.h" |
61 | #include "newtaskdlg.h" | 62 | #include "newtaskdlg.h" |
62 | #include "mainwindow.h" | 63 | #include "mainwindow.h" |
63 | 64 | ||
64 | using Opie::Core::OApplicationFactory; | 65 | using Opie::Core::OApplicationFactory; |
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index c0fe805..b96795f 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TODO_MAIN_WINDOW_H | 31 | #ifndef TODO_MAIN_WINDOW_H |
30 | #define TODO_MAIN_WINDOW_H | 32 | #define TODO_MAIN_WINDOW_H |
31 | 33 | ||
32 | #include <qlist.h> | 34 | #include <qlist.h> |
33 | 35 | ||
34 | #include <opie2/otodoaccess.h> | 36 | #include <opie2/otodoaccess.h> |
35 | #include <opie2/opimtodo.h> | 37 | #include <opie2/opimtodo.h> |
36 | #include <opie2/opimmainwindow.h> | 38 | #include <opie2/opimmainwindow.h> |
37 | #include <opie2/owidgetstack.h> | 39 | #include <opie2/owidgetstack.h> |
38 | 40 | ||
39 | #include "smalltodo.h" | 41 | #include "smalltodo.h" |
40 | #include "todoview.h" | 42 | #include "todoview.h" |
41 | #include "quickedit.h" | 43 | #include "quickedit.h" |
42 | #include "todomanager.h" | 44 | #include "todomanager.h" |
43 | 45 | ||
44 | class QPopupMenu; | 46 | class QPopupMenu; |
45 | class QMenuBar; | 47 | class QMenuBar; |
46 | class QToolBar; | 48 | class QToolBar; |
47 | class QAction; | 49 | class QAction; |
48 | class Ir; | 50 | class Ir; |
49 | class QVBox; | 51 | class QVBox; |
50 | class QLineEdit; | 52 | class QLineEdit; |
@@ -133,49 +135,49 @@ private slots: | |||
133 | Opie::Ui::OWidgetStack *m_stack; | 135 | Opie::Ui::OWidgetStack *m_stack; |
134 | 136 | ||
135 | bool m_syncing:1; | 137 | bool m_syncing:1; |
136 | bool m_deadline:1; | 138 | bool m_deadline:1; |
137 | bool m_completed:1; | 139 | bool m_completed:1; |
138 | bool m_overdue:1; | 140 | bool m_overdue:1; |
139 | bool m_quicktask:1; | 141 | bool m_quicktask:1; |
140 | TodoManager m_todoMgr; | 142 | TodoManager m_todoMgr; |
141 | QString m_curCat; | 143 | QString m_curCat; |
142 | QList<ViewBase> m_views; | 144 | QList<ViewBase> m_views; |
143 | uint m_counter; | 145 | uint m_counter; |
144 | TemplateManager* m_tempManager; | 146 | TemplateManager* m_tempManager; |
145 | 147 | ||
146 | 148 | ||
147 | private slots: | 149 | private slots: |
148 | void initStuff(); | 150 | void initStuff(); |
149 | 151 | ||
150 | void slotItemNew(); | 152 | void slotItemNew(); |
151 | void slotItemEdit(); | 153 | void slotItemEdit(); |
152 | void slotItemDuplicate(); | 154 | void slotItemDuplicate(); |
153 | void slotItemDelete(); | 155 | void slotItemDelete(); |
154 | void slotItemBeam(); | 156 | void slotItemBeam(); |
155 | void slotItemFind(); | 157 | void slotItemFind(); |
156 | void slotConfigure(); | 158 | void slotConfigure(); |
157 | 159 | ||
158 | void slotShow(int); | 160 | void slotShow(int); |
159 | void slotEdit(int); | 161 | void slotEdit(int); |
160 | void slotUpdate3( QWidget* ); | 162 | void slotUpdate3( QWidget* ); |
161 | void slotComplete( int uid ); | 163 | void slotComplete( int uid ); |
162 | void slotComplete( const OPimTodo& ev ); | 164 | void slotComplete( const OPimTodo& ev ); |
163 | 165 | ||
164 | void slotDelete(int uid ); | 166 | void slotDelete(int uid ); |
165 | void slotDeleteAll(); | 167 | void slotDeleteAll(); |
166 | void slotDeleteCompleted(); | 168 | void slotDeleteCompleted(); |
167 | 169 | ||
168 | 170 | ||
169 | void setCategory( const QString &category ); | 171 | void setCategory( const QString &category ); |
170 | 172 | ||
171 | void slotShowDeadLine( bool ); | 173 | void slotShowDeadLine( bool ); |
172 | void slotShowCompleted( bool ); | 174 | void slotShowCompleted( bool ); |
173 | void slotShowQuickTask( bool ); | 175 | void slotShowQuickTask( bool ); |
174 | 176 | ||
175 | void setDocument( const QString& ); | 177 | void setDocument( const QString& ); |
176 | 178 | ||
177 | 179 | ||
178 | void beamDone( Ir* ); | 180 | void beamDone( Ir* ); |
179 | void slotShowDetails(); | 181 | void slotShowDetails(); |
180 | void slotShowNext(); | 182 | void slotShowNext(); |
181 | void slotShowPrev(); | 183 | void slotShowPrev(); |
diff --git a/core/pim/todo/newtaskdlg.cpp b/core/pim/todo/newtaskdlg.cpp index 0b5a29d..68a0d24 100644 --- a/core/pim/todo/newtaskdlg.cpp +++ b/core/pim/todo/newtaskdlg.cpp | |||
@@ -1,78 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2005 Dan Williams <drw@handhelds.org> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "newtaskdlg.h" | 31 | #include "newtaskdlg.h" |
30 | 32 | ||
31 | #include <qbuttongroup.h> | 33 | #include <qbuttongroup.h> |
32 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
33 | #include <qlayout.h> | 35 | #include <qlayout.h> |
34 | #include <qradiobutton.h> | 36 | #include <qradiobutton.h> |
35 | 37 | ||
36 | NewTaskDlg::NewTaskDlg( const QStringList &templates, QWidget *parent ) | 38 | NewTaskDlg::NewTaskDlg( const QStringList &templates, QWidget *parent ) |
37 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 39 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
38 | { | 40 | { |
39 | setCaption( tr( "New Task" ) ); | 41 | setCaption( tr( "New Task" ) ); |
40 | 42 | ||
41 | QButtonGroup *bg = new QButtonGroup( this ); | 43 | QButtonGroup *bg = new QButtonGroup( this ); |
42 | bg->hide(); | 44 | bg->hide(); |
43 | 45 | ||
44 | QVBoxLayout *layout = new QVBoxLayout( this, 10, 3 ); | 46 | QVBoxLayout *layout = new QVBoxLayout( this, 10, 3 ); |
45 | 47 | ||
46 | QRadioButton *btn = new QRadioButton( tr( "Blank task" ), this ); | 48 | QRadioButton *btn = new QRadioButton( tr( "Blank task" ), this ); |
47 | btn->setChecked( true ); | 49 | btn->setChecked( true ); |
48 | bg->insert( btn ); | 50 | bg->insert( btn ); |
49 | layout->addWidget( btn ); | 51 | layout->addWidget( btn ); |
50 | 52 | ||
51 | layout->addStretch(); | 53 | layout->addStretch(); |
52 | 54 | ||
53 | m_useTemplate = new QRadioButton( tr( "Using template:" ), this ); | 55 | m_useTemplate = new QRadioButton( tr( "Using template:" ), this ); |
54 | connect( m_useTemplate, SIGNAL(toggled(bool)), this, SLOT(slotUseTemplate(bool)) ); | 56 | connect( m_useTemplate, SIGNAL(toggled(bool)), this, SLOT(slotUseTemplate(bool)) ); |
55 | bg->insert( m_useTemplate ); | 57 | bg->insert( m_useTemplate ); |
56 | layout->addWidget( m_useTemplate ); | 58 | layout->addWidget( m_useTemplate ); |
57 | 59 | ||
58 | m_templateList = new QComboBox( this ); | 60 | m_templateList = new QComboBox( this ); |
59 | m_templateList->insertStringList( templates ); | 61 | m_templateList->insertStringList( templates ); |
60 | m_templateList->setEnabled( false ); | 62 | m_templateList->setEnabled( false ); |
61 | layout->addWidget( m_templateList ); | 63 | layout->addWidget( m_templateList ); |
62 | 64 | ||
63 | layout->addStretch(); | 65 | layout->addStretch(); |
64 | } | 66 | } |
65 | 67 | ||
66 | QString NewTaskDlg::tempSelected() { | 68 | QString NewTaskDlg::tempSelected() { |
67 | QString tempStr; | 69 | QString tempStr; |
68 | if ( m_useTemplate->isChecked() ) | 70 | if ( m_useTemplate->isChecked() ) |
69 | tempStr = m_templateList->currentText(); | 71 | tempStr = m_templateList->currentText(); |
70 | 72 | ||
71 | return tempStr; | 73 | return tempStr; |
72 | } | 74 | } |
73 | 75 | ||
74 | void NewTaskDlg::slotUseTemplate( bool on ) { | 76 | void NewTaskDlg::slotUseTemplate( bool on ) { |
75 | m_templateList->setEnabled( on ); | 77 | m_templateList->setEnabled( on ); |
76 | if ( on ) | 78 | if ( on ) |
77 | m_templateList->setFocus(); | 79 | m_templateList->setFocus(); |
78 | } | 80 | } |
diff --git a/core/pim/todo/newtaskdlg.h b/core/pim/todo/newtaskdlg.h index 31398b3..235c7a0 100644 --- a/core/pim/todo/newtaskdlg.h +++ b/core/pim/todo/newtaskdlg.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef NEWTASKDLG_H | 31 | #ifndef NEWTASKDLG_H |
30 | #define NEWTASKDLG_H | 32 | #define NEWTASKDLG_H |
31 | 33 | ||
32 | #include <qdialog.h> | 34 | #include <qdialog.h> |
33 | 35 | ||
34 | #include <qstringlist.h> | 36 | #include <qstringlist.h> |
35 | 37 | ||
36 | class QComboBox; | 38 | class QComboBox; |
37 | class QRadioButton; | 39 | class QRadioButton; |
38 | 40 | ||
39 | class NewTaskDlg : public QDialog | 41 | class NewTaskDlg : public QDialog |
40 | { | 42 | { |
41 | Q_OBJECT | 43 | Q_OBJECT |
42 | 44 | ||
43 | public: | 45 | public: |
44 | NewTaskDlg( const QStringList &templates, QWidget *parent = 0l ); | 46 | NewTaskDlg( const QStringList &templates, QWidget *parent = 0l ); |
45 | 47 | ||
46 | QString tempSelected(); | 48 | QString tempSelected(); |
47 | 49 | ||
48 | private: | 50 | private: |
49 | QRadioButton *m_useTemplate; | 51 | QRadioButton *m_useTemplate; |
50 | QComboBox *m_templateList; | 52 | QComboBox *m_templateList; |
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index bbc177d..8cce9ed 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <qlayout.h> | 31 | #include <qlayout.h> |
2 | 32 | ||
3 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
4 | 34 | ||
5 | #include "taskeditoroverview.h" | 35 | #include "taskeditoroverview.h" |
6 | #include "taskeditorstatus.h" | 36 | #include "taskeditorstatus.h" |
7 | #include "taskeditoralarms.h" | 37 | #include "taskeditoralarms.h" |
8 | 38 | ||
9 | #include "otaskeditor.h" | 39 | #include "otaskeditor.h" |
10 | 40 | ||
11 | using namespace Opie::Ui; | 41 | using namespace Opie::Ui; |
12 | using namespace Opie; | 42 | using namespace Opie; |
13 | 43 | ||
14 | OTaskEditor::OTaskEditor(int cur) | 44 | OTaskEditor::OTaskEditor(int cur) |
15 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 45 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
16 | init(); | 46 | init(); |
17 | init( cur ); | 47 | init( cur ); |
18 | } | 48 | } |
19 | OTaskEditor::OTaskEditor( const OPimTodo& to) | 49 | OTaskEditor::OTaskEditor( const OPimTodo& to) |
20 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { | 50 | : QDialog( 0, 0, TRUE, WStyle_ContextHelp ) { |
21 | init(); | 51 | init(); |
22 | init( to ); | 52 | init( to ); |
23 | } | 53 | } |
24 | OTaskEditor::~OTaskEditor() { | 54 | OTaskEditor::~OTaskEditor() { |
diff --git a/core/pim/todo/otaskeditor.h b/core/pim/todo/otaskeditor.h index 65e7bda..1715d02 100644 --- a/core/pim/todo/otaskeditor.h +++ b/core/pim/todo/otaskeditor.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TASK_EDITOR_H | 31 | #ifndef OPIE_TASK_EDITOR_H |
2 | #define OPIE_TASK_EDITOR_H | 32 | #define OPIE_TASK_EDITOR_H |
3 | 33 | ||
4 | #include <qdialog.h> | 34 | #include <qdialog.h> |
5 | 35 | ||
6 | #include <opie2/opimtodo.h> | 36 | #include <opie2/opimtodo.h> |
7 | #include <opie2/otabwidget.h> | 37 | #include <opie2/otabwidget.h> |
8 | #include <opie2/opimrecurrencewidget.h> | 38 | #include <opie2/opimrecurrencewidget.h> |
9 | #include <opie2/opimrecurrencewidget.h> | 39 | #include <opie2/opimrecurrencewidget.h> |
10 | 40 | ||
11 | class TaskEditorOverView; | 41 | class TaskEditorOverView; |
12 | class TaskEditorStatus; | 42 | class TaskEditorStatus; |
13 | class TaskEditorAlarms; | 43 | class TaskEditorAlarms; |
14 | class QMultiLineEdit; | 44 | class QMultiLineEdit; |
15 | 45 | ||
16 | class OTaskEditor : public QDialog { | 46 | class OTaskEditor : public QDialog { |
17 | Q_OBJECT | 47 | Q_OBJECT |
18 | public: | 48 | public: |
19 | OTaskEditor(int cur); | 49 | OTaskEditor(int cur); |
20 | OTaskEditor( const Opie::OPimTodo& todo ); | 50 | OTaskEditor( const Opie::OPimTodo& todo ); |
21 | ~OTaskEditor(); | 51 | ~OTaskEditor(); |
22 | 52 | ||
23 | /* | 53 | /* |
24 | * same as the c'tor but this gives us the | 54 | * same as the c'tor but this gives us the |
diff --git a/core/pim/todo/quickedit.cpp b/core/pim/todo/quickedit.cpp index 16fc53a..eb26c45 100644 --- a/core/pim/todo/quickedit.cpp +++ b/core/pim/todo/quickedit.cpp | |||
@@ -1,21 +1,51 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include "quickedit.h" | 31 | #include "quickedit.h" |
2 | 32 | ||
3 | using namespace Todo; | 33 | using namespace Todo; |
4 | 34 | ||
5 | // not so interesting part base Implementation | 35 | // not so interesting part base Implementation |
6 | QuickEdit::QuickEdit(MainWindow* main ) | 36 | QuickEdit::QuickEdit(MainWindow* main ) |
7 | : m_main( main ) { | 37 | : m_main( main ) { |
8 | m_sig = new QSignal(); | 38 | m_sig = new QSignal(); |
9 | } | 39 | } |
10 | QuickEdit::~QuickEdit() { | 40 | QuickEdit::~QuickEdit() { |
11 | delete m_sig; | 41 | delete m_sig; |
12 | } | 42 | } |
13 | QSignal* QuickEdit::signal() { | 43 | QSignal* QuickEdit::signal() { |
14 | return m_sig; | 44 | return m_sig; |
15 | } | 45 | } |
16 | MainWindow* QuickEdit::mainWindow() { | 46 | MainWindow* QuickEdit::mainWindow() { |
17 | return m_main; | 47 | return m_main; |
18 | } | 48 | } |
19 | void QuickEdit::commit() { | 49 | void QuickEdit::commit() { |
20 | m_sig->activate(); | 50 | m_sig->activate(); |
21 | } | 51 | } |
diff --git a/core/pim/todo/quickedit.h b/core/pim/todo/quickedit.h index 0c0c204..a479d9e 100644 --- a/core/pim/todo/quickedit.h +++ b/core/pim/todo/quickedit.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_QUICK_EDIT_H | 31 | #ifndef OPIE_QUICK_EDIT_H |
2 | #define OPIE_QUICK_EDIT_H | 32 | #define OPIE_QUICK_EDIT_H |
3 | 33 | ||
4 | #include <qsignal.h> | 34 | #include <qsignal.h> |
5 | #include <qwidget.h> | 35 | #include <qwidget.h> |
6 | 36 | ||
7 | #include <opie2/opimtodo.h> | 37 | #include <opie2/opimtodo.h> |
8 | 38 | ||
9 | using Opie::OPimTodo; | 39 | using Opie::OPimTodo; |
10 | 40 | ||
11 | namespace Todo{ | 41 | namespace Todo{ |
12 | class MainWindow; | 42 | class MainWindow; |
13 | struct QuickEditBase { | 43 | struct QuickEditBase { |
14 | virtual OPimTodo todo()const = 0l; | 44 | virtual OPimTodo todo()const = 0l; |
15 | virtual QSignal* signal() = 0l; | 45 | virtual QSignal* signal() = 0l; |
16 | virtual QWidget* widget() = 0l; | 46 | virtual QWidget* widget() = 0l; |
17 | }; | 47 | }; |
18 | /* | 48 | /* |
19 | * this is my second try | 49 | * this is my second try |
20 | * of signal and slots with namespaces | 50 | * of signal and slots with namespaces |
21 | * and templates | 51 | * and templates |
22 | * I use a different approach now | 52 | * I use a different approach now |
23 | * I give a QSignal away | 53 | * I give a QSignal away |
24 | * and have a protected method called emit | 54 | * and have a protected method called emit |
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp index 90ad19e..f700716 100644 --- a/core/pim/todo/quickeditimpl.cpp +++ b/core/pim/todo/quickeditimpl.cpp | |||
@@ -1,74 +1,106 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <qaction.h> | 31 | #include <qaction.h> |
2 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
3 | #include <qwhatsthis.h> | 33 | #include <qwhatsthis.h> |
4 | 34 | ||
5 | #include <qpe/resource.h> | ||
6 | |||
7 | #include <opie2/oclickablelabel.h> | 35 | #include <opie2/oclickablelabel.h> |
36 | #include <opie2/oresource.h> | ||
8 | 37 | ||
9 | #include "mainwindow.h" | 38 | #include "mainwindow.h" |
10 | #include "quickeditimpl.h" | 39 | #include "quickeditimpl.h" |
11 | 40 | ||
12 | 41 | ||
13 | 42 | ||
14 | QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) | 43 | QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) |
15 | : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { | 44 | : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { |
16 | setHorizontalStretchable( TRUE ); | 45 | setHorizontalStretchable( TRUE ); |
17 | 46 | ||
18 | // Load priority icons | 47 | // Load priority icons |
19 | // TODO - probably should be done globally somewhere else, | 48 | // TODO - probably should be done globally somewhere else, |
20 | // see also tableview.cpp/h, taskeditoroverview.cpp/h | 49 | // see also tableview.cpp/h, taskeditoroverview.cpp/h |
21 | priority1 = Resource::loadPixmap( "todo/priority1" ); | 50 | priority1 = Opie::Core::OResource::loadPixmap( "todo/priority1" ); |
22 | priority3 = Resource::loadPixmap( "todo/priority3" ); | 51 | priority3 = Opie::Core::OResource::loadPixmap( "todo/priority3" ); |
23 | priority5 = Resource::loadPixmap( "todo/priority5" ); | 52 | priority5 = Opie::Core::OResource::loadPixmap( "todo/priority5" ); |
24 | 53 | ||
25 | m_lbl = new Opie::Ui::OClickableLabel( this ); | 54 | m_lbl = new Opie::Ui::OClickableLabel( this ); |
26 | m_lbl->setMinimumWidth( 15 ); | 55 | m_lbl->setMinimumWidth( 15 ); |
27 | m_lbl->setPixmap( priority3 ); | 56 | m_lbl->setPixmap( priority3 ); |
28 | connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); | 57 | connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); |
29 | QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 58 | QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
30 | 59 | ||
31 | m_edit = new QLineEdit( this ); | 60 | m_edit = new QLineEdit( this ); |
32 | setStretchableWidget( m_edit ); | 61 | setStretchableWidget( m_edit ); |
33 | QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 62 | QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
34 | 63 | ||
35 | /* | 64 | /* |
36 | * it's not implemented and won't be implemented for 1.0 | 65 | * it's not implemented and won't be implemented for 1.0 |
37 | */ | 66 | */ |
38 | #if 0 | 67 | #if 0 |
39 | QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 ); | 68 | QAction *a = new QAction( QWidget::tr( "More" ), Opie::Core::OResource::loadPixmap( "todo/more", Opie::Core::OResource::SmallIcon ), |
69 | QString::null, 0, this, 0 ); | ||
40 | connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); | 70 | connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); |
41 | a->addTo( this ); | 71 | a->addTo( this ); |
42 | a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 72 | a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
43 | #endif | 73 | #endif |
44 | 74 | ||
45 | QAction *a = new QAction( QWidget::tr( "Enter" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); | 75 | QAction *a = new QAction( QWidget::tr( "Enter" ), Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ), |
76 | QString::null, 0, this, 0 ); | ||
46 | connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) ); | 77 | connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) ); |
47 | a->addTo( this ); | 78 | a->addTo( this ); |
48 | a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 79 | a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
49 | 80 | ||
50 | a = new QAction( QWidget::tr( "Cancel" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 81 | a = new QAction( QWidget::tr( "Cancel" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ), |
82 | QString::null, 0, this, 0 ); | ||
51 | connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) ); | 83 | connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) ); |
52 | a->addTo( this ); | 84 | a->addTo( this ); |
53 | a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); | 85 | a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); |
54 | 86 | ||
55 | m_visible = visible; | 87 | m_visible = visible; |
56 | if ( !m_visible ) { | 88 | if ( !m_visible ) { |
57 | hide(); | 89 | hide(); |
58 | } | 90 | } |
59 | 91 | ||
60 | m_menu = 0l; | 92 | m_menu = 0l; |
61 | reinit(); | 93 | reinit(); |
62 | } | 94 | } |
63 | QuickEditImpl::~QuickEditImpl() { | 95 | QuickEditImpl::~QuickEditImpl() { |
64 | 96 | ||
65 | } | 97 | } |
66 | OPimTodo QuickEditImpl::todo()const { | 98 | OPimTodo QuickEditImpl::todo()const { |
67 | return m_todo; | 99 | return m_todo; |
68 | } | 100 | } |
69 | QWidget* QuickEditImpl::widget() { | 101 | QWidget* QuickEditImpl::widget() { |
70 | return this; | 102 | return this; |
71 | } | 103 | } |
72 | void QuickEditImpl::slotEnter() { | 104 | void QuickEditImpl::slotEnter() { |
73 | OPimTodo todo; | 105 | OPimTodo todo; |
74 | 106 | ||
diff --git a/core/pim/todo/quickeditimpl.h b/core/pim/todo/quickeditimpl.h index d465dba..cfb33a9 100644 --- a/core/pim/todo/quickeditimpl.h +++ b/core/pim/todo/quickeditimpl.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_QUICK_EDIT_IMPL_H | 31 | #ifndef OPIE_QUICK_EDIT_IMPL_H |
2 | #define OPIE_QUICK_EDIT_IMPL_H | 32 | #define OPIE_QUICK_EDIT_IMPL_H |
3 | 33 | ||
4 | #include <qpixmap.h> | 34 | #include <qpixmap.h> |
5 | 35 | ||
6 | #include <qtoolbar.h> | 36 | #include <qtoolbar.h> |
7 | 37 | ||
8 | #include "quickedit.h" | 38 | #include "quickedit.h" |
9 | 39 | ||
10 | class QLineEdit; | 40 | class QLineEdit; |
11 | class QLabel; | 41 | class QLabel; |
12 | 42 | ||
13 | class QuickEditImpl : public QToolBar, public Todo::QuickEdit { | 43 | class QuickEditImpl : public QToolBar, public Todo::QuickEdit { |
14 | Q_OBJECT | 44 | Q_OBJECT |
15 | public: | 45 | public: |
16 | QuickEditImpl( QWidget* parent, bool visible); | 46 | QuickEditImpl( QWidget* parent, bool visible); |
17 | ~QuickEditImpl(); | 47 | ~QuickEditImpl(); |
18 | OPimTodo todo()const; | 48 | OPimTodo todo()const; |
19 | QWidget* widget(); | 49 | QWidget* widget(); |
20 | private slots: | 50 | private slots: |
21 | void slotEnter(); | 51 | void slotEnter(); |
22 | void slotPrio(); | 52 | void slotPrio(); |
23 | void slotMore(); | 53 | void slotMore(); |
24 | void slotCancel(); | 54 | void slotCancel(); |
diff --git a/core/pim/todo/smalltodo.cpp b/core/pim/todo/smalltodo.cpp index 504256d..c5e1201 100644 --- a/core/pim/todo/smalltodo.cpp +++ b/core/pim/todo/smalltodo.cpp | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <zecke@handhelds.org> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "smalltodo.h" | 31 | #include "smalltodo.h" |
30 | 32 | ||
31 | using namespace Todo; | 33 | using namespace Todo; |
32 | 34 | ||
33 | struct SmallTodo::SmallTodoPrivate : public QShared{ | 35 | struct SmallTodo::SmallTodoPrivate : public QShared{ |
34 | 36 | ||
35 | SmallTodoPrivate() : QShared(), uid(-1) {}; | 37 | SmallTodoPrivate() : QShared(), uid(-1) {}; |
36 | QString name; | 38 | QString name; |
37 | QStringList categories; // as real Names | 39 | QStringList categories; // as real Names |
38 | int uid; | 40 | int uid; |
39 | bool complete:1; | 41 | bool complete:1; |
40 | QDate date; | 42 | QDate date; |
41 | 43 | ||
42 | 44 | ||
43 | void deleteSelf() { delete this; }; | 45 | void deleteSelf() { delete this; }; |
44 | }; | 46 | }; |
45 | 47 | ||
46 | SmallTodo::SmallTodo(int uid, | 48 | SmallTodo::SmallTodo(int uid, |
47 | bool comp, | 49 | bool comp, |
48 | const QDate& date, | 50 | const QDate& date, |
49 | const QString& name, | 51 | const QString& name, |
50 | const QStringList& cats) { | 52 | const QStringList& cats) { |
diff --git a/core/pim/todo/smalltodo.h b/core/pim/todo/smalltodo.h index 963218e..d6db0e6 100644 --- a/core/pim/todo/smalltodo.h +++ b/core/pim/todo/smalltodo.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <zecke@handhelds.org> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TODO_SMALL_TODO_H | 31 | #ifndef TODO_SMALL_TODO_H |
30 | #define TODO_SMALL_TODO_H | 32 | #define TODO_SMALL_TODO_H |
31 | 33 | ||
32 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
33 | #include <qstring.h> | 35 | #include <qstring.h> |
34 | #include <qstringlist.h> | 36 | #include <qstringlist.h> |
35 | 37 | ||
36 | 38 | ||
37 | namespace Todo { | 39 | namespace Todo { |
38 | /** | 40 | /** |
39 | * SmallTodo holds everything necessary | 41 | * SmallTodo holds everything necessary |
40 | * to represent a OPimTodo without holding | 42 | * to represent a OPimTodo without holding |
41 | * everything from a OPimTodo | 43 | * everything from a OPimTodo |
42 | */ | 44 | */ |
43 | class SmallTodo { | 45 | class SmallTodo { |
44 | public: | 46 | public: |
45 | SmallTodo(int uid = 0, | 47 | SmallTodo(int uid = 0, |
46 | bool comp = false, | 48 | bool comp = false, |
47 | const QDate& date = QDate::currentDate(), | 49 | const QDate& date = QDate::currentDate(), |
48 | const QString& = QString::null, | 50 | const QString& = QString::null, |
49 | const QStringList& = QStringList() ); | 51 | const QStringList& = QStringList() ); |
50 | SmallTodo( const SmallTodo& ); | 52 | SmallTodo( const SmallTodo& ); |
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index c64ad46..3e88974 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -1,61 +1,64 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <zecke> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
30 | |||
28 | #include <stdlib.h> | 31 | #include <stdlib.h> |
29 | #include <cmath> | 32 | #include <cmath> |
30 | #include <cctype> | 33 | #include <cctype> |
31 | 34 | ||
32 | #include <opie2/odebug.h> | 35 | #include <opie2/odebug.h> |
33 | #include <opie2/opimrecurrence.h> | 36 | #include <opie2/opimrecurrence.h> |
37 | #include <opie2/oresource.h> | ||
34 | 38 | ||
35 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
36 | #include <qpe/qpeapplication.h> | 40 | #include <qpe/qpeapplication.h> |
37 | #include <qpe/resource.h> | ||
38 | 41 | ||
39 | #include <qcombobox.h> | 42 | #include <qcombobox.h> |
40 | #include <qlineedit.h> | 43 | #include <qlineedit.h> |
41 | #include <qpopupmenu.h> | 44 | #include <qpopupmenu.h> |
42 | 45 | ||
43 | #include "mainwindow.h" | 46 | #include "mainwindow.h" |
44 | //#include "tableitems.h" | 47 | //#include "tableitems.h" |
45 | #include "tableview.h" | 48 | #include "tableview.h" |
46 | 49 | ||
47 | using namespace Todo; | 50 | using namespace Todo; |
48 | 51 | ||
49 | namespace { | 52 | namespace { |
50 | static const int BoxSize = 14; | 53 | static const int BoxSize = 14; |
51 | static const int RowHeight = 20; | 54 | static const int RowHeight = 20; |
52 | } | 55 | } |
53 | 56 | ||
54 | TableView::EditorWidget::EditorWidget() : m_wid(0l), m_row(-1), m_col(-1) { | 57 | TableView::EditorWidget::EditorWidget() : m_wid(0l), m_row(-1), m_col(-1) { |
55 | } | 58 | } |
56 | void TableView::EditorWidget::setCellWidget(QWidget* wid, int row, int col ) { | 59 | void TableView::EditorWidget::setCellWidget(QWidget* wid, int row, int col ) { |
57 | m_wid = wid; | 60 | m_wid = wid; |
58 | m_row = row; | 61 | m_row = row; |
59 | m_col = col; | 62 | m_col = col; |
60 | } | 63 | } |
61 | void TableView::EditorWidget::releaseCellWidget() { | 64 | void TableView::EditorWidget::releaseCellWidget() { |
@@ -69,54 +72,54 @@ int TableView::EditorWidget::cellRow()const { | |||
69 | return m_row; | 72 | return m_row; |
70 | } | 73 | } |
71 | int TableView::EditorWidget::cellCol()const { | 74 | int TableView::EditorWidget::cellCol()const { |
72 | return m_col; | 75 | return m_col; |
73 | } | 76 | } |
74 | 77 | ||
75 | 78 | ||
76 | void TableView::initConfig() { | 79 | void TableView::initConfig() { |
77 | Config config( "todo" ); | 80 | Config config( "todo" ); |
78 | config.setGroup( "Options" ); | 81 | config.setGroup( "Options" ); |
79 | m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); | 82 | m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); |
80 | for (int i = 0; i < numCols(); i++ ) { | 83 | for (int i = 0; i < numCols(); i++ ) { |
81 | int width = config.readNumEntry("Width"+QString::number(i), -1 ); | 84 | int width = config.readNumEntry("Width"+QString::number(i), -1 ); |
82 | setColumnWidth(i, width == -1 ? columnWidth(i) : width ); | 85 | setColumnWidth(i, width == -1 ? columnWidth(i) : width ); |
83 | } | 86 | } |
84 | } | 87 | } |
85 | 88 | ||
86 | TableView::TableView( MainWindow* window, QWidget* wid ) | 89 | TableView::TableView( MainWindow* window, QWidget* wid ) |
87 | : QTable( wid ), TodoView( window ) { | 90 | : QTable( wid ), TodoView( window ) { |
88 | 91 | ||
89 | setName("TableView"); | 92 | setName("TableView"); |
90 | // Load icons | 93 | // Load icons |
91 | // TODO - probably should be done globally somewhere else, | 94 | // TODO - probably should be done globally somewhere else, |
92 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h | 95 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h |
93 | m_pic_completed = Resource::loadPixmap( "todo/completed" ); | 96 | m_pic_completed = Opie::Core::OResource::loadPixmap( "todo/completed" ); |
94 | QString namestr; | 97 | QString namestr; |
95 | for ( unsigned int i = 1; i < 6; i++ ) { | 98 | for ( unsigned int i = 1; i < 6; i++ ) { |
96 | namestr = "todo/priority"; | 99 | namestr = "todo/priority"; |
97 | namestr.append( QString::number( i ) ); | 100 | namestr.append( QString::number( i ) ); |
98 | m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); | 101 | m_pic_priority[ i - 1 ] = Opie::Core::OResource::loadPixmap( namestr ); |
99 | } | 102 | } |
100 | 103 | ||
101 | setUpdatesEnabled( false ); | 104 | setUpdatesEnabled( false ); |
102 | viewport()->setUpdatesEnabled( false ); | 105 | viewport()->setUpdatesEnabled( false ); |
103 | m_enablePaint = false; | 106 | m_enablePaint = false; |
104 | setNumRows(0); | 107 | setNumRows(0); |
105 | setNumCols(4); | 108 | setNumCols(4); |
106 | 109 | ||
107 | horizontalHeader()->setLabel( 0, QWidget::tr("C.") ); | 110 | horizontalHeader()->setLabel( 0, QWidget::tr("C.") ); |
108 | horizontalHeader()->setLabel( 1, QWidget::tr("Priority") ); | 111 | horizontalHeader()->setLabel( 1, QWidget::tr("Priority") ); |
109 | horizontalHeader()->setLabel( 2, QWidget::tr("Summary" ) ); | 112 | horizontalHeader()->setLabel( 2, QWidget::tr("Summary" ) ); |
110 | horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") ); | 113 | horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") ); |
111 | 114 | ||
112 | setShowDeadline( todoWindow()->showDeadline() ); | 115 | setShowDeadline( todoWindow()->showDeadline() ); |
113 | 116 | ||
114 | setSorting( TRUE ); | 117 | setSorting( TRUE ); |
115 | setSelectionMode( NoSelection ); | 118 | setSelectionMode( NoSelection ); |
116 | 119 | ||
117 | setLeftMargin( 0 ); | 120 | setLeftMargin( 0 ); |
118 | verticalHeader()->hide(); | 121 | verticalHeader()->hide(); |
119 | 122 | ||
120 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 123 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
121 | connect((QTable*)this, SIGNAL( clicked(int,int,int,const QPoint&) ), | 124 | connect((QTable*)this, SIGNAL( clicked(int,int,int,const QPoint&) ), |
122 | this, SLOT( slotClicked(int,int,int,const QPoint&) ) ); | 125 | this, SLOT( slotClicked(int,int,int,const QPoint&) ) ); |
@@ -249,49 +252,49 @@ void TableView::setShowDeadline( bool b ) { | |||
249 | if ( b ) | 252 | if ( b ) |
250 | showColumn( 3 ); | 253 | showColumn( 3 ); |
251 | else | 254 | else |
252 | hideColumn( 3 ); | 255 | hideColumn( 3 ); |
253 | 256 | ||
254 | // Try to intelligently size columns | 257 | // Try to intelligently size columns |
255 | // TODO - would use width() below, but doesn't have valid value at time of c'tor | 258 | // TODO - would use width() below, but doesn't have valid value at time of c'tor |
256 | int col2width = 238; | 259 | int col2width = 238; |
257 | int width = m_pic_completed.width(); | 260 | int width = m_pic_completed.width(); |
258 | setColumnWidth( 0, width ); | 261 | setColumnWidth( 0, width ); |
259 | col2width -= width; | 262 | col2width -= width; |
260 | width = fontMetrics().boundingRect( horizontalHeader()->label( 1 ) ).width() + 8; | 263 | width = fontMetrics().boundingRect( horizontalHeader()->label( 1 ) ).width() + 8; |
261 | setColumnWidth( 1, width ); | 264 | setColumnWidth( 1, width ); |
262 | col2width -= width; | 265 | col2width -= width; |
263 | if ( b ) { | 266 | if ( b ) { |
264 | width = fontMetrics().boundingRect( horizontalHeader()->label( 3 ) ).width() + 8; | 267 | width = fontMetrics().boundingRect( horizontalHeader()->label( 3 ) ).width() + 8; |
265 | setColumnWidth( 3, width ); | 268 | setColumnWidth( 3, width ); |
266 | col2width -= width; | 269 | col2width -= width; |
267 | } | 270 | } |
268 | setColumnWidth( 2, col2width ); | 271 | setColumnWidth( 2, col2width ); |
269 | } | 272 | } |
270 | void TableView::setShowCategory( const QString& str) { | 273 | void TableView::setShowCategory( const QString& str) { |
271 | if ( str != m_oleCat || m_first ) | 274 | if ( str != m_oleCat || m_first ) |
272 | updateView(); | 275 | updateView(); |
273 | 276 | ||
274 | m_oleCat = str; | 277 | m_oleCat = str; |
275 | m_first = false; | 278 | m_first = false; |
276 | } | 279 | } |
277 | void TableView::clear() { | 280 | void TableView::clear() { |
278 | setNumRows(0); | 281 | setNumRows(0); |
279 | } | 282 | } |
280 | void TableView::slotClicked(int row, int col, int, | 283 | void TableView::slotClicked(int row, int col, int, |
281 | const QPoint& point) { | 284 | const QPoint& point) { |
282 | if ( m_editorWidget.cellWidget() ) { | 285 | if ( m_editorWidget.cellWidget() ) { |
283 | //setCellContentFromEditor(m_editorWidget.cellRow(), m_editorWidget.cellCol() ); | 286 | //setCellContentFromEditor(m_editorWidget.cellRow(), m_editorWidget.cellCol() ); |
284 | endEdit(m_editorWidget.cellRow(), m_editorWidget.cellCol(), | 287 | endEdit(m_editorWidget.cellRow(), m_editorWidget.cellCol(), |
285 | true, true ); | 288 | true, true ); |
286 | m_editorWidget.releaseCellWidget(); | 289 | m_editorWidget.releaseCellWidget(); |
287 | } | 290 | } |
288 | 291 | ||
289 | if ( !cellGeometry(row, col ).contains(point ) ) | 292 | if ( !cellGeometry(row, col ).contains(point ) ) |
290 | return; | 293 | return; |
291 | 294 | ||
292 | int ui= sorted().uidAt( row ); | 295 | int ui= sorted().uidAt( row ); |
293 | 296 | ||
294 | 297 | ||
295 | switch( col ) { | 298 | switch( col ) { |
296 | case 0:{ | 299 | case 0:{ |
297 | int x = point.x() -columnPos( col ); | 300 | int x = point.x() -columnPos( col ); |
diff --git a/core/pim/todo/tableview.h b/core/pim/todo/tableview.h index 46c16e1..6693d86 100644 --- a/core/pim/todo/tableview.h +++ b/core/pim/todo/tableview.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef OPIE_TABLE_VIEW_H | 31 | #ifndef OPIE_TABLE_VIEW_H |
30 | #define OPIE_TABLE_VIEW_H | 32 | #define OPIE_TABLE_VIEW_H |
31 | 33 | ||
32 | #include <qtable.h> | 34 | #include <qtable.h> |
33 | #include <qmap.h> | 35 | #include <qmap.h> |
34 | #include <qpixmap.h> | 36 | #include <qpixmap.h> |
35 | 37 | ||
36 | #include "todoview.h" | 38 | #include "todoview.h" |
37 | 39 | ||
38 | class QTimer; | 40 | class QTimer; |
39 | 41 | ||
40 | namespace Todo { | 42 | namespace Todo { |
41 | class CheckItem; | 43 | class CheckItem; |
42 | class DueTextItem; | 44 | class DueTextItem; |
43 | class TableView : public QTable, public TodoView { | 45 | class TableView : public QTable, public TodoView { |
44 | Q_OBJECT | 46 | Q_OBJECT |
45 | public: | 47 | public: |
46 | TableView( MainWindow*, QWidget* parent ); | 48 | TableView( MainWindow*, QWidget* parent ); |
47 | ~TableView(); | 49 | ~TableView(); |
48 | 50 | ||
49 | 51 | ||
50 | QString type()const; | 52 | QString type()const; |
diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp index 62fc600..054984d 100644 --- a/core/pim/todo/taskeditoralarms.cpp +++ b/core/pim/todo/taskeditoralarms.cpp | |||
@@ -1,59 +1,61 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "taskeditoralarms.h" | 31 | #include "taskeditoralarms.h" |
30 | 32 | ||
31 | #include <opie2/opimnotifymanager.h> | 33 | #include <opie2/opimnotifymanager.h> |
34 | #include <opie2/oresource.h> | ||
32 | #include <opie2/otimepicker.h> | 35 | #include <opie2/otimepicker.h> |
33 | 36 | ||
34 | #include <qpe/datebookmonth.h> | 37 | #include <qpe/datebookmonth.h> |
35 | #include <qpe/resource.h> | ||
36 | 38 | ||
37 | #include <qlistview.h> | 39 | #include <qlistview.h> |
38 | #include <qlayout.h> | 40 | #include <qlayout.h> |
39 | 41 | ||
40 | 42 | ||
41 | using namespace Opie::Ui; | 43 | using namespace Opie::Ui; |
42 | class AlarmItem : public QListViewItem { | 44 | class AlarmItem : public QListViewItem { |
43 | public: | 45 | public: |
44 | AlarmItem( QListView*, const OPimAlarm& ); | 46 | AlarmItem( QListView*, const OPimAlarm& ); |
45 | ~AlarmItem(); | 47 | ~AlarmItem(); |
46 | 48 | ||
47 | OPimAlarm alarm()const; | 49 | OPimAlarm alarm()const; |
48 | void setAlarm( const OPimAlarm& ); | 50 | void setAlarm( const OPimAlarm& ); |
49 | private: | 51 | private: |
50 | QDateTime m_dt; | 52 | QDateTime m_dt; |
51 | int m_type; | 53 | int m_type; |
52 | }; | 54 | }; |
53 | AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt) | 55 | AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt) |
54 | : QListViewItem(view) { | 56 | : QListViewItem(view) { |
55 | setAlarm( dt ); | 57 | setAlarm( dt ); |
56 | } | 58 | } |
57 | void AlarmItem::setAlarm( const OPimAlarm& dt ) { | 59 | void AlarmItem::setAlarm( const OPimAlarm& dt ) { |
58 | m_dt = dt.dateTime(); | 60 | m_dt = dt.dateTime(); |
59 | m_type = dt.sound(); | 61 | m_type = dt.sound(); |
@@ -64,61 +66,64 @@ void AlarmItem::setAlarm( const OPimAlarm& dt ) { | |||
64 | AlarmItem::~AlarmItem() { | 66 | AlarmItem::~AlarmItem() { |
65 | } | 67 | } |
66 | OPimAlarm AlarmItem::alarm()const{ | 68 | OPimAlarm AlarmItem::alarm()const{ |
67 | OPimAlarm al( m_type, m_dt ); | 69 | OPimAlarm al( m_type, m_dt ); |
68 | 70 | ||
69 | return al; | 71 | return al; |
70 | } | 72 | } |
71 | 73 | ||
72 | TaskEditorAlarms::TaskEditorAlarms( QWidget* parent, int, const char* name, WFlags fl ) | 74 | TaskEditorAlarms::TaskEditorAlarms( QWidget* parent, int, const char* name, WFlags fl ) |
73 | : QWidget( parent, name, fl ) | 75 | : QWidget( parent, name, fl ) |
74 | { | 76 | { |
75 | m_date = m_type = m_time = 0; | 77 | m_date = m_type = m_time = 0; |
76 | QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 4 ); | 78 | QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 4 ); |
77 | 79 | ||
78 | lstAlarms = new QListView( this ); | 80 | lstAlarms = new QListView( this ); |
79 | lstAlarms->addColumn( tr("Date") ); | 81 | lstAlarms->addColumn( tr("Date") ); |
80 | lstAlarms->addColumn( tr("Time") ); | 82 | lstAlarms->addColumn( tr("Time") ); |
81 | lstAlarms->addColumn( tr("Type") ); | 83 | lstAlarms->addColumn( tr("Type") ); |
82 | 84 | ||
83 | connect( lstAlarms, SIGNAL(clicked(QListViewItem*,const QPoint&,int) ), | 85 | connect( lstAlarms, SIGNAL(clicked(QListViewItem*,const QPoint&,int) ), |
84 | this, SLOT(inlineEdit(QListViewItem*,const QPoint&,int) ) ); | 86 | this, SLOT(inlineEdit(QListViewItem*,const QPoint&,int) ) ); |
85 | 87 | ||
86 | layout->addMultiCellWidget( lstAlarms, 0, 0, 0, 2 ); | 88 | layout->addMultiCellWidget( lstAlarms, 0, 0, 0, 2 ); |
87 | 89 | ||
88 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), this ); | 90 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), |
91 | tr( "New" ), this ); | ||
89 | //QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); | 92 | //QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); |
90 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotNew() ) ); | 93 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotNew() ) ); |
91 | layout->addWidget( btn, 1, 0 ); | 94 | layout->addWidget( btn, 1, 0 ); |
92 | /* use when we've reminders too */ | 95 | /* use when we've reminders too */ |
93 | #if 0 | 96 | #if 0 |
94 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), this ); | 97 | btn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), |
98 | tr( "Edit" ), this ); | ||
95 | //QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); | 99 | //QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); |
96 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotEdit() ) ); | 100 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotEdit() ) ); |
97 | layout->addWidget( btn, 1, 1 ); | 101 | layout->addWidget( btn, 1, 1 ); |
98 | #endif | 102 | #endif |
99 | 103 | ||
100 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), this ); | 104 | btn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), |
105 | tr( "Delete" ), this ); | ||
101 | //QWhatsThis::add( btn, tr( "Select a checkbook and then click here to delete it." ) ); | 106 | //QWhatsThis::add( btn, tr( "Select a checkbook and then click here to delete it." ) ); |
102 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotDelete() ) ); | 107 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotDelete() ) ); |
103 | layout->addWidget( btn, 1, 2 ); | 108 | layout->addWidget( btn, 1, 2 ); |
104 | } | 109 | } |
105 | 110 | ||
106 | TaskEditorAlarms::~TaskEditorAlarms(){ | 111 | TaskEditorAlarms::~TaskEditorAlarms(){ |
107 | } | 112 | } |
108 | 113 | ||
109 | void TaskEditorAlarms::slotNew(){ | 114 | void TaskEditorAlarms::slotNew(){ |
110 | (void)new AlarmItem(lstAlarms, OPimAlarm(0, QDateTime::currentDateTime() ) ); | 115 | (void)new AlarmItem(lstAlarms, OPimAlarm(0, QDateTime::currentDateTime() ) ); |
111 | } | 116 | } |
112 | 117 | ||
113 | void TaskEditorAlarms::slotEdit(){ | 118 | void TaskEditorAlarms::slotEdit(){ |
114 | } | 119 | } |
115 | 120 | ||
116 | void TaskEditorAlarms::slotDelete(){ | 121 | void TaskEditorAlarms::slotDelete(){ |
117 | QListViewItem* item = lstAlarms->currentItem(); | 122 | QListViewItem* item = lstAlarms->currentItem(); |
118 | if (!item) return; | 123 | if (!item) return; |
119 | 124 | ||
120 | lstAlarms->takeItem( item ); delete item; | 125 | lstAlarms->takeItem( item ); delete item; |
121 | 126 | ||
122 | 127 | ||
123 | } | 128 | } |
124 | 129 | ||
diff --git a/core/pim/todo/taskeditoralarms.h b/core/pim/todo/taskeditoralarms.h index 2379b0c..5cff352 100644 --- a/core/pim/todo/taskeditoralarms.h +++ b/core/pim/todo/taskeditoralarms.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002,2003 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TASKEDITORALARMS_H | 31 | #ifndef TASKEDITORALARMS_H |
30 | #define TASKEDITORALARMS_H | 32 | #define TASKEDITORALARMS_H |
31 | 33 | ||
32 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
33 | 35 | ||
34 | #include <qwidget.h> | 36 | #include <qwidget.h> |
35 | 37 | ||
36 | class QListView; | 38 | class QListView; |
37 | class QListViewItem; | 39 | class QListViewItem; |
38 | 40 | ||
39 | using namespace Opie; | 41 | using namespace Opie; |
40 | 42 | ||
41 | class AlarmItem; | 43 | class AlarmItem; |
42 | class DateBookMonth; | 44 | class DateBookMonth; |
43 | class TaskEditorAlarms : public QWidget | 45 | class TaskEditorAlarms : public QWidget |
44 | { | 46 | { |
45 | Q_OBJECT | 47 | Q_OBJECT |
46 | 48 | ||
47 | public: | 49 | public: |
48 | enum Type { | 50 | enum Type { |
49 | Alarm = 0, | 51 | Alarm = 0, |
50 | Reminders | 52 | Reminders |
diff --git a/core/pim/todo/taskeditoroverview.cpp b/core/pim/todo/taskeditoroverview.cpp index 294acb9..1e43883 100644 --- a/core/pim/todo/taskeditoroverview.cpp +++ b/core/pim/todo/taskeditoroverview.cpp | |||
@@ -1,77 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "taskeditoroverview.h" | 31 | #include "taskeditoroverview.h" |
30 | 32 | ||
31 | //#include <opie2/opimrecurrence.h> | 33 | //#include <opie2/opimrecurrence.h> |
32 | 34 | ||
35 | #include <opie2/oresource.h> | ||
36 | |||
33 | #include <qpe/categoryselect.h> | 37 | #include <qpe/categoryselect.h> |
34 | #include <qpe/datebookmonth.h> | 38 | #include <qpe/datebookmonth.h> |
35 | #include <qpe/resource.h> | ||
36 | 39 | ||
37 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
38 | #include <qlabel.h> | 41 | #include <qlabel.h> |
39 | #include <qlayout.h> | 42 | #include <qlayout.h> |
40 | #include <qmultilineedit.h> | 43 | #include <qmultilineedit.h> |
41 | #include <qwhatsthis.h> | 44 | #include <qwhatsthis.h> |
42 | 45 | ||
43 | TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFlags fl ) | 46 | TaskEditorOverView::TaskEditorOverView( QWidget* parent, const char* name, WFlags fl ) |
44 | : QWidget( parent, name, fl ) | 47 | : QWidget( parent, name, fl ) |
45 | { | 48 | { |
46 | // Load icons | 49 | // Load icons |
47 | // TODO - probably should be done globally somewhere else, | 50 | // TODO - probably should be done globally somewhere else, |
48 | // see also quickeditimpl.cpp/h, tableview.cpp/h | 51 | // see also quickeditimpl.cpp/h, tableview.cpp/h |
49 | QString namestr; | 52 | QString namestr; |
50 | for ( unsigned int i = 1; i < 6; i++ ) { | 53 | for ( unsigned int i = 1; i < 6; i++ ) { |
51 | namestr = "todo/priority"; | 54 | namestr = "todo/priority"; |
52 | namestr.append( QString::number( i ) ); | 55 | namestr.append( QString::number( i ) ); |
53 | m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); | 56 | m_pic_priority[ i - 1 ] = Opie::Core::OResource::loadPixmap( namestr ); |
54 | } | 57 | } |
55 | 58 | ||
56 | QVBoxLayout *vb = new QVBoxLayout( this ); | 59 | QVBoxLayout *vb = new QVBoxLayout( this ); |
57 | 60 | ||
58 | QScrollView *sv = new QScrollView( this ); | 61 | QScrollView *sv = new QScrollView( this ); |
59 | vb->addWidget( sv ); | 62 | vb->addWidget( sv ); |
60 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 63 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
61 | sv->setFrameStyle( QFrame::NoFrame ); | 64 | sv->setFrameStyle( QFrame::NoFrame ); |
62 | 65 | ||
63 | QWidget *container = new QWidget( sv->viewport() ); | 66 | QWidget *container = new QWidget( sv->viewport() ); |
64 | sv->addChild( container ); | 67 | sv->addChild( container ); |
65 | 68 | ||
66 | QGridLayout *layout = new QGridLayout( container, 7, 2, 4, 4 ); | 69 | QGridLayout *layout = new QGridLayout( container, 7, 2, 4, 4 ); |
67 | 70 | ||
68 | // Description | 71 | // Description |
69 | QLabel *label = new QLabel( tr( "Summary:" ), container ); | 72 | QLabel *label = new QLabel( tr( "Summary:" ), container ); |
70 | layout->addWidget( label, 0, 0 ); | 73 | layout->addWidget( label, 0, 0 ); |
71 | QWhatsThis::add( label, tr( "Enter brief description of the task here." ) ); | 74 | QWhatsThis::add( label, tr( "Enter brief description of the task here." ) ); |
72 | cmbDesc = new QComboBox( TRUE, container ); | 75 | cmbDesc = new QComboBox( TRUE, container ); |
73 | cmbDesc->insertItem( tr( "Complete " ) ); | 76 | cmbDesc->insertItem( tr( "Complete " ) ); |
74 | cmbDesc->insertItem( tr( "Work on " ) ); | 77 | cmbDesc->insertItem( tr( "Work on " ) ); |
75 | cmbDesc->insertItem( tr( "Buy " ) ); | 78 | cmbDesc->insertItem( tr( "Buy " ) ); |
76 | cmbDesc->insertItem( tr( "Organize " ) ); | 79 | cmbDesc->insertItem( tr( "Organize " ) ); |
77 | cmbDesc->insertItem( tr( "Get " ) ); | 80 | cmbDesc->insertItem( tr( "Get " ) ); |
diff --git a/core/pim/todo/taskeditoroverview.h b/core/pim/todo/taskeditoroverview.h index 89679f1..db85041 100644 --- a/core/pim/todo/taskeditoroverview.h +++ b/core/pim/todo/taskeditoroverview.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TASKEDITOROVERVIEW_H | 31 | #ifndef TASKEDITOROVERVIEW_H |
30 | #define TASKEDITOROVERVIEW_H | 32 | #define TASKEDITOROVERVIEW_H |
31 | 33 | ||
32 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
33 | 35 | ||
34 | #include <qpixmap.h> | 36 | #include <qpixmap.h> |
35 | #include <qwidget.h> | 37 | #include <qwidget.h> |
36 | 38 | ||
37 | class CategorySelect; | 39 | class CategorySelect; |
38 | class QCheckBox; | 40 | class QCheckBox; |
39 | class QComboBox; | 41 | class QComboBox; |
40 | class QMultiLineEdit; | 42 | class QMultiLineEdit; |
41 | 43 | ||
42 | using namespace Opie; | 44 | using namespace Opie; |
43 | 45 | ||
44 | class TaskEditorOverView : public QWidget | 46 | class TaskEditorOverView : public QWidget |
45 | { | 47 | { |
46 | Q_OBJECT | 48 | Q_OBJECT |
47 | 49 | ||
48 | public: | 50 | public: |
49 | TaskEditorOverView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 51 | TaskEditorOverView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
50 | ~TaskEditorOverView(); | 52 | ~TaskEditorOverView(); |
diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp index 16351e0..17495a4 100644 --- a/core/pim/todo/taskeditorstatus.cpp +++ b/core/pim/todo/taskeditorstatus.cpp | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "taskeditorstatus.h" | 31 | #include "taskeditorstatus.h" |
30 | 32 | ||
31 | #include <opie2/opimmaintainer.h> | 33 | #include <opie2/opimmaintainer.h> |
32 | #include <opie2/opimstate.h> | 34 | #include <opie2/opimstate.h> |
33 | 35 | ||
34 | #include <qpe/datebookmonth.h> | 36 | #include <qpe/datebookmonth.h> |
35 | 37 | ||
36 | #include <qcheckbox.h> | 38 | #include <qcheckbox.h> |
37 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
38 | #include <qlabel.h> | 40 | #include <qlabel.h> |
39 | #include <qlayout.h> | 41 | #include <qlayout.h> |
40 | #include <qwhatsthis.h> | 42 | #include <qwhatsthis.h> |
41 | 43 | ||
42 | // FIXME add the hack slots instead of setPopup!!!! | 44 | // FIXME add the hack slots instead of setPopup!!!! |
43 | // drw you shouldn't have removed them | 45 | // drw you shouldn't have removed them |
44 | 46 | ||
45 | TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags fl ) | 47 | TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags fl ) |
46 | : QWidget( parent, name, fl ) | 48 | : QWidget( parent, name, fl ) |
47 | { | 49 | { |
48 | QDate curDate = QDate::currentDate(); | 50 | QDate curDate = QDate::currentDate(); |
49 | m_start = m_comp = m_due = curDate; | 51 | m_start = m_comp = m_due = curDate; |
50 | QString curDateStr = TimeString::longDateString( curDate ); | 52 | QString curDateStr = TimeString::longDateString( curDate ); |
diff --git a/core/pim/todo/taskeditorstatus.h b/core/pim/todo/taskeditorstatus.h index 97129f0..427eaf4 100644 --- a/core/pim/todo/taskeditorstatus.h +++ b/core/pim/todo/taskeditorstatus.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TASKEDITORSTATUS_H | 31 | #ifndef TASKEDITORSTATUS_H |
30 | #define TASKEDITORSTATUS_H | 32 | #define TASKEDITORSTATUS_H |
31 | 33 | ||
32 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
33 | 35 | ||
34 | #include <qdatetime.h> | 36 | #include <qdatetime.h> |
35 | #include <qwidget.h> | 37 | #include <qwidget.h> |
36 | 38 | ||
37 | class DateBookMonth; | 39 | class DateBookMonth; |
38 | class QCheckBox; | 40 | class QCheckBox; |
39 | class QComboBox; | 41 | class QComboBox; |
40 | class QLabel; | 42 | class QLabel; |
41 | class QPushButton; | 43 | class QPushButton; |
42 | class QToolButton; | 44 | class QToolButton; |
43 | 45 | ||
44 | using namespace Opie; | 46 | using namespace Opie; |
45 | 47 | ||
46 | /** | 48 | /** |
47 | * This is the implementation of the Opie Task Editor Advanced tab | 49 | * This is the implementation of the Opie Task Editor Advanced tab |
48 | * it features the State! | 50 | * it features the State! |
49 | * MaintainerMode | 51 | * MaintainerMode |
50 | * Description | 52 | * Description |
diff --git a/core/pim/todo/templatedialog.cpp b/core/pim/todo/templatedialog.cpp index 8d72297..9821667 100644 --- a/core/pim/todo/templatedialog.cpp +++ b/core/pim/todo/templatedialog.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <opie2/odebug.h> | 31 | #include <opie2/odebug.h> |
2 | 32 | ||
3 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
4 | #include <qhbox.h> | 34 | #include <qhbox.h> |
5 | #include <qlayout.h> | 35 | #include <qlayout.h> |
6 | #include <qlistview.h> | 36 | #include <qlistview.h> |
7 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
8 | 38 | ||
9 | #include "templatedialog.h" | 39 | #include "templatedialog.h" |
10 | 40 | ||
11 | 41 | ||
12 | using namespace Todo; | 42 | using namespace Todo; |
13 | 43 | ||
14 | /* TRANSLATOR Todo::TemplateDialog */ | 44 | /* TRANSLATOR Todo::TemplateDialog */ |
15 | 45 | ||
16 | TemplateDialog::TemplateDialog( QWidget* widget ) | 46 | TemplateDialog::TemplateDialog( QWidget* widget ) |
17 | : QDialog( widget, "TemplateDialog", TRUE ) | 47 | : QDialog( widget, "TemplateDialog", TRUE ) |
18 | { | 48 | { |
19 | setCaption( QWidget::tr("Template Editor") ); | 49 | setCaption( QWidget::tr("Template Editor") ); |
20 | m_main = new QVBoxLayout(this ); | 50 | m_main = new QVBoxLayout(this ); |
21 | 51 | ||
22 | m_list = new QListView( this ); | 52 | m_list = new QListView( this ); |
23 | m_main->addWidget( m_list, 100 ); | 53 | m_main->addWidget( m_list, 100 ); |
24 | 54 | ||
diff --git a/core/pim/todo/templatedialog.h b/core/pim/todo/templatedialog.h index 5886c34..8ed915b 100644 --- a/core/pim/todo/templatedialog.h +++ b/core/pim/todo/templatedialog.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TEMPLATE_DIALOG_H | 31 | #ifndef OPIE_TEMPLATE_DIALOG_H |
2 | #define OPIE_TEMPLATE_DIALOG_H | 32 | #define OPIE_TEMPLATE_DIALOG_H |
3 | 33 | ||
4 | #include <qdialog.h> | 34 | #include <qdialog.h> |
5 | #include <qstring.h> | 35 | #include <qstring.h> |
6 | 36 | ||
7 | class QListView; | 37 | class QListView; |
8 | class QPushButton; | 38 | class QPushButton; |
9 | class QLabel; | 39 | class QLabel; |
10 | class QHBox; | 40 | class QHBox; |
11 | class QVBoxLayout; | 41 | class QVBoxLayout; |
12 | class QLineEdit; | 42 | class QLineEdit; |
13 | 43 | ||
14 | 44 | ||
15 | namespace Todo { | 45 | namespace Todo { |
16 | class TemplateDialog : public QDialog { | 46 | class TemplateDialog : public QDialog { |
17 | Q_OBJECT | 47 | Q_OBJECT |
18 | public: | 48 | public: |
19 | /* it'll be modal */ | 49 | /* it'll be modal */ |
20 | TemplateDialog( QWidget* parent ); | 50 | TemplateDialog( QWidget* parent ); |
21 | virtual ~TemplateDialog(); | 51 | virtual ~TemplateDialog(); |
22 | 52 | ||
23 | protected: | 53 | protected: |
24 | QListView* listView(); | 54 | QListView* listView(); |
diff --git a/core/pim/todo/templatedialogimpl.cpp b/core/pim/todo/templatedialogimpl.cpp index c9ad3d0..0d4090e 100644 --- a/core/pim/todo/templatedialogimpl.cpp +++ b/core/pim/todo/templatedialogimpl.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
2 | 32 | ||
3 | #include "mainwindow.h" | 33 | #include "mainwindow.h" |
4 | #include "todoeditor.h" | 34 | #include "todoeditor.h" |
5 | #include "todotemplatemanager.h" | 35 | #include "todotemplatemanager.h" |
6 | #include "templatedialogimpl.h" | 36 | #include "templatedialogimpl.h" |
7 | 37 | ||
8 | 38 | ||
9 | using namespace Todo; | 39 | using namespace Todo; |
10 | 40 | ||
11 | /* TRANSLATOR Todo::TemplateDialogImpl */ | 41 | /* TRANSLATOR Todo::TemplateDialogImpl */ |
12 | 42 | ||
13 | namespace { | 43 | namespace { |
14 | class TemplateListItem : public QListViewItem { | 44 | class TemplateListItem : public QListViewItem { |
15 | public: | 45 | public: |
16 | TemplateListItem( QListView*, | 46 | TemplateListItem( QListView*, |
17 | const QString& name, | 47 | const QString& name, |
18 | const OPimTodo& ); | 48 | const OPimTodo& ); |
19 | ~TemplateListItem(); | 49 | ~TemplateListItem(); |
20 | 50 | ||
21 | OPimTodo event()const; | 51 | OPimTodo event()const; |
22 | QString text()const; | 52 | QString text()const; |
23 | void setText(const QString& str ); | 53 | void setText(const QString& str ); |
24 | void setEvent( const OPimTodo& ); | 54 | void setEvent( const OPimTodo& ); |
diff --git a/core/pim/todo/templatedialogimpl.h b/core/pim/todo/templatedialogimpl.h index cc78521..6affb7d 100644 --- a/core/pim/todo/templatedialogimpl.h +++ b/core/pim/todo/templatedialogimpl.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TEMPLATE_DIALOG_IMPL_H | 31 | #ifndef OPIE_TEMPLATE_DIALOG_IMPL_H |
2 | #define OPIE_TEMPLATE_DIALOG_IMPL_H | 32 | #define OPIE_TEMPLATE_DIALOG_IMPL_H |
3 | 33 | ||
4 | #include <qlistview.h> | 34 | #include <qlistview.h> |
5 | 35 | ||
6 | #include <opie2/opimtodo.h> | 36 | #include <opie2/opimtodo.h> |
7 | 37 | ||
8 | #include "templatedialog.h" | 38 | #include "templatedialog.h" |
9 | 39 | ||
10 | 40 | ||
11 | namespace Todo { | 41 | namespace Todo { |
12 | 42 | ||
13 | class MainWindow; | 43 | class MainWindow; |
14 | class TemplateManager; | 44 | class TemplateManager; |
15 | class TemplateDialogImpl : public Todo::TemplateDialog { | 45 | class TemplateDialogImpl : public Todo::TemplateDialog { |
16 | Q_OBJECT | 46 | Q_OBJECT |
17 | public: | 47 | public: |
18 | TemplateDialogImpl( MainWindow* win, TemplateManager* ); | 48 | TemplateDialogImpl( MainWindow* win, TemplateManager* ); |
19 | ~TemplateDialogImpl(); | 49 | ~TemplateDialogImpl(); |
20 | 50 | ||
21 | private: | 51 | private: |
22 | MainWindow* m_win; | 52 | MainWindow* m_win; |
23 | TemplateManager* m_man; | 53 | TemplateManager* m_man; |
24 | private slots: | 54 | private slots: |
diff --git a/core/pim/todo/textviewshow.cpp b/core/pim/todo/textviewshow.cpp index 01e5810..7d93efc 100644 --- a/core/pim/todo/textviewshow.cpp +++ b/core/pim/todo/textviewshow.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include "textviewshow.h" | 31 | #include "textviewshow.h" |
2 | 32 | ||
3 | using namespace Todo; | 33 | using namespace Todo; |
4 | 34 | ||
5 | TextViewShow::TextViewShow( QWidget* parent, MainWindow* win) | 35 | TextViewShow::TextViewShow( QWidget* parent, MainWindow* win) |
6 | : QTextView( parent ), TodoShow(win) { | 36 | : QTextView( parent ), TodoShow(win) { |
7 | 37 | ||
8 | } | 38 | } |
9 | TextViewShow::~TextViewShow() { | 39 | TextViewShow::~TextViewShow() { |
10 | } | 40 | } |
11 | QString TextViewShow::type()const { | 41 | QString TextViewShow::type()const { |
12 | return QString::fromLatin1("TextViewShow"); | 42 | return QString::fromLatin1("TextViewShow"); |
13 | } | 43 | } |
14 | void TextViewShow::slotShow( const OPimTodo& ev ) { | 44 | void TextViewShow::slotShow( const OPimTodo& ev ) { |
15 | setText( ev.toRichText() ); | 45 | setText( ev.toRichText() ); |
16 | } | 46 | } |
17 | QWidget* TextViewShow::widget() { | 47 | QWidget* TextViewShow::widget() { |
18 | return this; | 48 | return this; |
19 | } | 49 | } |
20 | void TextViewShow::keyPressEvent( QKeyEvent* event ) { | 50 | void TextViewShow::keyPressEvent( QKeyEvent* event ) { |
21 | switch( event->key() ) { | 51 | switch( event->key() ) { |
22 | case Qt::Key_Up: | 52 | case Qt::Key_Up: |
23 | if ( ( visibleHeight() < contentsHeight() ) && | 53 | if ( ( visibleHeight() < contentsHeight() ) && |
24 | ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) ) | 54 | ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) ) |
diff --git a/core/pim/todo/textviewshow.h b/core/pim/todo/textviewshow.h index cc31522..8278ef6 100644 --- a/core/pim/todo/textviewshow.h +++ b/core/pim/todo/textviewshow.h | |||
@@ -1,20 +1,50 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <qtextview.h> | 31 | #include <qtextview.h> |
2 | 32 | ||
3 | #include "todoshow.h" | 33 | #include "todoshow.h" |
4 | 34 | ||
5 | namespace Todo { | 35 | namespace Todo { |
6 | 36 | ||
7 | class TextViewShow : public QTextView, public TodoShow { | 37 | class TextViewShow : public QTextView, public TodoShow { |
8 | public: | 38 | public: |
9 | TextViewShow( QWidget* parent, MainWindow* ); | 39 | TextViewShow( QWidget* parent, MainWindow* ); |
10 | ~TextViewShow(); | 40 | ~TextViewShow(); |
11 | 41 | ||
12 | QString type()const; | 42 | QString type()const; |
13 | void slotShow( const OPimTodo& ev ); | 43 | void slotShow( const OPimTodo& ev ); |
14 | QWidget* widget(); | 44 | QWidget* widget(); |
15 | 45 | ||
16 | protected: | 46 | protected: |
17 | void keyPressEvent( QKeyEvent* ); | 47 | void keyPressEvent( QKeyEvent* ); |
18 | 48 | ||
19 | }; | 49 | }; |
20 | }; | 50 | }; |
diff --git a/core/pim/todo/todoedit.h b/core/pim/todo/todoedit.h index 4e89e93..a607eb2 100644 --- a/core/pim/todo/todoedit.h +++ b/core/pim/todo/todoedit.h | |||
@@ -1,17 +1,47 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TODO_EDIT_H | 31 | #ifndef OPIE_TODO_EDIT_H |
2 | #define OPIE_TODO_EDIT_H | 32 | #define OPIE_TODO_EDIT_H |
3 | 33 | ||
4 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
5 | 35 | ||
6 | namespace Todo { | 36 | namespace Todo { |
7 | class Edit { | 37 | class Edit { |
8 | public: | 38 | public: |
9 | Edit(); | 39 | Edit(); |
10 | virtual ~Edit(); | 40 | virtual ~Edit(); |
11 | 41 | ||
12 | ToDoEvent newEvent( const OPimTodo& ) = 0; | 42 | ToDoEvent newEvent( const OPimTodo& ) = 0; |
13 | ToDoEvent editEvent( const OPimTodo& ) = 0; | 43 | ToDoEvent editEvent( const OPimTodo& ) = 0; |
14 | }; | 44 | }; |
15 | }; | 45 | }; |
16 | 46 | ||
17 | #endif | 47 | #endif |
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index a1c559d..d4693a2 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <opie2/odebug.h> | 31 | #include <opie2/odebug.h> |
2 | 32 | ||
3 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
4 | 34 | ||
5 | #include "otaskeditor.h" | 35 | #include "otaskeditor.h" |
6 | #include "todoeditor.h" | 36 | #include "todoeditor.h" |
7 | 37 | ||
8 | using namespace Opie; | 38 | using namespace Opie; |
9 | using namespace Todo; | 39 | using namespace Todo; |
10 | 40 | ||
11 | Editor::Editor() { | 41 | Editor::Editor() { |
12 | m_accepted = false; | 42 | m_accepted = false; |
13 | m_self = 0l; | 43 | m_self = 0l; |
14 | } | 44 | } |
15 | Editor::~Editor() { | 45 | Editor::~Editor() { |
16 | delete m_self; | 46 | delete m_self; |
17 | m_self = 0; | 47 | m_self = 0; |
18 | } | 48 | } |
19 | OPimTodo Editor::newTodo( int cur, | 49 | OPimTodo Editor::newTodo( int cur, |
20 | QWidget*) { | 50 | QWidget*) { |
21 | 51 | ||
22 | OTaskEditor *e = self(); | 52 | OTaskEditor *e = self(); |
23 | e->setCaption( QObject::tr("Enter Task") ); | 53 | e->setCaption( QObject::tr("Enter Task") ); |
24 | e->init( cur ); | 54 | e->init( cur ); |
diff --git a/core/pim/todo/todoeditor.h b/core/pim/todo/todoeditor.h index 1ac7f8a..c12824c 100644 --- a/core/pim/todo/todoeditor.h +++ b/core/pim/todo/todoeditor.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TODO_EDITOR_H | 31 | #ifndef OPIE_TODO_EDITOR_H |
2 | #define OPIE_TODO_EDITOR_H | 32 | #define OPIE_TODO_EDITOR_H |
3 | 33 | ||
4 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
5 | 35 | ||
6 | 36 | ||
7 | class OTaskEditor; | 37 | class OTaskEditor; |
8 | namespace Todo { | 38 | namespace Todo { |
9 | class Editor { | 39 | class Editor { |
10 | public: | 40 | public: |
11 | Editor(); | 41 | Editor(); |
12 | ~Editor(); | 42 | ~Editor(); |
13 | 43 | ||
14 | Opie::OPimTodo newTodo( int currentCatId, | 44 | Opie::OPimTodo newTodo( int currentCatId, |
15 | QWidget* par ); | 45 | QWidget* par ); |
16 | Opie::OPimTodo edit( QWidget* par, | 46 | Opie::OPimTodo edit( QWidget* par, |
17 | const Opie::OPimTodo& ev = Opie::OPimTodo() ); | 47 | const Opie::OPimTodo& ev = Opie::OPimTodo() ); |
18 | 48 | ||
19 | 49 | ||
20 | bool accepted()const; | 50 | bool accepted()const; |
21 | protected: | 51 | protected: |
22 | OTaskEditor* self(); | 52 | OTaskEditor* self(); |
23 | private: | 53 | private: |
24 | bool m_accepted: 1; | 54 | bool m_accepted: 1; |
diff --git a/core/pim/todo/todomanager.cpp b/core/pim/todo/todomanager.cpp index fcd5f0e..2a9945d 100644 --- a/core/pim/todo/todomanager.cpp +++ b/core/pim/todo/todomanager.cpp | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include <opie2/odebug.h> | 31 | #include <opie2/odebug.h> |
30 | 32 | ||
31 | #include <qpe/categoryselect.h> | 33 | #include <qpe/categoryselect.h> |
32 | 34 | ||
33 | #include "todomanager.h" | 35 | #include "todomanager.h" |
34 | 36 | ||
35 | using namespace Todo; | 37 | using namespace Todo; |
36 | 38 | ||
37 | TodoManager::TodoManager( QObject *obj ) | 39 | TodoManager::TodoManager( QObject *obj ) |
38 | : QObject( obj ) { | 40 | : QObject( obj ) { |
39 | m_db = 0l; | 41 | m_db = 0l; |
40 | m_cat.load( categoryFileName() ); | 42 | m_cat.load( categoryFileName() ); |
41 | } | 43 | } |
42 | TodoManager::~TodoManager() { | 44 | TodoManager::~TodoManager() { |
43 | delete m_db; | 45 | delete m_db; |
44 | } | 46 | } |
45 | OPimTodo TodoManager::event(int uid ) { | 47 | OPimTodo TodoManager::event(int uid ) { |
46 | return m_db->find( uid ); | 48 | return m_db->find( uid ); |
47 | } | 49 | } |
48 | void TodoManager::updateList() { | 50 | void TodoManager::updateList() { |
49 | m_list = m_db->allRecords(); | 51 | m_list = m_db->allRecords(); |
50 | } | 52 | } |
diff --git a/core/pim/todo/todomanager.h b/core/pim/todo/todomanager.h index 865b47b..37c3a62 100644 --- a/core/pim/todo/todomanager.h +++ b/core/pim/todo/todomanager.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef OPIE_TODO_MANAGER_H | 31 | #ifndef OPIE_TODO_MANAGER_H |
30 | #define OPIE_TODO_MANAGER_H | 32 | #define OPIE_TODO_MANAGER_H |
31 | 33 | ||
32 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
33 | #include <opie2/otodoaccess.h> | 35 | #include <opie2/otodoaccess.h> |
34 | 36 | ||
35 | #include <qpe/categories.h> | 37 | #include <qpe/categories.h> |
36 | 38 | ||
37 | #include <qarray.h> | 39 | #include <qarray.h> |
38 | #include <qobject.h> | 40 | #include <qobject.h> |
39 | #include <qstring.h> | 41 | #include <qstring.h> |
40 | 42 | ||
41 | #include "smalltodo.h" | 43 | #include "smalltodo.h" |
42 | 44 | ||
43 | using Opie::OPimTodo; | 45 | using Opie::OPimTodo; |
44 | using Opie::OPimTodoAccess; | 46 | using Opie::OPimTodoAccess; |
45 | 47 | ||
46 | namespace Todo { | 48 | namespace Todo { |
47 | class TodoManager : public QObject{ | 49 | class TodoManager : public QObject{ |
48 | Q_OBJECT | 50 | Q_OBJECT |
49 | public: | 51 | public: |
50 | bool isLoaded()const; | 52 | bool isLoaded()const; |
diff --git a/core/pim/todo/todoshow.cpp b/core/pim/todo/todoshow.cpp index 5962028..268eb60 100644 --- a/core/pim/todo/todoshow.cpp +++ b/core/pim/todo/todoshow.cpp | |||
@@ -1,24 +1,53 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
1 | 30 | ||
2 | #include "mainwindow.h" | 31 | #include "mainwindow.h" |
3 | #include "todoshow.h" | 32 | #include "todoshow.h" |
4 | 33 | ||
5 | using namespace Todo; | 34 | using namespace Todo; |
6 | 35 | ||
7 | TodoShow::TodoShow(MainWindow* win) { | 36 | TodoShow::TodoShow(MainWindow* win) { |
8 | m_win = win; | 37 | m_win = win; |
9 | } | 38 | } |
10 | TodoShow::~TodoShow() { | 39 | TodoShow::~TodoShow() { |
11 | } | 40 | } |
12 | void TodoShow::escapeView() { | 41 | void TodoShow::escapeView() { |
13 | if (m_win ) | 42 | if (m_win ) |
14 | m_win->slotReturnFromView(); | 43 | m_win->slotReturnFromView(); |
15 | } | 44 | } |
16 | 45 | ||
17 | void TodoShow::showNext() { | 46 | void TodoShow::showNext() { |
18 | if (m_win) | 47 | if (m_win) |
19 | m_win->slotShowNext(); | 48 | m_win->slotShowNext(); |
20 | } | 49 | } |
21 | void TodoShow::showPrev() { | 50 | void TodoShow::showPrev() { |
22 | if (m_win) | 51 | if (m_win) |
23 | m_win->slotShowPrev(); | 52 | m_win->slotShowPrev(); |
24 | } | 53 | } |
diff --git a/core/pim/todo/todoshow.h b/core/pim/todo/todoshow.h index 1eeadf8..b3e0a1f 100644 --- a/core/pim/todo/todoshow.h +++ b/core/pim/todo/todoshow.h | |||
@@ -1,51 +1,54 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
30 | |||
28 | #ifndef TODO_TODO_SHOW_H | 31 | #ifndef TODO_TODO_SHOW_H |
29 | #define TODO_TODO_SHOW_H | 32 | #define TODO_TODO_SHOW_H |
30 | 33 | ||
31 | #include <qstring.h> | 34 | #include <qstring.h> |
32 | #include <qwidget.h> | 35 | #include <qwidget.h> |
33 | 36 | ||
34 | #include <opie2/opimtodo.h> | 37 | #include <opie2/opimtodo.h> |
35 | 38 | ||
36 | using Opie::OPimTodo; | 39 | using Opie::OPimTodo; |
37 | 40 | ||
38 | namespace Todo { | 41 | namespace Todo { |
39 | class MainWindow; | 42 | class MainWindow; |
40 | /** | 43 | /** |
41 | * TodoShow is the baseclass of | 44 | * TodoShow is the baseclass of |
42 | * of all TodoShows. | 45 | * of all TodoShows. |
43 | * The first implementation is a QTextView | 46 | * The first implementation is a QTextView |
44 | * implementation showing the Todo as richtext | 47 | * implementation showing the Todo as richtext |
45 | */ | 48 | */ |
46 | class TodoShow { | 49 | class TodoShow { |
47 | public: | 50 | public: |
48 | TodoShow( MainWindow* win); | 51 | TodoShow( MainWindow* win); |
49 | virtual ~TodoShow(); | 52 | virtual ~TodoShow(); |
50 | virtual QString type()const = 0; | 53 | virtual QString type()const = 0; |
51 | virtual void slotShow( const OPimTodo& ev ) = 0; | 54 | virtual void slotShow( const OPimTodo& ev ) = 0; |
diff --git a/core/pim/todo/todotemplate.h b/core/pim/todo/todotemplate.h index 9575737..69ec6dd 100644 --- a/core/pim/todo/todotemplate.h +++ b/core/pim/todo/todotemplate.h | |||
@@ -1,11 +1,40 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TODO_TEMPLATE_H | 31 | #ifndef OPIE_TODO_TEMPLATE_H |
2 | #define OPIE_TODO_TEMPLATE_H | 32 | #define OPIE_TODO_TEMPLATE_H |
3 | 33 | ||
4 | 34 | ||
5 | 35 | ||
6 | namespace Todo { | 36 | namespace Todo { |
7 | 37 | ||
8 | |||
9 | }; | 38 | }; |
10 | 39 | ||
11 | #endif | 40 | #endif |
diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp index 7690d37..892ad0d 100644 --- a/core/pim/todo/todotemplatemanager.cpp +++ b/core/pim/todo/todotemplatemanager.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include <opie2/odebug.h> | 31 | #include <opie2/odebug.h> |
2 | #include <opie2/otodoaccess.h> | 32 | #include <opie2/otodoaccess.h> |
3 | #include <opie2/otodoaccessxml.h> | 33 | #include <opie2/otodoaccessxml.h> |
4 | 34 | ||
5 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
6 | #include <qpe/global.h> | 36 | #include <qpe/global.h> |
7 | 37 | ||
8 | #include "todotemplatemanager.h" | 38 | #include "todotemplatemanager.h" |
9 | 39 | ||
10 | 40 | ||
11 | using namespace Todo; | 41 | using namespace Todo; |
12 | 42 | ||
13 | TemplateManager::TemplateManager() { | 43 | TemplateManager::TemplateManager() { |
14 | m_path = Global::applicationFileName("todolist", "templates.xml"); | 44 | m_path = Global::applicationFileName("todolist", "templates.xml"); |
15 | } | 45 | } |
16 | TemplateManager::~TemplateManager() { | 46 | TemplateManager::~TemplateManager() { |
17 | save(); | 47 | save(); |
18 | } | 48 | } |
19 | void TemplateManager::load() { | 49 | void TemplateManager::load() { |
20 | Config conf("todolist_templates"); | 50 | Config conf("todolist_templates"); |
21 | OPimTodoAccessXML *xml = new OPimTodoAccessXML( QString::fromLatin1("template"), | 51 | OPimTodoAccessXML *xml = new OPimTodoAccessXML( QString::fromLatin1("template"), |
22 | m_path ); | 52 | m_path ); |
23 | OPimTodoAccess todoDB(xml ); | 53 | OPimTodoAccess todoDB(xml ); |
24 | todoDB.load(); | 54 | todoDB.load(); |
diff --git a/core/pim/todo/todotemplatemanager.h b/core/pim/todo/todotemplatemanager.h index ee8aaaf..8601ee8 100644 --- a/core/pim/todo/todotemplatemanager.h +++ b/core/pim/todo/todotemplatemanager.h | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #ifndef OPIE_TODO_TEMPLATE_H | 31 | #ifndef OPIE_TODO_TEMPLATE_H |
2 | #define OPIE_TODO_TEMPLATE_H | 32 | #define OPIE_TODO_TEMPLATE_H |
3 | 33 | ||
4 | #include <opie2/opimtodo.h> | 34 | #include <opie2/opimtodo.h> |
5 | 35 | ||
6 | #include <qstring.h> | 36 | #include <qstring.h> |
7 | #include <qmap.h> | 37 | #include <qmap.h> |
8 | 38 | ||
9 | using namespace Opie; | 39 | using namespace Opie; |
10 | 40 | ||
11 | namespace Todo { | 41 | namespace Todo { |
12 | class TemplateManager { | 42 | class TemplateManager { |
13 | public: | 43 | public: |
14 | TemplateManager(); | 44 | TemplateManager(); |
15 | ~TemplateManager(); | 45 | ~TemplateManager(); |
16 | void load(); | 46 | void load(); |
17 | void save(); | 47 | void save(); |
18 | QStringList templates()const; | 48 | QStringList templates()const; |
19 | OPimTodo templateEvent( const QString& templateName ); | 49 | OPimTodo templateEvent( const QString& templateName ); |
20 | 50 | ||
21 | /* also replaces one */ | 51 | /* also replaces one */ |
22 | void addEvent( const QString&, const OPimTodo& ); | 52 | void addEvent( const QString&, const OPimTodo& ); |
23 | void removeEvent( const QString& ); | 53 | void removeEvent( const QString& ); |
24 | private: | 54 | private: |
diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp index 3d2c982..937fbd1 100644 --- a/core/pim/todo/todoview.cpp +++ b/core/pim/todo/todoview.cpp | |||
@@ -1,24 +1,54 @@ | |||
1 | /* | ||
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include "mainwindow.h" | 31 | #include "mainwindow.h" |
2 | 32 | ||
3 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
4 | 34 | ||
5 | #include "todoview.h" | 35 | #include "todoview.h" |
6 | 36 | ||
7 | using namespace Todo; | 37 | using namespace Todo; |
8 | 38 | ||
9 | 39 | ||
10 | 40 | ||
11 | 41 | ||
12 | TodoView::TodoView( MainWindow* win ) | 42 | TodoView::TodoView( MainWindow* win ) |
13 | : m_main( win ) | 43 | : m_main( win ) |
14 | { | 44 | { |
15 | m_asc = false; | 45 | m_asc = false; |
16 | m_sortOrder = -1; | 46 | m_sortOrder = -1; |
17 | } | 47 | } |
18 | TodoView::~TodoView() { | 48 | TodoView::~TodoView() { |
19 | }; | 49 | }; |
20 | MainWindow* TodoView::todoWindow() { | 50 | MainWindow* TodoView::todoWindow() { |
21 | return m_main; | 51 | return m_main; |
22 | } | 52 | } |
23 | 53 | ||
24 | OPimTodo TodoView::event(int uid ) { | 54 | OPimTodo TodoView::event(int uid ) { |
diff --git a/core/pim/todo/todoview.h b/core/pim/todo/todoview.h index a5ea9f5..6e840e1 100644 --- a/core/pim/todo/todoview.h +++ b/core/pim/todo/todoview.h | |||
@@ -1,50 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 <> | 3 | |
4 | .>+-= | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | _;:, .> :=|. This program is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This program is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Library General Public License for more | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: details. | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; You should have received a copy of the GNU | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = Library General Public License along with | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | : Â Â = Â ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #ifndef TODO_VIEW_H | 31 | #ifndef TODO_VIEW_H |
30 | #define TODO_VIEW_H | 32 | #define TODO_VIEW_H |
31 | 33 | ||
32 | #include <qarray.h> | 34 | #include <qarray.h> |
33 | #include <qstring.h> | 35 | #include <qstring.h> |
34 | #include <qvaluelist.h> | 36 | #include <qvaluelist.h> |
35 | #include <qwidget.h> | 37 | #include <qwidget.h> |
36 | 38 | ||
37 | #include <opie2/otodoaccess.h> | 39 | #include <opie2/otodoaccess.h> |
38 | 40 | ||
39 | #include "smalltodo.h" | 41 | #include "smalltodo.h" |
40 | 42 | ||
41 | using Opie::OPimTodo; | 43 | using Opie::OPimTodo; |
42 | using Opie::OPimTodoAccess; | 44 | using Opie::OPimTodoAccess; |
43 | 45 | ||
44 | namespace Todo { | 46 | namespace Todo { |
45 | class MainWindow; | 47 | class MainWindow; |
46 | 48 | ||
47 | /** | 49 | /** |
48 | * due to inheretince problems we need this base class | 50 | * due to inheretince problems we need this base class |
49 | */ | 51 | */ |
50 | struct ViewBase { | 52 | struct ViewBase { |