summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp2
-rw-r--r--library/qpeapplication.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 78eb416..9e97c56 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -222,65 +222,65 @@ ODevice *ODevice::inst ( )
222 dev = new iPAQ ( ); 222 dev = new iPAQ ( );
223 else if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) 223 else if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
224 dev = new Zaurus ( ); 224 dev = new Zaurus ( );
225 else 225 else
226 dev = new ODevice ( ); 226 dev = new ODevice ( );
227 227
228 dev-> init ( ); 228 dev-> init ( );
229 } 229 }
230 return dev; 230 return dev;
231} 231}
232 232
233 233
234/************************************************** 234/**************************************************
235 * 235 *
236 * common 236 * common
237 * 237 *
238 **************************************************/ 238 **************************************************/
239 239
240 240
241ODevice::ODevice ( ) 241ODevice::ODevice ( )
242{ 242{
243 d = new ODeviceData; 243 d = new ODeviceData;
244 244
245 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; 245 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
246 246
247 d-> m_modelstr = "Unknown"; 247 d-> m_modelstr = "Unknown";
248 d-> m_model = Model_Unknown; 248 d-> m_model = Model_Unknown;
249 d-> m_vendorstr = "Unknown"; 249 d-> m_vendorstr = "Unknown";
250 d-> m_vendor = Vendor_Unknown; 250 d-> m_vendor = Vendor_Unknown;
251 d-> m_systemstr = "Unknown"; 251 d-> m_systemstr = "Unknown";
252 d-> m_system = System_Unknown; 252 d-> m_system = System_Unknown;
253 d-> m_sysverstr = "0.0"; 253 d-> m_sysverstr = "0.0";
254 d-> m_rotation = None; 254 d-> m_rotation = Rot0;
255 255
256 d-> m_holdtime = 1000; // 1000ms 256 d-> m_holdtime = 1000; // 1000ms
257 257
258 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 258 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
259 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 259 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & )));
260} 260}
261 261
262void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) 262void ODevice::systemMessage ( const QCString &msg, const QByteArray & )
263{ 263{
264 if ( msg == "deviceButtonMappingChanged()" ) { 264 if ( msg == "deviceButtonMappingChanged()" ) {
265 reloadButtonMapping ( ); 265 reloadButtonMapping ( );
266 } 266 }
267} 267}
268 268
269void ODevice::init ( ) 269void ODevice::init ( )
270{ 270{
271 // Simulation uses iPAQ 3660 device buttons 271 // Simulation uses iPAQ 3660 device buttons
272 272
273 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 273 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
274 i_button *ib = ipaq_buttons + i; 274 i_button *ib = ipaq_buttons + i;
275 ODeviceButton b; 275 ODeviceButton b;
276 276
277 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { 277 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) {
278 b. setKeycode ( ib-> code ); 278 b. setKeycode ( ib-> code );
279 b. setUserText ( qApp-> translate ( "Button", ib-> utext )); 279 b. setUserText ( qApp-> translate ( "Button", ib-> utext ));
280 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 280 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
281 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 281 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
282 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 282 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
283 283
284 d-> m_buttons. append ( b ); 284 d-> m_buttons. append ( b );
285 } 285 }
286 } 286 }
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 7505115..7f74510 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -128,61 +128,61 @@ private:
128 QCopChannel *pidChannel; 128 QCopChannel *pidChannel;
129#endif 129#endif
130 QPEApplicationData *d; 130 QPEApplicationData *d;
131 131
132 bool reserved_sh; 132 bool reserved_sh;
133 133
134 134
135 135
136}; 136};
137 137
138inline void QPEApplication::showDialog( QDialog* d, bool nomax ) 138inline void QPEApplication::showDialog( QDialog* d, bool nomax )
139{ 139{
140 QSize sh = d->sizeHint(); 140 QSize sh = d->sizeHint();
141 int w = QMAX(sh.width(),d->width()); 141 int w = QMAX(sh.width(),d->width());
142 int h = QMAX(sh.height(),d->height()); 142 int h = QMAX(sh.height(),d->height());
143 if ( !nomax 143 if ( !nomax
144 && ( w > qApp->desktop()->width()*3/4 144 && ( w > qApp->desktop()->width()*3/4
145 || h > qApp->desktop()->height()*3/4 ) ) 145 || h > qApp->desktop()->height()*3/4 ) )
146 { 146 {
147 d->showMaximized(); 147 d->showMaximized();
148 } else { 148 } else {
149 d->resize(w,h); 149 d->resize(w,h);
150 d->show(); 150 d->show();
151 } 151 }
152} 152}
153 153
154inline int QPEApplication::execDialog( QDialog* d, bool nomax ) 154inline int QPEApplication::execDialog( QDialog* d, bool nomax )
155{ 155{
156 showDialog(d,nomax); 156 showDialog(d,nomax);
157 return d->exec(); 157 return d->exec();
158} 158}
159 159
160enum Transformation { None, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ 160enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
161 161
162inline void QPEApplication::setCurrentRotation( int r ) 162inline void QPEApplication::setCurrentRotation( int r )
163{ 163{
164 Transformation e; 164 Transformation e;
165 165
166 switch (r) { 166 switch (r) {
167 case 0: 167 case 0:
168 e = None; 168 e = Rot0;
169 break; 169 break;
170 case 90: 170 case 90:
171 e = Rot90; 171 e = Rot90;
172 break; 172 break;
173 case 180: 173 case 180:
174 e = Rot180; 174 e = Rot180;
175 break; 175 break;
176 case 270: 176 case 270:
177 e = Rot270; 177 e = Rot270;
178 break; 178 break;
179 default: 179 default:
180 return; 180 return;
181 } 181 }
182 182
183 qDebug("calling qApp->desktop()->qwsDisplay()->setTransformation( %d )\n", e); 183 qDebug("calling qApp->desktop()->qwsDisplay()->setTransformation( %d )\n", e);
184 qApp->desktop()->qwsDisplay()->setTransformation( e ); 184 qApp->desktop()->qwsDisplay()->setTransformation( e );
185} 185}
186 186
187 187
188#endif 188#endif