author | chicken <chicken> | 2004-03-01 15:58:07 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 15:58:07 (UTC) |
commit | 931c55406a043195712955c732a875e17899df90 (patch) (unidiff) | |
tree | 8097c88ee3e96f8fb613ccca1ebf36bf73070dcc | |
parent | 87676b131aad1bfe979570a48107527db4040020 (diff) | |
download | opie-931c55406a043195712955c732a875e17899df90.zip opie-931c55406a043195712955c732a875e17899df90.tar.gz opie-931c55406a043195712955c732a875e17899df90.tar.bz2 |
fix includes
25 files changed, 1 insertions, 67 deletions
diff --git a/libopie2/opiecore/odebug.cpp b/libopie2/opiecore/odebug.cpp index 4505ce7..a40ef53 100644 --- a/libopie2/opiecore/odebug.cpp +++ b/libopie2/opiecore/odebug.cpp | |||
@@ -18,78 +18,67 @@ | |||
18 | : .. .:, . . . without even the implied warranty of | 18 | : .. .:, . . . without even the implied warranty of |
19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 19 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 20 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
21 | ..}^=.= = ; Library General Public License for more | 21 | ..}^=.= = ; Library General Public License for more |
22 | ++= -. .` .: details. | 22 | ++= -. .` .: details. |
23 | : = ...= . :.=- | 23 | : = ...= . :.=- |
24 | -. .:....=;==+<; You should have received a copy of the GNU | 24 | -. .:....=;==+<; You should have received a copy of the GNU |
25 | -_. . . )=. = Library General Public License along with | 25 | -_. . . )=. = Library General Public License along with |
26 | -- :-=` this library; see the file COPYING.LIB. | 26 | -- :-=` this library; see the file COPYING.LIB. |
27 | If not, write to the Free Software Foundation, | 27 | If not, write to the Free Software Foundation, |
28 | Inc., 59 Temple Place - Suite 330, | 28 | Inc., 59 Temple Place - Suite 330, |
29 | Boston, MA 02111-1307, USA. | 29 | Boston, MA 02111-1307, USA. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | // Include this header without OPIE_NO_DEBUG defined to avoid having the oDebugInfo | 32 | // Include this header without OPIE_NO_DEBUG defined to avoid having the oDebugInfo |
33 | // functions inlined to noops (which would then conflict with their definition here). | 33 | // functions inlined to noops (which would then conflict with their definition here). |
34 | 34 | ||
35 | #include <opie2/odebug.h> | 35 | #include <opie2/odebug.h> |
36 | 36 | ||
37 | #ifdef OPIE_NO_DEBUG | 37 | #ifdef OPIE_NO_DEBUG |
38 | #undef odDebug | 38 | #undef odDebug |
39 | #undef odBacktrace | 39 | #undef odBacktrace |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | /* OPIE */ | 42 | /* OPIE */ |
43 | 43 | ||
44 | #include <opie2/oapplication.h> | 44 | #include <opie2/oapplication.h> |
45 | #include <opie2/oglobalsettings.h> | 45 | #include <opie2/oglobalsettings.h> |
46 | #include <opie2/oconfig.h> | 46 | #include <opie2/oconfig.h> |
47 | 47 | ||
48 | /* QT */ | 48 | /* QT */ |
49 | 49 | ||
50 | #include <qbrush.h> | ||
51 | #include <qdatetime.h> | ||
52 | #include <qfile.h> | 50 | #include <qfile.h> |
53 | #include <qhostaddress.h> | ||
54 | #include <qmessagebox.h> | 51 | #include <qmessagebox.h> |
55 | #include <qintdict.h> | ||
56 | #include <qpoint.h> | ||
57 | #include <qrect.h> | ||
58 | #include <qregion.h> | ||
59 | #include <qsize.h> | ||
60 | #include <qsocketdevice.h> | 52 | #include <qsocketdevice.h> |
61 | #include <qstring.h> | ||
62 | #include <qstringlist.h> | ||
63 | #include <qtextstream.h> | ||
64 | 53 | ||
65 | /* UNIX */ | 54 | /* UNIX */ |
66 | 55 | ||
67 | #include <stdlib.h> // abort | 56 | #include <stdlib.h> // abort |
68 | #include <unistd.h> // getpid | 57 | #include <unistd.h> // getpid |
69 | #include <stdarg.h> // vararg stuff | 58 | #include <stdarg.h> // vararg stuff |
70 | #include <ctype.h> // isprint | 59 | #include <ctype.h> // isprint |
71 | #include <syslog.h> | 60 | #include <syslog.h> |
72 | #include <errno.h> | 61 | #include <errno.h> |
73 | #include <string.h> | 62 | #include <string.h> |
74 | 63 | ||
75 | #ifndef OPIE_NO_BACKTRACE | 64 | #ifndef OPIE_NO_BACKTRACE |
76 | #include <execinfo.h> | 65 | #include <execinfo.h> |
77 | #endif | 66 | #endif |
78 | 67 | ||
79 | 68 | ||
80 | /*====================================================================================== | 69 | /*====================================================================================== |
81 | * debug levels | 70 | * debug levels |
82 | *======================================================================================*/ | 71 | *======================================================================================*/ |
83 | 72 | ||
84 | enum DebugLevels { | 73 | enum DebugLevels { |
85 | ODEBUG_INFO = 0, | 74 | ODEBUG_INFO = 0, |
86 | ODEBUG_WARN = 1, | 75 | ODEBUG_WARN = 1, |
87 | ODEBUG_ERROR = 2, | 76 | ODEBUG_ERROR = 2, |
88 | ODEBUG_FATAL = 3 | 77 | ODEBUG_FATAL = 3 |
89 | }; | 78 | }; |
90 | 79 | ||
91 | /*====================================================================================== | 80 | /*====================================================================================== |
92 | * oDebug private data | 81 | * oDebug private data |
93 | *======================================================================================*/ | 82 | *======================================================================================*/ |
94 | 83 | ||
95 | /*====================================================================================== | 84 | /*====================================================================================== |
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp index 879e80f..1aa206e 100644 --- a/libopie2/opiecore/oglobal.cpp +++ b/libopie2/opiecore/oglobal.cpp | |||
@@ -1,64 +1,63 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> | 3 | Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | =. Copyright (C) 2004 Holger 'zecke' Freyther <zecke@handhelds.org> | 4 | =. Copyright (C) 2004 Holger 'zecke' Freyther <zecke@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <opie2/oglobal.h> | 30 | #include <opie2/oglobal.h> |
31 | 31 | ||
32 | #include <qfile.h> | ||
33 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
34 | #include <qdir.h> | 33 | #include <qdir.h> |
35 | #include <qpe/mimetype.h> | 34 | #include <qpe/mimetype.h> |
36 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
37 | #include <qpe/storage.h> | 36 | #include <qpe/storage.h> |
38 | 37 | ||
39 | #include <unistd.h> | 38 | #include <unistd.h> |
40 | #include <sys/types.h> | 39 | #include <sys/types.h> |
41 | 40 | ||
42 | static const char Base64EncMap[64] = | 41 | static const char Base64EncMap[64] = |
43 | { | 42 | { |
44 | 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, | 43 | 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, |
45 | 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, | 44 | 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, |
46 | 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, | 45 | 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, |
47 | 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, | 46 | 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, |
48 | 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, | 47 | 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, |
49 | 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, | 48 | 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, |
50 | 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, 0x32, 0x33, | 49 | 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, 0x32, 0x33, |
51 | 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F | 50 | 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F |
52 | }; | 51 | }; |
53 | 52 | ||
54 | static char Base64DecMap[128] = | 53 | static char Base64DecMap[128] = |
55 | { | 54 | { |
56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
60 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
61 | 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3F, | 60 | 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3F, |
62 | 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, | 61 | 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, |
63 | 0x3C, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 62 | 0x3C, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
64 | 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, | 63 | 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, |
diff --git a/libopie2/opiecore/oglobalsettings.cpp b/libopie2/opiecore/oglobalsettings.cpp index 66adbd0..192e55b 100644 --- a/libopie2/opiecore/oglobalsettings.cpp +++ b/libopie2/opiecore/oglobalsettings.cpp | |||
@@ -9,68 +9,65 @@ | |||
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 10 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | 34 | ||
35 | #include <opie2/oglobalsettings.h> | 35 | #include <opie2/oglobalsettings.h> |
36 | #include <opie2/oconfig.h> | 36 | #include <opie2/oconfig.h> |
37 | #include <opie2/oglobal.h> | 37 | #include <opie2/oglobal.h> |
38 | 38 | ||
39 | /* QT */ | 39 | /* QT */ |
40 | 40 | ||
41 | #include <qobject.h> | ||
42 | #include <qdir.h> | 41 | #include <qdir.h> |
43 | #include <qpixmap.h> | ||
44 | #include <qfontinfo.h> | ||
45 | 42 | ||
46 | /* UNIX */ | 43 | /* UNIX */ |
47 | 44 | ||
48 | #include <stdlib.h> | 45 | #include <stdlib.h> |
49 | 46 | ||
50 | QString* OGlobalSettings::s_desktopPath = 0; | 47 | QString* OGlobalSettings::s_desktopPath = 0; |
51 | QString* OGlobalSettings::s_autostartPath = 0; | 48 | QString* OGlobalSettings::s_autostartPath = 0; |
52 | QString* OGlobalSettings::s_trashPath = 0; | 49 | QString* OGlobalSettings::s_trashPath = 0; |
53 | QString* OGlobalSettings::s_documentPath = 0; | 50 | QString* OGlobalSettings::s_documentPath = 0; |
54 | QFont *OGlobalSettings::_generalFont = 0; | 51 | QFont *OGlobalSettings::_generalFont = 0; |
55 | QFont *OGlobalSettings::_fixedFont = 0; | 52 | QFont *OGlobalSettings::_fixedFont = 0; |
56 | QFont *OGlobalSettings::_toolBarFont = 0; | 53 | QFont *OGlobalSettings::_toolBarFont = 0; |
57 | QFont *OGlobalSettings::_menuFont = 0; | 54 | QFont *OGlobalSettings::_menuFont = 0; |
58 | QFont *OGlobalSettings::_windowTitleFont = 0; | 55 | QFont *OGlobalSettings::_windowTitleFont = 0; |
59 | QFont *OGlobalSettings::_taskbarFont = 0; | 56 | QFont *OGlobalSettings::_taskbarFont = 0; |
60 | 57 | ||
61 | QColor *OGlobalSettings::OpieGray = 0; | 58 | QColor *OGlobalSettings::OpieGray = 0; |
62 | QColor *OGlobalSettings::OpieHighlight = 0; | 59 | QColor *OGlobalSettings::OpieHighlight = 0; |
63 | QColor *OGlobalSettings::OpieAlternate = 0; | 60 | QColor *OGlobalSettings::OpieAlternate = 0; |
64 | 61 | ||
65 | OGlobalSettings::OMouseSettings *OGlobalSettings::s_mouseSettings = 0; | 62 | OGlobalSettings::OMouseSettings *OGlobalSettings::s_mouseSettings = 0; |
66 | 63 | ||
67 | //FIXME: Add manipulators to the accessors | 64 | //FIXME: Add manipulators to the accessors |
68 | 65 | ||
69 | int OGlobalSettings::dndEventDelay() | 66 | int OGlobalSettings::dndEventDelay() |
70 | { | 67 | { |
71 | OConfig *c = OGlobal::config(); | 68 | OConfig *c = OGlobal::config(); |
72 | OConfigGroupSaver cgs( c, "General" ); | 69 | OConfigGroupSaver cgs( c, "General" ); |
73 | return c->readNumEntry("DndDelay", 2); | 70 | return c->readNumEntry("DndDelay", 2); |
74 | } | 71 | } |
75 | 72 | ||
76 | bool OGlobalSettings::singleClick() | 73 | bool OGlobalSettings::singleClick() |
diff --git a/libopie2/opiecore/oprocctrl.cpp b/libopie2/opiecore/oprocctrl.cpp index b3d57c8..0403526 100644 --- a/libopie2/opiecore/oprocctrl.cpp +++ b/libopie2/opiecore/oprocctrl.cpp | |||
@@ -10,65 +10,64 @@ | |||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | // | 19 | // |
20 | // KPROCESSCONTROLLER -- A helper class for KProcess | 20 | // KPROCESSCONTROLLER -- A helper class for KProcess |
21 | // | 21 | // |
22 | // version 0.3.1, Jan, 8th 1997 | 22 | // version 0.3.1, Jan, 8th 1997 |
23 | // | 23 | // |
24 | // (C) Christian Czezatke | 24 | // (C) Christian Czezatke |
25 | // e9025461@student.tuwien.ac.at | 25 | // e9025461@student.tuwien.ac.at |
26 | // Ported by Holger Freyther | 26 | // Ported by Holger Freyther |
27 | // | 27 | // |
28 | 28 | ||
29 | //#include <config.h> | 29 | //#include <config.h> |
30 | 30 | ||
31 | #include <sys/types.h> | 31 | #include <sys/types.h> |
32 | #include <sys/socket.h> | 32 | #include <sys/socket.h> |
33 | 33 | ||
34 | #include <errno.h> | 34 | #include <errno.h> |
35 | #include <fcntl.h> | 35 | #include <fcntl.h> |
36 | #include <stdio.h> | 36 | #include <stdio.h> |
37 | #include <string.h> | 37 | #include <string.h> |
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <assert.h> | 39 | #include <assert.h> |
40 | 40 | ||
41 | #include <qsocketnotifier.h> | 41 | #include <qsocketnotifier.h> |
42 | #include "oprocess.h" | ||
43 | #include "oprocctrl.h" | 42 | #include "oprocctrl.h" |
44 | 43 | ||
45 | OProcessController *OProcessController::theOProcessController = 0; | 44 | OProcessController *OProcessController::theOProcessController = 0; |
46 | 45 | ||
47 | struct sigaction OProcessController::oldChildHandlerData; | 46 | struct sigaction OProcessController::oldChildHandlerData; |
48 | bool OProcessController::handlerSet = false; | 47 | bool OProcessController::handlerSet = false; |
49 | 48 | ||
50 | OProcessController::OProcessController() | 49 | OProcessController::OProcessController() |
51 | { | 50 | { |
52 | assert( theOProcessController == 0 ); | 51 | assert( theOProcessController == 0 ); |
53 | 52 | ||
54 | if (0 > pipe(fd)) | 53 | if (0 > pipe(fd)) |
55 | printf(strerror(errno)); | 54 | printf(strerror(errno)); |
56 | 55 | ||
57 | notifier = new QSocketNotifier(fd[0], QSocketNotifier::Read); | 56 | notifier = new QSocketNotifier(fd[0], QSocketNotifier::Read); |
58 | notifier->setEnabled(true); | 57 | notifier->setEnabled(true); |
59 | QObject::connect(notifier, SIGNAL(activated(int)), | 58 | QObject::connect(notifier, SIGNAL(activated(int)), |
60 | this, SLOT(slotDoHousekeeping(int))); | 59 | this, SLOT(slotDoHousekeeping(int))); |
61 | connect( &delayedChildrenCleanupTimer, SIGNAL( timeout()), | 60 | connect( &delayedChildrenCleanupTimer, SIGNAL( timeout()), |
62 | SLOT( delayedChildrenCleanup())); | 61 | SLOT( delayedChildrenCleanup())); |
63 | 62 | ||
64 | theOProcessController = this; | 63 | theOProcessController = this; |
65 | 64 | ||
66 | setupHandlers(); | 65 | setupHandlers(); |
67 | } | 66 | } |
68 | 67 | ||
69 | 68 | ||
70 | void OProcessController::setupHandlers() | 69 | void OProcessController::setupHandlers() |
71 | { | 70 | { |
72 | if( handlerSet ) | 71 | if( handlerSet ) |
73 | return; | 72 | return; |
74 | struct sigaction act; | 73 | struct sigaction act; |
diff --git a/libopie2/opiecore/oprocess.cpp b/libopie2/opiecore/oprocess.cpp index 83677aa..0a361a1 100644 --- a/libopie2/opiecore/oprocess.cpp +++ b/libopie2/opiecore/oprocess.cpp | |||
@@ -8,67 +8,65 @@ | |||
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "oprocctrl.h" | 31 | #include "oprocctrl.h" |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/oprocess.h> | 34 | #include <opie2/oprocess.h> |
35 | 35 | ||
36 | /* QT */ | 36 | /* QT */ |
37 | 37 | ||
38 | #include <qapplication.h> | 38 | #include <qapplication.h> |
39 | #include <qdir.h> | 39 | #include <qdir.h> |
40 | #include <qfile.h> | ||
41 | #include <qmap.h> | 40 | #include <qmap.h> |
42 | #include <qregexp.h> | ||
43 | #include <qsocketnotifier.h> | 41 | #include <qsocketnotifier.h> |
44 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
45 | 43 | ||
46 | /* STD */ | 44 | /* STD */ |
47 | #include <errno.h> | 45 | #include <errno.h> |
48 | #include <fcntl.h> | 46 | #include <fcntl.h> |
49 | #include <pwd.h> | 47 | #include <pwd.h> |
50 | #include <stdlib.h> | 48 | #include <stdlib.h> |
51 | #include <signal.h> | 49 | #include <signal.h> |
52 | #include <stdio.h> | 50 | #include <stdio.h> |
53 | #include <string.h> | 51 | #include <string.h> |
54 | #include <sys/time.h> | 52 | #include <sys/time.h> |
55 | #include <sys/types.h> | 53 | #include <sys/types.h> |
56 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
57 | #include <sys/socket.h> | 55 | #include <sys/socket.h> |
58 | #include <unistd.h> | 56 | #include <unistd.h> |
59 | #ifdef HAVE_SYS_SELECT_H | 57 | #ifdef HAVE_SYS_SELECT_H |
60 | #include <sys/select.h> | 58 | #include <sys/select.h> |
61 | #endif | 59 | #endif |
62 | #ifdef HAVE_INITGROUPS | 60 | #ifdef HAVE_INITGROUPS |
63 | #include <grp.h> | 61 | #include <grp.h> |
64 | #endif | 62 | #endif |
65 | 63 | ||
66 | class OProcessPrivate | 64 | class OProcessPrivate |
67 | { | 65 | { |
68 | public: | 66 | public: |
69 | OProcessPrivate() : useShell( false ) | 67 | OProcessPrivate() : useShell( false ) |
70 | { } | 68 | { } |
71 | 69 | ||
72 | bool useShell; | 70 | bool useShell; |
73 | QMap<QString, QString> env; | 71 | QMap<QString, QString> env; |
74 | QString wd; | 72 | QString wd; |
diff --git a/libopie2/opiedb/osqlbackendmanager.cpp b/libopie2/opiedb/osqlbackendmanager.cpp index 0f261b9..95ed77b 100644 --- a/libopie2/opiedb/osqlbackendmanager.cpp +++ b/libopie2/opiedb/osqlbackendmanager.cpp | |||
@@ -1,34 +1,33 @@ | |||
1 | #include <qdir.h> | 1 | #include <qdir.h> |
2 | #include <qfile.h> | ||
3 | #include <qmap.h> | 2 | #include <qmap.h> |
4 | 3 | ||
5 | #include "osqlbackendmanager.h" | 4 | #include "osqlbackendmanager.h" |
6 | 5 | ||
7 | namespace { | 6 | namespace { |
8 | class Config { | 7 | class Config { |
9 | typedef QMap<QString, QString> List; | 8 | typedef QMap<QString, QString> List; |
10 | public: | 9 | public: |
11 | Config( const QString& fileName ); | 10 | Config( const QString& fileName ); |
12 | /** | 11 | /** |
13 | * Quite simple layout in nature | 12 | * Quite simple layout in nature |
14 | * BeginFile | 13 | * BeginFile |
15 | * Key = Value | 14 | * Key = Value |
16 | */ | 15 | */ |
17 | bool load(); | 16 | bool load(); |
18 | QString value( const QString& key ); | 17 | QString value( const QString& key ); |
19 | private: | 18 | private: |
20 | List m_list; | 19 | List m_list; |
21 | QString m_fileName; | 20 | QString m_fileName; |
22 | }; | 21 | }; |
23 | Config::Config( const QString& fileName ) | 22 | Config::Config( const QString& fileName ) |
24 | : m_fileName( fileName ) { | 23 | : m_fileName( fileName ) { |
25 | } | 24 | } |
26 | 25 | ||
27 | bool Config::load() { | 26 | bool Config::load() { |
28 | if (!QFile::exists( m_fileName ) ) | 27 | if (!QFile::exists( m_fileName ) ) |
29 | return false; | 28 | return false; |
30 | QFile file( m_fileName ); | 29 | QFile file( m_fileName ); |
31 | if (!file.open(IO_ReadOnly ) ) | 30 | if (!file.open(IO_ReadOnly ) ) |
32 | return false; | 31 | return false; |
33 | QStringList list = QStringList::split( '\n', file.readAll() ); | 32 | QStringList list = QStringList::split( '\n', file.readAll() ); |
34 | QStringList::Iterator it; | 33 | QStringList::Iterator it; |
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp index b857534..6141504 100644 --- a/libopie2/opiedb/osqlitedriver.cpp +++ b/libopie2/opiedb/osqlitedriver.cpp | |||
@@ -1,63 +1,62 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "osqlresult.h" | ||
32 | #include "osqlquery.h" | 31 | #include "osqlquery.h" |
33 | #include "osqlitedriver.h" | 32 | #include "osqlitedriver.h" |
34 | 33 | ||
35 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
36 | 35 | ||
37 | #include <stdlib.h> | 36 | #include <stdlib.h> |
38 | 37 | ||
39 | // fromLocal8Bit() does not work as expected. Thus it | 38 | // fromLocal8Bit() does not work as expected. Thus it |
40 | // is replaced by fromLatin1() (eilers) | 39 | // is replaced by fromLatin1() (eilers) |
41 | #define __BUGGY_LOCAL8BIT_ | 40 | #define __BUGGY_LOCAL8BIT_ |
42 | 41 | ||
43 | 42 | ||
44 | namespace { | 43 | namespace { |
45 | struct Query { | 44 | struct Query { |
46 | OSQLError::ValueList errors; | 45 | OSQLError::ValueList errors; |
47 | OSQLResultItem::ValueList items; | 46 | OSQLResultItem::ValueList items; |
48 | OSQLiteDriver *driver; | 47 | OSQLiteDriver *driver; |
49 | }; | 48 | }; |
50 | } | 49 | } |
51 | 50 | ||
52 | 51 | ||
53 | OSQLiteDriver::OSQLiteDriver( QLibrary *lib ) | 52 | OSQLiteDriver::OSQLiteDriver( QLibrary *lib ) |
54 | : OSQLDriver( lib ) | 53 | : OSQLDriver( lib ) |
55 | { | 54 | { |
56 | m_sqlite = 0l; | 55 | m_sqlite = 0l; |
57 | } | 56 | } |
58 | 57 | ||
59 | 58 | ||
60 | OSQLiteDriver::~OSQLiteDriver() { | 59 | OSQLiteDriver::~OSQLiteDriver() { |
61 | close(); | 60 | close(); |
62 | } | 61 | } |
63 | 62 | ||
diff --git a/libopie2/opiedb/osqlmanager.cpp b/libopie2/opiedb/osqlmanager.cpp index b0fea04..766ebe1 100644 --- a/libopie2/opiedb/osqlmanager.cpp +++ b/libopie2/opiedb/osqlmanager.cpp | |||
@@ -1,37 +1,35 @@ | |||
1 | 1 | ||
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | 3 | ||
4 | #include "osqlbackend.h" | ||
5 | #include "osqldriver.h" | ||
6 | #include "osqlmanager.h" | 4 | #include "osqlmanager.h" |
7 | #include "osqlbackendmanager.h" | 5 | #include "osqlbackendmanager.h" |
8 | #include "osqlitedriver.h" | 6 | #include "osqlitedriver.h" |
9 | 7 | ||
10 | OSQLManager::OSQLManager() { | 8 | OSQLManager::OSQLManager() { |
11 | } | 9 | } |
12 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { | 10 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { |
13 | m_list.clear(); | 11 | m_list.clear(); |
14 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); | 12 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); |
15 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); | 13 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); |
16 | 14 | ||
17 | if ( !m_path.contains(opie) && !opie.isEmpty() ) | 15 | if ( !m_path.contains(opie) && !opie.isEmpty() ) |
18 | m_path << opie; | 16 | m_path << opie; |
19 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) | 17 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) |
20 | m_path << qpe; | 18 | m_path << qpe; |
21 | 19 | ||
22 | OSQLBackEndManager mng( m_path ); | 20 | OSQLBackEndManager mng( m_path ); |
23 | m_list = mng.scan(); | 21 | m_list = mng.scan(); |
24 | m_list += builtIn(); | 22 | m_list += builtIn(); |
25 | 23 | ||
26 | return m_list; | 24 | return m_list; |
27 | } | 25 | } |
28 | /* | 26 | /* |
29 | * loading dso's is currently not enabled due problems with QLibrary | 27 | * loading dso's is currently not enabled due problems with QLibrary |
30 | * beeing in libqpe and not libqte | 28 | * beeing in libqpe and not libqte |
31 | */ | 29 | */ |
32 | OSQLDriver* OSQLManager::load( const QString& name ) { | 30 | OSQLDriver* OSQLManager::load( const QString& name ) { |
33 | OSQLDriver* driver = 0l; | 31 | OSQLDriver* driver = 0l; |
34 | 32 | ||
35 | if ( name == "SQLite" ) { | 33 | if ( name == "SQLite" ) { |
36 | driver = new OSQLiteDriver(); | 34 | driver = new OSQLiteDriver(); |
37 | } | 35 | } |
diff --git a/libopie2/opiedb/osqlresult.cpp b/libopie2/opiedb/osqlresult.cpp index 490fb45..42da356 100644 --- a/libopie2/opiedb/osqlresult.cpp +++ b/libopie2/opiedb/osqlresult.cpp | |||
@@ -1,34 +1,33 @@ | |||
1 | 1 | ||
2 | #include "osqlquery.h" | ||
3 | #include "osqlresult.h" | 2 | #include "osqlresult.h" |
4 | 3 | ||
5 | OSQLResultItem::OSQLResultItem( const TableString& string, | 4 | OSQLResultItem::OSQLResultItem( const TableString& string, |
6 | const TableInt& Int) | 5 | const TableInt& Int) |
7 | : m_string( string ), m_int( Int ) | 6 | : m_string( string ), m_int( Int ) |
8 | { | 7 | { |
9 | 8 | ||
10 | } | 9 | } |
11 | OSQLResultItem::~OSQLResultItem() { | 10 | OSQLResultItem::~OSQLResultItem() { |
12 | } | 11 | } |
13 | OSQLResultItem::OSQLResultItem( const OSQLResultItem& item) { | 12 | OSQLResultItem::OSQLResultItem( const OSQLResultItem& item) { |
14 | *this = item; | 13 | *this = item; |
15 | } | 14 | } |
16 | OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) { | 15 | OSQLResultItem &OSQLResultItem::operator=( const OSQLResultItem& other) { |
17 | m_string = other.m_string; | 16 | m_string = other.m_string; |
18 | m_int = other.m_int; | 17 | m_int = other.m_int; |
19 | return *this; | 18 | return *this; |
20 | } | 19 | } |
21 | OSQLResultItem::TableString OSQLResultItem::tableString()const{ | 20 | OSQLResultItem::TableString OSQLResultItem::tableString()const{ |
22 | return m_string; | 21 | return m_string; |
23 | } | 22 | } |
24 | OSQLResultItem::TableInt OSQLResultItem::tableInt()const { | 23 | OSQLResultItem::TableInt OSQLResultItem::tableInt()const { |
25 | return m_int; | 24 | return m_int; |
26 | } | 25 | } |
27 | QString OSQLResultItem::data( const QString& columnName, bool *ok ) { | 26 | QString OSQLResultItem::data( const QString& columnName, bool *ok ) { |
28 | TableString::Iterator it = m_string.find( columnName ); | 27 | TableString::Iterator it = m_string.find( columnName ); |
29 | 28 | ||
30 | /* if found */ | 29 | /* if found */ |
31 | if ( it != m_string.end() ) { | 30 | if ( it != m_string.end() ) { |
32 | if ( ok ) *ok = true; | 31 | if ( ok ) *ok = true; |
33 | return it.data(); | 32 | return it.data(); |
34 | }else{ | 33 | }else{ |
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp index ca63389..51e088c 100644 --- a/libopie2/opiemm/osoundsystem.cpp +++ b/libopie2/opiemm/osoundsystem.cpp | |||
@@ -11,65 +11,64 @@ | |||
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <opie2/osoundsystem.h> | 32 | #include <opie2/osoundsystem.h> |
33 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
34 | 34 | ||
35 | #include <errno.h> | 35 | #include <errno.h> |
36 | #include <fcntl.h> | 36 | #include <fcntl.h> |
37 | #include <string.h> | 37 | #include <string.h> |
38 | #include <sys/ioctl.h> | 38 | #include <sys/ioctl.h> |
39 | #include <sys/types.h> | 39 | #include <sys/types.h> |
40 | #include <sys/soundcard.h> | 40 | #include <sys/soundcard.h> |
41 | #include <sys/stat.h> | 41 | #include <sys/stat.h> |
42 | 42 | ||
43 | #include <qstringlist.h> | ||
44 | 43 | ||
45 | /*====================================================================================== | 44 | /*====================================================================================== |
46 | * OSoundSystem | 45 | * OSoundSystem |
47 | *======================================================================================*/ | 46 | *======================================================================================*/ |
48 | 47 | ||
49 | OSoundSystem* OSoundSystem::_instance = 0; | 48 | OSoundSystem* OSoundSystem::_instance = 0; |
50 | 49 | ||
51 | OSoundSystem::OSoundSystem() | 50 | OSoundSystem::OSoundSystem() |
52 | { | 51 | { |
53 | odebug << "OSoundSystem::OSoundSystem()" << oendl; | 52 | odebug << "OSoundSystem::OSoundSystem()" << oendl; |
54 | synchronize(); | 53 | synchronize(); |
55 | } | 54 | } |
56 | 55 | ||
57 | void OSoundSystem::synchronize() | 56 | void OSoundSystem::synchronize() |
58 | { | 57 | { |
59 | // gather available interfaces by inspecting /dev | 58 | // gather available interfaces by inspecting /dev |
60 | //FIXME: we could use SIOCGIFCONF here, but we aren't interested in virtual (e.g. eth0:0) devices | 59 | //FIXME: we could use SIOCGIFCONF here, but we aren't interested in virtual (e.g. eth0:0) devices |
61 | //FIXME: Use SIOCGIFCONF anway, because we can disable listing of aliased devices | 60 | //FIXME: Use SIOCGIFCONF anway, because we can disable listing of aliased devices |
62 | 61 | ||
63 | _interfaces.clear(); | 62 | _interfaces.clear(); |
64 | _interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) ); | 63 | _interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) ); |
65 | 64 | ||
66 | 65 | ||
67 | /* | 66 | /* |
68 | 67 | ||
69 | QString str; | 68 | QString str; |
70 | QFile f( "/dev/sound" ); | 69 | QFile f( "/dev/sound" ); |
71 | bool hasFile = f.open( IO_ReadOnly ); | 70 | bool hasFile = f.open( IO_ReadOnly ); |
72 | if ( !hasFile ) | 71 | if ( !hasFile ) |
73 | { | 72 | { |
74 | odebug << "OSoundSystem: /dev/sound not existing. No sound devices available" << oendl; | 73 | odebug << "OSoundSystem: /dev/sound not existing. No sound devices available" << oendl; |
75 | return; | 74 | return; |
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index 2da549c..b93b752 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp | |||
@@ -11,65 +11,64 @@ | |||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "omanufacturerdb.h" | 31 | #include "omanufacturerdb.h" |
32 | 32 | ||
33 | #define OPIE_IMPROVE_GUI_LATENCY 1 | 33 | #define OPIE_IMPROVE_GUI_LATENCY 1 |
34 | 34 | ||
35 | /* OPIE */ | 35 | /* OPIE */ |
36 | #include <opie2/odebug.h> | 36 | #include <opie2/odebug.h> |
37 | #ifdef OPIE_IMPROVE_GUI_LATENCY | 37 | #ifdef OPIE_IMPROVE_GUI_LATENCY |
38 | #include <qpe/global.h> | 38 | #include <qpe/global.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | /* QT */ | 41 | /* QT */ |
42 | #include <qapplication.h> | 42 | #include <qapplication.h> |
43 | #include <qstring.h> | ||
44 | #include <qfile.h> | 43 | #include <qfile.h> |
45 | #include <qtextstream.h> | 44 | #include <qtextstream.h> |
46 | 45 | ||
47 | OManufacturerDB* OManufacturerDB::_instance = 0; | 46 | OManufacturerDB* OManufacturerDB::_instance = 0; |
48 | 47 | ||
49 | OManufacturerDB* OManufacturerDB::instance() | 48 | OManufacturerDB* OManufacturerDB::instance() |
50 | { | 49 | { |
51 | if ( !OManufacturerDB::_instance ) | 50 | if ( !OManufacturerDB::_instance ) |
52 | { | 51 | { |
53 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; | 52 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; |
54 | _instance = new OManufacturerDB(); | 53 | _instance = new OManufacturerDB(); |
55 | } | 54 | } |
56 | return _instance; | 55 | return _instance; |
57 | } | 56 | } |
58 | 57 | ||
59 | 58 | ||
60 | OManufacturerDB::OManufacturerDB() | 59 | OManufacturerDB::OManufacturerDB() |
61 | { | 60 | { |
62 | #ifdef OPIE_IMPROVE_GUI_LATENCY | 61 | #ifdef OPIE_IMPROVE_GUI_LATENCY |
63 | Global::statusMessage( "Reading Manufacturers..." ); | 62 | Global::statusMessage( "Reading Manufacturers..." ); |
64 | #endif | 63 | #endif |
65 | QString filename( "/etc/manufacturers" ); | 64 | QString filename( "/etc/manufacturers" ); |
66 | odebug << "OManufacturerDB: trying to read " << filename << oendl; | 65 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
67 | if ( !QFile::exists( filename ) ) | 66 | if ( !QFile::exists( filename ) ) |
68 | { | 67 | { |
69 | filename = "/opt/QtPalmtop/etc/manufacturers"; | 68 | filename = "/opt/QtPalmtop/etc/manufacturers"; |
70 | odebug << "OManufacturerDB: trying to read " << filename << oendl; | 69 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
71 | if ( !QFile::exists( filename ) ) | 70 | if ( !QFile::exists( filename ) ) |
72 | { | 71 | { |
73 | filename = "/usr/share/wellenreiter/manufacturers"; | 72 | filename = "/usr/share/wellenreiter/manufacturers"; |
74 | odebug << "OManufacturerDB: trying to read " << filename << oendl; | 73 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
75 | } | 74 | } |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 0adba68..5d92b8f 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | |||
@@ -4,71 +4,69 @@ | |||
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | /* | 29 | /* |
30 | * XML Backend for the OPIE-Contact Database. | 30 | * XML Backend for the OPIE-Contact Database. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <opie2/ocontactaccessbackend_xml.h> | 33 | #include <opie2/ocontactaccessbackend_xml.h> |
34 | 34 | ||
35 | #include <qasciidict.h> | 35 | #include <qasciidict.h> |
36 | #include <qdatetime.h> | ||
37 | #include <qfile.h> | 36 | #include <qfile.h> |
38 | #include <qfileinfo.h> | 37 | #include <qfileinfo.h> |
39 | #include <qregexp.h> | 38 | #include <qregexp.h> |
40 | #include <qarray.h> | 39 | #include <qarray.h> |
41 | #include <qmap.h> | 40 | #include <qmap.h> |
42 | #include <qdatetime.h> | ||
43 | 41 | ||
44 | #include <qpe/global.h> | 42 | #include <qpe/global.h> |
45 | 43 | ||
46 | #include <opie2/xmltree.h> | 44 | #include <opie2/xmltree.h> |
47 | #include <opie2/ocontactaccessbackend.h> | 45 | #include <opie2/ocontactaccessbackend.h> |
48 | #include <opie2/ocontactaccess.h> | 46 | #include <opie2/ocontactaccess.h> |
49 | 47 | ||
50 | #include <stdlib.h> | 48 | #include <stdlib.h> |
51 | #include <errno.h> | 49 | #include <errno.h> |
52 | 50 | ||
53 | using namespace Opie; | 51 | using namespace Opie; |
54 | 52 | ||
55 | 53 | ||
56 | namespace Opie { | 54 | namespace Opie { |
57 | OPimContactAccessBackend_XML::OPimContactAccessBackend_XML ( const QString& appname, const QString& filename ): | 55 | OPimContactAccessBackend_XML::OPimContactAccessBackend_XML ( const QString& appname, const QString& filename ): |
58 | m_changed( false ) | 56 | m_changed( false ) |
59 | { | 57 | { |
60 | // Just m_contactlist should call delete if an entry | 58 | // Just m_contactlist should call delete if an entry |
61 | // is removed. | 59 | // is removed. |
62 | m_contactList.setAutoDelete( true ); | 60 | m_contactList.setAutoDelete( true ); |
63 | m_uidToContact.setAutoDelete( false ); | 61 | m_uidToContact.setAutoDelete( false ); |
64 | 62 | ||
65 | m_appName = appname; | 63 | m_appName = appname; |
66 | 64 | ||
67 | /* Set journalfile name ... */ | 65 | /* Set journalfile name ... */ |
68 | m_journalName = getenv("HOME"); | 66 | m_journalName = getenv("HOME"); |
69 | m_journalName +="/.abjournal" + appname; | 67 | m_journalName +="/.abjournal" + appname; |
70 | 68 | ||
71 | /* Expecting to access the default filename if nothing else is set */ | 69 | /* Expecting to access the default filename if nothing else is set */ |
72 | if ( filename.isEmpty() ){ | 70 | if ( filename.isEmpty() ){ |
73 | m_fileName = Global::applicationFileName( "addressbook","addressbook.xml" ); | 71 | m_fileName = Global::applicationFileName( "addressbook","addressbook.xml" ); |
74 | } else | 72 | } else |
diff --git a/libopie2/opiepim/core/opimcontact.cpp b/libopie2/opiepim/core/opimcontact.cpp index a5df597..4a774e8 100644 --- a/libopie2/opiepim/core/opimcontact.cpp +++ b/libopie2/opiepim/core/opimcontact.cpp | |||
@@ -10,69 +10,65 @@ | |||
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define QTOPIA_INTERNAL_CONTACT_MRE | 30 | #define QTOPIA_INTERNAL_CONTACT_MRE |
31 | 31 | ||
32 | #include "opimcontact.h" | 32 | #include "opimcontact.h" |
33 | 33 | ||
34 | /* OPIE */ | 34 | /* OPIE */ |
35 | #include <opie2/opimresolver.h> | 35 | #include <opie2/opimresolver.h> |
36 | #include <opie2/opimdateconversion.h> | 36 | #include <opie2/opimdateconversion.h> |
37 | #include <qpe/stringutil.h> | 37 | #include <qpe/stringutil.h> |
38 | #include <qpe/timestring.h> | 38 | #include <qpe/timestring.h> |
39 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
40 | 40 | ||
41 | /* QT */ | 41 | /* QT */ |
42 | #include <qobject.h> | ||
43 | #include <qregexp.h> | ||
44 | #include <qstylesheet.h> | 42 | #include <qstylesheet.h> |
45 | #include <qfileinfo.h> | ||
46 | #include <qmap.h> | ||
47 | 43 | ||
48 | /* STD */ | 44 | /* STD */ |
49 | #include <stdio.h> | 45 | #include <stdio.h> |
50 | 46 | ||
51 | /*! | 47 | /*! |
52 | \class Contact contact.h | 48 | \class Contact contact.h |
53 | \brief The Contact class holds the data of an address book entry. | 49 | \brief The Contact class holds the data of an address book entry. |
54 | 50 | ||
55 | This data includes information the name of the person, contact | 51 | This data includes information the name of the person, contact |
56 | information, and business information such as deparment and job title. | 52 | information, and business information such as deparment and job title. |
57 | 53 | ||
58 | \ingroup qtopiaemb | 54 | \ingroup qtopiaemb |
59 | \ingroup qtopiadesktop | 55 | \ingroup qtopiadesktop |
60 | */ | 56 | */ |
61 | 57 | ||
62 | 58 | ||
63 | namespace Opie | 59 | namespace Opie |
64 | { | 60 | { |
65 | /*! | 61 | /*! |
66 | Creates a new, empty contact. | 62 | Creates a new, empty contact. |
67 | */ | 63 | */ |
68 | OPimContact::OPimContact():OPimRecord(), mMap(), d( 0 ) | 64 | OPimContact::OPimContact():OPimRecord(), mMap(), d( 0 ) |
69 | {} | 65 | {} |
70 | 66 | ||
71 | /*! | 67 | /*! |
72 | \internal | 68 | \internal |
73 | Creates a new contact. The properties of the contact are | 69 | Creates a new contact. The properties of the contact are |
74 | set from \a fromMap. | 70 | set from \a fromMap. |
75 | */ | 71 | */ |
76 | OPimContact::OPimContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap( fromMap ), d( 0 ) | 72 | OPimContact::OPimContact( const QMap<int, QString> &fromMap ):OPimRecord(), mMap( fromMap ), d( 0 ) |
77 | { | 73 | { |
78 | QString cats = mMap[ Qtopia::AddressCategory ]; | 74 | QString cats = mMap[ Qtopia::AddressCategory ]; |
diff --git a/libopie2/opiepim/core/opimcontactfields.cpp b/libopie2/opiepim/core/opimcontactfields.cpp index 4b0ba3b..120beb6 100644 --- a/libopie2/opiepim/core/opimcontactfields.cpp +++ b/libopie2/opiepim/core/opimcontactfields.cpp | |||
@@ -2,70 +2,68 @@ | |||
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> | 3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimcontactfields.h" | 30 | #include "opimcontactfields.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/opimcontact.h> | 33 | #include <opie2/opimcontact.h> |
34 | #include <qpe/recordfields.h> // We should use our own enum in the future .. | ||
35 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
36 | 35 | ||
37 | /* QT */ | 36 | /* QT */ |
38 | #include <qobject.h> | 37 | #include <qobject.h> |
39 | #include <qstringlist.h> | ||
40 | 38 | ||
41 | 39 | ||
42 | namespace Opie | 40 | namespace Opie |
43 | { | 41 | { |
44 | /*! | 42 | /*! |
45 | \internal | 43 | \internal |
46 | Returns a list of personal field names for a contact. | 44 | Returns a list of personal field names for a contact. |
47 | */ | 45 | */ |
48 | QStringList OPimContactFields::personalfields( bool sorted, bool translated ) | 46 | QStringList OPimContactFields::personalfields( bool sorted, bool translated ) |
49 | { | 47 | { |
50 | QStringList list; | 48 | QStringList list; |
51 | QMap<int, QString> mapIdToStr; | 49 | QMap<int, QString> mapIdToStr; |
52 | if ( translated ) | 50 | if ( translated ) |
53 | mapIdToStr = idToTrFields(); | 51 | mapIdToStr = idToTrFields(); |
54 | else | 52 | else |
55 | mapIdToStr = idToUntrFields(); | 53 | mapIdToStr = idToUntrFields(); |
56 | 54 | ||
57 | list.append( mapIdToStr[ Qtopia::AddressUid ] ); | 55 | list.append( mapIdToStr[ Qtopia::AddressUid ] ); |
58 | list.append( mapIdToStr[ Qtopia::AddressCategory ] ); | 56 | list.append( mapIdToStr[ Qtopia::AddressCategory ] ); |
59 | 57 | ||
60 | list.append( mapIdToStr[ Qtopia::Title ] ); | 58 | list.append( mapIdToStr[ Qtopia::Title ] ); |
61 | list.append( mapIdToStr[ Qtopia::FirstName ] ); | 59 | list.append( mapIdToStr[ Qtopia::FirstName ] ); |
62 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); | 60 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); |
63 | list.append( mapIdToStr[ Qtopia::LastName ] ); | 61 | list.append( mapIdToStr[ Qtopia::LastName ] ); |
64 | list.append( mapIdToStr[ Qtopia::Suffix ] ); | 62 | list.append( mapIdToStr[ Qtopia::Suffix ] ); |
65 | list.append( mapIdToStr[ Qtopia::FileAs ] ); | 63 | list.append( mapIdToStr[ Qtopia::FileAs ] ); |
66 | 64 | ||
67 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); | 65 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); |
68 | list.append( mapIdToStr[ Qtopia::Department ] ); | 66 | list.append( mapIdToStr[ Qtopia::Department ] ); |
69 | list.append( mapIdToStr[ Qtopia::Company ] ); | 67 | list.append( mapIdToStr[ Qtopia::Company ] ); |
70 | 68 | ||
71 | list.append( mapIdToStr[ Qtopia::Notes ] ); | 69 | list.append( mapIdToStr[ Qtopia::Notes ] ); |
diff --git a/libopie2/opiepim/core/opimevent.cpp b/libopie2/opiepim/core/opimevent.cpp index 3ddbf85..77730e9 100644 --- a/libopie2/opiepim/core/opimevent.cpp +++ b/libopie2/opiepim/core/opimevent.cpp | |||
@@ -5,70 +5,67 @@ | |||
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimevent.h" | 30 | #include "opimevent.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/opimrecurrence.h> | 33 | #include <opie2/opimrecurrence.h> |
34 | #include <opie2/opimresolver.h> | 34 | #include <opie2/opimresolver.h> |
35 | #include <opie2/opimnotifymanager.h> | 35 | #include <opie2/opimnotifymanager.h> |
36 | #include <qpe/categories.h> | 36 | #include <qpe/categories.h> |
37 | #include <qpe/palmtopuidgen.h> | ||
38 | #include <qpe/stringutil.h> | 37 | #include <qpe/stringutil.h> |
39 | 38 | ||
40 | /* QT */ | 39 | /* QT */ |
41 | #include <qshared.h> | ||
42 | #include <qarray.h> | ||
43 | 40 | ||
44 | namespace Opie | 41 | namespace Opie |
45 | { | 42 | { |
46 | 43 | ||
47 | int OCalendarHelper::week( const QDate& date ) | 44 | int OCalendarHelper::week( const QDate& date ) |
48 | { | 45 | { |
49 | // Calculates the week this date is in within that | 46 | // Calculates the week this date is in within that |
50 | // month. Equals the "row" is is in in the month view | 47 | // month. Equals the "row" is is in in the month view |
51 | int week = 1; | 48 | int week = 1; |
52 | QDate tmp( date.year(), date.month(), 1 ); | 49 | QDate tmp( date.year(), date.month(), 1 ); |
53 | if ( date.dayOfWeek() < tmp.dayOfWeek() ) | 50 | if ( date.dayOfWeek() < tmp.dayOfWeek() ) |
54 | ++week; | 51 | ++week; |
55 | 52 | ||
56 | week += ( date.day() - 1 ) / 7; | 53 | week += ( date.day() - 1 ) / 7; |
57 | 54 | ||
58 | return week; | 55 | return week; |
59 | } | 56 | } |
60 | 57 | ||
61 | 58 | ||
62 | int OCalendarHelper::ocurrence( const QDate& date ) | 59 | int OCalendarHelper::ocurrence( const QDate& date ) |
63 | { | 60 | { |
64 | // calculates the number of occurrances of this day of the | 61 | // calculates the number of occurrances of this day of the |
65 | // week till the given date (e.g 3rd Wednesday of the month) | 62 | // week till the given date (e.g 3rd Wednesday of the month) |
66 | return ( date.day() - 1 ) / 7 + 1; | 63 | return ( date.day() - 1 ) / 7 + 1; |
67 | } | 64 | } |
68 | 65 | ||
69 | 66 | ||
70 | int OCalendarHelper::dayOfWeek( char day ) | 67 | int OCalendarHelper::dayOfWeek( char day ) |
71 | { | 68 | { |
72 | int dayOfWeek = 1; | 69 | int dayOfWeek = 1; |
73 | char i = OPimRecurrence::MON; | 70 | char i = OPimRecurrence::MON; |
74 | while ( !( i & day ) && i <= OPimRecurrence::SUN ) | 71 | while ( !( i & day ) && i <= OPimRecurrence::SUN ) |
diff --git a/libopie2/opiepim/core/opimnotify.cpp b/libopie2/opiepim/core/opimnotify.cpp index 43858f0..417b0b9 100644 --- a/libopie2/opiepim/core/opimnotify.cpp +++ b/libopie2/opiepim/core/opimnotify.cpp | |||
@@ -1,65 +1,64 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Main Author <main-author@whereever.org> | 3 | Copyright (C) The Main Author <main-author@whereever.org> |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimnotify.h" | 30 | #include "opimnotify.h" |
31 | 31 | ||
32 | /* QT */ | 32 | /* QT */ |
33 | #include <qshared.h> | ||
34 | 33 | ||
35 | namespace Opie | 34 | namespace Opie |
36 | { | 35 | { |
37 | 36 | ||
38 | struct OPimNotify::Data : public QShared | 37 | struct OPimNotify::Data : public QShared |
39 | { | 38 | { |
40 | Data() : QShared(), dur( -1 ), parent( 0 ) | 39 | Data() : QShared(), dur( -1 ), parent( 0 ) |
41 | { | 40 | { |
42 | } | 41 | } |
43 | QDateTime start; | 42 | QDateTime start; |
44 | int dur; | 43 | int dur; |
45 | QString application; | 44 | QString application; |
46 | int parent; | 45 | int parent; |
47 | }; | 46 | }; |
48 | 47 | ||
49 | OPimNotify::OPimNotify( const QDateTime& start, int duration, int parent ) | 48 | OPimNotify::OPimNotify( const QDateTime& start, int duration, int parent ) |
50 | { | 49 | { |
51 | data = new Data; | 50 | data = new Data; |
52 | data->start = start; | 51 | data->start = start; |
53 | data->dur = duration; | 52 | data->dur = duration; |
54 | data->parent = parent; | 53 | data->parent = parent; |
55 | } | 54 | } |
56 | 55 | ||
57 | 56 | ||
58 | OPimNotify::OPimNotify( const OPimNotify& noti ) | 57 | OPimNotify::OPimNotify( const OPimNotify& noti ) |
59 | : data( noti.data ) | 58 | : data( noti.data ) |
60 | { | 59 | { |
61 | data->ref(); | 60 | data->ref(); |
62 | } | 61 | } |
63 | 62 | ||
64 | 63 | ||
65 | OPimNotify::~OPimNotify() | 64 | OPimNotify::~OPimNotify() |
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index c603f44..67eed41 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp | |||
@@ -5,65 +5,64 @@ | |||
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimrecord.h" | 30 | #include "opimrecord.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <qpe/categories.h> | 33 | #include <qpe/categories.h> |
34 | #include <qpe/categoryselect.h> | 34 | #include <qpe/categoryselect.h> |
35 | 35 | ||
36 | /* QT */ | 36 | /* QT */ |
37 | #include <qarray.h> | ||
38 | 37 | ||
39 | namespace Opie | 38 | namespace Opie |
40 | { | 39 | { |
41 | Qtopia::UidGen OPimRecord::m_uidGen( Qtopia::UidGen::Qtopia ); | 40 | Qtopia::UidGen OPimRecord::m_uidGen( Qtopia::UidGen::Qtopia ); |
42 | 41 | ||
43 | 42 | ||
44 | OPimRecord::OPimRecord( int uid ) | 43 | OPimRecord::OPimRecord( int uid ) |
45 | : Qtopia::Record() | 44 | : Qtopia::Record() |
46 | { | 45 | { |
47 | 46 | ||
48 | m_lastHit = -1; | 47 | m_lastHit = -1; |
49 | setUid( uid ); | 48 | setUid( uid ); |
50 | } | 49 | } |
51 | 50 | ||
52 | 51 | ||
53 | OPimRecord::~OPimRecord() | 52 | OPimRecord::~OPimRecord() |
54 | {} | 53 | {} |
55 | 54 | ||
56 | 55 | ||
57 | OPimRecord::OPimRecord( const OPimRecord& rec ) | 56 | OPimRecord::OPimRecord( const OPimRecord& rec ) |
58 | : Qtopia::Record( rec ) | 57 | : Qtopia::Record( rec ) |
59 | { | 58 | { |
60 | ( *this ) = rec; | 59 | ( *this ) = rec; |
61 | } | 60 | } |
62 | 61 | ||
63 | 62 | ||
64 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec ) | 63 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec ) |
65 | { | 64 | { |
66 | if ( this == &rec ) return * this; | 65 | if ( this == &rec ) return * this; |
67 | 66 | ||
68 | Qtopia::Record::operator=( rec ); | 67 | Qtopia::Record::operator=( rec ); |
69 | m_xrefman = rec.m_xrefman; | 68 | m_xrefman = rec.m_xrefman; |
diff --git a/libopie2/opiepim/core/opimtodo.cpp b/libopie2/opiepim/core/opimtodo.cpp index 34df807..f246bfd 100644 --- a/libopie2/opiepim/core/opimtodo.cpp +++ b/libopie2/opiepim/core/opimtodo.cpp | |||
@@ -7,69 +7,68 @@ | |||
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "opimtodo.h" | 30 | #include "opimtodo.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/opimstate.h> | 33 | #include <opie2/opimstate.h> |
34 | #include <opie2/opimrecurrence.h> | 34 | #include <opie2/opimrecurrence.h> |
35 | #include <opie2/opimmaintainer.h> | 35 | #include <opie2/opimmaintainer.h> |
36 | #include <opie2/opimnotifymanager.h> | 36 | #include <opie2/opimnotifymanager.h> |
37 | #include <opie2/opimresolver.h> | 37 | #include <opie2/opimresolver.h> |
38 | #include <qpe/palmtopuidgen.h> | 38 | #include <qpe/palmtopuidgen.h> |
39 | #include <qpe/stringutil.h> | ||
40 | #include <qpe/palmtoprecord.h> | 39 | #include <qpe/palmtoprecord.h> |
41 | #include <qpe/stringutil.h> | ||
42 | #include <qpe/categories.h> | 40 | #include <qpe/categories.h> |
43 | #include <qpe/categoryselect.h> | 41 | #include <qpe/categoryselect.h> |
42 | #include <qpe/stringutil.h> | ||
44 | 43 | ||
45 | /* QT */ | 44 | /* QT */ |
46 | #include <qobject.h> | 45 | #include <qobject.h> |
47 | #include <qshared.h> | 46 | #include <qshared.h> |
48 | 47 | ||
49 | namespace Opie | 48 | namespace Opie |
50 | { | 49 | { |
51 | 50 | ||
52 | struct OPimTodo::OPimTodoData : public QShared | 51 | struct OPimTodo::OPimTodoData : public QShared |
53 | { | 52 | { |
54 | OPimTodoData() : QShared() | 53 | OPimTodoData() : QShared() |
55 | { | 54 | { |
56 | recur = 0; | 55 | recur = 0; |
57 | state = 0; | 56 | state = 0; |
58 | maintainer = 0; | 57 | maintainer = 0; |
59 | notifiers = 0; | 58 | notifiers = 0; |
60 | }; | 59 | }; |
61 | ~OPimTodoData() | 60 | ~OPimTodoData() |
62 | { | 61 | { |
63 | delete recur; | 62 | delete recur; |
64 | delete maintainer; | 63 | delete maintainer; |
65 | delete notifiers; | 64 | delete notifiers; |
66 | } | 65 | } |
67 | 66 | ||
68 | QDate date; | 67 | QDate date; |
69 | bool isCompleted: 1; | 68 | bool isCompleted: 1; |
70 | bool hasDate: 1; | 69 | bool hasDate: 1; |
71 | int priority; | 70 | int priority; |
72 | QString desc; | 71 | QString desc; |
73 | QString sum; | 72 | QString sum; |
74 | QMap<QString, QString> extra; | 73 | QMap<QString, QString> extra; |
75 | ushort prog; | 74 | ushort prog; |
diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp index 49628c9..49ddeb6 100644 --- a/libopie2/opieui/ofontselector.cpp +++ b/libopie2/opieui/ofontselector.cpp | |||
@@ -7,65 +7,64 @@ | |||
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* OPIE */ | 30 | /* OPIE */ |
31 | #include <opie2/ofontselector.h> | 31 | #include <opie2/ofontselector.h> |
32 | #include <qpe/fontdatabase.h> | 32 | #include <qpe/fontdatabase.h> |
33 | 33 | ||
34 | /* QT */ | 34 | /* QT */ |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qlistbox.h> | 36 | #include <qlistbox.h> |
37 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qfont.h> | ||
40 | #include <qmultilineedit.h> | 39 | #include <qmultilineedit.h> |
41 | 40 | ||
42 | using namespace Opie; | 41 | using namespace Opie; |
43 | 42 | ||
44 | namespace Opie | 43 | namespace Opie |
45 | { | 44 | { |
46 | 45 | ||
47 | class OFontSelectorPrivate | 46 | class OFontSelectorPrivate |
48 | { | 47 | { |
49 | public: | 48 | public: |
50 | QListBox * m_font_family_list; | 49 | QListBox * m_font_family_list; |
51 | QComboBox * m_font_style_list; | 50 | QComboBox * m_font_style_list; |
52 | QComboBox * m_font_size_list; | 51 | QComboBox * m_font_size_list; |
53 | QMultiLineEdit *m_preview; | 52 | QMultiLineEdit *m_preview; |
54 | 53 | ||
55 | bool m_pointbug : 1; | 54 | bool m_pointbug : 1; |
56 | 55 | ||
57 | FontDatabase m_fdb; | 56 | FontDatabase m_fdb; |
58 | }; | 57 | }; |
59 | 58 | ||
60 | }; | 59 | }; |
61 | 60 | ||
62 | namespace | 61 | namespace |
63 | { | 62 | { |
64 | 63 | ||
65 | class FontListItem : public QListBoxText | 64 | class FontListItem : public QListBoxText |
66 | { | 65 | { |
67 | public: | 66 | public: |
68 | FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText() | 67 | FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText() |
69 | { | 68 | { |
70 | m_name = t; | 69 | m_name = t; |
71 | m_styles = styles; | 70 | m_styles = styles; |
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index 38f3fe2..84617f8 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp | |||
@@ -1,66 +1,63 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> | 3 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | .=l. | 4 | .=l. |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This program is free software; you can | 6 | _;:, .> :=|. This program is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This program is distributed in the hope that | 13 | .i_,=:_. -<s. This program is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
18 | ..}^=.= = ; Library General Public License for more | 18 | ..}^=.= = ; Library General Public License for more |
19 | ++= -. .` .: details. | 19 | ++= -. .` .: details. |
20 | : = ...= . :.=- | 20 | : = ...= . :.=- |
21 | -. .:....=;==+<; You should have received a copy of the GNU | 21 | -. .:....=;==+<; You should have received a copy of the GNU |
22 | -_. . . )=. = Library General Public License along with | 22 | -_. . . )=. = Library General Public License along with |
23 | -- :-=` this library; see the file COPYING.LIB. | 23 | -- :-=` this library; see the file COPYING.LIB. |
24 | If not, write to the Free Software Foundation, | 24 | If not, write to the Free Software Foundation, |
25 | Inc., 59 Temple Place - Suite 330, | 25 | Inc., 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* QT */ | 30 | /* QT */ |
31 | 31 | ||
32 | #include <qcolor.h> | ||
33 | #include <qheader.h> | ||
34 | #include <qpainter.h> | ||
35 | #include <qpixmap.h> | 32 | #include <qpixmap.h> |
36 | 33 | ||
37 | /* OPIE */ | 34 | /* OPIE */ |
38 | 35 | ||
39 | #include <opie2/odebug.h> | 36 | #include <opie2/odebug.h> |
40 | #include <opie2/olistview.h> | 37 | #include <opie2/olistview.h> |
41 | 38 | ||
42 | /*====================================================================================== | 39 | /*====================================================================================== |
43 | * OListView | 40 | * OListView |
44 | *======================================================================================*/ | 41 | *======================================================================================*/ |
45 | 42 | ||
46 | OListView::OListView( QWidget *parent, const char *name ) | 43 | OListView::OListView( QWidget *parent, const char *name ) |
47 | :QListView( parent, name ) | 44 | :QListView( parent, name ) |
48 | { | 45 | { |
49 | //FIXME: get from global settings and calculate ==> see oglobalsettings.* | 46 | //FIXME: get from global settings and calculate ==> see oglobalsettings.* |
50 | 47 | ||
51 | m_alternateBackground = QColor( 238, 246, 255 ); | 48 | m_alternateBackground = QColor( 238, 246, 255 ); |
52 | m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine ); | 49 | m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine ); |
53 | m_fullWidth = true; | 50 | m_fullWidth = true; |
54 | connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*))); | 51 | connect( this, SIGNAL(expanded(QListViewItem*)), SLOT(expand(QListViewItem*))); |
55 | } | 52 | } |
56 | 53 | ||
57 | OListView::~OListView() | 54 | OListView::~OListView() |
58 | { | 55 | { |
59 | } | 56 | } |
60 | 57 | ||
61 | void OListView::setFullWidth( bool fullWidth ) | 58 | void OListView::setFullWidth( bool fullWidth ) |
62 | { | 59 | { |
63 | m_fullWidth = m_fullWidth; | 60 | m_fullWidth = m_fullWidth; |
64 | #if QT_VERSION > 290 | 61 | #if QT_VERSION > 290 |
65 | header()->setStretchEnabled( fullWidth, columns()-1 ); | 62 | header()->setStretchEnabled( fullWidth, columns()-1 ); |
66 | #endif | 63 | #endif |
diff --git a/libopie2/opieui/opopupmenu.cpp b/libopie2/opieui/opopupmenu.cpp index ac73188..d5cc575 100644 --- a/libopie2/opieui/opopupmenu.cpp +++ b/libopie2/opieui/opopupmenu.cpp | |||
@@ -1,62 +1,55 @@ | |||
1 | /* This file is part of the KDE libraries | 1 | /* This file is part of the KDE libraries |
2 | Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> | 2 | Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org> |
3 | Copyright (C) 2002 Hamish Rodda <meddie@yoyo.its.monash.edu.au> | 3 | Copyright (C) 2002 Hamish Rodda <meddie@yoyo.its.monash.edu.au> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License version 2 as published by the Free Software Foundation. | 7 | License version 2 as published by the Free Software Foundation. |
8 | 8 | ||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | /* QT */ | 20 | /* QT */ |
21 | 21 | ||
22 | #include <qapplication.h> | ||
23 | #include <qcursor.h> | ||
24 | #include <qpainter.h> | ||
25 | #include <qdrawutil.h> | 22 | #include <qdrawutil.h> |
26 | #include <qtimer.h> | 23 | #include <qtimer.h> |
27 | #include <qfont.h> | ||
28 | #include <qfontmetrics.h> | ||
29 | #include <qregexp.h> | ||
30 | #include <qstyle.h> | ||
31 | 24 | ||
32 | /* OPIE */ | 25 | /* OPIE */ |
33 | 26 | ||
34 | #include <opie2/opopupmenu.h> | 27 | #include <opie2/opopupmenu.h> |
35 | #include <opie2/oconfig.h> | 28 | #include <opie2/oconfig.h> |
36 | 29 | ||
37 | OPopupTitle::OPopupTitle(QWidget *parent, const char *name) | 30 | OPopupTitle::OPopupTitle(QWidget *parent, const char *name) |
38 | : QWidget(parent, name) | 31 | : QWidget(parent, name) |
39 | { | 32 | { |
40 | setMinimumSize(16, fontMetrics().height()+8); | 33 | setMinimumSize(16, fontMetrics().height()+8); |
41 | } | 34 | } |
42 | 35 | ||
43 | OPopupTitle::OPopupTitle(OPixmapEffect::GradientType /* gradient */, | 36 | OPopupTitle::OPopupTitle(OPixmapEffect::GradientType /* gradient */, |
44 | const QColor &/* color */, const QColor &/* textColor */, | 37 | const QColor &/* color */, const QColor &/* textColor */, |
45 | QWidget *parent, const char *name) | 38 | QWidget *parent, const char *name) |
46 | : QWidget(parent, name) | 39 | : QWidget(parent, name) |
47 | { | 40 | { |
48 | setMinimumSize(16, fontMetrics().height()+8); | 41 | setMinimumSize(16, fontMetrics().height()+8); |
49 | } | 42 | } |
50 | 43 | ||
51 | OPopupTitle::OPopupTitle(const OPixmap & /* background */, const QColor &/* color */, | 44 | OPopupTitle::OPopupTitle(const OPixmap & /* background */, const QColor &/* color */, |
52 | const QColor &/* textColor */, QWidget *parent, | 45 | const QColor &/* textColor */, QWidget *parent, |
53 | const char *name) | 46 | const char *name) |
54 | : QWidget(parent, name) | 47 | : QWidget(parent, name) |
55 | { | 48 | { |
56 | setMinimumSize(16, fontMetrics().height()+8); | 49 | setMinimumSize(16, fontMetrics().height()+8); |
57 | } | 50 | } |
58 | 51 | ||
59 | void OPopupTitle::setTitle(const QString &text, const QPixmap *icon) | 52 | void OPopupTitle::setTitle(const QString &text, const QPixmap *icon) |
60 | { | 53 | { |
61 | titleStr = text; | 54 | titleStr = text; |
62 | if (icon) | 55 | if (icon) |
diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp index ec5af6b..23b3ce3 100644 --- a/libopie2/opieui/oselector.cpp +++ b/libopie2/opieui/oselector.cpp | |||
@@ -1,55 +1,54 @@ | |||
1 | /* This file is part of the KDE libraries | 1 | /* This file is part of the KDE libraries |
2 | Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 | Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public | 5 | modify it under the terms of the GNU Library General Public |
6 | License as published by the Free Software Foundation; either | 6 | License as published by the Free Software Foundation; either |
7 | version 2 of the License, or (at your option) any later version. | 7 | version 2 of the License, or (at your option) any later version. |
8 | 8 | ||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | /* QT */ | 20 | /* QT */ |
21 | 21 | ||
22 | #include <qimage.h> | 22 | #include <qimage.h> |
23 | #include <qpainter.h> | ||
24 | #include <qdrawutil.h> | 23 | #include <qdrawutil.h> |
25 | 24 | ||
26 | /* OPIE */ | 25 | /* OPIE */ |
27 | 26 | ||
28 | #include <opie2/oimageeffect.h> | 27 | #include <opie2/oimageeffect.h> |
29 | #include <opie2/oselector.h> | 28 | #include <opie2/oselector.h> |
30 | 29 | ||
31 | #define STORE_W 8 | 30 | #define STORE_W 8 |
32 | #define STORE_W2 STORE_W * 2 | 31 | #define STORE_W2 STORE_W * 2 |
33 | 32 | ||
34 | //----------------------------------------------------------------------------- | 33 | //----------------------------------------------------------------------------- |
35 | /* | 34 | /* |
36 | * 2D value selector. | 35 | * 2D value selector. |
37 | * The contents of the selector are drawn by derived class. | 36 | * The contents of the selector are drawn by derived class. |
38 | */ | 37 | */ |
39 | 38 | ||
40 | OXYSelector::OXYSelector( QWidget *parent, const char *name ) | 39 | OXYSelector::OXYSelector( QWidget *parent, const char *name ) |
41 | : QWidget( parent, name ) | 40 | : QWidget( parent, name ) |
42 | { | 41 | { |
43 | xPos = 0; | 42 | xPos = 0; |
44 | yPos = 0; | 43 | yPos = 0; |
45 | minX = 0; | 44 | minX = 0; |
46 | minY = 0; | 45 | minY = 0; |
47 | maxX = 100; | 46 | maxX = 100; |
48 | maxY = 100; | 47 | maxY = 100; |
49 | store.setOptimization( QPixmap::BestOptim ); | 48 | store.setOptimization( QPixmap::BestOptim ); |
50 | store.resize( STORE_W2, STORE_W2 ); | 49 | store.resize( STORE_W2, STORE_W2 ); |
51 | } | 50 | } |
52 | 51 | ||
53 | 52 | ||
54 | OXYSelector::~OXYSelector() | 53 | OXYSelector::~OXYSelector() |
55 | {} | 54 | {} |
diff --git a/libopie2/opieui/oseparator.cpp b/libopie2/opieui/oseparator.cpp index 98d42c7..b93c225 100644 --- a/libopie2/opieui/oseparator.cpp +++ b/libopie2/opieui/oseparator.cpp | |||
@@ -7,65 +7,64 @@ | |||
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | 33 | ||
34 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
35 | #include <opie2/oseparator.h> | 35 | #include <opie2/oseparator.h> |
36 | 36 | ||
37 | /* QT */ | 37 | /* QT */ |
38 | 38 | ||
39 | #include <qstyle.h> | ||
40 | 39 | ||
41 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) | 40 | OSeparator::OSeparator(QWidget* parent, const char* name, WFlags f) |
42 | : QFrame(parent, name, f) | 41 | : QFrame(parent, name, f) |
43 | { | 42 | { |
44 | setLineWidth(1); | 43 | setLineWidth(1); |
45 | setMidLineWidth(0); | 44 | setMidLineWidth(0); |
46 | setOrientation( HLine ); | 45 | setOrientation( HLine ); |
47 | } | 46 | } |
48 | 47 | ||
49 | 48 | ||
50 | 49 | ||
51 | OSeparator::OSeparator(int orientation, QWidget* parent, const char* name, WFlags f) | 50 | OSeparator::OSeparator(int orientation, QWidget* parent, const char* name, WFlags f) |
52 | : QFrame(parent, name, f) | 51 | : QFrame(parent, name, f) |
53 | { | 52 | { |
54 | setLineWidth(1); | 53 | setLineWidth(1); |
55 | setMidLineWidth(0); | 54 | setMidLineWidth(0); |
56 | setOrientation( orientation ); | 55 | setOrientation( orientation ); |
57 | } | 56 | } |
58 | 57 | ||
59 | 58 | ||
60 | 59 | ||
61 | void OSeparator::setOrientation(int orientation) | 60 | void OSeparator::setOrientation(int orientation) |
62 | { | 61 | { |
63 | switch(orientation) | 62 | switch(orientation) |
64 | { | 63 | { |
65 | case Vertical: | 64 | case Vertical: |
66 | case VLine: | 65 | case VLine: |
67 | setFrameStyle( QFrame::VLine | QFrame::Sunken ); | 66 | setFrameStyle( QFrame::VLine | QFrame::Sunken ); |
68 | setMinimumSize(2, 0); | 67 | setMinimumSize(2, 0); |
69 | break; | 68 | break; |
70 | 69 | ||
71 | default: | 70 | default: |
diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp index 9f9f2c2..d4712a4 100644 --- a/libopie2/opieui/otimepicker.cpp +++ b/libopie2/opieui/otimepicker.cpp | |||
@@ -1,67 +1,64 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> | 3 | Copyright (C) Stefan Eilers <eilers.stefan@epost.de> |
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* QT */ | 30 | /* QT */ |
31 | #include <qbuttongroup.h> | ||
32 | #include <qlayout.h> | 31 | #include <qlayout.h> |
33 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
34 | #include <qstring.h> | ||
35 | #include <qtoolbutton.h> | ||
36 | 33 | ||
37 | /* OPIE */ | 34 | /* OPIE */ |
38 | #include <opie2/otimepicker.h> | 35 | #include <opie2/otimepicker.h> |
39 | 36 | ||
40 | using namespace Opie; | 37 | using namespace Opie; |
41 | 38 | ||
42 | /** | 39 | /** |
43 | * Constructs the widget | 40 | * Constructs the widget |
44 | * @param parent The parent of the OTimePicker | 41 | * @param parent The parent of the OTimePicker |
45 | * @param name The name of the object | 42 | * @param name The name of the object |
46 | * @param fl Window Flags | 43 | * @param fl Window Flags |
47 | */ | 44 | */ |
48 | OTimePicker::OTimePicker(QWidget* parent, const char* name, Qt::WFlags fl) | 45 | OTimePicker::OTimePicker(QWidget* parent, const char* name, Qt::WFlags fl) |
49 | :QWidget(parent,name,fl) | 46 | :QWidget(parent,name,fl) |
50 | { | 47 | { |
51 | QVBoxLayout *vbox=new QVBoxLayout(this); | 48 | QVBoxLayout *vbox=new QVBoxLayout(this); |
52 | 49 | ||
53 | OClickableLabel *r; | 50 | OClickableLabel *r; |
54 | QString s; | 51 | QString s; |
55 | 52 | ||
56 | // Hour Row | 53 | // Hour Row |
57 | QWidget *row=new QWidget(this); | 54 | QWidget *row=new QWidget(this); |
58 | QHBoxLayout *l=new QHBoxLayout(row); | 55 | QHBoxLayout *l=new QHBoxLayout(row); |
59 | vbox->addWidget(row); | 56 | vbox->addWidget(row); |
60 | 57 | ||
61 | for (int i=0; i<24; i++) | 58 | for (int i=0; i<24; i++) |
62 | { | 59 | { |
63 | r=new OClickableLabel(row); | 60 | r=new OClickableLabel(row); |
64 | hourLst.append(r); | 61 | hourLst.append(r); |
65 | s.sprintf("%.2d",i); | 62 | s.sprintf("%.2d",i); |
66 | r->setText(s); | 63 | r->setText(s); |
67 | r->setToggleButton(true); | 64 | r->setToggleButton(true); |
diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp index 65fe3d8..8839456 100644 --- a/libopie2/opieui/oversatileview.cpp +++ b/libopie2/opieui/oversatileview.cpp | |||
@@ -9,76 +9,65 @@ | |||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | /* OPIE */ | 31 | /* OPIE */ |
32 | 32 | ||
33 | #include <opie2/odebug.h> | 33 | #include <opie2/odebug.h> |
34 | #include <opie2/oversatileview.h> | 34 | #include <opie2/oversatileview.h> |
35 | #include <opie2/oversatileviewitem.h> | 35 | #include <opie2/oversatileviewitem.h> |
36 | #include <opie2/olistview.h> | 36 | #include <opie2/olistview.h> |
37 | 37 | ||
38 | /* QT */ | 38 | /* QT */ |
39 | 39 | ||
40 | #include <qaction.h> | 40 | #include <qaction.h> |
41 | #include <qbrush.h> | ||
42 | #include <qfont.h> | ||
43 | #include <qiconset.h> | ||
44 | #include <qiconview.h> | ||
45 | #include <qlistview.h> | ||
46 | #include <qpalette.h> | ||
47 | #include <qpoint.h> | ||
48 | #include <qpopupmenu.h> | 41 | #include <qpopupmenu.h> |
49 | #include <qrect.h> | ||
50 | #include <qsize.h> | ||
51 | #include <qstring.h> | ||
52 | #include <qwidgetstack.h> | ||
53 | 42 | ||
54 | /* XPM */ | 43 | /* XPM */ |
55 | static const char * view_icon_xpm[] = { | 44 | static const char * view_icon_xpm[] = { |
56 | "16 16 16 1", | 45 | "16 16 16 1", |
57 | " c None", | 46 | " c None", |
58 | ".c #87BD88", | 47 | ".c #87BD88", |
59 | "+c #8BBE8B", | 48 | "+c #8BBE8B", |
60 | "@c #81BA81", | 49 | "@c #81BA81", |
61 | "#c #6DAF6D", | 50 | "#c #6DAF6D", |
62 | "$c #87BD87", | 51 | "$c #87BD87", |
63 | "%c #FCFDFC", | 52 | "%c #FCFDFC", |
64 | "&c #AED0AE", | 53 | "&c #AED0AE", |
65 | "*c #4E9C4C", | 54 | "*c #4E9C4C", |
66 | "=c #91BD91", | 55 | "=c #91BD91", |
67 | "-c #72B172", | 56 | "-c #72B172", |
68 | ";c #448643", | 57 | ";c #448643", |
69 | ">c #519F50", | 58 | ">c #519F50", |
70 | ",c #499247", | 59 | ",c #499247", |
71 | "'c #356A35", | 60 | "'c #356A35", |
72 | ")c #686868", | 61 | ")c #686868", |
73 | " ", | 62 | " ", |
74 | " .+@# .+@# ", | 63 | " .+@# .+@# ", |
75 | " $%&* $%&* ", | 64 | " $%&* $%&* ", |
76 | " @=-; @=-; ", | 65 | " @=-; @=-; ", |
77 | " #>,' #>,' ", | 66 | " #>,' #>,' ", |
78 | " ", | 67 | " ", |
79 | " )))))) )))))) ", | 68 | " )))))) )))))) ", |
80 | " ", | 69 | " ", |
81 | " ", | 70 | " ", |
82 | " .+@# .+@# ", | 71 | " .+@# .+@# ", |
83 | " $%&* $%&* ", | 72 | " $%&* $%&* ", |
84 | " @=-; @=-; ", | 73 | " @=-; @=-; ", |