-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 7 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 52 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 2 |
14 files changed, 44 insertions, 43 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 62a2e03..cef7f63 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -85,46 +85,48 @@ struct default_button default_buttons [] = { | |||
85 | "opiemail", "newMail()" }, | 85 | "opiemail", "newMail()" }, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | ODevice *ODevice::inst() | 88 | ODevice *ODevice::inst() |
89 | { | 89 | { |
90 | static ODevice *dev = 0; | 90 | static ODevice *dev = 0; |
91 | 91 | ||
92 | // rewrite this to only use /proc/cpuinfo or so | 92 | // rewrite this to only use /proc/cpuinfo or so |
93 | QString cpu_info; | ||
93 | 94 | ||
94 | if ( !dev ) | 95 | if ( !dev ) |
95 | { | 96 | { |
96 | QFile f( PATH_PROC_CPUINFO ); | 97 | QFile f( PATH_PROC_CPUINFO ); |
97 | if ( f.open( IO_ReadOnly ) ) | 98 | if ( f.open( IO_ReadOnly ) ) |
98 | { | 99 | { |
99 | QTextStream s( &f ); | 100 | QTextStream s( &f ); |
100 | while ( !s.atEnd() ) | 101 | while ( !s.atEnd() ) |
101 | { | 102 | { |
102 | QString line; | 103 | QString line; |
103 | line = s.readLine(); | 104 | line = s.readLine(); |
104 | if ( line.startsWith( "Hardware" ) ) | 105 | if ( line.startsWith( "Hardware" ) ) |
105 | { | 106 | { |
106 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 107 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
108 | cpu_info = line; | ||
107 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 109 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
108 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 110 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
109 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 111 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
110 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 112 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
111 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 113 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
112 | else qWarning( "ODevice() - unknown hardware - using default." ); | 114 | else qWarning( "ODevice() - unknown hardware - using default." ); |
113 | break; | 115 | break; |
114 | } | 116 | } |
115 | } | 117 | } |
116 | } | 118 | } |
117 | else | 119 | else |
118 | { | 120 | { |
119 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 121 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
120 | } | 122 | } |
121 | if ( !dev ) dev = new ODevice(); | 123 | if ( !dev ) dev = new ODevice(); |
122 | dev->init(); | 124 | dev->init(cpu_info); |
123 | } | 125 | } |
124 | return dev; | 126 | return dev; |
125 | } | 127 | } |
126 | 128 | ||
127 | ODevice::ODevice() | 129 | ODevice::ODevice() |
128 | { | 130 | { |
129 | d = new ODeviceData; | 131 | d = new ODeviceData; |
130 | 132 | ||
@@ -145,17 +147,17 @@ ODevice::ODevice() | |||
145 | 147 | ||
146 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) | 148 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) |
147 | { | 149 | { |
148 | if ( msg == "deviceButtonMappingChanged()" ) { | 150 | if ( msg == "deviceButtonMappingChanged()" ) { |
149 | reloadButtonMapping(); | 151 | reloadButtonMapping(); |
150 | } | 152 | } |
151 | } | 153 | } |
152 | 154 | ||
153 | void ODevice::init() | 155 | void ODevice::init(const QString&) |
154 | { | 156 | { |
155 | } | 157 | } |
156 | 158 | ||
157 | /** | 159 | /** |
158 | * This method initialises the button mapping | 160 | * This method initialises the button mapping |
159 | */ | 161 | */ |
160 | void ODevice::initButtons() | 162 | void ODevice::initButtons() |
161 | { | 163 | { |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 0ba58f0..aaebde3 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -55,17 +55,18 @@ enum OModel { | |||
55 | Model_iPAQ = ( 1 << 24 ), | 55 | Model_iPAQ = ( 1 << 24 ), |
56 | 56 | ||
57 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), | 57 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), |
58 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), | 58 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), |
59 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), | 59 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), |
60 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), | 60 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), |
61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | 61 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), |
62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | 62 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), |
63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000011 ), | 63 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000020 ), |
64 | Model_iPAQ_H22xx = ( Model_iPAQ | 0x000040 ), | ||
64 | 65 | ||
65 | Model_Jornada = ( 6 << 24 ), | 66 | Model_Jornada = ( 6 << 24 ), |
66 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), | 67 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), |
67 | 68 | ||
68 | Model_Zaurus = ( 2 << 24 ), | 69 | Model_Zaurus = ( 2 << 24 ), |
69 | 70 | ||
70 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), | 71 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), |
71 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), | 72 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), |
@@ -155,17 +156,17 @@ enum ODirection { | |||
155 | 156 | ||
156 | enum OHingeStatus { | 157 | enum OHingeStatus { |
157 | CASE_CLOSED = 3, | 158 | CASE_CLOSED = 3, |
158 | CASE_PORTRAIT = 2, | 159 | CASE_PORTRAIT = 2, |
159 | CASE_LANDSCAPE = 0, | 160 | CASE_LANDSCAPE = 0, |
160 | CASE_UNKNOWN = 1, | 161 | CASE_UNKNOWN = 1, |
161 | }; | 162 | }; |
162 | 163 | ||
163 | /* default button for qvfb or such | 164 | /* default button for qvfb or such |
164 | * see odevice.cpp for details. | 165 | * see odevice.cpp for details. |
165 | * hint: manage a user defined button for qvfb? | 166 | * hint: manage a user defined button for qvfb? |
166 | * alwin | 167 | * alwin |
167 | */ | 168 | */ |
168 | struct default_button { | 169 | struct default_button { |
169 | Qt::Key code; | 170 | Qt::Key code; |
170 | char *utext; | 171 | char *utext; |
171 | char *pix; | 172 | char *pix; |
@@ -190,17 +191,17 @@ class ODevice : public QObject | |||
190 | Q_OBJECT | 191 | Q_OBJECT |
191 | 192 | ||
192 | private: | 193 | private: |
193 | /* disable copy */ | 194 | /* disable copy */ |
194 | ODevice ( const ODevice & ); | 195 | ODevice ( const ODevice & ); |
195 | 196 | ||
196 | protected: | 197 | protected: |
197 | ODevice(); | 198 | ODevice(); |
198 | virtual void init(); | 199 | virtual void init(const QString&); |
199 | virtual void initButtons(); | 200 | virtual void initButtons(); |
200 | static void sendSuspendmsg(); | 201 | static void sendSuspendmsg(); |
201 | 202 | ||
202 | ODeviceData *d; | 203 | ODeviceData *d; |
203 | 204 | ||
204 | public: | 205 | public: |
205 | // sandman do we want to allow destructions? -zecke? | 206 | // sandman do we want to allow destructions? -zecke? |
206 | virtual ~ODevice(); | 207 | virtual ~ODevice(); |
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 98e2ffa..efe35e7 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -109,63 +109,61 @@ struct i_button ipaq_buttons [] = { | |||
109 | "buttonsettings", "raise()" }, | 109 | "buttonsettings", "raise()" }, |
110 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, | 110 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
111 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | 111 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
112 | "devicebuttons/ipaq_record", | 112 | "devicebuttons/ipaq_record", |
113 | "QPE/VMemo", "toggleRecord()", | 113 | "QPE/VMemo", "toggleRecord()", |
114 | "sound", "raise()" }, | 114 | "sound", "raise()" }, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | void iPAQ::init() | 117 | void iPAQ::init(const QString& model) |
118 | { | 118 | { |
119 | d->m_vendorstr = "HP"; | 119 | d->m_vendorstr = "HP"; |
120 | d->m_vendor = Vendor_HP; | 120 | d->m_vendor = Vendor_HP; |
121 | 121 | ||
122 | QFile f ( "/proc/hal/model" ); | 122 | d->m_modelstr = model.mid(model.findRev('H')); |
123 | |||
124 | if ( d->m_modelstr == "H3100" ) | ||
125 | d->m_model = Model_iPAQ_H31xx; | ||
126 | else if ( d->m_modelstr == "H3600" ) | ||
127 | d->m_model = Model_iPAQ_H36xx; | ||
128 | else if ( d->m_modelstr == "H3700" ) | ||
129 | d->m_model = Model_iPAQ_H37xx; | ||
130 | else if ( d->m_modelstr == "H3800" ) | ||
131 | d->m_model = Model_iPAQ_H38xx; | ||
132 | else if ( d->m_modelstr == "H3900" ) | ||
133 | d->m_model = Model_iPAQ_H39xx; | ||
134 | else if ( d->m_modelstr == "H5400" ) | ||
135 | d->m_model = Model_iPAQ_H5xxx; | ||
136 | else if ( d->m_modelstr == "H2200" ) | ||
137 | d->m_model = Model_iPAQ_H22xx; | ||
138 | else | ||
139 | d->m_model = Model_Unknown; | ||
123 | 140 | ||
124 | if ( f. open ( IO_ReadOnly )) { | ||
125 | QTextStream ts ( &f ); | ||
126 | 141 | ||
127 | d->m_modelstr = "H" + ts. readLine(); | ||
128 | |||
129 | if ( d->m_modelstr == "H3100" ) | ||
130 | d->m_model = Model_iPAQ_H31xx; | ||
131 | else if ( d->m_modelstr == "H3600" ) | ||
132 | d->m_model = Model_iPAQ_H36xx; | ||
133 | else if ( d->m_modelstr == "H3700" ) | ||
134 | d->m_model = Model_iPAQ_H37xx; | ||
135 | else if ( d->m_modelstr == "H3800" ) | ||
136 | d->m_model = Model_iPAQ_H38xx; | ||
137 | else if ( d->m_modelstr == "H3900" ) | ||
138 | d->m_model = Model_iPAQ_H39xx; | ||
139 | else if ( d->m_modelstr == "H5400" ) | ||
140 | d->m_model = Model_iPAQ_H5xxx; | ||
141 | else | ||
142 | d->m_model = Model_Unknown; | ||
143 | |||
144 | f. close(); | ||
145 | } | ||
146 | 142 | ||
147 | switch ( d->m_model ) { | 143 | switch ( d->m_model ) { |
148 | case Model_iPAQ_H31xx: | 144 | case Model_iPAQ_H31xx: |
149 | case Model_iPAQ_H38xx: | 145 | case Model_iPAQ_H38xx: |
150 | d->m_rotation = Rot90; | 146 | d->m_rotation = Rot90; |
151 | break; | 147 | break; |
148 | case Model_iPAQ_H5xxx: | ||
149 | case Model_iPAQ_H22xx: | ||
150 | d->m_rotation = Rot0; | ||
151 | break; | ||
152 | case Model_iPAQ_H36xx: | 152 | case Model_iPAQ_H36xx: |
153 | case Model_iPAQ_H37xx: | 153 | case Model_iPAQ_H37xx: |
154 | case Model_iPAQ_H39xx: | 154 | case Model_iPAQ_H39xx: |
155 | |||
156 | default: | 155 | default: |
157 | d->m_rotation = Rot270; | 156 | d->m_rotation = Rot270; |
158 | break; | 157 | break; |
159 | case Model_iPAQ_H5xxx: | 158 | |
160 | d->m_rotation = Rot0; | ||
161 | } | 159 | } |
162 | 160 | ||
163 | f. setName ( "/etc/familiar-version" ); | 161 | QFile f( "/etc/familiar-version" ); |
164 | if ( f. open ( IO_ReadOnly )) { | 162 | if ( f. open ( IO_ReadOnly )) { |
165 | d->m_systemstr = "Familiar"; | 163 | d->m_systemstr = "Familiar"; |
166 | d->m_system = System_Familiar; | 164 | d->m_system = System_Familiar; |
167 | 165 | ||
168 | QTextStream ts ( &f ); | 166 | QTextStream ts ( &f ); |
169 | d->m_sysverstr = ts. readLine(). mid ( 10 ); | 167 | d->m_sysverstr = ts. readLine(). mid ( 10 ); |
170 | 168 | ||
171 | f. close(); | 169 | f. close(); |
diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h index 968f715..cc0b8ac 100644 --- a/libopie2/opiecore/device/odevice_ipaq.h +++ b/libopie2/opiecore/device/odevice_ipaq.h | |||
@@ -38,17 +38,17 @@ | |||
38 | namespace Opie { | 38 | namespace Opie { |
39 | namespace Core { | 39 | namespace Core { |
40 | namespace Internal { | 40 | namespace Internal { |
41 | 41 | ||
42 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter | 42 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter |
43 | { | 43 | { |
44 | 44 | ||
45 | protected: | 45 | protected: |
46 | virtual void init(); | 46 | virtual void init(const QString&); |
47 | virtual void initButtons(); | 47 | virtual void initButtons(); |
48 | 48 | ||
49 | public: | 49 | public: |
50 | virtual bool setSoftSuspend( bool soft ); | 50 | virtual bool setSoftSuspend( bool soft ); |
51 | 51 | ||
52 | virtual bool setDisplayBrightness( int b ); | 52 | virtual bool setDisplayBrightness( int b ); |
53 | virtual int displayBrightnessResolution() const; | 53 | virtual int displayBrightnessResolution() const; |
54 | 54 | ||
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index eaa93ca..ad2f830 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -74,17 +74,17 @@ typedef struct { | |||
74 | unsigned char brightness; | 74 | unsigned char brightness; |
75 | } FLITE_IN; | 75 | } FLITE_IN; |
76 | 76 | ||
77 | #define LED_ON OD_IOW( 'f', 5, LED_IN ) | 77 | #define LED_ON OD_IOW( 'f', 5, LED_IN ) |
78 | #define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) | 78 | #define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) |
79 | 79 | ||
80 | using namespace Opie::Core::Internal; | 80 | using namespace Opie::Core::Internal; |
81 | 81 | ||
82 | void Jornada::init() | 82 | void Jornada::init(const QString&) |
83 | { | 83 | { |
84 | d->m_vendorstr = "HP"; | 84 | d->m_vendorstr = "HP"; |
85 | d->m_vendor = Vendor_HP; | 85 | d->m_vendor = Vendor_HP; |
86 | d->m_modelstr = "Jornada 56x"; | 86 | d->m_modelstr = "Jornada 56x"; |
87 | d->m_model = Model_Jornada_56x; | 87 | d->m_model = Model_Jornada_56x; |
88 | d->m_systemstr = "Familiar"; | 88 | d->m_systemstr = "Familiar"; |
89 | d->m_system = System_Familiar; | 89 | d->m_system = System_Familiar; |
90 | d->m_rotation = Rot0; | 90 | d->m_rotation = Rot0; |
diff --git a/libopie2/opiecore/device/odevice_jornada.h b/libopie2/opiecore/device/odevice_jornada.h index e2e67af..fddfe34 100644 --- a/libopie2/opiecore/device/odevice_jornada.h +++ b/libopie2/opiecore/device/odevice_jornada.h | |||
@@ -34,17 +34,17 @@ | |||
34 | 34 | ||
35 | namespace Opie { | 35 | namespace Opie { |
36 | namespace Core { | 36 | namespace Core { |
37 | namespace Internal { | 37 | namespace Internal { |
38 | class Jornada : public ODevice | 38 | class Jornada : public ODevice |
39 | { | 39 | { |
40 | 40 | ||
41 | protected: | 41 | protected: |
42 | virtual void init(); | 42 | virtual void init(const QString&); |
43 | 43 | ||
44 | public: | 44 | public: |
45 | virtual bool setSoftSuspend ( bool soft ); | 45 | virtual bool setSoftSuspend ( bool soft ); |
46 | virtual bool setDisplayBrightness ( int b ); | 46 | virtual bool setDisplayBrightness ( int b ); |
47 | virtual int displayBrightnessResolution() const; | 47 | virtual int displayBrightnessResolution() const; |
48 | }; | 48 | }; |
49 | } | 49 | } |
50 | } | 50 | } |
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index 10b7b61..32467f1 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp | |||
@@ -64,17 +64,17 @@ struct r_button ramses_buttons [] = { | |||
64 | "QPE/TaskBar", "toggleStartMenu()" }, | 64 | "QPE/TaskBar", "toggleStartMenu()" }, |
65 | { Model_Ramses_MNCI, | 65 | { Model_Ramses_MNCI, |
66 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 66 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
67 | "devicebuttons/ipaq_home", | 67 | "devicebuttons/ipaq_home", |
68 | "QPE/Launcher", "home()", | 68 | "QPE/Launcher", "home()", |
69 | "buttonsettings", "raise()" }, | 69 | "buttonsettings", "raise()" }, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | void Ramses::init() | 72 | void Ramses::init(const QString&) |
73 | { | 73 | { |
74 | d->m_vendorstr = "M und N"; | 74 | d->m_vendorstr = "M und N"; |
75 | d->m_vendor = Vendor_MundN; | 75 | d->m_vendor = Vendor_MundN; |
76 | 76 | ||
77 | QFile f("/proc/sys/board/ramses"); | 77 | QFile f("/proc/sys/board/ramses"); |
78 | 78 | ||
79 | d->m_modelstr = "Ramses"; | 79 | d->m_modelstr = "Ramses"; |
80 | d->m_model = Model_Ramses_MNCI; | 80 | d->m_model = Model_Ramses_MNCI; |
diff --git a/libopie2/opiecore/device/odevice_ramses.h b/libopie2/opiecore/device/odevice_ramses.h index aea9e2a..3cf5e92 100644 --- a/libopie2/opiecore/device/odevice_ramses.h +++ b/libopie2/opiecore/device/odevice_ramses.h | |||
@@ -36,17 +36,17 @@ | |||
36 | 36 | ||
37 | namespace Opie { | 37 | namespace Opie { |
38 | namespace Core { | 38 | namespace Core { |
39 | namespace Internal { | 39 | namespace Internal { |
40 | 40 | ||
41 | class Ramses : public ODevice, public QWSServer::KeyboardFilter | 41 | class Ramses : public ODevice, public QWSServer::KeyboardFilter |
42 | { | 42 | { |
43 | protected: | 43 | protected: |
44 | virtual void init(); | 44 | virtual void init(const QString&); |
45 | 45 | ||
46 | public: | 46 | public: |
47 | virtual bool setSoftSuspend( bool soft ); | 47 | virtual bool setSoftSuspend( bool soft ); |
48 | virtual bool suspend(); | 48 | virtual bool suspend(); |
49 | 49 | ||
50 | virtual bool setDisplayStatus( bool on ); | 50 | virtual bool setDisplayStatus( bool on ); |
51 | virtual bool setDisplayBrightness( int b ); | 51 | virtual bool setDisplayBrightness( int b ); |
52 | virtual int displayBrightnessResolution() const; | 52 | virtual int displayBrightnessResolution() const; |
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index e9481bb..6630763 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp | |||
@@ -107,17 +107,17 @@ struct s_button simpad_buttons [] = { | |||
107 | { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, | 107 | { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, |
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 | ||
115 | void SIMpad::init() | 115 | void 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" ); | 120 | QFile f ( "/proc/hal/model" ); |
121 | 121 | ||
122 | //TODO Implement model checking | 122 | //TODO Implement model checking |
123 | //FIXME For now we assume an SL4 | 123 | //FIXME For now we assume an SL4 |
diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h index 3d5acb5..0f4e66f 100644 --- a/libopie2/opiecore/device/odevice_simpad.h +++ b/libopie2/opiecore/device/odevice_simpad.h | |||
@@ -37,17 +37,17 @@ | |||
37 | 37 | ||
38 | namespace Opie { | 38 | namespace Opie { |
39 | namespace Core { | 39 | namespace Core { |
40 | namespace Internal { | 40 | namespace Internal { |
41 | 41 | ||
42 | class SIMpad : public ODevice, public QWSServer::KeyboardFilter | 42 | class SIMpad : public ODevice, public QWSServer::KeyboardFilter |
43 | { | 43 | { |
44 | protected: | 44 | protected: |
45 | virtual void init(); | 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 ); |
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index 4e9f227..493ed25 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -66,17 +66,17 @@ struct yopy_button yopy_buttons [] = { | |||
66 | "addressbook", "raise()", | 66 | "addressbook", "raise()", |
67 | "addressbook", "beamBusinessCard()" }, | 67 | "addressbook", "beamBusinessCard()" }, |
68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), | 68 | { Qt::Key_F12, QT_TRANSLATE_NOOP( "Button", "End Button" ), |
69 | "devicebuttons/yopy_end", | 69 | "devicebuttons/yopy_end", |
70 | "QPE/Launcher", "home()", | 70 | "QPE/Launcher", "home()", |
71 | "buttonsettings", "raise()" }, | 71 | "buttonsettings", "raise()" }, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | void Yopy::init() | 74 | void Yopy::init(const QString&) |
75 | { | 75 | { |
76 | d->m_vendorstr = "G.Mate"; | 76 | d->m_vendorstr = "G.Mate"; |
77 | d->m_vendor = Vendor_GMate; | 77 | d->m_vendor = Vendor_GMate; |
78 | d->m_modelstr = "Yopy3700"; | 78 | d->m_modelstr = "Yopy3700"; |
79 | d->m_model = Model_Yopy_3700; | 79 | d->m_model = Model_Yopy_3700; |
80 | d->m_rotation = Rot0; | 80 | d->m_rotation = Rot0; |
81 | 81 | ||
82 | d->m_systemstr = "Linupy"; | 82 | d->m_systemstr = "Linupy"; |
diff --git a/libopie2/opiecore/device/odevice_yopy.h b/libopie2/opiecore/device/odevice_yopy.h index 6e1db88..f6bf061 100644 --- a/libopie2/opiecore/device/odevice_yopy.h +++ b/libopie2/opiecore/device/odevice_yopy.h | |||
@@ -34,17 +34,17 @@ _;:, .> :=|. This program is free software; you can | |||
34 | 34 | ||
35 | namespace Opie { | 35 | namespace Opie { |
36 | namespace Core { | 36 | namespace Core { |
37 | namespace Internal { | 37 | namespace Internal { |
38 | class Yopy : public ODevice | 38 | class Yopy : public ODevice |
39 | { | 39 | { |
40 | protected: | 40 | protected: |
41 | 41 | ||
42 | virtual void init(); | 42 | virtual void init(const QString&); |
43 | virtual void initButtons(); | 43 | virtual void initButtons(); |
44 | 44 | ||
45 | public: | 45 | public: |
46 | virtual bool suspend(); | 46 | virtual bool suspend(); |
47 | 47 | ||
48 | virtual bool setDisplayBrightness ( int b ); | 48 | virtual bool setDisplayBrightness ( int b ); |
49 | virtual int displayBrightnessResolution() const; | 49 | virtual int displayBrightnessResolution() const; |
50 | }; | 50 | }; |
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 1434e69..e8b813e 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -110,17 +110,17 @@ struct z_button z_buttons_c700 [] = { | |||
110 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, and C860) | 110 | // Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, and C860) |
111 | // | 111 | // |
112 | // Only question right now is: Do we really need to do it? Because as soon | 112 | // Only question right now is: Do we really need to do it? Because as soon |
113 | // as the OpenZaurus kernel is ready, there will be a unified interface for all | 113 | // as the OpenZaurus kernel is ready, there will be a unified interface for all |
114 | // Zaurus models (concerning apm, backlight, buttons, etc.) | 114 | // Zaurus models (concerning apm, backlight, buttons, etc.) |
115 | // | 115 | // |
116 | // Comments? - mickeyl. | 116 | // Comments? - mickeyl. |
117 | 117 | ||
118 | void Zaurus::init() | 118 | void Zaurus::init(const QString&) |
119 | { | 119 | { |
120 | d->m_vendorstr = "Sharp"; | 120 | d->m_vendorstr = "Sharp"; |
121 | d->m_vendor = Vendor_Sharp; | 121 | d->m_vendor = Vendor_Sharp; |
122 | m_embedix = true; // Not openzaurus means: It has an embedix kernel ! | 122 | m_embedix = true; // Not openzaurus means: It has an embedix kernel ! |
123 | 123 | ||
124 | // QFile f ( "/proc/filesystems" ); | 124 | // QFile f ( "/proc/filesystems" ); |
125 | QString model; | 125 | QString model; |
126 | 126 | ||
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index a0b1787..76a40d6 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -48,17 +48,17 @@ | |||
48 | 48 | ||
49 | namespace Opie { | 49 | namespace Opie { |
50 | namespace Core { | 50 | namespace Core { |
51 | namespace Internal { | 51 | namespace Internal { |
52 | class Zaurus : public ODevice | 52 | class Zaurus : public ODevice |
53 | { | 53 | { |
54 | 54 | ||
55 | protected: | 55 | protected: |
56 | virtual void init(); | 56 | virtual void init(const QString&); |
57 | virtual void initButtons(); | 57 | virtual void initButtons(); |
58 | 58 | ||
59 | public: | 59 | public: |
60 | virtual bool setSoftSuspend ( bool soft ); | 60 | virtual bool setSoftSuspend ( bool soft ); |
61 | 61 | ||
62 | virtual bool setDisplayBrightness ( int b ); | 62 | virtual bool setDisplayBrightness ( int b ); |
63 | virtual int displayBrightnessResolution() const; | 63 | virtual int displayBrightnessResolution() const; |
64 | 64 | ||