summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-26 20:02:39 (UTC)
committer kergoth <kergoth>2003-01-26 20:02:39 (UTC)
commit5c4af98c127d777ba9f7de0c2298fb931a9cc877 (patch) (unidiff)
treef2e68310458b7965d7f3270e0eea9be4d3341b25
parent808181587c1cea5a089c75df7d2833f100bddbf1 (diff)
downloadopie-5c4af98c127d777ba9f7de0c2298fb931a9cc877.zip
opie-5c4af98c127d777ba9f7de0c2298fb931a9cc877.tar.gz
opie-5c4af98c127d777ba9f7de0c2298fb931a9cc877.tar.bz2
fix the Transformation redefinition.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 8164c4d..575e1fe 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,198 +1,198 @@
1/* This file is part of the OPIE libraries 1/* This file is part of the OPIE libraries
2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) 2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef _LIBOPIE_ODEVICE_H_ 20#ifndef _LIBOPIE_ODEVICE_H_
21#define _LIBOPIE_ODEVICE_H_ 21#define _LIBOPIE_ODEVICE_H_
22 22
23#include <qobject.h> 23#include <qobject.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qnamespace.h> 25#include <qnamespace.h>
26 26
27#include <opie/odevicebutton.h> 27#include <opie/odevicebutton.h>
28 28
29enum Transformation { None, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ 29#include <qpe/qpeapplication.h> /* for Transformation enum.. */
30 30
31class ODeviceData; 31class ODeviceData;
32 32
33namespace Opie { 33namespace Opie {
34 34
35enum OModel { 35enum OModel {
36 Model_Unknown, 36 Model_Unknown,
37 37
38 Model_Series_Mask = 0xff000000, 38 Model_Series_Mask = 0xff000000,
39 39
40 Model_iPAQ = ( 1 << 24 ), 40 Model_iPAQ = ( 1 << 24 ),
41 41
42 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), 42 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ),
43 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), 43 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ),
44 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), 44 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ),
45 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), 45 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ),
46 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), 46 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ),
47 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), 47 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ),
48 48
49 Model_Zaurus = ( 2 << 24 ), 49 Model_Zaurus = ( 2 << 24 ),
50 50
51 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), 51 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ),
52 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), 52 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ),
53 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), 53 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ),
54 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), 54 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
55 Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), 55 Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ),
56}; 56};
57 57
58 enum OVendor { 58 enum OVendor {
59 Vendor_Unknown, 59 Vendor_Unknown,
60 60
61 Vendor_HP, 61 Vendor_HP,
62 Vendor_Sharp 62 Vendor_Sharp
63 }; 63 };
64 64
65enum OSystem { 65enum OSystem {
66 System_Unknown, 66 System_Unknown,
67 67
68 System_Familiar, 68 System_Familiar,
69 System_Zaurus, 69 System_Zaurus,
70 System_OpenZaurus 70 System_OpenZaurus
71}; 71};
72 72
73enum OLedState { 73enum OLedState {
74 Led_Off, 74 Led_Off,
75 Led_On, 75 Led_On,
76 Led_BlinkSlow, 76 Led_BlinkSlow,
77 Led_BlinkFast 77 Led_BlinkFast
78}; 78};
79 79
80enum OLed { 80enum OLed {
81 Led_Mail, 81 Led_Mail,
82 Led_Power, 82 Led_Power,
83 Led_BlueTooth 83 Led_BlueTooth
84}; 84};
85 85
86enum OHardKey { 86enum OHardKey {
87 HardKey_Datebook = Qt::Key_F9, 87 HardKey_Datebook = Qt::Key_F9,
88 HardKey_Contacts = Qt::Key_F10, 88 HardKey_Contacts = Qt::Key_F10,
89 HardKey_Menu = Qt::Key_F11, 89 HardKey_Menu = Qt::Key_F11,
90 HardKey_Home = Qt::Key_F12, 90 HardKey_Home = Qt::Key_F12,
91 HardKey_Mail = Qt::Key_F13, 91 HardKey_Mail = Qt::Key_F13,
92 HardKey_Record = Qt::Key_F24, 92 HardKey_Record = Qt::Key_F24,
93 HardKey_Suspend = Qt::Key_F34, 93 HardKey_Suspend = Qt::Key_F34,
94 HardKey_Backlight = Qt::Key_F35, 94 HardKey_Backlight = Qt::Key_F35,
95}; 95};
96 96
97class ODevice : public QObject { 97class ODevice : public QObject {
98 Q_OBJECT 98 Q_OBJECT
99 99
100private: 100private:
101 ODevice ( const ODevice & ); 101 ODevice ( const ODevice & );
102 102
103protected: 103protected:
104 ODevice ( ); 104 ODevice ( );
105 virtual void init ( ); 105 virtual void init ( );
106 106
107 ODeviceData *d; 107 ODeviceData *d;
108 108
109public: 109public:
110 virtual ~ODevice ( ); 110 virtual ~ODevice ( );
111 111
112 static ODevice *inst ( ); 112 static ODevice *inst ( );
113 113
114// information 114// information
115 115
116 QString modelString ( ) const; 116 QString modelString ( ) const;
117 OModel model ( ) const; 117 OModel model ( ) const;
118 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 118 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
119 119
120 QString vendorString ( ) const; 120 QString vendorString ( ) const;
121 OVendor vendor ( ) const; 121 OVendor vendor ( ) const;
122 122
123 QString systemString ( ) const; 123 QString systemString ( ) const;
124 OSystem system ( ) const; 124 OSystem system ( ) const;
125 125
126 QString systemVersionString ( ) const; 126 QString systemVersionString ( ) const;
127 127
128 Transformation rotation ( ) const; 128 Transformation rotation ( ) const;
129 129
130 // system 130 // system
131 131
132 virtual bool setSoftSuspend ( bool on ); 132 virtual bool setSoftSuspend ( bool on );
133 virtual bool suspend ( ); 133 virtual bool suspend ( );
134 134
135 virtual bool setDisplayStatus ( bool on ); 135 virtual bool setDisplayStatus ( bool on );
136 virtual bool setDisplayBrightness ( int brightness ); 136 virtual bool setDisplayBrightness ( int brightness );
137 virtual int displayBrightnessResolution ( ) const; 137 virtual int displayBrightnessResolution ( ) const;
138 138
139// input / output 139// input / output
140 140
141 virtual void alarmSound ( ); 141 virtual void alarmSound ( );
142 virtual void keySound ( ); 142 virtual void keySound ( );
143 virtual void touchSound ( ); 143 virtual void touchSound ( );
144 144
145 virtual QValueList <OLed> ledList ( ) const; 145 virtual QValueList <OLed> ledList ( ) const;
146 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 146 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
147 virtual OLedState ledState ( OLed led ) const; 147 virtual OLedState ledState ( OLed led ) const;
148 virtual bool setLedState ( OLed led, OLedState st ); 148 virtual bool setLedState ( OLed led, OLedState st );
149 149
150 virtual bool hasLightSensor ( ) const; 150 virtual bool hasLightSensor ( ) const;
151 virtual int readLightSensor ( ); 151 virtual int readLightSensor ( );
152 virtual int lightSensorResolution ( ) const; 152 virtual int lightSensorResolution ( ) const;
153 153
154 /** 154 /**
155 * Returns the available buttons on this device. The number and location 155 * Returns the available buttons on this device. The number and location
156 * of buttons will vary depending on the device. Button numbers will be assigned 156 * of buttons will vary depending on the device. Button numbers will be assigned
157 * by the device manufacturer and will be from most preferred button to least preffered 157 * by the device manufacturer and will be from most preferred button to least preffered
158 * button. Note that this list only contains "user mappable" buttons. 158 * button. Note that this list only contains "user mappable" buttons.
159 */ 159 */
160 const QValueList<ODeviceButton> &buttons ( ) const; 160 const QValueList<ODeviceButton> &buttons ( ) const;
161 161
162 /** 162 /**
163 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it 163 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
164 * returns 0L 164 * returns 0L
165 */ 165 */
166 const ODeviceButton *buttonForKeycode ( ushort keyCode ); 166 const ODeviceButton *buttonForKeycode ( ushort keyCode );
167 167
168 /** 168 /**
169 * Reassigns the pressed action for \a button. To return to the factory 169 * Reassigns the pressed action for \a button. To return to the factory
170 * default pass an empty string as \a qcopMessage. 170 * default pass an empty string as \a qcopMessage.
171 */ 171 */
172 void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); 172 void remapPressedAction ( int button, const OQCopMessage &qcopMessage );
173 173
174 /** 174 /**
175 * Reassigns the held action for \a button. To return to the factory 175 * Reassigns the held action for \a button. To return to the factory
176 * default pass an empty string as \a qcopMessage. 176 * default pass an empty string as \a qcopMessage.
177 */ 177 */
178 void remapHeldAction ( int button, const OQCopMessage &qcopMessage ); 178 void remapHeldAction ( int button, const OQCopMessage &qcopMessage );
179 179
180 /** 180 /**
181 * How long (in ms) you have to press a button for a "hold" action 181 * How long (in ms) you have to press a button for a "hold" action
182 */ 182 */
183 uint buttonHoldTime ( ) const; 183 uint buttonHoldTime ( ) const;
184 184
185 signals: 185 signals:
186 void buttonMappingChanged ( ); 186 void buttonMappingChanged ( );
187 187
188 private slots: 188 private slots:
189 void systemMessage ( const QCString &, const QByteArray & ); 189 void systemMessage ( const QCString &, const QByteArray & );
190 190
191protected: 191protected:
192 void reloadButtonMapping ( ); 192 void reloadButtonMapping ( );
193}; 193};
194 194
195} 195}
196 196
197#endif 197#endif
198 198