summaryrefslogtreecommitdiff
path: root/inputmethods/dvorak/dvorak.cpp
Unidiff
Diffstat (limited to 'inputmethods/dvorak/dvorak.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/dvorak/dvorak.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/inputmethods/dvorak/dvorak.cpp b/inputmethods/dvorak/dvorak.cpp
index 97afa0a..2137f22 100644
--- a/inputmethods/dvorak/dvorak.cpp
+++ b/inputmethods/dvorak/dvorak.cpp
@@ -68,57 +68,57 @@ void Keyboard::resizeEvent(QResizeEvent*)
68 nk = 19; 68 nk = 19;
69 } 69 }
70 defaultKeyWidth = width()/nk; 70 defaultKeyWidth = width()/nk;
71 xoffs = (width()-defaultKeyWidth*nk)/2; 71 xoffs = (width()-defaultKeyWidth*nk)/2;
72} 72}
73 73
74void KeyboardPicks::initialise() 74void KeyboardPicks::initialise()
75{ 75{
76 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 76 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
77 mode = 0; 77 mode = 0;
78 dc = new KeyboardConfig(this); 78 dc = new KeyboardConfig(this);
79 configs.append(dc); 79 configs.append(dc);
80} 80}
81 81
82QSize KeyboardPicks::sizeHint() const 82QSize KeyboardPicks::sizeHint() const
83{ 83{
84 return QSize(240,fontMetrics().lineSpacing()); 84 return QSize(240,fontMetrics().lineSpacing());
85} 85}
86 86
87 87
88void KeyboardConfig::generateText(const QString &s) 88void KeyboardConfig::generateText(const QString &s)
89{ 89{
90#if defined(Q_WS_QWS) || defined(_WS_QWS_) 90#if defined(Q_WS_QWS) || defined(_WS_QWS_)
91 for (int i=0; i<(int)backspaces; i++) { 91 for (int i=0; i<(int)backspaces; i++) {
92 parent->emitKey( 0, Qt::Key_Backspace, 0, true, false ); 92 parent->emitKey( 0, ::Qt::Key_Backspace, 0, true, false );
93 parent->emitKey( 0, Qt::Key_Backspace, 0, false, false ); 93 parent->emitKey( 0, ::Qt::Key_Backspace, 0, false, false );
94 } 94 }
95 for (int i=0; i<(int)s.length(); i++) { 95 for (int i=0; i<(int)s.length(); i++) {
96 parent->emitKey( s[i].unicode(), 0, 0, true, false ); 96 parent->emitKey( s[i].unicode(), 0, 0, true, false );
97 parent->emitKey( s[i].unicode(), 0, 0, false, false ); 97 parent->emitKey( s[i].unicode(), 0, 0, false, false );
98 } 98 }
99 parent->emitKey( 0, Qt::Key_Space, 0, true, false ); 99 parent->emitKey( 0, ::Qt::Key_Space, 0, true, false );
100 parent->emitKey( 0, Qt::Key_Space, 0, false, false ); 100 parent->emitKey( 0, ::Qt::Key_Space, 0, false, false );
101 backspaces = 0; 101 backspaces = 0;
102#endif 102#endif
103} 103}
104 104
105 105
106//PC keyboard layout and scancodes 106//PC keyboard layout and scancodes
107 107
108/* 108/*
109 Format: length, code, length, code, ..., 0 109 Format: length, code, length, code, ..., 0
110 110
111 length is measured in half the width of a standard key. 111 length is measured in half the width of a standard key.
112 If code < 0x80 we have length/2 consecutive standard keys, 112 If code < 0x80 we have length/2 consecutive standard keys,
113 starting with scancode code. 113 starting with scancode code.
114 114
115 Special keys are hardcoded, one at a time, with length of key 115 Special keys are hardcoded, one at a time, with length of key
116 and code >= 0x80, these are NOT standard PC scancodes, but are looked 116 and code >= 0x80, these are NOT standard PC scancodes, but are looked
117 up in specialM[]. (The special keys are not keymappable.) 117 up in specialM[]. (The special keys are not keymappable.)
118 118
119 */ 119 */
120 120
121static const uchar * const keyboard_opti[5] = { 121static const uchar * const keyboard_opti[5] = {
122 (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", 122 (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",
123 (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", 123 (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",
124 (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", 124 (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",