-rw-r--r-- | libopie2/README | 19 | ||||
-rw-r--r-- | libopie2/libopie2.pro | 9 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.h | 10 | ||||
-rw-r--r-- | libopie2/opiecore/opiecore.pro | 11 | ||||
-rw-r--r-- | libopie2/opiedb/opiedb.pro | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlmanager.h | 2 | ||||
-rw-r--r-- | libopie2/opiemm/opiemm.pro | 8 | ||||
-rw-r--r-- | libopie2/opiemm/osoundsystem.cpp | 1 | ||||
-rw-r--r-- | libopie2/opienet/opienet.pro | 8 | ||||
-rw-r--r-- | libopie2/opiepim/opiepim.pro | 9 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 20 | ||||
-rw-r--r-- | libopie2/opieui/oversatileview.h | 2 |
13 files changed, 105 insertions, 14 deletions
diff --git a/libopie2/README b/libopie2/README index 57172a7..daf6b27 100644 --- a/libopie2/README +++ b/libopie2/README | |||
@@ -1,169 +1,188 @@ | |||
1 | /******************************************************************** | 1 | /******************************************************************** |
2 | /* This is an overview of the opielibs2 project | 2 | /* This is an overview of the opielibs2 project |
3 | /********************************************************************/ | 3 | /********************************************************************/ |
4 | 4 | ||
5 | Origin: opielibs is about creating classes to | 5 | Origin: opielibs is about creating classes to |
6 | * optimize Qt classes for the embedded environment | 6 | * optimize Qt classes for the embedded environment |
7 | * provide sophisticated abstractions for developers | 7 | * provide sophisticated abstractions for developers |
8 | * provide complete documentation and working examples | 8 | * provide complete documentation and working examples |
9 | * provide end users with a common look and feel | 9 | * provide end users with a common look and feel |
10 | * reduce memory footprint through sharing code | 10 | * reduce memory footprint through sharing code |
11 | * reduce possible bugs through reusing tested code | 11 | * reduce possible bugs through reusing tested code |
12 | 12 | ||
13 | -------------------------------------------------------- | 13 | -------------------------------------------------------- |
14 | 0. Building | ||
15 | -------------------------------------------------------- | ||
16 | |||
17 | * for QPE run: | ||
18 | qmake libopie2.pro | ||
19 | make | ||
20 | |||
21 | OR (even better) | ||
22 | cd $OPIEDIR | ||
23 | make menuconfig | ||
24 | make -k | ||
25 | |||
26 | * for QT/X11 run: | ||
27 | qmake "platform=x11" libopie2.pro | ||
28 | make | ||
29 | |||
30 | Make sure you have set $PLATFORM=x86-linux | ||
31 | |||
32 | -------------------------------------------------------- | ||
14 | 1. General Overview | 33 | 1. General Overview |
15 | -------------------------------------------------------- | 34 | -------------------------------------------------------- |
16 | 35 | ||
17 | libopie is functionally seperated into the following libraries: | 36 | libopie is functionally seperated into the following libraries: |
18 | - libopiecore | 37 | - libopiecore |
19 | - libopieui | 38 | - libopieui |
20 | - libopiepim | 39 | - libopiepim |
21 | - libopiedb | 40 | - libopiedb |
22 | - libopienet | 41 | - libopienet |
23 | - libopiemm | 42 | - libopiemm |
24 | 43 | ||
25 | 1.1 Contents of libopiecore [ opiecore ] | 44 | 1.1 Contents of libopiecore [ opiecore ] |
26 | -------------------------------------------------------- | 45 | -------------------------------------------------------- |
27 | 46 | ||
28 | - odbgstream | 47 | - odbgstream |
29 | - ondbgstream | 48 | - ondbgstream |
30 | 49 | ||
31 | - oprocctrl | 50 | - oprocctrl |
32 | - oprocess | 51 | - oprocess |
33 | - odevice | 52 | - odevice |
34 | - odevicebutton | 53 | - odevicebutton |
35 | 54 | ||
36 | - oconfig | 55 | - oconfig |
37 | - oconfiggroupsaver | 56 | - oconfiggroupsaver |
38 | 57 | ||
39 | - ocompletionbase | 58 | - ocompletionbase |
40 | - ocompletion | 59 | - ocompletion |
41 | - ocomptreenodelist | 60 | - ocomptreenodelist |
42 | - ocomptreenode | 61 | - ocomptreenode |
43 | - ocompletionwrapper | 62 | - ocompletionwrapper |
44 | 63 | ||
45 | - oglobal | 64 | - oglobal |
46 | - oglobalsettings | 65 | - oglobalsettings |
47 | 66 | ||
48 | - osortableitem | 67 | - osortableitem |
49 | - osortablevaluelist | 68 | - osortablevaluelist |
50 | 69 | ||
51 | 1.2 Contents of libopieui [ opieui ] | 70 | 1.2 Contents of libopieui [ opieui ] |
52 | -------------------------------------------------------- | 71 | -------------------------------------------------------- |
53 | 72 | ||
54 | - oapplication | 73 | - oapplication |
55 | 74 | ||
56 | - ofiledialog | 75 | - ofiledialog |
57 | - colordialog | 76 | - colordialog |
58 | - oclickablelabel | 77 | - oclickablelabel |
59 | - ocolorbutton | 78 | - ocolorbutton |
60 | - colorpopupmenu | 79 | - colorpopupmenu |
61 | - otabinfo | 80 | - otabinfo |
62 | - otabbar | 81 | - otabbar |
63 | - otabwidget | 82 | - otabwidget |
64 | - ofontmenu | 83 | - ofontmenu |
65 | - ofontselector | 84 | - ofontselector |
66 | - ofileview | 85 | - ofileview |
67 | - oticker | 86 | - oticker |
68 | 87 | ||
69 | - olistview | 88 | - olistview |
70 | - olistviewitem | 89 | - olistviewitem |
71 | - oversatileview | 90 | - oversatileview |
72 | - oversatileviewitem | 91 | - oversatileviewitem |
73 | - ocompletionbox | 92 | - ocompletionbox |
74 | - olineedit | 93 | - olineedit |
75 | - ocombobox | 94 | - ocombobox |
76 | - ohistorycombo | 95 | - ohistorycombo |
77 | 96 | ||
78 | - omessagebox | 97 | - omessagebox |
79 | - odialogbase | 98 | - odialogbase |
80 | 99 | ||
81 | - todayconfigwidget (rather into opiepim?) | 100 | - todayconfigwidget (rather into opiepim?) |
82 | - orecurrancewidget (rather into opiepim?) | 101 | - orecurrancewidget (rather into opiepim?) |
83 | - otimepicker (rather into opiepim?) | 102 | - otimepicker (rather into opiepim?) |
84 | 103 | ||
85 | 1.3 Contents of libopiepim [ opiepim ] | 104 | 1.3 Contents of libopiepim [ opiepim ] |
86 | -------------------------------------------------------- | 105 | -------------------------------------------------------- |
87 | 106 | ||
88 | - ocheckitem | 107 | - ocheckitem |
89 | - todayplugininterface | 108 | - todayplugininterface |
90 | 109 | ||
91 | THIS STUFF IS OUTDATED/DEPRICATED AND SCHOULD NOT | 110 | THIS STUFF IS OUTDATED/DEPRICATED AND SCHOULD NOT |
92 | BE MOVED IN THE NEW LIBRARY !! | 111 | BE MOVED IN THE NEW LIBRARY !! |
93 | USE THE CLASSES IN libopie/pim INSTEAD !(eilers) | 112 | USE THE CLASSES IN libopie/pim INSTEAD !(eilers) |
94 | 113 | ||
95 | - todoresource | 114 | - todoresource |
96 | - todoevent | 115 | - todoevent |
97 | - todovcalresource | 116 | - todovcalresource |
98 | 117 | ||
99 | 1.4 Contents of libopiedb [ opiedb ] | 118 | 1.4 Contents of libopiedb [ opiedb ] |
100 | -------------------------------------------------------- | 119 | -------------------------------------------------------- |
101 | 120 | ||
102 | - xmltree | 121 | - xmltree |
103 | 122 | ||
104 | THIS STUFF IS OUTDATED/DEPRICATED AND SCHOULD NOT | 123 | THIS STUFF IS OUTDATED/DEPRICATED AND SCHOULD NOT |
105 | BE MOVED IN THE NEW LIBRARY !! | 124 | BE MOVED IN THE NEW LIBRARY !! |
106 | USE THE CLASSES IN libopie/pim INSTEAD !(eilers) | 125 | USE THE CLASSES IN libopie/pim INSTEAD !(eilers) |
107 | - tododb | 126 | - tododb |
108 | 127 | ||
109 | 1.5 Contents of libopienet [ opienet ] | 128 | 1.5 Contents of libopienet [ opienet ] |
110 | -------------------------------------------------------- | 129 | -------------------------------------------------------- |
111 | 130 | ||
112 | - onetwork | 131 | - onetwork |
113 | - onetworkinterface | 132 | - onetworkinterface |
114 | - owirelessnetworkinterface | 133 | - owirelessnetworkinterface |
115 | - ochannelhopper | 134 | - ochannelhopper |
116 | 135 | ||
117 | - omonitoring | 136 | - omonitoring |
118 | - ociscomonitoring | 137 | - ociscomonitoring |
119 | - owlanngmonitoring | 138 | - owlanngmonitoring |
120 | - ohostapmonitoring | 139 | - ohostapmonitoring |
121 | - oorinocomonitoring | 140 | - oorinocomonitoring |
122 | 141 | ||
123 | - opacketcapturer | 142 | - opacketcapturer |
124 | - opacket | 143 | - opacket |
125 | - oethernetpacket | 144 | - oethernetpacket |
126 | - owavelanpacket | 145 | - owavelanpacket |
127 | - ollcpacket | 146 | - ollcpacket |
128 | - oippacket | 147 | - oippacket |
129 | - oudppacket | 148 | - oudppacket |
130 | - otcppacket | 149 | - otcppacket |
131 | 150 | ||
132 | <libmail stuff> | 151 | <libmail stuff> |
133 | <libbend stuff> | 152 | <libbend stuff> |
134 | <libftp stuff> | 153 | <libftp stuff> |
135 | 154 | ||
136 | 1.6 Contents of libopiemm [ opiemm ] | 155 | 1.6 Contents of libopiemm [ opiemm ] |
137 | -------------------------------------------------------- | 156 | -------------------------------------------------------- |
138 | 157 | ||
139 | - osoundsystem | 158 | - osoundsystem |
140 | - oaudiointerface | 159 | - oaudiointerface |
141 | - osoundserver | 160 | - osoundserver |
142 | 161 | ||
143 | -------------------------------------------------------- | 162 | -------------------------------------------------------- |
144 | 2.0 Feature Description | 163 | 2.0 Feature Description |
145 | -------------------------------------------------------- | 164 | -------------------------------------------------------- |
146 | 165 | ||
147 | 2.1 libopiecore | 166 | 2.1 libopiecore |
148 | 167 | ||
149 | ... | 168 | ... |
150 | 169 | ||
151 | 2.2 libopieui | 170 | 2.2 libopieui |
152 | 171 | ||
153 | ... | 172 | ... |
154 | 173 | ||
155 | 2.3 libopiepim | 174 | 2.3 libopiepim |
156 | 175 | ||
157 | ... | 176 | ... |
158 | 177 | ||
159 | 2.4 libopiedb | 178 | 2.4 libopiedb |
160 | 179 | ||
161 | ... | 180 | ... |
162 | 181 | ||
163 | 2.5 libopienet | 182 | 2.5 libopienet |
164 | 183 | ||
165 | ... | 184 | ... |
166 | 185 | ||
167 | 2.6 libopiemm | 186 | 2.6 libopiemm |
168 | 187 | ||
169 | ... | 188 | ... |
diff --git a/libopie2/libopie2.pro b/libopie2/libopie2.pro index 0bd1d06..e734654 100644 --- a/libopie2/libopie2.pro +++ b/libopie2/libopie2.pro | |||
@@ -1,4 +1,11 @@ | |||
1 | TEMPLATE = subdirs | 1 | TEMPLATE = subdirs |
2 | unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm examples | 2 | unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm examples |
3 | 3 | ||
4 | include ( $(OPIEDIR)/include.pro ) | 4 | !contains( platform, x11 ) { |
5 | message( Configuring libopie2 for build on Opie ) | ||
6 | include ( $(OPIEDIR)/include.pro ) | ||
7 | } | ||
8 | |||
9 | contains( platform, x11 ) { | ||
10 | message( Configuring libopie2 for build on Qt/X11 ) | ||
11 | } | ||
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index 06d8ba2..84cab48 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -1,125 +1,137 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
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 | #include <opie2/oapplication.h> | 31 | #include <opie2/oapplication.h> |
32 | #include <opie2/oconfig.h> | 32 | #include <opie2/oconfig.h> |
33 | #include <opie2/odebug.h> | ||
33 | 34 | ||
34 | #include <signal.h> | 35 | #include <signal.h> |
35 | #include <stdio.h> | 36 | #include <stdio.h> |
36 | 37 | ||
37 | OApplication* OApplication::_instance = 0; | 38 | OApplication* OApplication::_instance = 0; |
38 | 39 | ||
39 | /**************************************************************************************************/ | 40 | /**************************************************************************************************/ |
40 | /* OApplicationPrivate | 41 | /* OApplicationPrivate |
41 | /**************************************************************************************************/ | 42 | /**************************************************************************************************/ |
42 | 43 | ||
43 | class OApplicationPrivate | 44 | class OApplicationPrivate |
44 | { | 45 | { |
45 | public: | 46 | public: |
46 | OApplicationPrivate() {}; | 47 | OApplicationPrivate() {}; |
47 | ~OApplicationPrivate() {}; | 48 | ~OApplicationPrivate() {}; |
48 | }; | 49 | }; |
49 | 50 | ||
50 | /**************************************************************************************************/ | 51 | /**************************************************************************************************/ |
51 | /* OApplication | 52 | /* OApplication |
52 | /**************************************************************************************************/ | 53 | /**************************************************************************************************/ |
53 | 54 | ||
54 | 55 | ||
55 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) | 56 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) |
57 | #ifdef QWS | ||
56 | :QPEApplication( argc, argv ), | 58 | :QPEApplication( argc, argv ), |
59 | #else | ||
60 | :QApplication( argc, argv ), | ||
61 | #endif | ||
57 | _appname( rAppName ), | 62 | _appname( rAppName ), |
58 | _config( 0 ) | 63 | _config( 0 ) |
59 | { | 64 | { |
60 | init(); | 65 | init(); |
61 | } | 66 | } |
62 | 67 | ||
63 | 68 | ||
64 | OApplication::~OApplication() | 69 | OApplication::~OApplication() |
65 | { | 70 | { |
66 | delete d; | 71 | delete d; |
67 | if ( _config ) | 72 | if ( _config ) |
68 | delete _config; | 73 | delete _config; |
69 | OApplication::_instance = 0; | 74 | OApplication::_instance = 0; |
70 | // after deconstruction of the one-and-only application object, | 75 | // after deconstruction of the one-and-only application object, |
71 | // the construction of another object is allowed | 76 | // the construction of another object is allowed |
72 | } | 77 | } |
73 | 78 | ||
74 | 79 | ||
75 | OConfig* OApplication::config() | 80 | OConfig* OApplication::config() |
76 | { | 81 | { |
77 | if ( !_config ) | 82 | if ( !_config ) |
78 | { | 83 | { |
79 | _config = new OConfig( _appname ); | 84 | _config = new OConfig( _appname ); |
80 | } | 85 | } |
81 | return _config; | 86 | return _config; |
82 | } | 87 | } |
83 | 88 | ||
84 | 89 | ||
85 | void OApplication::init() | 90 | void OApplication::init() |
86 | { | 91 | { |
87 | d = new OApplicationPrivate(); | 92 | d = new OApplicationPrivate(); |
88 | if ( !OApplication::_instance ) | 93 | if ( !OApplication::_instance ) |
89 | { | 94 | { |
90 | OApplication::_instance = this; | 95 | OApplication::_instance = this; |
91 | 96 | ||
92 | /* register SIGSEGV handler to give programs an option | 97 | /* register SIGSEGV handler to give programs an option |
93 | * to exit gracefully, e.g. save or close devices or files. | 98 | * to exit gracefully, e.g. save or close devices or files. |
94 | struct sigaction sa; | 99 | struct sigaction sa; |
95 | sa.sa_handler = ( void (*)(int) ) &segv_handler; | 100 | sa.sa_handler = ( void (*)(int) ) &segv_handler; |
96 | sa.sa_flags = SA_SIGINFO | SA_RESTART; | 101 | sa.sa_flags = SA_SIGINFO | SA_RESTART; |
97 | sigemptyset(&sa.sa_mask); | 102 | sigemptyset(&sa.sa_mask); |
98 | sigaction(SIGSEGV, &sa, NULL); | 103 | sigaction(SIGSEGV, &sa, NULL); |
99 | */ | 104 | */ |
100 | } | 105 | } |
101 | else | 106 | else |
102 | { | 107 | { |
103 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); | 108 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); |
104 | } | 109 | } |
105 | } | 110 | } |
106 | 111 | ||
107 | 112 | ||
108 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) | 113 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) |
109 | { | 114 | { |
115 | #ifdef QWS | ||
110 | QPEApplication::showMainWidget( widget, nomax ); | 116 | QPEApplication::showMainWidget( widget, nomax ); |
117 | #else | ||
118 | // tille: I am quit sure if this is the right way to do.. | ||
119 | odDebug(nomax,7) << "ignoring nomax"; | ||
120 | setMainWidget( widget ); | ||
121 | widget->show(); | ||
122 | #endif | ||
111 | widget->setCaption( _appname ); | 123 | widget->setCaption( _appname ); |
112 | } | 124 | } |
113 | 125 | ||
114 | 126 | ||
115 | void OApplication::setTitle( const QString& title ) const | 127 | void OApplication::setTitle( const QString& title ) const |
116 | { | 128 | { |
117 | if ( mainWidget() ) | 129 | if ( mainWidget() ) |
118 | { | 130 | { |
119 | if ( !title.isNull() ) | 131 | if ( !title.isNull() ) |
120 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | 132 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); |
121 | else | 133 | else |
122 | mainWidget()->setCaption( _appname ); | 134 | mainWidget()->setCaption( _appname ); |
123 | } | 135 | } |
124 | } | 136 | } |
125 | 137 | ||
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 6bc2b1c..3043910 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -1,102 +1,110 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
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 | #ifndef OAPPLICATION_H | 31 | #ifndef OAPPLICATION_H |
32 | #define OAPPLICATION_H | 32 | #define OAPPLICATION_H |
33 | 33 | ||
34 | #define oApp OApplication::oApplication() | 34 | #define oApp OApplication::oApplication() |
35 | 35 | ||
36 | #ifdef QWS | ||
36 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
38 | #else | ||
39 | #include <qapplication.h> | ||
40 | #endif | ||
37 | 41 | ||
38 | class OApplicationPrivate; | 42 | class OApplicationPrivate; |
39 | class OConfig; | 43 | class OConfig; |
40 | 44 | ||
41 | class OApplication: public QPEApplication | 45 | #ifdef QWS |
46 | class OApplication : public QPEApplication | ||
47 | #else | ||
48 | class OApplication : public QApplication | ||
49 | #endif | ||
42 | { | 50 | { |
43 | Q_OBJECT | 51 | Q_OBJECT |
44 | 52 | ||
45 | public: | 53 | public: |
46 | /** | 54 | /** |
47 | * Constructor. Parses command-line arguments and sets the window caption. | 55 | * Constructor. Parses command-line arguments and sets the window caption. |
48 | * | 56 | * |
49 | * @param rAppName application name. Will be used for finding the | 57 | * @param rAppName application name. Will be used for finding the |
50 | * associated message, icon and configuration files | 58 | * associated message, icon and configuration files |
51 | * | 59 | * |
52 | */ | 60 | */ |
53 | OApplication( int& argc, char** argv, const QCString& rAppName ); | 61 | OApplication( int& argc, char** argv, const QCString& rAppName ); |
54 | /** | 62 | /** |
55 | * Destructor. Destroys the application object and its children. | 63 | * Destructor. Destroys the application object and its children. |
56 | */ | 64 | */ |
57 | virtual ~OApplication(); | 65 | virtual ~OApplication(); |
58 | /** | 66 | /** |
59 | * @returns the process-wide application object | 67 | * @returns the process-wide application object |
60 | * | 68 | * |
61 | * This is similar to the global @ref QApplication pointer qApp. It | 69 | * This is similar to the global @ref QApplication pointer qApp. It |
62 | * allows access to the single global OApplication object, since | 70 | * allows access to the single global OApplication object, since |
63 | * more than one cannot be created in the same application. It | 71 | * more than one cannot be created in the same application. It |
64 | * saves you the trouble of having to pass the pointer explicitly | 72 | * saves you the trouble of having to pass the pointer explicitly |
65 | * to every function that may require it. | 73 | * to every function that may require it. |
66 | */ | 74 | */ |
67 | static OApplication* oApplication() { return _instance; }; | 75 | static OApplication* oApplication() { return _instance; }; |
68 | /** | 76 | /** |
69 | * Returns the application name as given during creation. | 77 | * Returns the application name as given during creation. |
70 | * | 78 | * |
71 | * @returns a reference to the application name | 79 | * @returns a reference to the application name |
72 | */ | 80 | */ |
73 | const QCString& appName() const { return _appname; }; | 81 | const QCString& appName() const { return _appname; }; |
74 | /** | 82 | /** |
75 | * @returns the application session config object. | 83 | * @returns the application session config object. |
76 | * | 84 | * |
77 | * @see OConfig | 85 | * @see OConfig |
78 | */ | 86 | */ |
79 | OConfig* config(); | 87 | OConfig* config(); |
80 | /** | 88 | /** |
81 | * Shows the main @a widget and sets the name of the application as window caption. | 89 | * Shows the main @a widget and sets the name of the application as window caption. |
82 | */ | 90 | */ |
83 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); | 91 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); |
84 | /** | 92 | /** |
85 | * Set the application title. The application title will be concatenated | 93 | * Set the application title. The application title will be concatenated |
86 | * to the application name given in the constructor. | 94 | * to the application name given in the constructor. |
87 | * | 95 | * |
88 | * @param title the title. If not given, resets caption to appname | 96 | * @param title the title. If not given, resets caption to appname |
89 | */ | 97 | */ |
90 | virtual void setTitle( const QString& title = QString::null ) const; | 98 | virtual void setTitle( const QString& title = QString::null ) const; |
91 | 99 | ||
92 | protected: | 100 | protected: |
93 | void init(); | 101 | void init(); |
94 | 102 | ||
95 | private: | 103 | private: |
96 | const QCString _appname; | 104 | const QCString _appname; |
97 | static OApplication* _instance; | 105 | static OApplication* _instance; |
98 | OConfig* _config; | 106 | OConfig* _config; |
99 | OApplicationPrivate* d; | 107 | OApplicationPrivate* d; |
100 | }; | 108 | }; |
101 | 109 | ||
102 | #endif // OAPPLICATION_H | 110 | #endif // OAPPLICATION_H |
diff --git a/libopie2/opiecore/opiecore.pro b/libopie2/opiecore/opiecore.pro index ed7d6d7..c8a291a 100644 --- a/libopie2/opiecore/opiecore.pro +++ b/libopie2/opiecore/opiecore.pro | |||
@@ -1,31 +1,38 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = oapplication.h \ | 4 | HEADERS = oapplication.h \ |
5 | oconfig.h \ | 5 | oconfig.h \ |
6 | ocompletionbase.h \ | 6 | ocompletionbase.h \ |
7 | ocompletion.h \ | 7 | ocompletion.h \ |
8 | odebug.h \ | 8 | odebug.h \ |
9 | oglobal.h \ | 9 | oglobal.h \ |
10 | oglobalsettings.h \ | 10 | oglobalsettings.h \ |
11 | osortablevaluelist.h | 11 | osortablevaluelist.h |
12 | 12 | ||
13 | SOURCES = oapplication.cpp \ | 13 | SOURCES = oapplication.cpp \ |
14 | oconfig.cpp \ | 14 | oconfig.cpp \ |
15 | ocompletionbase.cpp \ | 15 | ocompletionbase.cpp \ |
16 | ocompletion.cpp \ | 16 | ocompletion.cpp \ |
17 | odebug.cpp \ | 17 | odebug.cpp \ |
18 | oglobal.cpp \ | 18 | oglobal.cpp \ |
19 | oglobalsettings.cpp | 19 | oglobalsettings.cpp |
20 | 20 | ||
21 | INTERFACES = | 21 | INTERFACES = |
22 | TARGET = opiecore2 | 22 | TARGET = opiecore2 |
23 | VERSION = 1.8.1 | 23 | VERSION = 1.8.1 |
24 | INCLUDEPATH += $(OPIEDIR)/include | 24 | INCLUDEPATH += $(OPIEDIR)/include |
25 | DEPENDPATH += $(OPIEDIR)/include | 25 | DEPENDPATH += $(OPIEDIR)/include |
26 | LIBS = -lqpe | ||
27 | MOC_DIR = moc | 26 | MOC_DIR = moc |
28 | OBJECTS_DIR = obj | 27 | OBJECTS_DIR = obj |
29 | 28 | ||
30 | include ( $(OPIEDIR)/include.pro ) | 29 | |
30 | !contains( platform, x11 ) { | ||
31 | LIBS = -lqpe | ||
32 | include ( $(OPIEDIR)/include.pro ) | ||
33 | } | ||
34 | |||
35 | contains( platform, x11 ) { | ||
36 | LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
37 | } | ||
31 | 38 | ||
diff --git a/libopie2/opiedb/opiedb.pro b/libopie2/opiedb/opiedb.pro index 401646a..3612f0e 100644 --- a/libopie2/opiedb/opiedb.pro +++ b/libopie2/opiedb/opiedb.pro | |||
@@ -1,32 +1,38 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = osqlbackend.h \ | 4 | HEADERS = osqlbackend.h \ |
5 | osqldriver.h \ | 5 | osqldriver.h \ |
6 | osqlerror.h \ | 6 | osqlerror.h \ |
7 | osqlmanager.h \ | 7 | osqlmanager.h \ |
8 | osqlquery.h \ | 8 | osqlquery.h \ |
9 | osqlresult.h \ | 9 | osqlresult.h \ |
10 | osqltable.h \ | 10 | osqltable.h \ |
11 | osqlbackendmanager.h \ | 11 | osqlbackendmanager.h \ |
12 | osqlitedriver.h | 12 | osqlitedriver.h |
13 | SOURCES = osqlbackend.cpp \ | 13 | SOURCES = osqlbackend.cpp \ |
14 | osqldriver.cpp \ | 14 | osqldriver.cpp \ |
15 | osqlerror.cpp \ | 15 | osqlerror.cpp \ |
16 | osqlmanager.cpp \ | 16 | osqlmanager.cpp \ |
17 | osqlquery.cpp \ | 17 | osqlquery.cpp \ |
18 | osqlresult.cpp \ | 18 | osqlresult.cpp \ |
19 | osqltable.cpp \ | 19 | osqltable.cpp \ |
20 | osqlbackendmanager.cpp \ | 20 | osqlbackendmanager.cpp \ |
21 | osqlitedriver.cpp | 21 | osqlitedriver.cpp |
22 | INTERFACES = | 22 | INTERFACES = |
23 | TARGET = opiedb2 | 23 | TARGET = opiedb2 |
24 | VERSION = 1.8.1 | 24 | VERSION = 1.8.1 |
25 | INCLUDEPATH += $(OPIEDIR)/include | 25 | INCLUDEPATH += $(OPIEDIR)/include |
26 | DEPENDPATH += $(OPIEDIR)/include | 26 | DEPENDPATH += $(OPIEDIR)/include |
27 | 27 | ||
28 | MOC_DIR = moc | 28 | MOC_DIR = moc |
29 | OBJECTS_DIR = obj | 29 | OBJECTS_DIR = obj |
30 | 30 | ||
31 | include ( $(OPIEDIR)/include.pro ) | 31 | !contains( platform, x11 ) { |
32 | include ( $(OPIEDIR)/include.pro ) | ||
33 | } | ||
34 | |||
35 | contains( platform, x11 ) { | ||
36 | LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
37 | } | ||
32 | 38 | ||
diff --git a/libopie2/opiedb/osqlmanager.h b/libopie2/opiedb/osqlmanager.h index b3d8d69..5323b14 100644 --- a/libopie2/opiedb/osqlmanager.h +++ b/libopie2/opiedb/osqlmanager.h | |||
@@ -1,62 +1,64 @@ | |||
1 | 1 | ||
2 | #ifndef OSQL_MANAGER_H | 2 | #ifndef OSQL_MANAGER_H |
3 | #define OSQL_MANAGER_H | 3 | #define OSQL_MANAGER_H |
4 | 4 | ||
5 | #include <qobject.h> | 5 | #include <qobject.h> |
6 | #include <qstringlist.h> | ||
6 | 7 | ||
7 | #include "osqlbackend.h" | 8 | #include "osqlbackend.h" |
8 | 9 | ||
10 | |||
9 | /** | 11 | /** |
10 | * OSQLManager is responsible for loading | 12 | * OSQLManager is responsible for loading |
11 | * and unloading, querying different OSQL | 13 | * and unloading, querying different OSQL |
12 | * services | 14 | * services |
13 | * Load a OSQLDriver and delete it yourself | 15 | * Load a OSQLDriver and delete it yourself |
14 | * | 16 | * |
15 | */ | 17 | */ |
16 | class OSQLDriver; | 18 | class OSQLDriver; |
17 | class OSQLManager : public QObject { | 19 | class OSQLManager : public QObject { |
18 | Q_OBJECT | 20 | Q_OBJECT |
19 | public: | 21 | public: |
20 | /** | 22 | /** |
21 | * Empty c'tor | 23 | * Empty c'tor |
22 | */ | 24 | */ |
23 | OSQLManager(); | 25 | OSQLManager(); |
24 | 26 | ||
25 | /** | 27 | /** |
26 | * Query the Manager for different backends | 28 | * Query the Manager for different backends |
27 | */ | 29 | */ |
28 | OSQLBackEnd::ValueList queryBackEnd(); | 30 | OSQLBackEnd::ValueList queryBackEnd(); |
29 | 31 | ||
30 | /** | 32 | /** |
31 | * Load a backend with it's name from param name | 33 | * Load a backend with it's name from param name |
32 | */ | 34 | */ |
33 | OSQLDriver* load( const QString& name ); | 35 | OSQLDriver* load( const QString& name ); |
34 | 36 | ||
35 | /** | 37 | /** |
36 | * Load a OSQLDevice from const reference of OSQLBackEnd | 38 | * Load a OSQLDevice from const reference of OSQLBackEnd |
37 | */ | 39 | */ |
38 | OSQLDriver* load( const OSQLBackEnd& ); | 40 | OSQLDriver* load( const OSQLBackEnd& ); |
39 | 41 | ||
40 | /** | 42 | /** |
41 | * loads the Opie standard backend | 43 | * loads the Opie standard backend |
42 | */ | 44 | */ |
43 | OSQLDriver *standard(); | 45 | OSQLDriver *standard(); |
44 | 46 | ||
45 | /** | 47 | /** |
46 | * register path to the search path list | 48 | * register path to the search path list |
47 | * When querying for services we scan all the | 49 | * When querying for services we scan all the |
48 | * registered path for backends | 50 | * registered path for backends |
49 | */ | 51 | */ |
50 | void registerPath( const QString& path ); | 52 | void registerPath( const QString& path ); |
51 | 53 | ||
52 | /** | 54 | /** |
53 | * unregisterPath from the search path list | 55 | * unregisterPath from the search path list |
54 | */ | 56 | */ |
55 | bool unregisterPath( const QString& path ); | 57 | bool unregisterPath( const QString& path ); |
56 | private: | 58 | private: |
57 | OSQLBackEnd::ValueList builtIn()const; | 59 | OSQLBackEnd::ValueList builtIn()const; |
58 | OSQLBackEnd::ValueList m_list; | 60 | OSQLBackEnd::ValueList m_list; |
59 | QStringList m_path; | 61 | QStringList m_path; |
60 | }; | 62 | }; |
61 | 63 | ||
62 | #endif | 64 | #endif |
diff --git a/libopie2/opiemm/opiemm.pro b/libopie2/opiemm/opiemm.pro index 8e5eeb4..d3ce8f7 100644 --- a/libopie2/opiemm/opiemm.pro +++ b/libopie2/opiemm/opiemm.pro | |||
@@ -1,16 +1,22 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = osoundsystem.h | 4 | HEADERS = osoundsystem.h |
5 | SOURCES = osoundsystem.cpp | 5 | SOURCES = osoundsystem.cpp |
6 | INTERFACES = | 6 | INTERFACES = |
7 | TARGET = opiemm2 | 7 | TARGET = opiemm2 |
8 | VERSION = 1.8.1 | 8 | VERSION = 1.8.1 |
9 | INCLUDEPATH += $(OPIEDIR)/include | 9 | INCLUDEPATH += $(OPIEDIR)/include |
10 | DEPENDPATH += $(OPIEDIR)/include | 10 | DEPENDPATH += $(OPIEDIR)/include |
11 | LIBS += | 11 | LIBS += |
12 | MOC_DIR = moc | 12 | MOC_DIR = moc |
13 | OBJECTS_DIR = obj | 13 | OBJECTS_DIR = obj |
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | ||
16 | 15 | ||
16 | !contains( platform, x11 ) { | ||
17 | include ( $(OPIEDIR)/include.pro ) | ||
18 | } | ||
19 | |||
20 | contains( platform, x11 ) { | ||
21 | LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
22 | } | ||
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp index fd23bea..d857659 100644 --- a/libopie2/opiemm/osoundsystem.cpp +++ b/libopie2/opiemm/osoundsystem.cpp | |||
@@ -1,297 +1,298 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
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 | #include <opie2/osoundsystem.h> | 32 | #include <opie2/osoundsystem.h> |
33 | 33 | ||
34 | #include <errno.h> | 34 | #include <errno.h> |
35 | #include <fcntl.h> | 35 | #include <fcntl.h> |
36 | #include <string.h> | 36 | #include <string.h> |
37 | #include <sys/ioctl.h> | 37 | #include <sys/ioctl.h> |
38 | #include <sys/types.h> | 38 | #include <sys/types.h> |
39 | #include <sys/soundcard.h> | 39 | #include <sys/soundcard.h> |
40 | #include <sys/stat.h> | 40 | #include <sys/stat.h> |
41 | 41 | ||
42 | #include <qstringlist.h> | ||
42 | 43 | ||
43 | /*====================================================================================== | 44 | /*====================================================================================== |
44 | * OSoundSystem | 45 | * OSoundSystem |
45 | *======================================================================================*/ | 46 | *======================================================================================*/ |
46 | 47 | ||
47 | OSoundSystem* OSoundSystem::_instance = 0; | 48 | OSoundSystem* OSoundSystem::_instance = 0; |
48 | 49 | ||
49 | OSoundSystem::OSoundSystem() | 50 | OSoundSystem::OSoundSystem() |
50 | { | 51 | { |
51 | qDebug( "OSoundSystem::OSoundSystem()" ); | 52 | qDebug( "OSoundSystem::OSoundSystem()" ); |
52 | synchronize(); | 53 | synchronize(); |
53 | } | 54 | } |
54 | 55 | ||
55 | void OSoundSystem::synchronize() | 56 | void OSoundSystem::synchronize() |
56 | { | 57 | { |
57 | // gather available interfaces by inspecting /dev | 58 | // gather available interfaces by inspecting /dev |
58 | //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 |
59 | //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 |
60 | 61 | ||
61 | _interfaces.clear(); | 62 | _interfaces.clear(); |
62 | _interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) ); | 63 | _interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) ); |
63 | 64 | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | 67 | ||
67 | 68 | ||
68 | 69 | ||
69 | 70 | ||
70 | QString str; | 71 | QString str; |
71 | QFile f( "/dev/sound" ); | 72 | QFile f( "/dev/sound" ); |
72 | bool hasFile = f.open( IO_ReadOnly ); | 73 | bool hasFile = f.open( IO_ReadOnly ); |
73 | if ( !hasFile ) | 74 | if ( !hasFile ) |
74 | { | 75 | { |
75 | qDebug( "OSoundSystem: /dev/sound not existing. No sound devices available" ); | 76 | qDebug( "OSoundSystem: /dev/sound not existing. No sound devices available" ); |
76 | return; | 77 | return; |
77 | } | 78 | } |
78 | QTextStream s( &f ); | 79 | QTextStream s( &f ); |
79 | s.readLine(); | 80 | s.readLine(); |
80 | s.readLine(); | 81 | s.readLine(); |
81 | while ( !s.atEnd() ) | 82 | while ( !s.atEnd() ) |
82 | { | 83 | { |
83 | s >> str; | 84 | s >> str; |
84 | str.truncate( str.find( ':' ) ); | 85 | str.truncate( str.find( ':' ) ); |
85 | qDebug( "OSoundSystem: found interface '%s'", (const char*) str ); | 86 | qDebug( "OSoundSystem: found interface '%s'", (const char*) str ); |
86 | OAudioInterface* iface; | 87 | OAudioInterface* iface; |
87 | iface = new OAudioInterface( this, (const char*) str ); | 88 | iface = new OAudioInterface( this, (const char*) str ); |
88 | 89 | ||
89 | _interfaces.insert( str, iface ); | 90 | _interfaces.insert( str, iface ); |
90 | s.readLine(); | 91 | s.readLine(); |
91 | } | 92 | } |
92 | */ | 93 | */ |
93 | } | 94 | } |
94 | 95 | ||
95 | 96 | ||
96 | int OSoundSystem::count() const | 97 | int OSoundSystem::count() const |
97 | { | 98 | { |
98 | return _interfaces.count(); | 99 | return _interfaces.count(); |
99 | } | 100 | } |
100 | 101 | ||
101 | 102 | ||
102 | OSoundCard* OSoundSystem::card( const QString& iface ) const | 103 | OSoundCard* OSoundSystem::card( const QString& iface ) const |
103 | { | 104 | { |
104 | return _interfaces[iface]; | 105 | return _interfaces[iface]; |
105 | } | 106 | } |
106 | 107 | ||
107 | 108 | ||
108 | OSoundSystem* OSoundSystem::instance() | 109 | OSoundSystem* OSoundSystem::instance() |
109 | { | 110 | { |
110 | if ( !_instance ) _instance = new OSoundSystem(); | 111 | if ( !_instance ) _instance = new OSoundSystem(); |
111 | return _instance; | 112 | return _instance; |
112 | } | 113 | } |
113 | 114 | ||
114 | 115 | ||
115 | OSoundSystem::CardIterator OSoundSystem::iterator() const | 116 | OSoundSystem::CardIterator OSoundSystem::iterator() const |
116 | { | 117 | { |
117 | return OSoundSystem::CardIterator( _interfaces ); | 118 | return OSoundSystem::CardIterator( _interfaces ); |
118 | } | 119 | } |
119 | 120 | ||
120 | 121 | ||
121 | /*====================================================================================== | 122 | /*====================================================================================== |
122 | * OSoundCard | 123 | * OSoundCard |
123 | *======================================================================================*/ | 124 | *======================================================================================*/ |
124 | 125 | ||
125 | OSoundCard::OSoundCard( QObject* parent, const char* name ) | 126 | OSoundCard::OSoundCard( QObject* parent, const char* name ) |
126 | :QObject( parent, name ), _audio( 0 ), _mixer( 0 ) | 127 | :QObject( parent, name ), _audio( 0 ), _mixer( 0 ) |
127 | { | 128 | { |
128 | qDebug( "OSoundCard::OSoundCard()" ); | 129 | qDebug( "OSoundCard::OSoundCard()" ); |
129 | init(); | 130 | init(); |
130 | } | 131 | } |
131 | 132 | ||
132 | 133 | ||
133 | OSoundCard::~OSoundCard() | 134 | OSoundCard::~OSoundCard() |
134 | { | 135 | { |
135 | } | 136 | } |
136 | 137 | ||
137 | 138 | ||
138 | void OSoundCard::init() | 139 | void OSoundCard::init() |
139 | { | 140 | { |
140 | _audio = new OAudioInterface( this, "/dev/dsp" ); | 141 | _audio = new OAudioInterface( this, "/dev/dsp" ); |
141 | _mixer = new OMixerInterface( this, "/dev/mixer" ); | 142 | _mixer = new OMixerInterface( this, "/dev/mixer" ); |
142 | } | 143 | } |
143 | 144 | ||
144 | 145 | ||
145 | /*====================================================================================== | 146 | /*====================================================================================== |
146 | * OAudioInterface | 147 | * OAudioInterface |
147 | *======================================================================================*/ | 148 | *======================================================================================*/ |
148 | 149 | ||
149 | OAudioInterface::OAudioInterface( QObject* parent, const char* name ) | 150 | OAudioInterface::OAudioInterface( QObject* parent, const char* name ) |
150 | :QObject( parent, name ) | 151 | :QObject( parent, name ) |
151 | { | 152 | { |
152 | qDebug( "OAudioInterface::OAudioInterface()" ); | 153 | qDebug( "OAudioInterface::OAudioInterface()" ); |
153 | init(); | 154 | init(); |
154 | } | 155 | } |
155 | 156 | ||
156 | 157 | ||
157 | OAudioInterface::~OAudioInterface() | 158 | OAudioInterface::~OAudioInterface() |
158 | { | 159 | { |
159 | } | 160 | } |
160 | 161 | ||
161 | 162 | ||
162 | void OAudioInterface::init() | 163 | void OAudioInterface::init() |
163 | { | 164 | { |
164 | 165 | ||
165 | 166 | ||
166 | } | 167 | } |
167 | 168 | ||
168 | 169 | ||
169 | /*====================================================================================== | 170 | /*====================================================================================== |
170 | * OMixerInterface | 171 | * OMixerInterface |
171 | *======================================================================================*/ | 172 | *======================================================================================*/ |
172 | 173 | ||
173 | OMixerInterface::OMixerInterface( QObject* parent, const char* name ) | 174 | OMixerInterface::OMixerInterface( QObject* parent, const char* name ) |
174 | :QObject( parent, name ) | 175 | :QObject( parent, name ) |
175 | { | 176 | { |
176 | qDebug( "OMixerInterface::OMixerInterface()" ); | 177 | qDebug( "OMixerInterface::OMixerInterface()" ); |
177 | init(); | 178 | init(); |
178 | } | 179 | } |
179 | 180 | ||
180 | 181 | ||
181 | OMixerInterface::~OMixerInterface() | 182 | OMixerInterface::~OMixerInterface() |
182 | { | 183 | { |
183 | } | 184 | } |
184 | 185 | ||
185 | 186 | ||
186 | void OMixerInterface::init() | 187 | void OMixerInterface::init() |
187 | { | 188 | { |
188 | // open the device | 189 | // open the device |
189 | _fd = ::open( name(), O_RDWR ); | 190 | _fd = ::open( name(), O_RDWR ); |
190 | if ( _fd == -1 ) | 191 | if ( _fd == -1 ) |
191 | { | 192 | { |
192 | qWarning( "can't open mixer." ); | 193 | qWarning( "can't open mixer." ); |
193 | return; | 194 | return; |
194 | } | 195 | } |
195 | 196 | ||
196 | // construct the device capabilities | 197 | // construct the device capabilities |
197 | int devmask = 0; | 198 | int devmask = 0; |
198 | if ( ioctl( _fd, SOUND_MIXER_READ_DEVMASK, &devmask ) != -1 ) | 199 | if ( ioctl( _fd, SOUND_MIXER_READ_DEVMASK, &devmask ) != -1 ) |
199 | { | 200 | { |
200 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "PlayVolume", SOUND_MIXER_VOLUME ); | 201 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "PlayVolume", SOUND_MIXER_VOLUME ); |
201 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "PlayBass", SOUND_MIXER_BASS ); | 202 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "PlayBass", SOUND_MIXER_BASS ); |
202 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "PlayTreble", SOUND_MIXER_TREBLE ); | 203 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "PlayTreble", SOUND_MIXER_TREBLE ); |
203 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "PlaySynth", SOUND_MIXER_SYNTH ); | 204 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "PlaySynth", SOUND_MIXER_SYNTH ); |
204 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "PlayPCM", SOUND_MIXER_PCM ); | 205 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "PlayPCM", SOUND_MIXER_PCM ); |
205 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "PlaySpeaker", SOUND_MIXER_SPEAKER ); | 206 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "PlaySpeaker", SOUND_MIXER_SPEAKER ); |
206 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "PlayLine", SOUND_MIXER_LINE ); | 207 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "PlayLine", SOUND_MIXER_LINE ); |
207 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "PlayMic", SOUND_MIXER_MIC ); | 208 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "PlayMic", SOUND_MIXER_MIC ); |
208 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "PlayCD", SOUND_MIXER_CD ); | 209 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "PlayCD", SOUND_MIXER_CD ); |
209 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "PlayInputMix", SOUND_MIXER_IMIX ); | 210 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "PlayInputMix", SOUND_MIXER_IMIX ); |
210 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "PlayAltPCM", SOUND_MIXER_ALTPCM ); | 211 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "PlayAltPCM", SOUND_MIXER_ALTPCM ); |
211 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "PlayRecord", SOUND_MIXER_RECLEV ); | 212 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "PlayRecord", SOUND_MIXER_RECLEV ); |
212 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "PlayInputGain", SOUND_MIXER_IGAIN ); | 213 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "PlayInputGain", SOUND_MIXER_IGAIN ); |
213 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "PlayOutputGain", SOUND_MIXER_OGAIN ); | 214 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "PlayOutputGain", SOUND_MIXER_OGAIN ); |
214 | //qDebug( "devmask available and constructed." ); | 215 | //qDebug( "devmask available and constructed." ); |
215 | } | 216 | } |
216 | 217 | ||
217 | devmask = 0; | 218 | devmask = 0; |
218 | if ( ioctl( _fd, SOUND_MIXER_READ_RECMASK, &devmask ) != -1 ) | 219 | if ( ioctl( _fd, SOUND_MIXER_READ_RECMASK, &devmask ) != -1 ) |
219 | { | 220 | { |
220 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "RecVolume", SOUND_MIXER_VOLUME ); | 221 | if ( devmask & ( 1 << SOUND_MIXER_VOLUME ) ) _channels.insert( "RecVolume", SOUND_MIXER_VOLUME ); |
221 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "RecBass", SOUND_MIXER_BASS ); | 222 | if ( devmask & ( 1 << SOUND_MIXER_BASS ) ) _channels.insert( "RecBass", SOUND_MIXER_BASS ); |
222 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "RecTreble", SOUND_MIXER_TREBLE ); | 223 | if ( devmask & ( 1 << SOUND_MIXER_TREBLE ) ) _channels.insert( "RecTreble", SOUND_MIXER_TREBLE ); |
223 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "RecSynth", SOUND_MIXER_SYNTH ); | 224 | if ( devmask & ( 1 << SOUND_MIXER_SYNTH ) ) _channels.insert( "RecSynth", SOUND_MIXER_SYNTH ); |
224 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "RecPCM", SOUND_MIXER_PCM ); | 225 | if ( devmask & ( 1 << SOUND_MIXER_PCM ) ) _channels.insert( "RecPCM", SOUND_MIXER_PCM ); |
225 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "RecSpeaker", SOUND_MIXER_SPEAKER ); | 226 | if ( devmask & ( 1 << SOUND_MIXER_SPEAKER ) ) _channels.insert( "RecSpeaker", SOUND_MIXER_SPEAKER ); |
226 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "RecLine", SOUND_MIXER_LINE ); | 227 | if ( devmask & ( 1 << SOUND_MIXER_LINE ) ) _channels.insert( "RecLine", SOUND_MIXER_LINE ); |
227 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "RecMic", SOUND_MIXER_MIC ); | 228 | if ( devmask & ( 1 << SOUND_MIXER_MIC ) ) _channels.insert( "RecMic", SOUND_MIXER_MIC ); |
228 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "RecCD", SOUND_MIXER_CD ); | 229 | if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "RecCD", SOUND_MIXER_CD ); |
229 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "RecInputMix", SOUND_MIXER_IMIX ); | 230 | if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "RecInputMix", SOUND_MIXER_IMIX ); |
230 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "RecAltPCM", SOUND_MIXER_ALTPCM ); | 231 | if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "RecAltPCM", SOUND_MIXER_ALTPCM ); |
231 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "RecRecord", SOUND_MIXER_RECLEV ); | 232 | if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "RecRecord", SOUND_MIXER_RECLEV ); |
232 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "RecInputGain", SOUND_MIXER_IGAIN ); | 233 | if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "RecInputGain", SOUND_MIXER_IGAIN ); |
233 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "RecOutputGain", SOUND_MIXER_OGAIN ); | 234 | if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "RecOutputGain", SOUND_MIXER_OGAIN ); |
234 | //qDebug( "recmask available and constructed." ); | 235 | //qDebug( "recmask available and constructed." ); |
235 | } | 236 | } |
236 | 237 | ||
237 | /* ChannelIterator it; | 238 | /* ChannelIterator it; |
238 | for ( it = _channels.begin(); it != _channels.end(); ++it ) | 239 | for ( it = _channels.begin(); it != _channels.end(); ++it ) |
239 | { | 240 | { |
240 | qDebug( "Channel %s available (bit %d)", (const char*) it.key(), it.data() ); | 241 | qDebug( "Channel %s available (bit %d)", (const char*) it.key(), it.data() ); |
241 | qDebug( " +--- Volume: %02d | %02d", volume( it.key() ) & 0xff, volume( it.key() ) >> 8 ); | 242 | qDebug( " +--- Volume: %02d | %02d", volume( it.key() ) & 0xff, volume( it.key() ) >> 8 ); |
242 | } | 243 | } |
243 | */ | 244 | */ |
244 | } | 245 | } |
245 | 246 | ||
246 | QStringList OMixerInterface::allChannels() const | 247 | QStringList OMixerInterface::allChannels() const |
247 | { | 248 | { |
248 | ChannelIterator it = _channels.begin(); | 249 | ChannelIterator it = _channels.begin(); |
249 | QStringList channels; | 250 | QStringList channels; |
250 | while ( it != _channels.end() ) | 251 | while ( it != _channels.end() ) |
251 | { | 252 | { |
252 | channels += it.key(); | 253 | channels += it.key(); |
253 | it++; | 254 | it++; |
254 | } | 255 | } |
255 | return channels; | 256 | return channels; |
256 | } | 257 | } |
257 | 258 | ||
258 | 259 | ||
259 | QStringList OMixerInterface::recChannels() const | 260 | QStringList OMixerInterface::recChannels() const |
260 | { | 261 | { |
261 | qWarning( "NYI" ); | 262 | qWarning( "NYI" ); |
262 | } | 263 | } |
263 | 264 | ||
264 | 265 | ||
265 | QStringList OMixerInterface::playChannels() const | 266 | QStringList OMixerInterface::playChannels() const |
266 | { | 267 | { |
267 | qWarning( "NYI" ); | 268 | qWarning( "NYI" ); |
268 | } | 269 | } |
269 | 270 | ||
270 | 271 | ||
271 | bool OMixerInterface::hasChannel( const QString& channel ) | 272 | bool OMixerInterface::hasChannel( const QString& channel ) |
272 | { | 273 | { |
273 | return _channels.contains( channel ); | 274 | return _channels.contains( channel ); |
274 | } | 275 | } |
275 | 276 | ||
276 | 277 | ||
277 | void OMixerInterface::setVolume( const QString& channel, int left, int right ) | 278 | void OMixerInterface::setVolume( const QString& channel, int left, int right ) |
278 | { | 279 | { |
279 | int volume = left; | 280 | int volume = left; |
280 | volume |= ( right == -1 ) ? left << 8 : right << 8; | 281 | volume |= ( right == -1 ) ? left << 8 : right << 8; |
281 | 282 | ||
282 | if ( _channels.contains( channel ) ) | 283 | if ( _channels.contains( channel ) ) |
283 | { | 284 | { |
284 | int result = ioctl( _fd, MIXER_WRITE( _channels[channel] ), &volume ); | 285 | int result = ioctl( _fd, MIXER_WRITE( _channels[channel] ), &volume ); |
285 | if ( result == -1 ) | 286 | if ( result == -1 ) |
286 | { | 287 | { |
287 | qWarning( "Can't set volume: %s", strerror( errno ) ); | 288 | qWarning( "Can't set volume: %s", strerror( errno ) ); |
288 | } | 289 | } |
289 | else | 290 | else |
290 | { | 291 | { |
291 | if ( result & 0xff != left ) | 292 | if ( result & 0xff != left ) |
292 | { | 293 | { |
293 | qWarning( "Device adjusted volume from %d to %d", left, result & 0xff ); | 294 | qWarning( "Device adjusted volume from %d to %d", left, result & 0xff ); |
294 | } | 295 | } |
295 | } | 296 | } |
296 | } | 297 | } |
297 | } | 298 | } |
diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro index 3f9166a..93389db 100644 --- a/libopie2/opienet/opienet.pro +++ b/libopie2/opienet/opienet.pro | |||
@@ -1,22 +1,28 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = omanufacturerdb.cpp \ | 4 | HEADERS = omanufacturerdb.cpp \ |
5 | onetutils.cpp \ | 5 | onetutils.cpp \ |
6 | onetwork.h \ | 6 | onetwork.h \ |
7 | opcap.h | 7 | opcap.h |
8 | SOURCES = omanufacturerdb.cpp \ | 8 | SOURCES = omanufacturerdb.cpp \ |
9 | onetutils.cpp \ | 9 | onetutils.cpp \ |
10 | onetwork.cpp \ | 10 | onetwork.cpp \ |
11 | opcap.cpp | 11 | opcap.cpp |
12 | INTERFACES = | 12 | INTERFACES = |
13 | TARGET = opienet2 | 13 | TARGET = opienet2 |
14 | VERSION = 1.8.1 | 14 | VERSION = 1.8.1 |
15 | INCLUDEPATH += $(OPIEDIR)/include | 15 | INCLUDEPATH += $(OPIEDIR)/include |
16 | DEPENDPATH += $(OPIEDIR)/include | 16 | DEPENDPATH += $(OPIEDIR)/include |
17 | LIBS += -lpcap | 17 | LIBS += -lpcap |
18 | MOC_DIR = moc | 18 | MOC_DIR = moc |
19 | OBJECTS_DIR = obj | 19 | OBJECTS_DIR = obj |
20 | 20 | ||
21 | include ( $(OPIEDIR)/include.pro ) | ||
22 | 21 | ||
22 | !contains( platform, x11 ) { | ||
23 | include ( $(OPIEDIR)/include.pro ) | ||
24 | } | ||
25 | |||
26 | contains( platform, x11 ) { | ||
27 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
28 | } | ||
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro index 7fc7bb7..cc6ee90 100644 --- a/libopie2/opiepim/opiepim.pro +++ b/libopie2/opiepim/opiepim.pro | |||
@@ -1,17 +1,24 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = | 4 | HEADERS = |
5 | 5 | ||
6 | SOURCES = | 6 | SOURCES = |
7 | INTERFACES = | 7 | INTERFACES = |
8 | TARGET = opiepim2 | 8 | TARGET = opiepim2 |
9 | VERSION = 1.8.1 | 9 | VERSION = 1.8.1 |
10 | INCLUDEPATH += $(OPIEDIR)/include | 10 | INCLUDEPATH += $(OPIEDIR)/include |
11 | DEPENDPATH += $(OPIEDIR)/include | 11 | DEPENDPATH += $(OPIEDIR)/include |
12 | 12 | ||
13 | MOC_DIR = moc | 13 | MOC_DIR = moc |
14 | OBJECTS_DIR = obj | 14 | OBJECTS_DIR = obj |
15 | 15 | ||
16 | include ( $(OPIEDIR)/include.pro ) | 16 | |
17 | !contains( platform, x11 ) { | ||
18 | include ( $(OPIEDIR)/include.pro ) | ||
19 | } | ||
20 | |||
21 | contains( platform, x11 ) { | ||
22 | LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
23 | } | ||
17 | 24 | ||
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index aa85955..1b6ecdf 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro | |||
@@ -1,48 +1,58 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = ocompletionbox.h \ | 4 | HEADERS = ocompletionbox.h \ |
5 | ocombobox.h \ | 5 | ocombobox.h \ |
6 | oeditlistbox.h \ | 6 | oeditlistbox.h \ |
7 | olineedit.h \ | 7 | olineedit.h \ |
8 | olistview.h \ | 8 | olistview.h \ |
9 | oimageeffect.h \ | 9 | oimageeffect.h \ |
10 | opixmapeffect.h \ | 10 | opixmapeffect.h \ |
11 | opopupmenu.h \ | 11 | opopupmenu.h \ |
12 | opixmapprovider.h \ | 12 | opixmapprovider.h \ |
13 | oselector.h \ | 13 | oselector.h \ |
14 | oversatileview.h \ | 14 | oversatileview.h \ |
15 | oversatileviewitem.h \ | 15 | oversatileviewitem.h \ |
16 | #ojanuswidget.h \ | 16 | #ojanuswidget.h \ |
17 | odialog.h \ | 17 | odialog.h \ |
18 | oseparator.h \ | 18 | oseparator.h |
19 | otaskbarapplet.h | 19 | # otaskbarapplet.h |
20 | 20 | ||
21 | SOURCES = ocompletionbox.cpp \ | 21 | SOURCES = ocompletionbox.cpp \ |
22 | ocombobox.cpp \ | 22 | ocombobox.cpp \ |
23 | oeditlistbox.cpp \ | 23 | oeditlistbox.cpp \ |
24 | olineedit.cpp \ | 24 | olineedit.cpp \ |
25 | olistview.cpp \ | 25 | olistview.cpp \ |
26 | oimageeffect.cpp \ | 26 | oimageeffect.cpp \ |
27 | opixmapeffect.cpp \ | 27 | opixmapeffect.cpp \ |
28 | opopupmenu.cpp \ | 28 | opopupmenu.cpp \ |
29 | opixmapprovider.cpp \ | 29 | opixmapprovider.cpp \ |
30 | oselector.cpp \ | 30 | oselector.cpp \ |
31 | oversatileview.cpp \ | 31 | oversatileview.cpp \ |
32 | oversatileviewitem.cpp \ | 32 | oversatileviewitem.cpp \ |
33 | #ojanuswidget.cpp \ | 33 | #ojanuswidget.cpp \ |
34 | odialog.cpp \ | 34 | odialog.cpp \ |
35 | oseparator.cpp \ | 35 | oseparator.cpp #\ |
36 | otaskbarapplet.cpp | 36 | # otaskbarapplet.cpp |
37 | 37 | ||
38 | INTERFACES = | 38 | INTERFACES = |
39 | TARGET = opieui2 | 39 | TARGET = opieui2 |
40 | VERSION = 1.8.1 | 40 | VERSION = 1.8.1 |
41 | INCLUDEPATH += $(OPIEDIR)/include | 41 | INCLUDEPATH += $(OPIEDIR)/include |
42 | DEPENDPATH += $(OPIEDIR)/include | 42 | DEPENDPATH += $(OPIEDIR)/include |
43 | LIBS += -lopiecore2 | 43 | LIBS += -lopiecore2 |
44 | MOC_DIR = moc | 44 | MOC_DIR = moc |
45 | OBJECTS_DIR = obj | 45 | OBJECTS_DIR = obj |
46 | 46 | ||
47 | include ( $(OPIEDIR)/include.pro ) | 47 | |
48 | !contains( platform, x11 ) { | ||
49 | include ( $(OPIEDIR)/include.pro ) | ||
50 | HEADERS += otaskbarapplet.h | ||
51 | SOURCES += otaskbarapplet.cpp | ||
52 | } | ||
53 | |||
54 | contains( platform, x11 ) { | ||
55 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
56 | message( Warning: NO otaskbarapplet ATM ) | ||
57 | } | ||
48 | 58 | ||
diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 1df8154..8af21dc 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h | |||
@@ -1,297 +1,297 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
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 | #ifndef OVERSATILEVIEW_H | 31 | #ifndef OVERSATILEVIEW_H |
32 | #define OVERSATILEVIEW_H | 32 | #define OVERSATILEVIEW_H |
33 | 33 | ||
34 | /* QT */ | 34 | /* QT */ |
35 | 35 | ||
36 | #include <qwidgetstack.h> | 36 | #include <qwidgetstack.h> |
37 | #include <qiconview.h> | 37 | #include <qiconview.h> |
38 | 38 | ||
39 | /* OPIE */ | 39 | /* OPIE */ |
40 | 40 | ||
41 | #include <qpe/qpeapplication.h> | 41 | #include <opie2/oapplication.h> |
42 | 42 | ||
43 | /* FORWARDS */ | 43 | /* FORWARDS */ |
44 | 44 | ||
45 | class QHeader; | 45 | class QHeader; |
46 | class QIconSet; | 46 | class QIconSet; |
47 | class QIconViewItem; | 47 | class QIconViewItem; |
48 | class OListView; | 48 | class OListView; |
49 | class QListViewItem; | 49 | class QListViewItem; |
50 | class QPopupMenu; | 50 | class QPopupMenu; |
51 | class QString; | 51 | class QString; |
52 | 52 | ||
53 | #ifndef QT_NO_DRAGANDDROP | 53 | #ifndef QT_NO_DRAGANDDROP |
54 | class QIconDragItem; | 54 | class QIconDragItem; |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | class OVersatileView : public QWidgetStack | 57 | class OVersatileView : public QWidgetStack |
58 | { | 58 | { |
59 | Q_OBJECT | 59 | Q_OBJECT |
60 | 60 | ||
61 | friend class OVersatileViewItem; | 61 | friend class OVersatileViewItem; |
62 | 62 | ||
63 | //==============================================================================================// | 63 | //==============================================================================================// |
64 | // OVersatileView High Level API | 64 | // OVersatileView High Level API |
65 | //==============================================================================================// | 65 | //==============================================================================================// |
66 | 66 | ||
67 | public: | 67 | public: |
68 | OVersatileView( QWidget* parent = 0, const char* name = 0, int mode = 0 ); | 68 | OVersatileView( QWidget* parent = 0, const char* name = 0, int mode = 0 ); |
69 | ~OVersatileView(); | 69 | ~OVersatileView(); |
70 | 70 | ||
71 | QPopupMenu* contextMenu() const; | 71 | QPopupMenu* contextMenu() const; |
72 | 72 | ||
73 | void setSynchronization( bool sync ); | 73 | void setSynchronization( bool sync ); |
74 | bool synchronization(); | 74 | bool synchronization(); |
75 | 75 | ||
76 | enum ViewMode { Tree = 0, Icons }; | 76 | enum ViewMode { Tree = 0, Icons }; |
77 | int viewMode(); | 77 | int viewMode(); |
78 | 78 | ||
79 | QIconView* iconView() const; | 79 | QIconView* iconView() const; |
80 | OListView* listView() const; | 80 | OListView* listView() const; |
81 | 81 | ||
82 | enum WarningPolicy { None = 0, Warn, WarnReturn }; | 82 | enum WarningPolicy { None = 0, Warn, WarnReturn }; |
83 | 83 | ||
84 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode | 84 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode |
85 | bool warningPolicy() const; | 85 | bool warningPolicy() const; |
86 | 86 | ||
87 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); | 87 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); |
88 | 88 | ||
89 | public slots: | 89 | public slots: |
90 | void setViewMode( int mode ); | 90 | void setViewMode( int mode ); |
91 | void setIconViewMode(); | 91 | void setIconViewMode(); |
92 | void setTreeViewMode(); | 92 | void setTreeViewMode(); |
93 | 93 | ||
94 | protected: | 94 | protected: |
95 | virtual bool isValidViewMode( int mode ) const; | 95 | virtual bool isValidViewMode( int mode ) const; |
96 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); | 96 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); |
97 | 97 | ||
98 | private: | 98 | private: |
99 | int _viewmode; | 99 | int _viewmode; |
100 | bool _synchronization; | 100 | bool _synchronization; |
101 | mutable int _warningpolicy; | 101 | mutable int _warningpolicy; |
102 | 102 | ||
103 | OListView* _listview; | 103 | OListView* _listview; |
104 | QIconView* _iconview; | 104 | QIconView* _iconview; |
105 | 105 | ||
106 | QPixmap _treeleaf; | 106 | QPixmap _treeleaf; |
107 | QPixmap _treeopened; | 107 | QPixmap _treeopened; |
108 | QPixmap _treeclosed; | 108 | QPixmap _treeclosed; |
109 | 109 | ||
110 | QPixmap _iconleaf; | 110 | QPixmap _iconleaf; |
111 | QPixmap _iconopened; | 111 | QPixmap _iconopened; |
112 | QPixmap _iconclosed; | 112 | QPixmap _iconclosed; |
113 | 113 | ||
114 | QPopupMenu* _contextmenu; | 114 | QPopupMenu* _contextmenu; |
115 | 115 | ||
116 | int _iconstyle; | 116 | int _iconstyle; |
117 | int _treestyle; | 117 | int _treestyle; |
118 | 118 | ||
119 | private slots: | 119 | private slots: |
120 | 120 | ||
121 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); | 121 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); |
122 | void contextMenuRequested( QIconViewItem*, const QPoint& ); | 122 | void contextMenuRequested( QIconViewItem*, const QPoint& ); |
123 | 123 | ||
124 | // type converting signal forwarders | 124 | // type converting signal forwarders |
125 | 125 | ||
126 | void selectionChanged( QListViewItem * ); | 126 | void selectionChanged( QListViewItem * ); |
127 | void currentChanged( QListViewItem * ); | 127 | void currentChanged( QListViewItem * ); |
128 | void clicked( QListViewItem * ); | 128 | void clicked( QListViewItem * ); |
129 | void pressed( QListViewItem * ); | 129 | void pressed( QListViewItem * ); |
130 | void doubleClicked( QListViewItem * ); | 130 | void doubleClicked( QListViewItem * ); |
131 | void returnPressed( QListViewItem * ); | 131 | void returnPressed( QListViewItem * ); |
132 | void onItem( QListViewItem * ); | 132 | void onItem( QListViewItem * ); |
133 | 133 | ||
134 | void selectionChanged( QIconViewItem * ); | 134 | void selectionChanged( QIconViewItem * ); |
135 | void currentChanged( QIconViewItem * ); | 135 | void currentChanged( QIconViewItem * ); |
136 | void clicked( QIconViewItem * ); | 136 | void clicked( QIconViewItem * ); |
137 | void pressed( QIconViewItem * ); | 137 | void pressed( QIconViewItem * ); |
138 | void doubleClicked( QIconViewItem * ); | 138 | void doubleClicked( QIconViewItem * ); |
139 | void returnPressed( QIconViewItem * ); | 139 | void returnPressed( QIconViewItem * ); |
140 | void onItem( QIconViewItem * ); | 140 | void onItem( QIconViewItem * ); |
141 | 141 | ||
142 | void expanded( QListViewItem * item ); // QListView | 142 | void expanded( QListViewItem * item ); // QListView |
143 | void collapsed( QListViewItem * item ); // QListView | 143 | void collapsed( QListViewItem * item ); // QListView |
144 | 144 | ||
145 | signals: | 145 | signals: |
146 | 146 | ||
147 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); | 147 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); |
148 | 148 | ||
149 | /*#ifndef QT_NO_DRAGANDDROP | 149 | /*#ifndef QT_NO_DRAGANDDROP |
150 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 150 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
151 | #endif | 151 | #endif |
152 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 152 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView |
153 | void itemRenamed( OVersatileViewItem *item ); // QIconView | 153 | void itemRenamed( OVersatileViewItem *item ); // QIconView |
154 | */ | 154 | */ |
155 | 155 | ||
156 | //==============================================================================================// | 156 | //==============================================================================================// |
157 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView | 157 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView |
158 | //==============================================================================================// | 158 | //==============================================================================================// |
159 | 159 | ||
160 | public: | 160 | public: |
161 | 161 | ||
162 | /* | 162 | /* |
163 | enum Arrangement { // QIconView | 163 | enum Arrangement { // QIconView |
164 | LeftToRight = 0, | 164 | LeftToRight = 0, |
165 | TopToBottom | 165 | TopToBottom |
166 | }; | 166 | }; |
167 | enum ResizeMode { // QIconView | 167 | enum ResizeMode { // QIconView |
168 | Fixed = 0, | 168 | Fixed = 0, |
169 | Adjust | 169 | Adjust |
170 | }; | 170 | }; |
171 | enum ItemTextPos { // QIconView | 171 | enum ItemTextPos { // QIconView |
172 | Bottom = 0, | 172 | Bottom = 0, |
173 | Right | 173 | Right |
174 | }; | 174 | }; |
175 | */ | 175 | */ |
176 | 176 | ||
177 | // | 177 | // |
178 | // only in QListView | 178 | // only in QListView |
179 | // | 179 | // |
180 | 180 | ||
181 | int treeStepSize() const; // QListView | 181 | int treeStepSize() const; // QListView |
182 | virtual void setTreeStepSize( int ); // QListView | 182 | virtual void setTreeStepSize( int ); // QListView |
183 | 183 | ||
184 | QHeader * header() const; // QListView | 184 | QHeader * header() const; // QListView |
185 | 185 | ||
186 | virtual int addColumn( const QString &label, int size = -1); // QListView | 186 | virtual int addColumn( const QString &label, int size = -1); // QListView |
187 | virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView | 187 | virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView |
188 | void removeColumn( int index ); // #### make virtual in next major release! // QListView | 188 | void removeColumn( int index ); // #### make virtual in next major release! // QListView |
189 | virtual void setColumnText( int column, const QString &label ); // QListView | 189 | virtual void setColumnText( int column, const QString &label ); // QListView |
190 | virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView | 190 | virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView |
191 | QString columnText( int column ) const; // QListView | 191 | QString columnText( int column ) const; // QListView |
192 | virtual void setColumnWidth( int column, int width ); // QListView | 192 | virtual void setColumnWidth( int column, int width ); // QListView |
193 | int columnWidth( int column ) const; // QListView | 193 | int columnWidth( int column ) const; // QListView |
194 | enum WidthMode { Manual, Maximum }; // QListView | 194 | enum WidthMode { Manual, Maximum }; // QListView |
195 | virtual void setColumnWidthMode( int column, WidthMode ); // QListView | 195 | virtual void setColumnWidthMode( int column, WidthMode ); // QListView |
196 | WidthMode columnWidthMode( int column ) const; // QListView | 196 | WidthMode columnWidthMode( int column ) const; // QListView |
197 | int columns() const; // QListView | 197 | int columns() const; // QListView |
198 | 198 | ||
199 | virtual void setColumnAlignment( int, int ); // QListView | 199 | virtual void setColumnAlignment( int, int ); // QListView |
200 | int columnAlignment( int ) const; // QListView | 200 | int columnAlignment( int ) const; // QListView |
201 | 201 | ||
202 | OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView | 202 | OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView |
203 | QRect itemRect( const OVersatileViewItem * ) const; // QListView | 203 | QRect itemRect( const OVersatileViewItem * ) const; // QListView |
204 | int itemPos( const OVersatileViewItem * ); // QListView | 204 | int itemPos( const OVersatileViewItem * ); // QListView |
205 | 205 | ||
206 | bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug* | 206 | bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug* |
207 | 207 | ||
208 | virtual void setMultiSelection( bool enable ); // QListView | 208 | virtual void setMultiSelection( bool enable ); // QListView |
209 | bool isMultiSelection() const; // QListView | 209 | bool isMultiSelection() const; // QListView |
210 | 210 | ||
211 | OVersatileViewItem * selectedItem() const; // QListView | 211 | OVersatileViewItem * selectedItem() const; // QListView |
212 | virtual void setOpen( OVersatileViewItem *, bool ); // QListView | 212 | virtual void setOpen( OVersatileViewItem *, bool ); // QListView |
213 | bool isOpen( const OVersatileViewItem * ) const; // QListView | 213 | bool isOpen( const OVersatileViewItem * ) const; // QListView |
214 | 214 | ||
215 | OVersatileViewItem * firstChild() const; // QListView | 215 | OVersatileViewItem * firstChild() const; // QListView |
216 | int childCount() const; // QListView | 216 | int childCount() const; // QListView |
217 | 217 | ||
218 | virtual void setAllColumnsShowFocus( bool ); // QListView | 218 | virtual void setAllColumnsShowFocus( bool ); // QListView |
219 | bool allColumnsShowFocus() const; // QListView | 219 | bool allColumnsShowFocus() const; // QListView |
220 | 220 | ||
221 | virtual void setItemMargin( int ); // QListView | 221 | virtual void setItemMargin( int ); // QListView |
222 | int itemMargin() const; // QListView | 222 | int itemMargin() const; // QListView |
223 | 223 | ||
224 | virtual void setRootIsDecorated( bool ); // QListView | 224 | virtual void setRootIsDecorated( bool ); // QListView |
225 | bool rootIsDecorated() const; // QListView | 225 | bool rootIsDecorated() const; // QListView |
226 | 226 | ||
227 | void setShowSortIndicator( bool show ); // QListView | 227 | void setShowSortIndicator( bool show ); // QListView |
228 | bool showSortIndicator() const; // QListView | 228 | bool showSortIndicator() const; // QListView |
229 | 229 | ||
230 | int index( const OVersatileViewItem *item ) const; // QIconView | 230 | int index( const OVersatileViewItem *item ) const; // QIconView |
231 | 231 | ||
232 | public slots: | 232 | public slots: |
233 | void triggerUpdate(); // QListView | 233 | void triggerUpdate(); // QListView |
234 | 234 | ||
235 | signals: | 235 | signals: |
236 | void expanded( OVersatileViewItem *item ); // QListView | 236 | void expanded( OVersatileViewItem *item ); // QListView |
237 | void collapsed( OVersatileViewItem *item ); // QListView | 237 | void collapsed( OVersatileViewItem *item ); // QListView |
238 | 238 | ||
239 | // | 239 | // |
240 | // only in QIconView | 240 | // only in QIconView |
241 | // | 241 | // |
242 | 242 | ||
243 | public: | 243 | public: |
244 | uint count() const; // QIconView | 244 | uint count() const; // QIconView |
245 | 245 | ||
246 | OVersatileViewItem *firstItem() const; // QIconView | 246 | OVersatileViewItem *firstItem() const; // QIconView |
247 | OVersatileViewItem *lastItem() const; // QIconView | 247 | OVersatileViewItem *lastItem() const; // QIconView |
248 | 248 | ||
249 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView | 249 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView |
250 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView | 250 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView |
251 | 251 | ||
252 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView | 252 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView |
253 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView | 253 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView |
254 | 254 | ||
255 | virtual void setGridX( int rx ); // QIconView | 255 | virtual void setGridX( int rx ); // QIconView |
256 | virtual void setGridY( int ry ); // QIconView | 256 | virtual void setGridY( int ry ); // QIconView |
257 | int gridX() const; // QIconView | 257 | int gridX() const; // QIconView |
258 | int gridY() const; // QIconView | 258 | int gridY() const; // QIconView |
259 | virtual void setSpacing( int sp ); // QIconView | 259 | virtual void setSpacing( int sp ); // QIconView |
260 | int spacing() const; // QIconView | 260 | int spacing() const; // QIconView |
261 | virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView | 261 | virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView |
262 | QIconView::ItemTextPos itemTextPos() const; // QIconView | 262 | QIconView::ItemTextPos itemTextPos() const; // QIconView |
263 | virtual void setItemTextBackground( const QBrush &b ); // QIconView | 263 | virtual void setItemTextBackground( const QBrush &b ); // QIconView |
264 | QBrush itemTextBackground() const; // QIconView | 264 | QBrush itemTextBackground() const; // QIconView |
265 | virtual void setArrangement( QIconView::Arrangement am ); // QIconView | 265 | virtual void setArrangement( QIconView::Arrangement am ); // QIconView |
266 | QIconView::Arrangement arrangement() const; // QIconView | 266 | QIconView::Arrangement arrangement() const; // QIconView |
267 | virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView | 267 | virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView |
268 | QIconView::ResizeMode resizeMode() const; // QIconView | 268 | QIconView::ResizeMode resizeMode() const; // QIconView |
269 | virtual void setMaxItemWidth( int w ); // QIconView | 269 | virtual void setMaxItemWidth( int w ); // QIconView |
270 | int maxItemWidth() const; // QIconView | 270 | int maxItemWidth() const; // QIconView |
271 | virtual void setMaxItemTextLength( int w ); // QIconView | 271 | virtual void setMaxItemTextLength( int w ); // QIconView |
272 | int maxItemTextLength() const; // QIconView | 272 | int maxItemTextLength() const; // QIconView |
273 | virtual void setAutoArrange( bool b ); // QIconView | 273 | virtual void setAutoArrange( bool b ); // QIconView |
274 | bool autoArrange() const; // QIconView | 274 | bool autoArrange() const; // QIconView |
275 | virtual void setShowToolTips( bool b ); // QIconView | 275 | virtual void setShowToolTips( bool b ); // QIconView |
276 | bool showToolTips() const; // QIconView | 276 | bool showToolTips() const; // QIconView |
277 | 277 | ||
278 | bool sorting() const; // QIconView | 278 | bool sorting() const; // QIconView |
279 | bool sortDirection() const; // QIconView | 279 | bool sortDirection() const; // QIconView |
280 | 280 | ||
281 | virtual void setItemsMovable( bool b ); // QIconView | 281 | virtual void setItemsMovable( bool b ); // QIconView |
282 | bool itemsMovable() const; // QIconView | 282 | bool itemsMovable() const; // QIconView |
283 | virtual void setWordWrapIconText( bool b ); // QIconView | 283 | virtual void setWordWrapIconText( bool b ); // QIconView |
284 | bool wordWrapIconText() const; // QIconView | 284 | bool wordWrapIconText() const; // QIconView |
285 | 285 | ||
286 | public slots: | 286 | public slots: |
287 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView | 287 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView |
288 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView | 288 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView |
289 | virtual void updateContents(); // QIconView | 289 | virtual void updateContents(); // QIconView |
290 | 290 | ||
291 | signals: | 291 | signals: |
292 | /*#ifndef QT_NO_DRAGANDDROP | 292 | /*#ifndef QT_NO_DRAGANDDROP |
293 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 293 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
294 | #endif | 294 | #endif |
295 | */ | 295 | */ |
296 | void moved(); // QIconView | 296 | void moved(); // QIconView |
297 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 297 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView |