summaryrefslogtreecommitdiff
path: root/libopie/odevice.h
authorzecke <zecke>2003-04-13 16:57:28 (UTC)
committer zecke <zecke>2003-04-13 16:57:28 (UTC)
commit0b311079ff19798866291034663757103c6ba935 (patch) (side-by-side diff)
tree70ddccf3a3147475050fa06cc2d807a71ab1d5ee /libopie/odevice.h
parent1537ccb435ca725c793db6e94e0b9e83484b57e7 (diff)
downloadopie-0b311079ff19798866291034663757103c6ba935.zip
opie-0b311079ff19798866291034663757103c6ba935.tar.gz
opie-0b311079ff19798866291034663757103c6ba935.tar.bz2
Jumbo API documentation update
and some API fixed ColorDialog is now OColorDialog!!! keep the namespace tidy! ColorPopupMenu is now OColorPopupMenu!!! keep the namespace tidy ColorDialog TT couldn't break bc we can so make it const QColor& OTimePicker add some convience methods more I might have forgot
Diffstat (limited to 'libopie/odevice.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/odevice.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/libopie/odevice.h b/libopie/odevice.h
index ff578d8..45a790b 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -23,54 +23,63 @@
#include <qobject.h>
#include <qstring.h>
#include <qnamespace.h>
#include <opie/odevicebutton.h>
#include <qpe/qpeapplication.h> /* for Transformation enum.. */
class ODeviceData;
namespace Opie {
+/**
+ * The available devices
+ */
enum OModel {
- Model_Unknown,
+ Model_Unknown, // = 0
Model_Series_Mask = 0xff000000,
Model_iPAQ = ( 1 << 24 ),
Model_iPAQ_All = ( Model_iPAQ | 0xffffff ),
Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ),
Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ),
Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ),
Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ),
Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ),
Model_Zaurus = ( 2 << 24 ),
Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ),
Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ),
Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ),
Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ),
};
+/**
+ * The vendor of the device
+ */
enum OVendor {
Vendor_Unknown,
Vendor_HP,
Vendor_Sharp
};
+/**
+ * The System used
+ */
enum OSystem {
System_Unknown,
System_Familiar,
System_Zaurus,
System_OpenZaurus
};
enum OLedState {
Led_Off,
Led_On,
Led_BlinkSlow,
@@ -85,40 +94,54 @@ enum OLed {
enum OHardKey {
HardKey_Datebook = Qt::Key_F9,
HardKey_Contacts = Qt::Key_F10,
HardKey_Menu = Qt::Key_F11,
HardKey_Home = Qt::Key_F12,
HardKey_Mail = Qt::Key_F13,
HardKey_Record = Qt::Key_F24,
HardKey_Suspend = Qt::Key_F34,
HardKey_Backlight = Qt::Key_F35,
};
+/**
+ * A singleton which gives informations about device specefic option
+ * like the Hardware used, LEDs, the Base Distribution and
+ * hardware key mappings.
+ *
+ *
+ * @short A small class for device specefic options
+ * @see QObject
+ * @author Robert Griebl
+ * @version 1.0
+ */
class ODevice : public QObject {
Q_OBJECT
private:
+ /* disable copy */
ODevice ( const ODevice & );
protected:
ODevice ( );
virtual void init ( );
virtual void initButtons ( );
ODeviceData *d;
public:
+ // sandman do we want to allow destructions? -zecke?
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;
@@ -129,25 +152,25 @@ public:
Transformation rotation ( ) const;
// system
virtual bool setSoftSuspend ( bool on );
virtual bool suspend ( );
virtual bool setDisplayStatus ( bool on );
virtual bool setDisplayBrightness ( int brightness );
virtual int displayBrightnessResolution ( ) const;
// 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;