Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index fd20e99..100fdfc 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -1,3 +1,3 @@ | |||
1 | #include "function_keyboard.h" | 1 | #include "function_keyboard.h" |
2 | #include <qsizepolicy.h> | 2 | #include <qsizepolicy.h> |
3 | #include <qevent.h> | 3 | #include <qevent.h> |
@@ -7,4 +7,4 @@ | |||
7 | 7 | ||
8 | FunctionKeyboard::FunctionKeyboard(QWidget *parent) : | 8 | FunctionKeyboard::FunctionKeyboard(QWidget *parent) : |
9 | QFrame(parent), numRows(2), numCols(11), | 9 | QFrame(parent), numRows(2), numCols(11), |
10 | pressedRow(0), pressedCol(0) { | 10 | pressedRow(0), pressedCol(0) { |
@@ -25,3 +25,3 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) : | |||
25 | 25 | ||
26 | handle, | 26 | handle, |
27 | FKey (value_list[0], value_list[1].toUShort(), value_list[2].toUShort()) | 27 | FKey (value_list[0], value_list[1].toUShort(), value_list[2].toUShort()) |
@@ -69,5 +69,5 @@ void FunctionKeyboard::paintEvent(QPaintEvent *e) { | |||
69 | p.drawText( | 69 | p.drawText( |
70 | c * keyWidth + 1, r * keyHeight + 1, | 70 | c * keyWidth + 1, r * keyHeight + 1, |
71 | keyWidth, keyHeight, | 71 | keyWidth, keyHeight, |
72 | Qt::AlignHCenter | Qt::AlignVCenter, | 72 | Qt::AlignHCenter | Qt::AlignVCenter, |
73 | keys[handle].getL() | 73 | keys[handle].getL() |
@@ -82,10 +82,10 @@ void FunctionKeyboard::paintKey(int row, int col) { | |||
82 | QPainter p(this); | 82 | QPainter p(this); |
83 | 83 | ||
84 | p.fillRect(QRect(QPoint(col * keyWidth + 1, row * keyHeight + 1), | 84 | p.fillRect(QRect(QPoint(col * keyWidth + 1, row * keyHeight + 1), |
85 | QPoint((col + 1) * keyWidth - 1, row * keyHeight + keyHeight- 1)), | 85 | QPoint((col + 1) * keyWidth - 1, row * keyHeight + keyHeight- 1)), |
86 | (pressedRow != -1 && pressedCol != -1 ) ? QColor(97,119,155) : QColor(255,255,255)); | 86 | (pressedRow != -1 && pressedCol != -1 ) ? QColor(97,119,155) : QColor(255,255,255)); |
87 | p.drawText( | 87 | p.drawText( |
88 | col * keyWidth + 1, row * keyHeight + 1, | 88 | col * keyWidth + 1, row * keyHeight + 1, |
89 | keyWidth, keyHeight, | 89 | keyWidth, keyHeight, |
90 | Qt::AlignHCenter | Qt::AlignVCenter, | 90 | Qt::AlignHCenter | Qt::AlignVCenter, |
91 | keys["r" + QString::number(row) + "c" + QString::number(col)].getL() | 91 | keys["r" + QString::number(row) + "c" + QString::number(col)].getL() |
@@ -140,18 +140,18 @@ void FunctionKeyboard::loadDefaults() { | |||
140 | /* what keys should be default? */ | 140 | /* what keys should be default? */ |
141 | keys.insert( "r0c0", FKey ("F1", 4144, 0)); | 141 | keys.insert( "r0c0", FKey ("F1", 4144, 0)); |
142 | keys.insert( "r0c1", FKey ("F2", 4145, 0)); | 142 | keys.insert( "r0c1", FKey ("F2", 4145, 0)); |
143 | keys.insert( "r0c2", FKey ("F3", 4145, 0)); | 143 | keys.insert( "r0c2", FKey ("F3", 4145, 0)); |
144 | keys.insert( "r0c3", FKey ("F4", 4146, 0)); | 144 | keys.insert( "r0c3", FKey ("F4", 4146, 0)); |
145 | keys.insert( "r0c4", FKey ("F5", 4147, 0)); | 145 | keys.insert( "r0c4", FKey ("F5", 4147, 0)); |
146 | keys.insert( "r0c5", FKey ("F6", 4148, 0)); | 146 | keys.insert( "r0c5", FKey ("F6", 4148, 0)); |
147 | keys.insert( "r0c6", FKey ("F7", 4149, 0)); | 147 | keys.insert( "r0c6", FKey ("F7", 4149, 0)); |
148 | keys.insert( "r0c7", FKey ("F8", 4150, 0)); | 148 | keys.insert( "r0c7", FKey ("F8", 4150, 0)); |
149 | keys.insert( "r0c8", FKey ("F9", 4151, 0)); | 149 | keys.insert( "r0c8", FKey ("F9", 4151, 0)); |
150 | keys.insert( "r0c9", FKey ("F10", 4152, 0)); | 150 | keys.insert( "r0c9", FKey ("F10", 4152, 0)); |
151 | keys.insert( "r0c10", FKey ("F11", 4153, 0)); | 151 | keys.insert( "r0c10", FKey ("F11", 4153, 0)); |
152 | 152 | ||
153 | keys.insert( "r1c7", FKey ("Ho", 4112, 0)); | 153 | keys.insert( "r1c7", FKey ("Ho", 4112, 0)); |
154 | keys.insert( "r1c8", FKey ("End", 4113, 0)); | 154 | keys.insert( "r1c8", FKey ("End", 4113, 0)); |
155 | keys.insert( "r1c9", FKey ("PU", 4118, 0)); | 155 | keys.insert( "r1c9", FKey ("PU", 4118, 0)); |
156 | keys.insert( "r1c10", FKey ("PD", 4119, 0)); | 156 | keys.insert( "r1c10", FKey ("PD", 4119, 0)); |
157 | 157 | ||
@@ -160,3 +160,3 @@ void FunctionKeyboard::loadDefaults() { | |||
160 | 160 | ||
161 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent) : | 161 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent) : |
162 | ProfileDialogKeyWidget(name, parent) { | 162 | ProfileDialogKeyWidget(name, parent) { |
@@ -176,6 +176,6 @@ FunctionKeyboardConfig::~FunctionKeyboardConfig() { | |||
176 | } | 176 | } |
177 | void FunctionKeyboardConfig::load (const Profile& prof) { | 177 | void FunctionKeyboardConfig::load (const Profile& ) { |
178 | 178 | ||
179 | } | 179 | } |
180 | void FunctionKeyboardConfig::save (Profile& prof) { | 180 | void FunctionKeyboardConfig::save (Profile& ) { |
181 | 181 | ||