author | sandman <sandman> | 2002-10-29 18:43:23 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-29 18:43:23 (UTC) |
commit | 5ac67b8aece5aca20419f8953f88a36fd729adfc (patch) (unidiff) | |
tree | 3ce57c7a938d36ce40ff0dfe4b114233febf7b08 /libopie/odevice.h | |
parent | 45d9a30ec17b5146ffdac8e776003752fe2deeea (diff) | |
download | opie-5ac67b8aece5aca20419f8953f88a36fd729adfc.zip opie-5ac67b8aece5aca20419f8953f88a36fd729adfc.tar.gz opie-5ac67b8aece5aca20419f8953f88a36fd729adfc.tar.bz2 |
- redone the Model enum to make it easy to check for series (like: is this an
iPAQ - and not is this a 31xx or 36xx or ...)
- fixed the disply brightness resolution bug on H38xx
-rw-r--r-- | libopie/odevice.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index e07b91c..e50009c 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -29,17 +29,21 @@ namespace Opie { | |||
29 | 29 | ||
30 | enum OModel { | 30 | enum OModel { |
31 | Model_Unknown, | 31 | Model_Unknown, |
32 | |||
33 | Model_Series_Mask = 0xff000000, | ||
32 | 34 | ||
33 | Model_iPAQ = ( 1 << 16 ), | 35 | Model_iPAQ = ( 1 << 24 ), |
34 | 36 | ||
35 | Model_iPAQ_H31xx = ( Model_iPAQ | 1 ), | 37 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), |
36 | Model_iPAQ_H36xx = ( Model_iPAQ | 2 ), | 38 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), |
37 | Model_iPAQ_H37xx = ( Model_iPAQ | 3 ), | 39 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), |
38 | Model_iPAQ_H38xx = ( Model_iPAQ | 4 ), | 40 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), |
41 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | ||
42 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | ||
39 | 43 | ||
40 | Model_Zaurus = ( 2 << 16 ), | 44 | Model_Zaurus = ( 2 << 24 ), |
41 | 45 | ||
42 | Model_Zaurus_SL5000 = ( Model_Zaurus | 1 ), | 46 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), |
43 | }; | 47 | }; |
44 | 48 | ||
45 | enum OVendor { | 49 | enum OVendor { |
@@ -104,6 +108,7 @@ public: | |||
104 | 108 | ||
105 | QString modelString ( ) const; | 109 | QString modelString ( ) const; |
106 | OModel model ( ) const; | 110 | OModel model ( ) const; |
111 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | ||
107 | 112 | ||
108 | QString vendorString ( ) const; | 113 | QString vendorString ( ) const; |
109 | OVendor vendor ( ) const; | 114 | OVendor vendor ( ) const; |
@@ -136,8 +141,6 @@ public: | |||
136 | virtual bool hasLightSensor ( ) const; | 141 | virtual bool hasLightSensor ( ) const; |
137 | virtual int readLightSensor ( ); | 142 | virtual int readLightSensor ( ); |
138 | virtual int lightSensorResolution ( ) const; | 143 | virtual int lightSensorResolution ( ) const; |
139 | |||
140 | //virtual QValueList <int> keyList ( ) const; | ||
141 | }; | 144 | }; |
142 | 145 | ||
143 | } | 146 | } |