Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 791e409..21fed99 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -124,98 +124,97 @@ void iPAQ::init(const QString& model) | |||
124 | 124 | ||
125 | if ( d->m_modelstr == "H3100" ) | 125 | if ( d->m_modelstr == "H3100" ) |
126 | d->m_model = Model_iPAQ_H31xx; | 126 | d->m_model = Model_iPAQ_H31xx; |
127 | else if ( d->m_modelstr == "H3600" ) | 127 | else if ( d->m_modelstr == "H3600" ) |
128 | d->m_model = Model_iPAQ_H36xx; | 128 | d->m_model = Model_iPAQ_H36xx; |
129 | else if ( d->m_modelstr == "H3700" ) | 129 | else if ( d->m_modelstr == "H3700" ) |
130 | d->m_model = Model_iPAQ_H37xx; | 130 | d->m_model = Model_iPAQ_H37xx; |
131 | else if ( d->m_modelstr == "H3800" ) | 131 | else if ( d->m_modelstr == "H3800" ) |
132 | d->m_model = Model_iPAQ_H38xx; | 132 | d->m_model = Model_iPAQ_H38xx; |
133 | else if ( d->m_modelstr == "H3900" ) | 133 | else if ( d->m_modelstr == "H3900" ) |
134 | d->m_model = Model_iPAQ_H39xx; | 134 | d->m_model = Model_iPAQ_H39xx; |
135 | else if ( d->m_modelstr == "H5400" ) | 135 | else if ( d->m_modelstr == "H5400" ) |
136 | d->m_model = Model_iPAQ_H5xxx; | 136 | d->m_model = Model_iPAQ_H5xxx; |
137 | else if ( d->m_modelstr == "H2200" ) | 137 | else if ( d->m_modelstr == "H2200" ) |
138 | d->m_model = Model_iPAQ_H22xx; | 138 | d->m_model = Model_iPAQ_H22xx; |
139 | else | 139 | else |
140 | d->m_model = Model_Unknown; | 140 | d->m_model = Model_Unknown; |
141 | 141 | ||
142 | switch ( d->m_model ) { | 142 | switch ( d->m_model ) { |
143 | case Model_iPAQ_H31xx: | 143 | case Model_iPAQ_H31xx: |
144 | case Model_iPAQ_H38xx: | 144 | case Model_iPAQ_H38xx: |
145 | d->m_rotation = Rot90; | 145 | d->m_rotation = Rot90; |
146 | break; | 146 | break; |
147 | case Model_iPAQ_H5xxx: | 147 | case Model_iPAQ_H5xxx: |
148 | case Model_iPAQ_H22xx: | 148 | case Model_iPAQ_H22xx: |
149 | d->m_rotation = Rot0; | 149 | d->m_rotation = Rot0; |
150 | break; | 150 | break; |
151 | case Model_iPAQ_H36xx: | 151 | case Model_iPAQ_H36xx: |
152 | case Model_iPAQ_H37xx: | 152 | case Model_iPAQ_H37xx: |
153 | case Model_iPAQ_H39xx: | 153 | case Model_iPAQ_H39xx: |
154 | default: | 154 | default: |
155 | d->m_rotation = Rot270; | 155 | d->m_rotation = Rot270; |
156 | break; | 156 | break; |
157 | 157 | ||
158 | } | 158 | } |
159 | 159 | ||
160 | m_leds [0] = m_leds [1] = Led_Off; | 160 | m_leds [0] = m_leds [1] = Led_Off; |
161 | 161 | ||
162 | m_power_timer = 0; | 162 | m_power_timer = 0; |
163 | 163 | ||
164 | } | 164 | } |
165 | 165 | ||
166 | void iPAQ::initButtons() | 166 | void iPAQ::initButtons() |
167 | { | 167 | { |
168 | if ( d->m_buttons ) | 168 | if ( d->m_buttons ) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | if ( isQWS( ) ) { | 171 | if ( isQWS( ) ) { |
172 | Opie::Core::OKeyFilter::inst()->addPreHandler(this); | 172 | addPreHandler(this); |
173 | //QWSServer::setKeyboardFilter ( this ); | ||
174 | } | 173 | } |
175 | 174 | ||
176 | d->m_buttons = new QValueList <ODeviceButton>; | 175 | d->m_buttons = new QValueList <ODeviceButton>; |
177 | 176 | ||
178 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { | 177 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { |
179 | i_button *ib = ipaq_buttons + i; | 178 | i_button *ib = ipaq_buttons + i; |
180 | ODeviceButton b; | 179 | ODeviceButton b; |
181 | 180 | ||
182 | if (( ib->model & d->m_model ) == d->m_model ) { | 181 | if (( ib->model & d->m_model ) == d->m_model ) { |
183 | b. setKeycode ( ib->code ); | 182 | b. setKeycode ( ib->code ); |
184 | b. setUserText ( QObject::tr ( "Button", ib->utext )); | 183 | b. setUserText ( QObject::tr ( "Button", ib->utext )); |
185 | b. setPixmap ( Resource::loadPixmap ( ib->pix )); | 184 | b. setPixmap ( Resource::loadPixmap ( ib->pix )); |
186 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); | 185 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); |
187 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); | 186 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); |
188 | 187 | ||
189 | d->m_buttons->append ( b ); | 188 | d->m_buttons->append ( b ); |
190 | } | 189 | } |
191 | } | 190 | } |
192 | reloadButtonMapping(); | 191 | reloadButtonMapping(); |
193 | 192 | ||
194 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | 193 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); |
195 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); | 194 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); |
196 | } | 195 | } |
197 | 196 | ||
198 | QValueList <OLed> iPAQ::ledList() const | 197 | QValueList <OLed> iPAQ::ledList() const |
199 | { | 198 | { |
200 | QValueList <OLed> vl; | 199 | QValueList <OLed> vl; |
201 | vl << Led_Power; | 200 | vl << Led_Power; |
202 | 201 | ||
203 | if ( d->m_model == Model_iPAQ_H38xx ) | 202 | if ( d->m_model == Model_iPAQ_H38xx ) |
204 | vl << Led_BlueTooth; | 203 | vl << Led_BlueTooth; |
205 | return vl; | 204 | return vl; |
206 | } | 205 | } |
207 | 206 | ||
208 | QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const | 207 | QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const |
209 | { | 208 | { |
210 | QValueList <OLedState> vl; | 209 | QValueList <OLedState> vl; |
211 | 210 | ||
212 | if ( l == Led_Power ) | 211 | if ( l == Led_Power ) |
213 | vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; | 212 | vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; |
214 | else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) | 213 | else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) |
215 | vl << Led_Off; // << Led_On << ??? | 214 | vl << Led_Off; // << Led_On << ??? |
216 | 215 | ||
217 | return vl; | 216 | return vl; |
218 | } | 217 | } |
219 | 218 | ||
220 | OLedState iPAQ::ledState ( OLed l ) const | 219 | OLedState iPAQ::ledState ( OLed l ) const |
221 | { | 220 | { |