summaryrefslogtreecommitdiff
path: root/inputmethods/keyboard/keyboard.cpp
Unidiff
Diffstat (limited to 'inputmethods/keyboard/keyboard.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/keyboard/keyboard.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp
index a85a7b1..fb88f2a 100644
--- a/inputmethods/keyboard/keyboard.cpp
+++ b/inputmethods/keyboard/keyboard.cpp
@@ -81,57 +81,57 @@ void Keyboard::resizeEvent(QResizeEvent*)
81 nk = 19; 81 nk = 19;
82 } 82 }
83 defaultKeyWidth = width()/nk; 83 defaultKeyWidth = width()/nk;
84 xoffs = (width()-defaultKeyWidth*nk)/2; 84 xoffs = (width()-defaultKeyWidth*nk)/2;
85} 85}
86 86
87void KeyboardPicks::initialise() 87void KeyboardPicks::initialise()
88{ 88{
89 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 89 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
90 mode = 0; 90 mode = 0;
91 dc = new KeyboardConfig(this); 91 dc = new KeyboardConfig(this);
92 configs.append(dc); 92 configs.append(dc);
93} 93}
94 94
95QSize KeyboardPicks::sizeHint() const 95QSize KeyboardPicks::sizeHint() const
96{ 96{
97 return QSize(240,fontMetrics().lineSpacing()); 97 return QSize(240,fontMetrics().lineSpacing());
98} 98}
99 99
100 100
101void KeyboardConfig::generateText(const QString &s) 101void KeyboardConfig::generateText(const QString &s)
102{ 102{
103#if defined(Q_WS_QWS) || defined(_WS_QWS_) 103#if defined(Q_WS_QWS) || defined(_WS_QWS_)
104 for (int i=0; i<(int)backspaces; i++) { 104 for (int i=0; i<(int)backspaces; i++) {
105 parent->emitKey( 0, Qt::Key_Backspace, 0, true, false ); 105 parent->emitKey( 0, ::Qt::Key_Backspace, 0, true, false );
106 parent->emitKey( 0, Qt::Key_Backspace, 0, false, false ); 106 parent->emitKey( 0, ::Qt::Key_Backspace, 0, false, false );
107 } 107 }
108 for (int i=0; i<(int)s.length(); i++) { 108 for (int i=0; i<(int)s.length(); i++) {
109 parent->emitKey( s[i].unicode(), 0, 0, true, false ); 109 parent->emitKey( s[i].unicode(), 0, 0, true, false );
110 parent->emitKey( s[i].unicode(), 0, 0, false, false ); 110 parent->emitKey( s[i].unicode(), 0, 0, false, false );
111 } 111 }
112 parent->emitKey( 0, Qt::Key_Space, 0, true, false ); 112 parent->emitKey( 0, ::Qt::Key_Space, 0, true, false );
113 parent->emitKey( 0, Qt::Key_Space, 0, false, false ); 113 parent->emitKey( 0, ::Qt::Key_Space, 0, false, false );
114 backspaces = 0; 114 backspaces = 0;
115#endif 115#endif
116} 116}
117 117
118 118
119//PC keyboard layout and scancodes 119//PC keyboard layout and scancodes
120 120
121/* 121/*
122 Format: length, code, length, code, ..., 0 122 Format: length, code, length, code, ..., 0
123 123
124 length is measured in half the width of a standard key. 124 length is measured in half the width of a standard key.
125 If code < 0x80 we have length/2 consecutive standard keys, 125 If code < 0x80 we have length/2 consecutive standard keys,
126 starting with scancode code. 126 starting with scancode code.
127 127
128 Special keys are hardcoded, one at a time, with length of key 128 Special keys are hardcoded, one at a time, with length of key
129 and code >= 0x80, these are NOT standard PC scancodes, but are looked 129 and code >= 0x80, these are NOT standard PC scancodes, but are looked
130 up in specialM[]. (The special keys are not keymappable.) 130 up in specialM[]. (The special keys are not keymappable.)
131 131
132 */ 132 */
133 133
134static const uchar * const keyboard_opti[5] = { 134static const uchar * const keyboard_opti[5] = {
135 (const uchar *const) "\001\223\003\240\002\20\002\41\002\26\002\62\002\56\002\45\002\54\003\200\001\223\002\226\002\235\002\234\002\236", 135 (const uchar *const) "\001\223\003\240\002\20\002\41\002\26\002\62\002\56\002\45\002\54\003\200\001\223\002\226\002\235\002\234\002\236",
136 (const uchar *const) "\001\223\003\201\004\207\002\30\002\24\002\43\004\207\003\203\001\223\006\002\002\065", 136 (const uchar *const) "\001\223\003\201\004\207\002\30\002\24\002\43\004\207\003\203\001\223\006\002\002\065",
137 (const uchar *const) "\001\223\003\202\002\60\002\37\002\23\002\22\002\36\002\21\002\55\003\203\001\223\006\005\002\055", 137 (const uchar *const) "\001\223\003\202\002\60\002\37\002\23\002\22\002\36\002\21\002\55\003\203\001\223\006\005\002\055",