summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
Unidiff
Diffstat (limited to 'libopie/odevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 45a790b..0c55ea0 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -74,111 +74,118 @@ enum OVendor {
74enum OSystem { 74enum OSystem {
75 System_Unknown, 75 System_Unknown,
76 76
77 System_Familiar, 77 System_Familiar,
78 System_Zaurus, 78 System_Zaurus,
79 System_OpenZaurus 79 System_OpenZaurus
80}; 80};
81 81
82enum OLedState { 82enum OLedState {
83 Led_Off, 83 Led_Off,
84 Led_On, 84 Led_On,
85 Led_BlinkSlow, 85 Led_BlinkSlow,
86 Led_BlinkFast 86 Led_BlinkFast
87}; 87};
88 88
89enum OLed { 89enum OLed {
90 Led_Mail, 90 Led_Mail,
91 Led_Power, 91 Led_Power,
92 Led_BlueTooth 92 Led_BlueTooth
93}; 93};
94 94
95enum OHardKey { 95enum OHardKey {
96 HardKey_Datebook = Qt::Key_F9, 96 HardKey_Datebook = Qt::Key_F9,
97 HardKey_Contacts = Qt::Key_F10, 97 HardKey_Contacts = Qt::Key_F10,
98 HardKey_Menu = Qt::Key_F11, 98 HardKey_Menu = Qt::Key_F11,
99 HardKey_Home = Qt::Key_F12, 99 HardKey_Home = Qt::Key_F12,
100 HardKey_Mail = Qt::Key_F13, 100 HardKey_Mail = Qt::Key_F13,
101 HardKey_Record = Qt::Key_F24, 101 HardKey_Record = Qt::Key_F24,
102 HardKey_Suspend = Qt::Key_F34, 102 HardKey_Suspend = Qt::Key_F34,
103 HardKey_Backlight = Qt::Key_F35, 103 HardKey_Backlight = Qt::Key_F35,
104}; 104};
105 105
106enum ODirection {
107 CW = 0,
108 CCW = 1,
109 Flip = 2,
110};
111
106/** 112/**
107 * A singleton which gives informations about device specefic option 113 * A singleton which gives informations about device specefic option
108 * like the Hardware used, LEDs, the Base Distribution and 114 * like the Hardware used, LEDs, the Base Distribution and
109 * hardware key mappings. 115 * hardware key mappings.
110 * 116 *
111 * 117 *
112 * @short A small class for device specefic options 118 * @short A small class for device specefic options
113 * @see QObject 119 * @see QObject
114 * @author Robert Griebl 120 * @author Robert Griebl
115 * @version 1.0 121 * @version 1.0
116 */ 122 */
117class ODevice : public QObject { 123class ODevice : public QObject {
118 Q_OBJECT 124 Q_OBJECT
119 125
120private: 126private:
121 /* disable copy */ 127 /* disable copy */
122 ODevice ( const ODevice & ); 128 ODevice ( const ODevice & );
123 129
124protected: 130protected:
125 ODevice ( ); 131 ODevice ( );
126 virtual void init ( ); 132 virtual void init ( );
127 virtual void initButtons ( ); 133 virtual void initButtons ( );
128 134
129 ODeviceData *d; 135 ODeviceData *d;
130 136
131public: 137public:
132 // sandman do we want to allow destructions? -zecke? 138 // sandman do we want to allow destructions? -zecke?
133 virtual ~ODevice ( ); 139 virtual ~ODevice ( );
134 140
135 141
136 static ODevice *inst ( ); 142 static ODevice *inst ( );
137 143
138// information 144// information
139 145
140 QString modelString ( ) const; 146 QString modelString ( ) const;
141 OModel model ( ) const; 147 OModel model ( ) const;
142 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 148 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
143 149
144 QString vendorString ( ) const; 150 QString vendorString ( ) const;
145 OVendor vendor ( ) const; 151 OVendor vendor ( ) const;
146 152
147 QString systemString ( ) const; 153 QString systemString ( ) const;
148 OSystem system ( ) const; 154 OSystem system ( ) const;
149 155
150 QString systemVersionString ( ) const; 156 QString systemVersionString ( ) const;
151 157
152 Transformation rotation ( ) const; 158 Transformation rotation ( ) const;
159 ODirection direction ( ) const;
153 160
154// system 161// system
155 162
156 virtual bool setSoftSuspend ( bool on ); 163 virtual bool setSoftSuspend ( bool on );
157 virtual bool suspend ( ); 164 virtual bool suspend ( );
158 165
159 virtual bool setDisplayStatus ( bool on ); 166 virtual bool setDisplayStatus ( bool on );
160 virtual bool setDisplayBrightness ( int brightness ); 167 virtual bool setDisplayBrightness ( int brightness );
161 virtual int displayBrightnessResolution ( ) const; 168 virtual int displayBrightnessResolution ( ) const;
162 169
163// input / output 170// input / output
164 //FIXME playAlarmSound and al might be better -zecke 171 //FIXME playAlarmSound and al might be better -zecke
165 virtual void alarmSound ( ); 172 virtual void alarmSound ( );
166 virtual void keySound ( ); 173 virtual void keySound ( );
167 virtual void touchSound ( ); 174 virtual void touchSound ( );
168 175
169 virtual QValueList <OLed> ledList ( ) const; 176 virtual QValueList <OLed> ledList ( ) const;
170 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 177 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
171 virtual OLedState ledState ( OLed led ) const; 178 virtual OLedState ledState ( OLed led ) const;
172 virtual bool setLedState ( OLed led, OLedState st ); 179 virtual bool setLedState ( OLed led, OLedState st );
173 180
174 virtual bool hasLightSensor ( ) const; 181 virtual bool hasLightSensor ( ) const;
175 virtual int readLightSensor ( ); 182 virtual int readLightSensor ( );
176 virtual int lightSensorResolution ( ) const; 183 virtual int lightSensorResolution ( ) const;
177 184
178 /** 185 /**
179 * Returns the available buttons on this device. The number and location 186 * Returns the available buttons on this device. The number and location
180 * of buttons will vary depending on the device. Button numbers will be assigned 187 * of buttons will vary depending on the device. Button numbers will be assigned
181 * by the device manufacturer and will be from most preferred button to least preffered 188 * by the device manufacturer and will be from most preferred button to least preffered
182 * button. Note that this list only contains "user mappable" buttons. 189 * button. Note that this list only contains "user mappable" buttons.
183 */ 190 */
184 const QValueList<ODeviceButton> &buttons ( ); 191 const QValueList<ODeviceButton> &buttons ( );