Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index 6c3253c..bf46e43 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp | |||
@@ -126,50 +126,49 @@ void SIMpad::init(const QString&) | |||
126 | d->m_model = Model_SIMpad_SL4; | 126 | d->m_model = Model_SIMpad_SL4; |
127 | 127 | ||
128 | switch ( d->m_model ) { | 128 | switch ( d->m_model ) { |
129 | default: | 129 | default: |
130 | d->m_rotation = Rot0; | 130 | d->m_rotation = Rot0; |
131 | d->m_direction = CCW; | 131 | d->m_direction = CCW; |
132 | d->m_holdtime = 1000; // 1000ms | 132 | d->m_holdtime = 1000; // 1000ms |
133 | 133 | ||
134 | break; | 134 | break; |
135 | } | 135 | } |
136 | 136 | ||
137 | //Distribution detecting code is now in base class | 137 | //Distribution detecting code is now in base class |
138 | m_leds [0] = m_leds [1] = Led_Off; | 138 | m_leds [0] = m_leds [1] = Led_Off; |
139 | 139 | ||
140 | m_power_timer = 0; | 140 | m_power_timer = 0; |
141 | 141 | ||
142 | } | 142 | } |
143 | 143 | ||
144 | void SIMpad::initButtons() | 144 | void SIMpad::initButtons() |
145 | { | 145 | { |
146 | if ( d->m_buttons ) | 146 | if ( d->m_buttons ) |
147 | return; | 147 | return; |
148 | 148 | ||
149 | if ( isQWS( ) ) { | 149 | if ( isQWS( ) ) { |
150 | Opie::Core::OKeyFilter::inst()->addPreHandler(this); | 150 | addPreHandler(this); |
151 | // QWSServer::setKeyboardFilter ( this ); | ||
152 | } | 151 | } |
153 | 152 | ||
154 | 153 | ||
155 | d->m_buttons = new QValueList <ODeviceButton>; | 154 | d->m_buttons = new QValueList <ODeviceButton>; |
156 | 155 | ||
157 | for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { | 156 | for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { |
158 | s_button *sb = simpad_buttons + i; | 157 | s_button *sb = simpad_buttons + i; |
159 | ODeviceButton b; | 158 | ODeviceButton b; |
160 | 159 | ||
161 | if (( sb->model & d->m_model ) == d->m_model ) { | 160 | if (( sb->model & d->m_model ) == d->m_model ) { |
162 | b. setKeycode ( sb->code ); | 161 | b. setKeycode ( sb->code ); |
163 | b. setUserText ( QObject::tr ( "Button", sb->utext )); | 162 | b. setUserText ( QObject::tr ( "Button", sb->utext )); |
164 | b. setPixmap ( Resource::loadPixmap ( sb->pix )); | 163 | b. setPixmap ( Resource::loadPixmap ( sb->pix )); |
165 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb->fpressedservice ), sb->fpressedaction )); | 164 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb->fpressedservice ), sb->fpressedaction )); |
166 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb->fheldservice ), sb->fheldaction )); | 165 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb->fheldservice ), sb->fheldaction )); |
167 | 166 | ||
168 | d->m_buttons->append ( b ); | 167 | d->m_buttons->append ( b ); |
169 | } | 168 | } |
170 | } | 169 | } |
171 | reloadButtonMapping(); | 170 | reloadButtonMapping(); |
172 | 171 | ||
173 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | 172 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); |
174 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); | 173 | connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); |
175 | } | 174 | } |