summaryrefslogtreecommitdiff
authordavipt <davipt>2002-06-28 13:36:05 (UTC)
committer davipt <davipt>2002-06-28 13:36:05 (UTC)
commitd4626cc76127b7022c8555ea11afbb289714c851 (patch) (unidiff)
tree3c4606b2574285f324c21ef78fd47ba6e55d8219
parenta94b5ab5cee9922fc02deb14a252b0c998dde1f7 (diff)
downloadopie-d4626cc76127b7022c8555ea11afbb289714c851.zip
opie-d4626cc76127b7022c8555ea11afbb289714c851.tar.gz
opie-d4626cc76127b7022c8555ea11afbb289714c851.tar.bz2
Fix bug #9 except that we need something else to translate keyboard names.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dvorak/dvorakimpl.cpp4
-rw-r--r--inputmethods/handwriting/handwritingimpl.cpp3
-rw-r--r--inputmethods/jumpx/keyboardimpl.cpp3
-rw-r--r--inputmethods/keyboard/keyboardimpl.cpp4
-rw-r--r--inputmethods/kjumpx/keyboardimpl.cpp3
-rw-r--r--inputmethods/pickboard/pickboardimpl.cpp3
-rw-r--r--inputmethods/unikeyboard/unikeyboardimpl.cpp3
7 files changed, 14 insertions, 9 deletions
diff --git a/inputmethods/dvorak/dvorakimpl.cpp b/inputmethods/dvorak/dvorakimpl.cpp
index 5b83b8f..d58b6b9 100644
--- a/inputmethods/dvorak/dvorakimpl.cpp
+++ b/inputmethods/dvorak/dvorakimpl.cpp
@@ -79,50 +79,50 @@ KeyboardImpl::~KeyboardImpl()
79} 79}
80 80
81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
82{ 82{
83 if ( !input ) 83 if ( !input )
84 input = new Keyboard( parent, "Keyboard", f ); 84 input = new Keyboard( parent, "Keyboard", f );
85 return input; 85 return input;
86} 86}
87 87
88void KeyboardImpl::resetState() 88void KeyboardImpl::resetState()
89{ 89{
90 if ( input ) 90 if ( input )
91 input->resetState(); 91 input->resetState();
92} 92}
93 93
94QPixmap *KeyboardImpl::icon() 94QPixmap *KeyboardImpl::icon()
95{ 95{
96 if ( !icn ) 96 if ( !icn )
97 icn = new QPixmap( (const char **)kb_xpm ); 97 icn = new QPixmap( (const char **)kb_xpm );
98 return icn; 98 return icn;
99} 99}
100 100
101QString KeyboardImpl::name() 101QString KeyboardImpl::name()
102{ 102{
103 return qApp->translate( "InputMethods", "Dvorak" ); 103 // return qApp->translate( "InputMethods", "Dvorak" );
104// return qApp->translate( "InputMethods", "Opti" ); 104 return "Dvorak";
105} 105}
106 106
107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
108{ 108{
109 if ( input ) 109 if ( input )
110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
111} 111}
112 112
113#ifndef QT_NO_COMPONENT 113#ifndef QT_NO_COMPONENT
114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
115{ 115{
116 *iface = 0; 116 *iface = 0;
117 if ( uuid == IID_QUnknown ) 117 if ( uuid == IID_QUnknown )
118 *iface = this; 118 *iface = this;
119 else if ( uuid == IID_InputMethod ) 119 else if ( uuid == IID_InputMethod )
120 *iface = this; 120 *iface = this;
121 121
122 if ( *iface ) 122 if ( *iface )
123 (*iface)->addRef(); 123 (*iface)->addRef();
124 return QS_OK; 124 return QS_OK;
125} 125}
126 126
127Q_EXPORT_INTERFACE() 127Q_EXPORT_INTERFACE()
128{ 128{
diff --git a/inputmethods/handwriting/handwritingimpl.cpp b/inputmethods/handwriting/handwritingimpl.cpp
index c39e1aa..0ea140c 100644
--- a/inputmethods/handwriting/handwritingimpl.cpp
+++ b/inputmethods/handwriting/handwritingimpl.cpp
@@ -62,49 +62,50 @@ HandwritingImpl::~HandwritingImpl()
62} 62}
63 63
64QWidget *HandwritingImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 64QWidget *HandwritingImpl::inputMethod( QWidget *parent, Qt::WFlags f )
65{ 65{
66 if ( !input ) 66 if ( !input )
67 input = new QIMPenInput( parent, "Handwriting", f ); 67 input = new QIMPenInput( parent, "Handwriting", f );
68 return input; 68 return input;
69} 69}
70 70
71void HandwritingImpl::resetState() 71void HandwritingImpl::resetState()
72{ 72{
73 if ( input ) 73 if ( input )
74 input->resetState(); 74 input->resetState();
75} 75}
76 76
77QPixmap *HandwritingImpl::icon() 77QPixmap *HandwritingImpl::icon()
78{ 78{
79 if ( !icn ) 79 if ( !icn )
80 icn = new QPixmap( (const char **)pen_xpm ); 80 icn = new QPixmap( (const char **)pen_xpm );
81 return icn; 81 return icn;
82} 82}
83 83
84QString HandwritingImpl::name() 84QString HandwritingImpl::name()
85{ 85{
86 return qApp->translate( "InputMethods", "Handwriting" ); 86 // return qApp->translate( "InputMethods", "Handwriting" );
87 return "Handwriting";
87} 88}
88 89
89void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot ) 90void HandwritingImpl::onKeyPress( QObject *receiver, const char *slot )
90{ 91{
91 if ( input ) 92 if ( input )
92 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 93 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
93} 94}
94 95
95#ifndef QT_NO_COMPONENT 96#ifndef QT_NO_COMPONENT
96QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 97QRESULT HandwritingImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
97{ 98{
98 *iface = 0; 99 *iface = 0;
99 if ( uuid == IID_QUnknown ) 100 if ( uuid == IID_QUnknown )
100 *iface = this; 101 *iface = this;
101 else if ( uuid == IID_InputMethod ) 102 else if ( uuid == IID_InputMethod )
102 *iface = this; 103 *iface = this;
103 104
104 if ( *iface ) 105 if ( *iface )
105 (*iface)->addRef(); 106 (*iface)->addRef();
106 return QS_OK; 107 return QS_OK;
107} 108}
108 109
109Q_EXPORT_INTERFACE() 110Q_EXPORT_INTERFACE()
110{ 111{
diff --git a/inputmethods/jumpx/keyboardimpl.cpp b/inputmethods/jumpx/keyboardimpl.cpp
index 92abb09..004f0b0 100644
--- a/inputmethods/jumpx/keyboardimpl.cpp
+++ b/inputmethods/jumpx/keyboardimpl.cpp
@@ -46,49 +46,50 @@ KeyboardImpl::~KeyboardImpl()
46} 46}
47 47
48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
49{ 49{
50 if ( !input ) 50 if ( !input )
51 input = new Keyboard( parent, "Keyboard", f ); 51 input = new Keyboard( parent, "Keyboard", f );
52 return input; 52 return input;
53} 53}
54 54
55void KeyboardImpl::resetState() 55void KeyboardImpl::resetState()
56{ 56{
57 if ( input ) 57 if ( input )
58 input->resetState(); 58 input->resetState();
59} 59}
60 60
61QPixmap *KeyboardImpl::icon() 61QPixmap *KeyboardImpl::icon()
62{ 62{
63 if ( !icn ) 63 if ( !icn )
64 icn = new QPixmap( (const char **)icon_xpm ); 64 icn = new QPixmap( (const char **)icon_xpm );
65 return icn; 65 return icn;
66} 66}
67 67
68QString KeyboardImpl::name() 68QString KeyboardImpl::name()
69{ 69{
70 return qApp->translate( "InputMethods", "JumpX" ); 70 // return qApp->translate( "InputMethods", "JumpX" );
71 return "JumpX";
71} 72}
72 73
73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 74void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
74{ 75{
75 if ( input ) 76 if ( input )
76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 77 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
77} 78}
78 79
79#ifndef QT_NO_COMPONENT 80#ifndef QT_NO_COMPONENT
80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 81QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
81{ 82{
82 *iface = 0; 83 *iface = 0;
83 if ( uuid == IID_QUnknown ) 84 if ( uuid == IID_QUnknown )
84 *iface = this; 85 *iface = this;
85 else if ( uuid == IID_InputMethod ) 86 else if ( uuid == IID_InputMethod )
86 *iface = this; 87 *iface = this;
87 88
88 if ( *iface ) 89 if ( *iface )
89 (*iface)->addRef(); 90 (*iface)->addRef();
90 return QS_OK; 91 return QS_OK;
91} 92}
92 93
93Q_EXPORT_INTERFACE() 94Q_EXPORT_INTERFACE()
94{ 95{
diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp
index ea61272..56e6870 100644
--- a/inputmethods/keyboard/keyboardimpl.cpp
+++ b/inputmethods/keyboard/keyboardimpl.cpp
@@ -79,50 +79,50 @@ KeyboardImpl::~KeyboardImpl()
79} 79}
80 80
81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 81QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
82{ 82{
83 if ( !input ) 83 if ( !input )
84 input = new Keyboard( parent, "Keyboard", f ); 84 input = new Keyboard( parent, "Keyboard", f );
85 return input; 85 return input;
86} 86}
87 87
88void KeyboardImpl::resetState() 88void KeyboardImpl::resetState()
89{ 89{
90 if ( input ) 90 if ( input )
91 input->resetState(); 91 input->resetState();
92} 92}
93 93
94QPixmap *KeyboardImpl::icon() 94QPixmap *KeyboardImpl::icon()
95{ 95{
96 if ( !icn ) 96 if ( !icn )
97 icn = new QPixmap( (const char **)kb_xpm ); 97 icn = new QPixmap( (const char **)kb_xpm );
98 return icn; 98 return icn;
99} 99}
100 100
101QString KeyboardImpl::name() 101QString KeyboardImpl::name()
102{ 102{
103 return qApp->translate( "InputMethods", "Keyboard" ); 103 // return qApp->translate( "InputMethods", "Keyboard" );
104// return qApp->translate( "InputMethods", "Opti" ); 104 return "Keyboard";
105} 105}
106 106
107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 107void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
108{ 108{
109 if ( input ) 109 if ( input )
110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 110 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
111} 111}
112 112
113#ifndef QT_NO_COMPONENT 113#ifndef QT_NO_COMPONENT
114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 114QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
115{ 115{
116 *iface = 0; 116 *iface = 0;
117 if ( uuid == IID_QUnknown ) 117 if ( uuid == IID_QUnknown )
118 *iface = this; 118 *iface = this;
119 else if ( uuid == IID_InputMethod ) 119 else if ( uuid == IID_InputMethod )
120 *iface = this; 120 *iface = this;
121 121
122 if ( *iface ) 122 if ( *iface )
123 (*iface)->addRef(); 123 (*iface)->addRef();
124 return QS_OK; 124 return QS_OK;
125} 125}
126 126
127Q_EXPORT_INTERFACE() 127Q_EXPORT_INTERFACE()
128{ 128{
diff --git a/inputmethods/kjumpx/keyboardimpl.cpp b/inputmethods/kjumpx/keyboardimpl.cpp
index 5d8e0d3..dbae2b4 100644
--- a/inputmethods/kjumpx/keyboardimpl.cpp
+++ b/inputmethods/kjumpx/keyboardimpl.cpp
@@ -46,49 +46,50 @@ KeyboardImpl::~KeyboardImpl()
46} 46}
47 47
48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 48QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
49{ 49{
50 if ( !input ) 50 if ( !input )
51 input = new Keyboard( parent, "Keyboard", f ); 51 input = new Keyboard( parent, "Keyboard", f );
52 return input; 52 return input;
53} 53}
54 54
55void KeyboardImpl::resetState() 55void KeyboardImpl::resetState()
56{ 56{
57 if ( input ) 57 if ( input )
58 input->resetState(); 58 input->resetState();
59} 59}
60 60
61QPixmap *KeyboardImpl::icon() 61QPixmap *KeyboardImpl::icon()
62{ 62{
63 if ( !icn ) 63 if ( !icn )
64 icn = new QPixmap( (const char **)icon_xpm ); 64 icn = new QPixmap( (const char **)icon_xpm );
65 return icn; 65 return icn;
66} 66}
67 67
68QString KeyboardImpl::name() 68QString KeyboardImpl::name()
69{ 69{
70 return qApp->translate( "InputMethods", "KJumpX" ); 70 // return qApp->translate( "InputMethods", "KJumpX" );
71 return "KJumpX";
71} 72}
72 73
73void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 74void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
74{ 75{
75 if ( input ) 76 if ( input )
76 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 77 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
77} 78}
78 79
79#ifndef QT_NO_COMPONENT 80#ifndef QT_NO_COMPONENT
80QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 81QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
81{ 82{
82 *iface = 0; 83 *iface = 0;
83 if ( uuid == IID_QUnknown ) 84 if ( uuid == IID_QUnknown )
84 *iface = this; 85 *iface = this;
85 else if ( uuid == IID_InputMethod ) 86 else if ( uuid == IID_InputMethod )
86 *iface = this; 87 *iface = this;
87 88
88 if ( *iface ) 89 if ( *iface )
89 (*iface)->addRef(); 90 (*iface)->addRef();
90 return QS_OK; 91 return QS_OK;
91} 92}
92 93
93Q_EXPORT_INTERFACE() 94Q_EXPORT_INTERFACE()
94{ 95{
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp
index a4e8f02..617acff 100644
--- a/inputmethods/pickboard/pickboardimpl.cpp
+++ b/inputmethods/pickboard/pickboardimpl.cpp
@@ -49,49 +49,50 @@ PickboardImpl::~PickboardImpl()
49} 49}
50 50
51QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 51QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
52{ 52{
53 if ( !pickboard ) 53 if ( !pickboard )
54 pickboard = new Pickboard( parent, "pickboard", f ); 54 pickboard = new Pickboard( parent, "pickboard", f );
55 return pickboard; 55 return pickboard;
56} 56}
57 57
58void PickboardImpl::resetState() 58void PickboardImpl::resetState()
59{ 59{
60 if ( pickboard ) 60 if ( pickboard )
61 pickboard->resetState(); 61 pickboard->resetState();
62} 62}
63 63
64QPixmap *PickboardImpl::icon() 64QPixmap *PickboardImpl::icon()
65{ 65{
66 if ( !icn ) 66 if ( !icn )
67 icn = new QPixmap( (const char **)pb_xpm ); 67 icn = new QPixmap( (const char **)pb_xpm );
68 return icn; 68 return icn;
69} 69}
70 70
71QString PickboardImpl::name() 71QString PickboardImpl::name()
72{ 72{
73 return qApp->translate( "InputMethods", "Pickboard" ); 73 // return qApp->translate( "InputMethods", "Pickboard" );
74 return "Pickboard";
74} 75}
75 76
76void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) 77void PickboardImpl::onKeyPress( QObject *receiver, const char *slot )
77{ 78{
78 if ( pickboard ) 79 if ( pickboard )
79 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 80 QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
80} 81}
81 82
82#ifndef QT_NO_COMPONENT 83#ifndef QT_NO_COMPONENT
83QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 84QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
84{ 85{
85 *iface = 0; 86 *iface = 0;
86 if ( uuid == IID_QUnknown ) 87 if ( uuid == IID_QUnknown )
87 *iface = this; 88 *iface = this;
88 else if ( uuid == IID_InputMethod ) 89 else if ( uuid == IID_InputMethod )
89 *iface = this; 90 *iface = this;
90 91
91 if ( *iface ) 92 if ( *iface )
92 (*iface)->addRef(); 93 (*iface)->addRef();
93 return QS_OK; 94 return QS_OK;
94} 95}
95 96
96Q_EXPORT_INTERFACE() 97Q_EXPORT_INTERFACE()
97{ 98{
diff --git a/inputmethods/unikeyboard/unikeyboardimpl.cpp b/inputmethods/unikeyboard/unikeyboardimpl.cpp
index fe601e0..aa05b31 100644
--- a/inputmethods/unikeyboard/unikeyboardimpl.cpp
+++ b/inputmethods/unikeyboard/unikeyboardimpl.cpp
@@ -54,49 +54,50 @@ UniKeyboardImpl::~UniKeyboardImpl()
54} 54}
55 55
56QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 56QWidget *UniKeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
57{ 57{
58 if ( !input ) 58 if ( !input )
59 input = new UniKeyboard( parent, "UniKeyboard", f ); 59 input = new UniKeyboard( parent, "UniKeyboard", f );
60 return input; 60 return input;
61} 61}
62 62
63void UniKeyboardImpl::resetState() 63void UniKeyboardImpl::resetState()
64{ 64{
65 if ( input ) 65 if ( input )
66 input->resetState(); 66 input->resetState();
67} 67}
68 68
69QPixmap *UniKeyboardImpl::icon() 69QPixmap *UniKeyboardImpl::icon()
70{ 70{
71 if ( !icn ) 71 if ( !icn )
72 icn = new QPixmap( (const char **)uni_xpm ); 72 icn = new QPixmap( (const char **)uni_xpm );
73 return icn; 73 return icn;
74} 74}
75 75
76QString UniKeyboardImpl::name() 76QString UniKeyboardImpl::name()
77{ 77{
78 return qApp->translate( "InputMethods", "Unicode" ); 78 // return qApp->translate( "InputMethods", "Unicode" );
79 return "Unicode";
79} 80}
80 81
81void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 82void UniKeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
82{ 83{
83 if ( input ) 84 if ( input )
84 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 85 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
85} 86}
86 87
87QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 88QRESULT UniKeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
88{ 89{
89 *iface = 0; 90 *iface = 0;
90 if ( uuid == IID_QUnknown ) 91 if ( uuid == IID_QUnknown )
91 *iface = this; 92 *iface = this;
92 else if ( uuid == IID_InputMethod ) 93 else if ( uuid == IID_InputMethod )
93 *iface = this; 94 *iface = this;
94 95
95 if ( *iface ) 96 if ( *iface )
96 (*iface)->addRef(); 97 (*iface)->addRef();
97 return QS_OK; 98 return QS_OK;
98} 99}
99 100
100Q_EXPORT_INTERFACE() 101Q_EXPORT_INTERFACE()
101{ 102{
102 Q_CREATE_INSTANCE( UniKeyboardImpl ) 103 Q_CREATE_INSTANCE( UniKeyboardImpl )