summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ipaq.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index cc4b01a..8ecea1b 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -167,97 +167,97 @@ void iPAQ::init()
167 f. close(); 167 f. close();
168 } else { 168 } else {
169 f. setName ( "/etc/oz_version" ); 169 f. setName ( "/etc/oz_version" );
170 170
171 if ( f. open ( IO_ReadOnly )) { 171 if ( f. open ( IO_ReadOnly )) {
172 d->m_systemstr = "OpenEmbedded/iPaq"; 172 d->m_systemstr = "OpenEmbedded/iPaq";
173 d->m_system = System_Familiar; 173 d->m_system = System_Familiar;
174 174
175 QTextStream ts ( &f ); 175 QTextStream ts ( &f );
176 ts.setDevice ( &f ); 176 ts.setDevice ( &f );
177 d->m_sysverstr = ts. readLine(); 177 d->m_sysverstr = ts. readLine();
178 f. close(); 178 f. close();
179 } 179 }
180 } 180 }
181 181
182 m_leds [0] = m_leds [1] = Led_Off; 182 m_leds [0] = m_leds [1] = Led_Off;
183 183
184 m_power_timer = 0; 184 m_power_timer = 0;
185 185
186} 186}
187 187
188void iPAQ::initButtons() 188void iPAQ::initButtons()
189{ 189{
190 if ( d->m_buttons ) 190 if ( d->m_buttons )
191 return; 191 return;
192 192
193 if ( isQWS( ) ) 193 if ( isQWS( ) )
194 QWSServer::setKeyboardFilter ( this ); 194 QWSServer::setKeyboardFilter ( this );
195 195
196 d->m_buttons = new QValueList <ODeviceButton>; 196 d->m_buttons = new QValueList <ODeviceButton>;
197 197
198 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 198 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
199 i_button *ib = ipaq_buttons + i; 199 i_button *ib = ipaq_buttons + i;
200 ODeviceButton b; 200 ODeviceButton b;
201 201
202 if (( ib->model & d->m_model ) == d->m_model ) { 202 if (( ib->model & d->m_model ) == d->m_model ) {
203 b. setKeycode ( ib->code ); 203 b. setKeycode ( ib->code );
204 b. setUserText ( QObject::tr ( "Button", ib->utext )); 204 b. setUserText ( QObject::tr ( "Button", ib->utext ));
205 b. setPixmap ( Resource::loadPixmap ( ib->pix )); 205 b. setPixmap ( Resource::loadPixmap ( ib->pix ));
206 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 206 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
207 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 207 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
208 208
209 d->m_buttons->append ( b ); 209 d->m_buttons->append ( b );
210 } 210 }
211 } 211 }
212 reloadButtonMapping(); 212 reloadButtonMapping();
213 213
214 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 214 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
215 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 215 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
216} 216}
217 217
218QValueList <OLed> iPAQ::ledList() const 218QValueList <OLed> iPAQ::ledList() const
219{ 219{
220 QValueList <OLed> vl; 220 QValueList <OLed> vl;
221 vl << Led_Power; 221 vl << Led_Power;
222 222
223 if ( d->m_model == Model_iPAQ_H38xx ) 223 if ( d->m_model == Model_iPAQ_H38xx )
224 vl << Led_BlueTooth; 224 vl << Led_BlueTooth;
225 return vl; 225 return vl;
226} 226}
227 227
228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const 228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const
229{ 229{
230 QValueList <OLedState> vl; 230 QValueList <OLedState> vl;
231 231
232 if ( l == Led_Power ) 232 if ( l == Led_Power )
233 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; 233 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast;
234 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) 234 else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx )
235 vl << Led_Off; // << Led_On << ??? 235 vl << Led_Off; // << Led_On << ???
236 236
237 return vl; 237 return vl;
238} 238}
239 239
240OLedState iPAQ::ledState ( OLed l ) const 240OLedState iPAQ::ledState ( OLed l ) const
241{ 241{
242 switch ( l ) { 242 switch ( l ) {
243 case Led_Power: 243 case Led_Power:
244 return m_leds [0]; 244 return m_leds [0];
245 case Led_BlueTooth: 245 case Led_BlueTooth:
246 return m_leds [1]; 246 return m_leds [1];
247 default: 247 default:
248 return Led_Off; 248 return Led_Off;
249 } 249 }
250} 250}
251 251
252bool iPAQ::setLedState ( OLed l, OLedState st ) 252bool iPAQ::setLedState ( OLed l, OLedState st )
253{ 253{
254 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK ); 254 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK );
255 255
256 if ( l == Led_Power ) { 256 if ( l == Led_Power ) {
257 if ( fd >= 0 ) { 257 if ( fd >= 0 ) {
258 LED_IN leds; 258 LED_IN leds;
259 ::memset ( &leds, 0, sizeof( leds )); 259 ::memset ( &leds, 0, sizeof( leds ));
260 leds. TotalTime = 0; 260 leds. TotalTime = 0;
261 leds. OnTime = 0; 261 leds. OnTime = 0;
262 leds. OffTime = 1; 262 leds. OffTime = 1;
263 leds. OffOnBlink = 2; 263 leds. OffOnBlink = 2;