summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp27
-rw-r--r--libopie2/opiecore/device/odevice_simpad.h12
2 files changed, 23 insertions, 16 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index ebf0cbb..9fde7f9 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -54,12 +54,24 @@
#ifndef QT_NO_SOUND
#include <linux/soundcard.h>
#endif
-using namespace Opie::Core;
-using namespace Opie::Core::Internal;
+namespace Opie {
+namespace Core {
+namespace Internal {
+namespace {
+struct s_button {
+ uint model;
+ Qt::Key code;
+ char *utext;
+ char *pix;
+ char *fpressedservice;
+ char *fpressedaction;
+ char *fheldservice;
+ char *fheldaction;
+};
-struct s_button simpad_buttons [] = {
+static struct s_button simpad_buttons [] = {
{ Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus,
Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Lower+Up"),
"devicebuttons/simpad_lower_up",
"datebook", "nextView()",
@@ -112,8 +124,10 @@ struct s_button simpad_buttons [] = {
"QPE/Launcher", "home()",
"buttonsettings", "raise()" },
*/
};
+}
+
void SIMpad::init(const QString&)
{
d->m_vendorstr = "SIEMENS";
@@ -148,9 +162,10 @@ void SIMpad::initButtons()
return;
d->m_buttons = new QValueList <ODeviceButton>;
- for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) {
+ uint size = sizeof(simpad_buttons)/sizeof(s_button);
+ for ( uint i = 0; i < size; i++ ) {
s_button *sb = simpad_buttons + i;
ODeviceButton b;
if (( sb->model & d->m_model ) == d->m_model ) {
@@ -380,4 +395,8 @@ void SIMpad::updateAllWidgets() {
}
delete list;
}
+
+}
+}
+}
diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h
index c25b911..41b94d1 100644
--- a/libopie2/opiecore/device/odevice_simpad.h
+++ b/libopie2/opiecore/device/odevice_simpad.h
@@ -67,20 +67,8 @@ protected:
OLedState m_leds [2];
private:
static void updateAllWidgets();
};
-
-struct s_button {
- uint model;
- Qt::Key code;
- char *utext;
- char *pix;
- char *fpressedservice;
- char *fpressedaction;
- char *fheldservice;
- char *fheldaction;
-};
-
}
}
}