summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-19 18:06:17 (UTC)
committer kergoth <kergoth>2003-04-19 18:06:17 (UTC)
commiteb276a6663540849ef98819eeaa8f935a7e1b945 (patch) (side-by-side diff)
tree7464e0858a367034f976088021ccec5953a0eddc
parent89ced5d0c4f4ce89a11333d80aac2f8b81d97233 (diff)
downloadopie-eb276a6663540849ef98819eeaa8f935a7e1b945.zip
opie-eb276a6663540849ef98819eeaa8f935a7e1b945.tar.gz
opie-eb276a6663540849ef98819eeaa8f935a7e1b945.tar.bz2
Add note about c700 physical screen orientation handling.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 29c8ad2..713cc90 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1117,67 +1117,79 @@ void Zaurus::init ( )
d-> m_systemstr = "Zaurus";
d-> m_system = System_Zaurus;
}
f. setName ( "/proc/deviceinfo/product" );
if ( f. open ( IO_ReadOnly ) ) {
QTextStream ts ( &f );
QString model = ts. readLine ( );
f. close ( );
d-> m_modelstr = QString("Zaurus ") + model;
if ( model == "SL-5500" )
d-> m_model = Model_Zaurus_SL5500;
else if ( model == "SL-C700" )
d-> m_model = Model_Zaurus_SLC700;
else if ( model == "SL-A300" )
d-> m_model = Model_Zaurus_SLA300;
else if ( model == "SL-B600" || model == "SL-5600" )
d-> m_model = Model_Zaurus_SLB600;
else
d-> m_model = Model_Zaurus_SL5000;
}
else {
d-> m_model = Model_Zaurus_SL5000;
d-> m_modelstr = "Zaurus (model unknown)";
}
switch ( d-> m_model ) {
case Model_Zaurus_SLA300:
d-> m_rotation = Rot0;
break;
case Model_Zaurus_SLC700:
- /* note for C700, we must check the display rotation
- * sensor to set an appropriate value
- */
+ bool flipstate = false;
+ // Note: need to 1) set flipstate based on physical screen orientation
+ // and 2) check to see if the user overrode the rotation direction
+ // using appearance, and if so, remove that item from the Config to
+ // ensure the rotate applet flips us back to the previous state.
+ if ( flipstate ) {
+ // 480x640
+ d-> m_rotation = Rot0;
+ d-> m_direction = CW;
+ } else {
+ // 640x480
+ d-> m_rotation = Rot270;
+ d-> m_direction = CCW;
+ }
+ break;
case Model_Zaurus_SLB600:
case Model_Zaurus_SL5500:
case Model_Zaurus_SL5000:
default:
d-> m_rotation = Rot270;
break;
}
m_leds [0] = Led_Off;
}
void Zaurus::initButtons ( )
{
if ( d-> m_buttons )
return;
d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
d-> m_buttons = new QValueList <ODeviceButton>;
for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) {
z_button *zb = z_buttons + i;
ODeviceButton b;
b. setKeycode ( zb-> code );
b. setUserText ( QObject::tr ( "Button", zb-> utext ));
b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction ));
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction ));
d-> m_buttons-> append ( b );
}