summaryrefslogtreecommitdiff
path: root/libopie
authorschurig <schurig>2003-06-17 06:34:27 (UTC)
committer schurig <schurig>2003-06-17 06:34:27 (UTC)
commit350e9cf9f8607202d78cba4400aec90ad075a763 (patch) (side-by-side diff)
tree69fa6761dda8893c9c801f5408bff837e3f54c7d /libopie
parent9d006f21949fc9a25e323e2fd20fab0bfb249b49 (diff)
downloadopie-350e9cf9f8607202d78cba4400aec90ad075a763.zip
opie-350e9cf9f8607202d78cba4400aec90ad075a763.tar.gz
opie-350e9cf9f8607202d78cba4400aec90ad075a763.tar.bz2
added helpful comment on usage of virtualHook
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index a232d69..650a2da 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -154,64 +154,70 @@ public:
virtual ~ODevice ( );
static ODevice *inst ( );
// information
QString modelString ( ) const;
OModel model ( ) const;
inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
QString vendorString ( ) const;
OVendor vendor ( ) const;
QString systemString ( ) const;
OSystem system ( ) const;
QString systemVersionString ( ) const;
Transformation rotation ( ) const;
ODirection direction ( ) const;
// system
virtual bool setSoftSuspend ( bool on );
virtual bool suspend ( );
virtual bool setDisplayStatus ( bool on );
virtual bool setDisplayBrightness ( int brightness );
virtual int displayBrightnessResolution ( ) const;
virtual bool setDisplayContrast ( int contrast );
virtual int displayContrastResolution ( ) const;
+ // don't add new virtual methods, use this:
+ // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); };
+ // and in your subclass do do overwrite
+ // protected virtual int virtual_hook(int, void *)
+ // which is defined below
+
// input / output
//FIXME playAlarmSound and al might be better -zecke
virtual void alarmSound ( );
virtual void keySound ( );
virtual void touchSound ( );
virtual QValueList <OLed> ledList ( ) const;
virtual QValueList <OLedState> ledStateList ( OLed led ) const;
virtual OLedState ledState ( OLed led ) const;
virtual bool setLedState ( OLed led, OLedState st );
virtual bool hasLightSensor ( ) const;
virtual int readLightSensor ( );
virtual int lightSensorResolution ( ) const;
const QStrList &allowedCpuFrequencies() const;
bool setCurrentCpuFrequency(uint index);
/**
* Returns the available buttons on this device. The number and location
* of buttons will vary depending on the device. Button numbers will be assigned
* by the device manufacturer and will be from most preferred button to least preffered
* button. Note that this list only contains "user mappable" buttons.
*/
const QValueList<ODeviceButton> &buttons ( );
/**
* Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
* returns 0L
*/
const ODeviceButton *buttonForKeycode ( ushort keyCode );