summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
authorkergoth <kergoth>2003-01-26 01:01:32 (UTC)
committer kergoth <kergoth>2003-01-26 01:01:32 (UTC)
commit7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b (patch) (unidiff)
tree29ab0dfa5c6d35621857af78a6fa3eaae517be33 /libopie/odevice.cpp
parent7d07568352e368fe473e4c1c5493df2ebb0090d2 (diff)
downloadopie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.zip
opie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.tar.gz
opie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.tar.bz2
1) Add Sharp Zaurus A300/B600|5600/C700 models, will add the model specific bits
later. 2) Add rotation data and method, to set a default rotation based on model .. so we can ditch the use of the startup script to set that.
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp55
1 files changed, 47 insertions, 8 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index d39d72f..78eb416 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -67,2 +67,4 @@ public:
67 QString m_sysverstr; 67 QString m_sysverstr;
68
69 Transformation m_rotation;
68 70
@@ -251,2 +253,3 @@ ODevice::ODevice ( )
251 d-> m_sysverstr = "0.0"; 253 d-> m_sysverstr = "0.0";
254 d-> m_rotation = None;
252 255
@@ -402,2 +405,7 @@ QString ODevice::systemVersionString ( ) const
402 405
406Transformation ODevice::rotation ( ) const
407{
408 return d-> m_rotation;
409}
410
403void ODevice::alarmSound ( ) 411void ODevice::alarmSound ( )
@@ -589,2 +597,15 @@ void iPAQ::init ( )
589 597
598 switch ( d-> m_model ) {
599 case Model_iPAQ_H31xx:
600 case Model_iPAQ_H38xx:
601 d-> m_rotation = Rot90;
602 break;
603 case Model_iPAQ_H36xx:
604 case Model_iPAQ_H37xx:
605 case Model_iPAQ_H39xx:
606 default:
607 d-> m_rotation = Rot270;
608 break;
609 }
610
590 f. setName ( "/etc/familiar-version" ); 611 f. setName ( "/etc/familiar-version" );
@@ -643,3 +664,2 @@ typedef struct {
643 664
644
645QValueList <OLed> iPAQ::ledList ( ) const 665QValueList <OLed> iPAQ::ledList ( ) const
@@ -939,9 +959,14 @@ void Zaurus::init ( )
939 f. close ( ); 959 f. close ( );
940 if ( model == "SL-5000D" ) { 960
941 d-> m_model = Model_Zaurus_SL5000; 961 d-> m_modelstr = QString("Zaurus ") + model;
942 d-> m_modelstr = "Zaurus SL-5000D"; 962 if ( model == "SL-5500" )
943 } else if ( model == "SL-5500" ) {
944 d-> m_model = Model_Zaurus_SL5500; 963 d-> m_model = Model_Zaurus_SL5500;
945 d-> m_modelstr = "Zaurus SL-5500"; 964 else if ( model == "SL-C700" )
946 } 965 d-> m_model = Model_Zaurus_SLC700;
966 else if ( model == "SL-A300" )
967 d-> m_model = Model_Zaurus_SLA300;
968 else if ( model == "SL-B600" || model == "SL-5600" )
969 d-> m_model = Model_Zaurus_SLB600;
970 else
971 d-> m_model = Model_Zaurus_SL5000;
947 } 972 }
@@ -949,3 +974,17 @@ void Zaurus::init ( )
949 d-> m_model = Model_Zaurus_SL5000; 974 d-> m_model = Model_Zaurus_SL5000;
950 d-> m_modelstr = "Zaurus SL-5000D (unverified)"; 975 d-> m_modelstr = "Zaurus (model unknown)";
976 }
977
978 switch ( d-> m_model ) {
979 case Model_Zaurus_SLC700:
980 /* note for C700, we must check the display rotation
981 * sensor to set an appropriate value
982 */
983 case Model_Zaurus_SLA300:
984 case Model_Zaurus_SLB600:
985 case Model_Zaurus_SL5500:
986 case Model_Zaurus_SL5000:
987 default:
988 d-> m_rotation = Rot270;
989 break;
951 } 990 }