author | zecke <zecke> | 2002-10-21 22:15:31 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-21 22:15:31 (UTC) |
commit | 151729eb3e4e4cfbb69db1f027e74188cf55c328 (patch) (unidiff) | |
tree | 73705a6ca967933780062a95756dc18ae7bd8167 /noncore/apps/opie-console/function_keyboard.cpp | |
parent | 5bcd4ccebd86f912c693de16675da44d21e11d94 (diff) | |
download | opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.zip opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.tar.gz opie-151729eb3e4e4cfbb69db1f027e74188cf55c328.tar.bz2 |
Fix the addPage bug... and avoid some compiler warnings. REMEMBER WARNINGS ARE BUGS
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,4 +1,4 @@ | |||
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> |
4 | #include <qwindowsystem_qws.h> | 4 | #include <qwindowsystem_qws.h> |
@@ -6,6 +6,6 @@ | |||
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
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) { |
11 | 11 | ||
@@ -24,5 +24,5 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) : | |||
24 | keys.insert( | 24 | keys.insert( |
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()) |
28 | ); | 28 | ); |
@@ -68,7 +68,7 @@ void FunctionKeyboard::paintEvent(QPaintEvent *e) { | |||
68 | 68 | ||
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() |
74 | ); | 74 | ); |
@@ -81,12 +81,12 @@ void FunctionKeyboard::paintKey(int row, int col) { | |||
81 | 81 | ||
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() |
92 | ); | 92 | ); |
@@ -139,25 +139,25 @@ void FunctionKeyboard::loadDefaults() { | |||
139 | 139 | ||
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 | ||
158 | } | 158 | } |
159 | 159 | ||
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) { |
163 | 163 | ||
@@ -175,8 +175,8 @@ FunctionKeyboardConfig::~FunctionKeyboardConfig() { | |||
175 | 175 | ||
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 | ||
182 | } | 182 | } |