author | schurig <schurig> | 2003-06-05 14:53:05 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-05 14:53:05 (UTC) |
commit | 9fe856c57c5df5a74f9276f500070f2d90cfe091 (patch) (unidiff) | |
tree | 36ed349f9746897b4f2870a2e41c8845dfe1e0e2 /libopie/odevice.h | |
parent | 76d25975a76699fedeca6917c530991071fcf4fa (diff) | |
download | opie-9fe856c57c5df5a74f9276f500070f2d90cfe091.zip opie-9fe856c57c5df5a74f9276f500070f2d90cfe091.tar.gz opie-9fe856c57c5df5a74f9276f500070f2d90cfe091.tar.bz2 |
added ODevice::setDisplayContrast(), ODevice::displayContrast() as virtual function,
which will break binary compatibility, but zecke said I shoud for now do it this way.
assorted Ramses specific patches
-rw-r--r-- | libopie/odevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 5829440..6c4830e 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -56,189 +56,191 @@ enum OModel { | |||
56 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), | 56 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), |
57 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), | 57 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), |
58 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), | 58 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), |
59 | 59 | ||
60 | Model_SIMpad = ( 3 << 24 ), | 60 | Model_SIMpad = ( 3 << 24 ), |
61 | 61 | ||
62 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), | 62 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), |
63 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), | 63 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), |
64 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), | 64 | Model_SIMpad_SL4 = ( Model_SIMpad | 0x000002 ), |
65 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), | 65 | Model_SIMpad_SLC = ( Model_SIMpad | 0x000004 ), |
66 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), | 66 | Model_SIMpad_TSinus = ( Model_SIMpad | 0x000008 ), |
67 | 67 | ||
68 | Model_Ramses = ( 4 << 24 ), | 68 | Model_Ramses = ( 4 << 24 ), |
69 | 69 | ||
70 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), | 70 | Model_Ramses_All = ( Model_Ramses | 0xffffff ), |
71 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), | 71 | Model_Ramses_MNCI = ( Model_Ramses | 0x000001 ), |
72 | }; | 72 | }; |
73 | 73 | ||
74 | /** | 74 | /** |
75 | * The vendor of the device | 75 | * The vendor of the device |
76 | */ | 76 | */ |
77 | enum OVendor { | 77 | enum OVendor { |
78 | Vendor_Unknown, | 78 | Vendor_Unknown, |
79 | 79 | ||
80 | Vendor_HP, | 80 | Vendor_HP, |
81 | Vendor_Sharp, | 81 | Vendor_Sharp, |
82 | Vendor_SIEMENS, | 82 | Vendor_SIEMENS, |
83 | Vendor_MundN, | 83 | Vendor_MundN, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * The System used | 87 | * The System used |
88 | */ | 88 | */ |
89 | enum OSystem { | 89 | enum OSystem { |
90 | System_Unknown, | 90 | System_Unknown, |
91 | 91 | ||
92 | System_Familiar, | 92 | System_Familiar, |
93 | System_Zaurus, | 93 | System_Zaurus, |
94 | System_OpenZaurus | 94 | System_OpenZaurus |
95 | }; | 95 | }; |
96 | 96 | ||
97 | enum OLedState { | 97 | enum OLedState { |
98 | Led_Off, | 98 | Led_Off, |
99 | Led_On, | 99 | Led_On, |
100 | Led_BlinkSlow, | 100 | Led_BlinkSlow, |
101 | Led_BlinkFast | 101 | Led_BlinkFast |
102 | }; | 102 | }; |
103 | 103 | ||
104 | enum OLed { | 104 | enum OLed { |
105 | Led_Mail, | 105 | Led_Mail, |
106 | Led_Power, | 106 | Led_Power, |
107 | Led_BlueTooth | 107 | Led_BlueTooth |
108 | }; | 108 | }; |
109 | 109 | ||
110 | enum OHardKey { | 110 | enum OHardKey { |
111 | HardKey_Datebook = Qt::Key_F9, | 111 | HardKey_Datebook = Qt::Key_F9, |
112 | HardKey_Contacts = Qt::Key_F10, | 112 | HardKey_Contacts = Qt::Key_F10, |
113 | HardKey_Menu = Qt::Key_F11, | 113 | HardKey_Menu = Qt::Key_F11, |
114 | HardKey_Home = Qt::Key_F12, | 114 | HardKey_Home = Qt::Key_F12, |
115 | HardKey_Mail = Qt::Key_F13, | 115 | HardKey_Mail = Qt::Key_F13, |
116 | HardKey_Record = Qt::Key_F24, | 116 | HardKey_Record = Qt::Key_F24, |
117 | HardKey_Suspend = Qt::Key_F34, | 117 | HardKey_Suspend = Qt::Key_F34, |
118 | HardKey_Backlight = Qt::Key_F35, | 118 | HardKey_Backlight = Qt::Key_F35, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | enum ODirection { | 121 | enum ODirection { |
122 | CW = 0, | 122 | CW = 0, |
123 | CCW = 1, | 123 | CCW = 1, |
124 | Flip = 2, | 124 | Flip = 2, |
125 | }; | 125 | }; |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * A singleton which gives informations about device specefic option | 128 | * A singleton which gives informations about device specefic option |
129 | * like the Hardware used, LEDs, the Base Distribution and | 129 | * like the Hardware used, LEDs, the Base Distribution and |
130 | * hardware key mappings. | 130 | * hardware key mappings. |
131 | * | 131 | * |
132 | * | 132 | * |
133 | * @short A small class for device specefic options | 133 | * @short A small class for device specefic options |
134 | * @see QObject | 134 | * @see QObject |
135 | * @author Robert Griebl | 135 | * @author Robert Griebl |
136 | * @version 1.0 | 136 | * @version 1.0 |
137 | */ | 137 | */ |
138 | class ODevice : public QObject { | 138 | class ODevice : public QObject { |
139 | Q_OBJECT | 139 | Q_OBJECT |
140 | 140 | ||
141 | private: | 141 | private: |
142 | /* disable copy */ | 142 | /* disable copy */ |
143 | ODevice ( const ODevice & ); | 143 | ODevice ( const ODevice & ); |
144 | 144 | ||
145 | protected: | 145 | protected: |
146 | ODevice ( ); | 146 | ODevice ( ); |
147 | virtual void init ( ); | 147 | virtual void init ( ); |
148 | virtual void initButtons ( ); | 148 | virtual void initButtons ( ); |
149 | 149 | ||
150 | ODeviceData *d; | 150 | ODeviceData *d; |
151 | 151 | ||
152 | public: | 152 | public: |
153 | // sandman do we want to allow destructions? -zecke? | 153 | // sandman do we want to allow destructions? -zecke? |
154 | virtual ~ODevice ( ); | 154 | virtual ~ODevice ( ); |
155 | 155 | ||
156 | 156 | ||
157 | static ODevice *inst ( ); | 157 | static ODevice *inst ( ); |
158 | 158 | ||
159 | // information | 159 | // information |
160 | 160 | ||
161 | QString modelString ( ) const; | 161 | QString modelString ( ) const; |
162 | OModel model ( ) const; | 162 | OModel model ( ) const; |
163 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 163 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
164 | 164 | ||
165 | QString vendorString ( ) const; | 165 | QString vendorString ( ) const; |
166 | OVendor vendor ( ) const; | 166 | OVendor vendor ( ) const; |
167 | 167 | ||
168 | QString systemString ( ) const; | 168 | QString systemString ( ) const; |
169 | OSystem system ( ) const; | 169 | OSystem system ( ) const; |
170 | 170 | ||
171 | QString systemVersionString ( ) const; | 171 | QString systemVersionString ( ) const; |
172 | 172 | ||
173 | Transformation rotation ( ) const; | 173 | Transformation rotation ( ) const; |
174 | ODirection direction ( ) const; | 174 | ODirection direction ( ) const; |
175 | 175 | ||
176 | // system | 176 | // system |
177 | 177 | ||
178 | virtual bool setSoftSuspend ( bool on ); | 178 | virtual bool setSoftSuspend ( bool on ); |
179 | virtual bool suspend ( ); | 179 | virtual bool suspend ( ); |
180 | 180 | ||
181 | virtual bool setDisplayStatus ( bool on ); | 181 | virtual bool setDisplayStatus ( bool on ); |
182 | virtual bool setDisplayBrightness ( int brightness ); | 182 | virtual bool setDisplayBrightness ( int brightness ); |
183 | virtual int displayBrightnessResolution ( ) const; | 183 | virtual int displayBrightnessResolution ( ) const; |
184 | virtual bool setDisplayContrast ( int contrast ); | ||
185 | virtual int displayContrastResolution ( ) const; | ||
184 | 186 | ||
185 | // input / output | 187 | // input / output |
186 | //FIXME playAlarmSound and al might be better -zecke | 188 | //FIXME playAlarmSound and al might be better -zecke |
187 | virtual void alarmSound ( ); | 189 | virtual void alarmSound ( ); |
188 | virtual void keySound ( ); | 190 | virtual void keySound ( ); |
189 | virtual void touchSound ( ); | 191 | virtual void touchSound ( ); |
190 | 192 | ||
191 | virtual QValueList <OLed> ledList ( ) const; | 193 | virtual QValueList <OLed> ledList ( ) const; |
192 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 194 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
193 | virtual OLedState ledState ( OLed led ) const; | 195 | virtual OLedState ledState ( OLed led ) const; |
194 | virtual bool setLedState ( OLed led, OLedState st ); | 196 | virtual bool setLedState ( OLed led, OLedState st ); |
195 | 197 | ||
196 | virtual bool hasLightSensor ( ) const; | 198 | virtual bool hasLightSensor ( ) const; |
197 | virtual int readLightSensor ( ); | 199 | virtual int readLightSensor ( ); |
198 | virtual int lightSensorResolution ( ) const; | 200 | virtual int lightSensorResolution ( ) const; |
199 | 201 | ||
200 | /** | 202 | /** |
201 | * Returns the available buttons on this device. The number and location | 203 | * Returns the available buttons on this device. The number and location |
202 | * of buttons will vary depending on the device. Button numbers will be assigned | 204 | * of buttons will vary depending on the device. Button numbers will be assigned |
203 | * by the device manufacturer and will be from most preferred button to least preffered | 205 | * by the device manufacturer and will be from most preferred button to least preffered |
204 | * button. Note that this list only contains "user mappable" buttons. | 206 | * button. Note that this list only contains "user mappable" buttons. |
205 | */ | 207 | */ |
206 | const QValueList<ODeviceButton> &buttons ( ); | 208 | const QValueList<ODeviceButton> &buttons ( ); |
207 | 209 | ||
208 | /** | 210 | /** |
209 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 211 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
210 | * returns 0L | 212 | * returns 0L |
211 | */ | 213 | */ |
212 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 214 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
213 | 215 | ||
214 | /** | 216 | /** |
215 | * Reassigns the pressed action for \a button. To return to the factory | 217 | * Reassigns the pressed action for \a button. To return to the factory |
216 | * default pass an empty string as \a qcopMessage. | 218 | * default pass an empty string as \a qcopMessage. |
217 | */ | 219 | */ |
218 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 220 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |
219 | 221 | ||
220 | /** | 222 | /** |
221 | * Reassigns the held action for \a button. To return to the factory | 223 | * Reassigns the held action for \a button. To return to the factory |
222 | * default pass an empty string as \a qcopMessage. | 224 | * default pass an empty string as \a qcopMessage. |
223 | */ | 225 | */ |
224 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 226 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
225 | 227 | ||
226 | /** | 228 | /** |
227 | * How long (in ms) you have to press a button for a "hold" action | 229 | * How long (in ms) you have to press a button for a "hold" action |
228 | */ | 230 | */ |
229 | uint buttonHoldTime ( ) const; | 231 | uint buttonHoldTime ( ) const; |
230 | 232 | ||
231 | signals: | 233 | signals: |
232 | void buttonMappingChanged ( ); | 234 | void buttonMappingChanged ( ); |
233 | 235 | ||
234 | private slots: | 236 | private slots: |
235 | void systemMessage ( const QCString &, const QByteArray & ); | 237 | void systemMessage ( const QCString &, const QByteArray & ); |
236 | 238 | ||
237 | protected: | 239 | protected: |
238 | void reloadButtonMapping ( ); | 240 | void reloadButtonMapping ( ); |
239 | }; | 241 | }; |
240 | 242 | ||
241 | } | 243 | } |
242 | 244 | ||
243 | #endif | 245 | #endif |
244 | 246 | ||