-rw-r--r-- | inputmethods/keyboard/keyboard.cpp | 1 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboard.h | 5 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboardimpl.cpp | 8 | ||||
-rw-r--r-- | inputmethods/keyboard/keyboardimpl.h | 13 |
4 files changed, 20 insertions, 7 deletions
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp index 0f0b188..a85a7b1 100644 --- a/inputmethods/keyboard/keyboard.cpp +++ b/inputmethods/keyboard/keyboard.cpp @@ -30,6 +30,7 @@ #include <sys/utsname.h> +using namespace KeyboardInput; #define USE_SMALL_BACKSPACE diff --git a/inputmethods/keyboard/keyboard.h b/inputmethods/keyboard/keyboard.h index 38ae338..cc7f3f5 100644 --- a/inputmethods/keyboard/keyboard.h +++ b/inputmethods/keyboard/keyboard.h @@ -23,6 +23,9 @@ class QTimer; +namespace KeyboardInput +{ + class KeyboardConfig : public DictFilterConfig { public: @@ -101,3 +104,5 @@ private: QTimer *repeatTimer; }; +} // namespace KeyboardInput + diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp index bc96402..3c77fe6 100644 --- a/inputmethods/keyboard/keyboardimpl.cpp +++ b/inputmethods/keyboard/keyboardimpl.cpp @@ -23,7 +23,7 @@ #include "keyboardimpl.h" /* XPM */ -static const char * kb_xpm[] = { +static const char * const kb_xpm[] = { "28 13 4 1", " c None", ". c #4C4C4C", @@ -45,7 +45,7 @@ static const char * kb_xpm[] = { /* XPM */ -static char * opti_xpm[] = { +static const char * const ipti_xpm[] = { "28 13 4 1", " c None", ". c #4C4C4C", @@ -65,8 +65,6 @@ static char * opti_xpm[] = { " .+@@.+@@.+@@.+@@.+@@.+@@. ", " ......................... "}; - - KeyboardImpl::KeyboardImpl() : input(0), icn(0), ref(0) { @@ -81,7 +79,7 @@ KeyboardImpl::~KeyboardImpl() QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) { if ( !input ) - input = new Keyboard( parent, "Keyboard", f ); + input = new KeyboardInput::Keyboard( parent, "Keyboard", f ); return input; } diff --git a/inputmethods/keyboard/keyboardimpl.h b/inputmethods/keyboard/keyboardimpl.h index e756364..d33a822 100644 --- a/inputmethods/keyboard/keyboardimpl.h +++ b/inputmethods/keyboard/keyboardimpl.h @@ -22,9 +22,16 @@ #include <qpe/inputmethodinterface.h> -class Keyboard; +namespace KeyboardInput +{ + class Keyboard; +} + class QPixmap; +namespace +{ + class KeyboardImpl : public InputMethodInterface { public: @@ -43,9 +50,11 @@ public: virtual void onKeyPress( QObject *receiver, const char *slot ); private: - Keyboard *input; + KeyboardInput::Keyboard *input; QPixmap *icn; ulong ref; }; +} // anonymous namespace + #endif |