author | sandman <sandman> | 2003-03-26 23:53:14 (UTC) |
---|---|---|
committer | sandman <sandman> | 2003-03-26 23:53:14 (UTC) |
commit | 9d291e88efa5b33bbf34112cdee8b0e516150dd6 (patch) (unidiff) | |
tree | 6059b942d98691d7882d5290d5aa854b187f13ce /libopie/odevice.h | |
parent | eda6fffbe8ad7e3635985d9b2a8f7b46964aa271 (diff) | |
download | opie-9d291e88efa5b33bbf34112cdee8b0e516150dd6.zip opie-9d291e88efa5b33bbf34112cdee8b0e516150dd6.tar.gz opie-9d291e88efa5b33bbf34112cdee8b0e516150dd6.tar.bz2 |
delay the initialization of the button information:
- faster startup for apps that are not accessing the HW buttons
- the basic ODevice stuff is useable without a QApplication object
-rw-r--r-- | libopie/odevice.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h index 575e1fe..ff578d8 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -94,24 +94,25 @@ enum OHardKey { | |||
94 | HardKey_Backlight = Qt::Key_F35, | 94 | HardKey_Backlight = Qt::Key_F35, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | class ODevice : public QObject { | 97 | class ODevice : public QObject { |
98 | Q_OBJECT | 98 | Q_OBJECT |
99 | 99 | ||
100 | private: | 100 | private: |
101 | ODevice ( const ODevice & ); | 101 | ODevice ( const ODevice & ); |
102 | 102 | ||
103 | protected: | 103 | protected: |
104 | ODevice ( ); | 104 | ODevice ( ); |
105 | virtual void init ( ); | 105 | virtual void init ( ); |
106 | virtual void initButtons ( ); | ||
106 | 107 | ||
107 | ODeviceData *d; | 108 | ODeviceData *d; |
108 | 109 | ||
109 | public: | 110 | public: |
110 | virtual ~ODevice ( ); | 111 | virtual ~ODevice ( ); |
111 | 112 | ||
112 | static ODevice *inst ( ); | 113 | static ODevice *inst ( ); |
113 | 114 | ||
114 | // information | 115 | // information |
115 | 116 | ||
116 | QString modelString ( ) const; | 117 | QString modelString ( ) const; |
117 | OModel model ( ) const; | 118 | OModel model ( ) const; |
@@ -148,25 +149,25 @@ public: | |||
148 | virtual bool setLedState ( OLed led, OLedState st ); | 149 | virtual bool setLedState ( OLed led, OLedState st ); |
149 | 150 | ||
150 | virtual bool hasLightSensor ( ) const; | 151 | virtual bool hasLightSensor ( ) const; |
151 | virtual int readLightSensor ( ); | 152 | virtual int readLightSensor ( ); |
152 | virtual int lightSensorResolution ( ) const; | 153 | virtual int lightSensorResolution ( ) const; |
153 | 154 | ||
154 | /** | 155 | /** |
155 | * Returns the available buttons on this device. The number and location | 156 | * 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 | 157 | * 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 | 158 | * 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. | 159 | * button. Note that this list only contains "user mappable" buttons. |
159 | */ | 160 | */ |
160 | const QValueList<ODeviceButton> &buttons ( ) const; | 161 | const QValueList<ODeviceButton> &buttons ( ); |
161 | 162 | ||
162 | /** | 163 | /** |
163 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it | 164 | * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it |
164 | * returns 0L | 165 | * returns 0L |
165 | */ | 166 | */ |
166 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); | 167 | const ODeviceButton *buttonForKeycode ( ushort keyCode ); |
167 | 168 | ||
168 | /** | 169 | /** |
169 | * Reassigns the pressed action for \a button. To return to the factory | 170 | * Reassigns the pressed action for \a button. To return to the factory |
170 | * default pass an empty string as \a qcopMessage. | 171 | * default pass an empty string as \a qcopMessage. |
171 | */ | 172 | */ |
172 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); | 173 | void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); |