summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 6c4830e..0974e8d 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -68,129 +68,128 @@ enum OModel {
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 */
77enum OVendor { 77enum 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 */
89enum OSystem { 89enum 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
97enum OLedState { 97enum 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
104enum OLed { 104enum OLed {
105 Led_Mail, 105 Led_Mail,
106 Led_Power, 106 Led_Power,
107 Led_BlueTooth 107 Led_BlueTooth
108}; 108};
109 109
110enum OHardKey { 110enum 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
121enum ODirection { 121enum 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 *
133 * @short A small class for device specefic options 132 * @short A small class for device specefic options
134 * @see QObject 133 * @see QObject
135 * @author Robert Griebl 134 * @author Robert Griebl
136 * @version 1.0 135 * @version 1.0
137 */ 136 */
138class ODevice : public QObject { 137class ODevice : public QObject {
139 Q_OBJECT 138 Q_OBJECT
140 139
141private: 140private:
142 /* disable copy */ 141 /* disable copy */
143 ODevice ( const ODevice & ); 142 ODevice ( const ODevice & );
144 143
145protected: 144protected:
146 ODevice ( ); 145 ODevice ( );
147 virtual void init ( ); 146 virtual void init ( );
148 virtual void initButtons ( ); 147 virtual void initButtons ( );
149 148
150 ODeviceData *d; 149 ODeviceData *d;
151 150
152public: 151public:
153 // sandman do we want to allow destructions? -zecke? 152 // sandman do we want to allow destructions? -zecke?
154 virtual ~ODevice ( ); 153 virtual ~ODevice ( );
155 154
156 155
157 static ODevice *inst ( ); 156 static ODevice *inst ( );
158 157
159// information 158// information
160 159
161 QString modelString ( ) const; 160 QString modelString ( ) const;
162 OModel model ( ) const; 161 OModel model ( ) const;
163 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 162 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
164 163
165 QString vendorString ( ) const; 164 QString vendorString ( ) const;
166 OVendor vendor ( ) const; 165 OVendor vendor ( ) const;
167 166
168 QString systemString ( ) const; 167 QString systemString ( ) const;
169 OSystem system ( ) const; 168 OSystem system ( ) const;
170 169
171 QString systemVersionString ( ) const; 170 QString systemVersionString ( ) const;
172 171
173 Transformation rotation ( ) const; 172 Transformation rotation ( ) const;
174 ODirection direction ( ) const; 173 ODirection direction ( ) const;
175 174
176// system 175// system
177 176
178 virtual bool setSoftSuspend ( bool on ); 177 virtual bool setSoftSuspend ( bool on );
179 virtual bool suspend ( ); 178 virtual bool suspend ( );
180 179
181 virtual bool setDisplayStatus ( bool on ); 180 virtual bool setDisplayStatus ( bool on );
182 virtual bool setDisplayBrightness ( int brightness ); 181 virtual bool setDisplayBrightness ( int brightness );
183 virtual int displayBrightnessResolution ( ) const; 182 virtual int displayBrightnessResolution ( ) const;
184 virtual bool setDisplayContrast ( int contrast ); 183 virtual bool setDisplayContrast ( int contrast );
185 virtual int displayContrastResolution ( ) const; 184 virtual int displayContrastResolution ( ) const;
186 185
187// input / output 186// input / output
188 //FIXME playAlarmSound and al might be better -zecke 187 //FIXME playAlarmSound and al might be better -zecke
189 virtual void alarmSound ( ); 188 virtual void alarmSound ( );
190 virtual void keySound ( ); 189 virtual void keySound ( );
191 virtual void touchSound ( ); 190 virtual void touchSound ( );
192 191
193 virtual QValueList <OLed> ledList ( ) const; 192 virtual QValueList <OLed> ledList ( ) const;
194 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 193 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
195 virtual OLedState ledState ( OLed led ) const; 194 virtual OLedState ledState ( OLed led ) const;
196 virtual bool setLedState ( OLed led, OLedState st ); 195 virtual bool setLedState ( OLed led, OLedState st );