summaryrefslogtreecommitdiff
authorzecke <zecke>2004-07-13 13:20:17 (UTC)
committer zecke <zecke>2004-07-13 13:20:17 (UTC)
commit4a31bc0d4c9a30583200e866f21340448d41d1c2 (patch) (unidiff)
tree2123d65d18b6ca57227bdb8b3254e82d9ba31759
parent37e0e077b51841971c3d4c25b287f4d39e750e2d (diff)
downloadopie-4a31bc0d4c9a30583200e866f21340448d41d1c2.zip
opie-4a31bc0d4c9a30583200e866f21340448d41d1c2.tar.gz
opie-4a31bc0d4c9a30583200e866f21340448d41d1c2.tar.bz2
-Small clean up, we do not need to use the file anymore as all
model checking is done in the ODevice base class -m_led[0] = m_led[1] = LedOff which size does m_led need? yeah two
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_simpad.h4
2 files changed, 2 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 6d4624b..76f03a0 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -108,43 +108,41 @@ struct s_button simpad_buttons [] = {
108 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"), 108 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"),
109 "devicebuttons/simpad_upper_lower", 109 "devicebuttons/simpad_upper_lower",
110 "QPE/Launcher", "home()", 110 "QPE/Launcher", "home()",
111 "buttonsettings", "raise()" }, 111 "buttonsettings", "raise()" },
112 */ 112 */
113}; 113};
114 114
115void SIMpad::init(const QString&) 115void SIMpad::init(const QString&)
116{ 116{
117 d->m_vendorstr = "SIEMENS"; 117 d->m_vendorstr = "SIEMENS";
118 d->m_vendor = Vendor_SIEMENS; 118 d->m_vendor = Vendor_SIEMENS;
119 119
120 QFile f ( "/proc/hal/model" );
121 120
122 //TODO Implement model checking 121 //TODO Implement model checking
123 //FIXME For now we assume an SL4 122 //FIXME For now we assume an SL4
124 123
125 d->m_modelstr = "SL4"; 124 d->m_modelstr = "SL4";
126 d->m_model = Model_SIMpad_SL4; 125 d->m_model = Model_SIMpad_SL4;
127 126
128 switch ( d->m_model ) { 127 switch ( d->m_model ) {
129 default: 128 default:
130 d->m_rotation = Rot0; 129 d->m_rotation = Rot0;
131 d->m_direction = CCW; 130 d->m_direction = CCW;
132 d->m_holdtime = 1000; // 1000ms 131 d->m_holdtime = 1000; // 1000ms
133 132
134 break; 133 break;
135 } 134 }
136 135
137 //Distribution detecting code is now in base class 136 //Distribution detecting code is now in base class
138
139 m_leds [0] = m_leds [1] = Led_Off; 137 m_leds [0] = m_leds [1] = Led_Off;
140 138
141 m_power_timer = 0; 139 m_power_timer = 0;
142 140
143} 141}
144 142
145void SIMpad::initButtons() 143void SIMpad::initButtons()
146{ 144{
147 if ( d->m_buttons ) 145 if ( d->m_buttons )
148 return; 146 return;
149 147
150 if ( isQWS( ) ) 148 if ( isQWS( ) )
diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h
index 0f4e66f..d9ae5a5 100644
--- a/libopie2/opiecore/device/odevice_simpad.h
+++ b/libopie2/opiecore/device/odevice_simpad.h
@@ -31,25 +31,25 @@
31#define ODEVICE_SIMPAD 31#define ODEVICE_SIMPAD
32 32
33#include <opie2/odevice.h> 33#include <opie2/odevice.h>
34 34
35/* QT */ 35/* QT */
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37 37
38namespace Opie { 38namespace Opie {
39namespace Core { 39namespace Core {
40namespace Internal { 40namespace Internal {
41 41
42class SIMpad : public ODevice, public QWSServer::KeyboardFilter 42class SIMpad : public ODevice, public QWSServer::KeyboardFilter
43{ 43{
44 protected: 44 protected:
45 virtual void init(const QString&); 45 virtual void init(const QString&);
46 virtual void initButtons(); 46 virtual void initButtons();
47 47
48 public: 48 public:
49 virtual bool setSoftSuspend( bool soft ); 49 virtual bool setSoftSuspend( bool soft );
50 virtual bool suspend(); 50 virtual bool suspend();
51 51
52 virtual bool setDisplayStatus( bool on ); 52 virtual bool setDisplayStatus( bool on );
53 virtual bool setDisplayBrightness( int b ); 53 virtual bool setDisplayBrightness( int b );
54 virtual int displayBrightnessResolution() const; 54 virtual int displayBrightnessResolution() const;
55 55
@@ -57,25 +57,25 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter
57 57
58 virtual QValueList <OLed> ledList() const; 58 virtual QValueList <OLed> ledList() const;
59 virtual QValueList <OLedState> ledStateList( OLed led ) const; 59 virtual QValueList <OLedState> ledStateList( OLed led ) const;
60 virtual OLedState ledState( OLed led ) const; 60 virtual OLedState ledState( OLed led ) const;
61 virtual bool setLedState( OLed led, OLedState st ); 61 virtual bool setLedState( OLed led, OLedState st );
62 62
63 protected: 63 protected:
64 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); 64 virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat );
65 virtual void timerEvent( QTimerEvent *te ); 65 virtual void timerEvent( QTimerEvent *te );
66 66
67 int m_power_timer; 67 int m_power_timer;
68 68
69 OLedState m_leds [1]; 69 OLedState m_leds [2];
70}; 70};
71 71
72struct s_button { 72struct s_button {
73 uint model; 73 uint model;
74 Qt::Key code; 74 Qt::Key code;
75 char *utext; 75 char *utext;
76 char *pix; 76 char *pix;
77 char *fpressedservice; 77 char *fpressedservice;
78 char *fpressedaction; 78 char *fpressedaction;
79 char *fheldservice; 79 char *fheldservice;
80 char *fheldaction; 80 char *fheldaction;
81}; 81};