author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/apps/opie-console/function_keyboard.cpp | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index c232d89..eb32551 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -239,87 +239,87 @@ void FunctionKeyboard::loadDefaults() { | |||
239 | keys.insert( "r1c2", FKey ("F3", 0, 4146, 0)); | 239 | keys.insert( "r1c2", FKey ("F3", 0, 4146, 0)); |
240 | keys.insert( "r1c3", FKey ("F4", 0, 4147, 0)); | 240 | keys.insert( "r1c3", FKey ("F4", 0, 4147, 0)); |
241 | keys.insert( "r1c4", FKey ("F5", 0, 4148, 0)); | 241 | keys.insert( "r1c4", FKey ("F5", 0, 4148, 0)); |
242 | keys.insert( "r1c5", FKey ("F6", 0, 4149, 0)); | 242 | keys.insert( "r1c5", FKey ("F6", 0, 4149, 0)); |
243 | keys.insert( "r1c6", FKey ("F7", 0, 4150, 0)); | 243 | keys.insert( "r1c6", FKey ("F7", 0, 4150, 0)); |
244 | keys.insert( "r1c7", FKey ("F8", 0, 4151, 0)); | 244 | keys.insert( "r1c7", FKey ("F8", 0, 4151, 0)); |
245 | keys.insert( "r1c8", FKey ("F9", 0, 4152, 0)); | 245 | keys.insert( "r1c8", FKey ("F9", 0, 4152, 0)); |
246 | keys.insert( "r1c9", FKey ("F10", 0, 4153, 0)); | 246 | keys.insert( "r1c9", FKey ("F10", 0, 4153, 0)); |
247 | keys.insert( "r1c10", FKey ("F11", 0, 4154, 0)); | 247 | keys.insert( "r1c10", FKey ("F11", 0, 4154, 0)); |
248 | keys.insert( "r1c11", FKey ("F12", 0, 4155, 0)); | 248 | keys.insert( "r1c11", FKey ("F12", 0, 4155, 0)); |
249 | 249 | ||
250 | 250 | ||
251 | } | 251 | } |
252 | 252 | ||
253 | /* FunctionKeyboardConfig {{{1 */ | 253 | /* FunctionKeyboardConfig {{{1 */ |
254 | 254 | ||
255 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) | 255 | FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) |
256 | : ProfileDialogKeyWidget(name, parent, na), | 256 | : ProfileDialogKeyWidget(name, parent, na), |
257 | selectedRow(0), selectedCol(0) | 257 | selectedRow(0), selectedCol(0) |
258 | { | 258 | { |
259 | qWarning("FunctionKeyboardConfig"); | 259 | qWarning("FunctionKeyboardConfig"); |
260 | 260 | ||
261 | 261 | ||
262 | kb = new FunctionKeyboard(this); | 262 | kb = new FunctionKeyboard(this); |
263 | connect (kb, SIGNAL(keyPressed(FKey, ushort, ushort, bool)), | 263 | connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), |
264 | this, SLOT(slotKeyPressed(FKey, ushort, ushort, bool))); | 264 | this, SLOT(slotKeyPressed(FKey,ushort,ushort,bool))); |
265 | 265 | ||
266 | QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimensions"), this); | 266 | QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimensions"), this); |
267 | QLabel *l = new QLabel("Rows", dimentions); | 267 | QLabel *l = new QLabel("Rows", dimentions); |
268 | m_rowBox = new QSpinBox(1, 15, 1, dimentions); | 268 | m_rowBox = new QSpinBox(1, 15, 1, dimentions); |
269 | connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int))); | 269 | connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int))); |
270 | l = new QLabel("Columns", dimentions); | 270 | l = new QLabel("Columns", dimentions); |
271 | m_colBox = new QSpinBox(1, 15, 1, dimentions); | 271 | m_colBox = new QSpinBox(1, 15, 1, dimentions); |
272 | connect (m_colBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeCols(int))); | 272 | connect (m_colBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeCols(int))); |
273 | 273 | ||
274 | QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit Key"), this); | 274 | QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit Key"), this); |
275 | l = new QLabel("Label", editKey); | 275 | l = new QLabel("Label", editKey); |
276 | m_labels = new QComboBox(true, editKey); | 276 | m_labels = new QComboBox(true, editKey); |
277 | m_labels->setInsertionPolicy(QComboBox::AtCurrent); | 277 | m_labels->setInsertionPolicy(QComboBox::AtCurrent); |
278 | m_labels->insertItem(""); | 278 | m_labels->insertItem(""); |
279 | 279 | ||
280 | QStringList files = QDir( QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList(); | 280 | QStringList files = QDir( QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList(); |
281 | 281 | ||
282 | for (uint i = 0; i < files.count(); i++) { | 282 | for (uint i = 0; i < files.count(); i++) { |
283 | 283 | ||
284 | m_labels->insertItem( Resource::loadPixmap("console/keys/" + files[i]), files[i]); | 284 | m_labels->insertItem( Resource::loadPixmap("console/keys/" + files[i]), files[i]); |
285 | } | 285 | } |
286 | connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int))); | 286 | connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int))); |
287 | connect (m_labels, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeLabelText(const QString&))); | 287 | connect (m_labels, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeLabelText(const QString&))); |
288 | 288 | ||
289 | l = new QLabel("Q Keycode", editKey); | 289 | l = new QLabel("Q Keycode", editKey); |
290 | m_qvalues = new QComboBox(true, editKey); | 290 | m_qvalues = new QComboBox(true, editKey); |
291 | m_qvalues->setInsertionPolicy(QComboBox::AtTop); | 291 | m_qvalues->setInsertionPolicy(QComboBox::AtTop); |
292 | m_qvalues->setDuplicatesEnabled(false); | 292 | m_qvalues->setDuplicatesEnabled(false); |
293 | m_qvalues->insertItem(""); | 293 | m_qvalues->insertItem(""); |
294 | connect (m_qvalues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeQCode(const QString&))); | 294 | connect (m_qvalues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeQCode(const QString&))); |
295 | 295 | ||
296 | l = new QLabel("Unicode Value", editKey); | 296 | l = new QLabel("Unicode Value", editKey); |
297 | m_uniValues = new QComboBox(true, editKey); | 297 | m_uniValues = new QComboBox(true, editKey); |
298 | m_uniValues->setInsertionPolicy(QComboBox::AtTop); | 298 | m_uniValues->setInsertionPolicy(QComboBox::AtTop); |
299 | m_uniValues->setDuplicatesEnabled(false); | 299 | m_uniValues->setDuplicatesEnabled(false); |
300 | m_uniValues->insertItem(""); | 300 | m_uniValues->insertItem(""); |
301 | connect (m_uniValues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeUnicode(const QString&))); | 301 | connect (m_uniValues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeUnicode(const QString&))); |
302 | 302 | ||
303 | QVBoxLayout *root = new QVBoxLayout(this, 2); | 303 | QVBoxLayout *root = new QVBoxLayout(this, 2); |
304 | root->addWidget(kb); | 304 | root->addWidget(kb); |
305 | root->addWidget(dimentions); | 305 | root->addWidget(dimentions); |
306 | root->addWidget(editKey); | 306 | root->addWidget(editKey); |
307 | } | 307 | } |
308 | FunctionKeyboardConfig::~FunctionKeyboardConfig() { | 308 | FunctionKeyboardConfig::~FunctionKeyboardConfig() { |
309 | 309 | ||
310 | } | 310 | } |
311 | void FunctionKeyboardConfig::load (const Profile& prof) { | 311 | void FunctionKeyboardConfig::load (const Profile& prof) { |
312 | 312 | ||
313 | kb->keys.clear(); | 313 | kb->keys.clear(); |
314 | kb->loadDefaults(); | 314 | kb->loadDefaults(); |
315 | 315 | ||
316 | m_rowBox->setValue(prof.readNumEntry("keb_rows", 2)); | 316 | m_rowBox->setValue(prof.readNumEntry("keb_rows", 2)); |
317 | m_colBox->setValue(prof.readNumEntry("keb_cols", 10)); | 317 | m_colBox->setValue(prof.readNumEntry("keb_cols", 10)); |
318 | 318 | ||
319 | /* load all the keys to the keyboard */ | 319 | /* load all the keys to the keyboard */ |
320 | for (int i = 0; i <= m_rowBox->value() -1; i++) | 320 | for (int i = 0; i <= m_rowBox->value() -1; i++) |
321 | for (int j = 0; j <= m_colBox->value() -1; j++) { | 321 | for (int j = 0; j <= m_colBox->value() -1; j++) { |
322 | 322 | ||
323 | QString h = "r" + QString::number(i) + "c" + QString::number(j); | 323 | QString h = "r" + QString::number(i) + "c" + QString::number(j); |
324 | QString values = prof.readEntry("keb_" + h); | 324 | QString values = prof.readEntry("keb_" + h); |
325 | 325 | ||