-rw-r--r-- | libopie/odevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 7f6f856..18ff5f1 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -107,143 +107,143 @@ enum OLed { | |||
107 | Led_Power, | 107 | Led_Power, |
108 | Led_BlueTooth | 108 | Led_BlueTooth |
109 | }; | 109 | }; |
110 | 110 | ||
111 | enum OHardKey { | 111 | enum OHardKey { |
112 | HardKey_Datebook = Qt::Key_F9, | 112 | HardKey_Datebook = Qt::Key_F9, |
113 | HardKey_Contacts = Qt::Key_F10, | 113 | HardKey_Contacts = Qt::Key_F10, |
114 | HardKey_Menu = Qt::Key_F11, | 114 | HardKey_Menu = Qt::Key_F11, |
115 | HardKey_Home = Qt::Key_F12, | 115 | HardKey_Home = Qt::Key_F12, |
116 | HardKey_Mail = Qt::Key_F13, | 116 | HardKey_Mail = Qt::Key_F13, |
117 | HardKey_Record = Qt::Key_F24, | 117 | HardKey_Record = Qt::Key_F24, |
118 | HardKey_Suspend = Qt::Key_F34, | 118 | HardKey_Suspend = Qt::Key_F34, |
119 | HardKey_Backlight = Qt::Key_F35, | 119 | HardKey_Backlight = Qt::Key_F35, |
120 | }; | 120 | }; |
121 | 121 | ||
122 | enum ODirection { | 122 | enum ODirection { |
123 | CW = 0, | 123 | CW = 0, |
124 | CCW = 1, | 124 | CCW = 1, |
125 | Flip = 2, | 125 | Flip = 2, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * A singleton which gives informations about device specefic option | 129 | * A singleton which gives informations about device specefic option |
130 | * like the Hardware used, LEDs, the Base Distribution and | 130 | * like the Hardware used, LEDs, the Base Distribution and |
131 | * hardware key mappings. | 131 | * hardware key mappings. |
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 | static ODevice *inst ( ); | 156 | static ODevice *inst ( ); |
157 | 157 | ||
158 | // information | 158 | // information |
159 | 159 | ||
160 | QString modelString ( ) const; | 160 | QString modelString ( ) const; |
161 | OModel model ( ) const; | 161 | OModel model ( ) const; |
162 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } | 162 | inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } |
163 | 163 | ||
164 | QString vendorString ( ) const; | 164 | QString vendorString ( ) const; |
165 | OVendor vendor ( ) const; | 165 | OVendor vendor ( ) const; |
166 | 166 | ||
167 | QString systemString ( ) const; | 167 | QString systemString ( ) const; |
168 | OSystem system ( ) const; | 168 | OSystem system ( ) const; |
169 | 169 | ||
170 | QString systemVersionString ( ) const; | 170 | QString systemVersionString ( ) const; |
171 | 171 | ||
172 | Transformation rotation ( ) const; | 172 | Transformation rotation ( ) const; |
173 | ODirection direction ( ) const; | 173 | ODirection direction ( ) const; |
174 | 174 | ||
175 | // system | 175 | // system |
176 | 176 | ||
177 | virtual bool setSoftSuspend ( bool on ); | 177 | virtual bool setSoftSuspend ( bool on ); |
178 | virtual bool suspend ( ); | 178 | virtual bool suspend ( ); |
179 | 179 | ||
180 | virtual bool setDisplayStatus ( bool on ); | 180 | virtual bool setDisplayStatus ( bool on ); |
181 | virtual bool setDisplayBrightness ( int brightness ); | 181 | virtual bool setDisplayBrightness ( int brightness ); |
182 | virtual int displayBrightnessResolution ( ) const; | 182 | virtual int displayBrightnessResolution ( ) const; |
183 | virtual bool setDisplayContrast ( int contrast ); | 183 | virtual bool setDisplayContrast ( int contrast ); |
184 | virtual int displayContrastResolution ( ) const; | 184 | virtual int displayContrastResolution ( ) const; |
185 | 185 | ||
186 | // input / output | 186 | // input / output |
187 | //FIXME playAlarmSound and al might be better -zecke | 187 | //FIXME playAlarmSound and al might be better -zecke |
188 | virtual void alarmSound ( ); | 188 | virtual void alarmSound ( ); |
189 | virtual void keySound ( ); | 189 | virtual void keySound ( ); |
190 | virtual void touchSound ( ); | 190 | virtual void touchSound ( ); |
191 | 191 | ||
192 | virtual QValueList <OLed> ledList ( ) const; | 192 | virtual QValueList <OLed> ledList ( ) const; |
193 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 193 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
194 | virtual OLedState ledState ( OLed led ) const; | 194 | virtual OLedState ledState ( OLed led ) const; |
195 | virtual bool setLedState ( OLed led, OLedState st ); | 195 | virtual bool setLedState ( OLed led, OLedState st ); |
196 | 196 | ||
197 | virtual bool hasLightSensor ( ) const; | 197 | virtual bool hasLightSensor ( ) const; |
198 | virtual int readLightSensor ( ); | 198 | virtual int readLightSensor ( ); |
199 | virtual int lightSensorResolution ( ) const; | 199 | virtual int lightSensorResolution ( ) const; |
200 | 200 | ||
201 | QStrList &cpuFrequencies() const; | 201 | QStrList &cpuFrequencies() const; |
202 | bool setCpuFrequency(uint index); | 202 | bool setCpuFrequency(uint index); |
203 | uint cpuFrequency() const; | 203 | int cpuFrequency() const; |
204 | 204 | ||
205 | /** | 205 | /** |
206 | * Returns the available buttons on this device. The number and location | 206 | * Returns the available buttons on this device. The number and location |
207 | * of buttons will vary depending on the device. Button numbers will be assigned | 207 | * of buttons will vary depending on the device. Button numbers will be assigned |
208 | * by the device manufacturer and will be from most preferred button to least preffered | 208 | * by the device manufacturer and will be from most preferred button to least preffered |
209 | * button. Note that this list only contains "user mappable" buttons. | 209 | * button. Note that this list only contains "user mappable" buttons. |
210 | */ | 210 | */ |
211 | const QValueList<ODeviceButton> &buttons ( ); | 211 | const QValueList<ODeviceButton> &buttons ( ); |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 214 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
215 | * returns 0L | 215 | * returns 0L |
216 | */ | 216 | */ |
217 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 217 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * Reassigns the pressed action for \a button. To return to the factory | 220 | * Reassigns the pressed action for \a button. To return to the factory |
221 | * default pass an empty string as \a qcopMessage. | 221 | * default pass an empty string as \a qcopMessage. |
222 | */ | 222 | */ |
223 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 223 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |
224 | 224 | ||
225 | /** | 225 | /** |
226 | * Reassigns the held action for \a button. To return to the factory | 226 | * Reassigns the held action for \a button. To return to the factory |
227 | * default pass an empty string as \a qcopMessage. | 227 | * default pass an empty string as \a qcopMessage. |
228 | */ | 228 | */ |
229 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); | 229 | void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * How long (in ms) you have to press a button for a "hold" action | 232 | * How long (in ms) you have to press a button for a "hold" action |
233 | */ | 233 | */ |
234 | uint buttonHoldTime ( ) const; | 234 | uint buttonHoldTime ( ) const; |
235 | 235 | ||
236 | signals: | 236 | signals: |
237 | void buttonMappingChanged ( ); | 237 | void buttonMappingChanged ( ); |
238 | 238 | ||
239 | private slots: | 239 | private slots: |
240 | void systemMessage ( const QCString &, const QByteArray & ); | 240 | void systemMessage ( const QCString &, const QByteArray & ); |
241 | 241 | ||
242 | protected: | 242 | protected: |
243 | void reloadButtonMapping ( ); | 243 | void reloadButtonMapping ( ); |
244 | }; | 244 | }; |
245 | 245 | ||
246 | } | 246 | } |
247 | 247 | ||
248 | #endif | 248 | #endif |
249 | 249 | ||