summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/function_keyboard.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index 6613183..0abe0d9 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -1,12 +1,8 @@
1#include "function_keyboard.h" 1#include "function_keyboard.h"
2 2
3/* OPIE */
4#include <opie2/odebug.h>
5using namespace Opie::Core;
6
7/* QT */ 3/* QT */
8#include <qlayout.h> 4#include <qlayout.h>
9#include <qlistbox.h> 5#include <qlistbox.h>
10#include <qlabel.h> 6#include <qlabel.h>
11#include <qdir.h> 7#include <qdir.h>
12 8
@@ -39,13 +35,12 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
39 keys.insert( 35 keys.insert(
40 36
41 handle, 37 handle,
42 FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort()) 38 FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort())
43 ); 39 );
44 } 40 }
45 //owarn << "loaded " << keys.count() << " keys" << oendl;
46 */ 41 */
47 if (keys.isEmpty()) loadDefaults(); 42 if (keys.isEmpty()) loadDefaults();
48 43
49 44
50 45
51} 46}
@@ -258,29 +253,26 @@ void FunctionKeyboard::loadDefaults() {
258/* FunctionKeyboardConfig {{{1 */ 253/* FunctionKeyboardConfig {{{1 */
259 254
260FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na ) 255FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na )
261 : ProfileDialogKeyWidget(name, parent, na), 256 : ProfileDialogKeyWidget(name, parent, na),
262 selectedRow(0), selectedCol(0) 257 selectedRow(0), selectedCol(0)
263{ 258{
264 owarn << "FunctionKeyboardConfig" << oendl;
265
266
267 kb = new FunctionKeyboard(this); 259 kb = new FunctionKeyboard(this);
268 connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), 260 connect (kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)),
269 this, SLOT(slotKeyPressed(FKey,ushort,ushort,bool))); 261 this, SLOT(slotKeyPressed(FKey,ushort,ushort,bool)));
270 262
271 QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimensions"), this); 263 QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimensions"), this);
272 QLabel *l = new QLabel("Rows", dimentions); 264 QLabel *l = new QLabel(tr("Rows"), dimentions);
273 m_rowBox = new QSpinBox(1, 15, 1, dimentions); 265 m_rowBox = new QSpinBox(1, 15, 1, dimentions);
274 connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int))); 266 connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int)));
275 l = new QLabel("Columns", dimentions); 267 l = new QLabel(tr("Columns"), dimentions);
276 m_colBox = new QSpinBox(1, 15, 1, dimentions); 268 m_colBox = new QSpinBox(1, 15, 1, dimentions);
277 connect (m_colBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeCols(int))); 269 connect (m_colBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeCols(int)));
278 270
279 QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit Key"), this); 271 QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit Key"), this);
280 l = new QLabel("Label", editKey); 272 l = new QLabel(tr("Label"), editKey);
281 m_labels = new QComboBox(true, editKey); 273 m_labels = new QComboBox(true, editKey);
282 m_labels->setInsertionPolicy(QComboBox::AtCurrent); 274 m_labels->setInsertionPolicy(QComboBox::AtCurrent);
283 m_labels->insertItem(""); 275 m_labels->insertItem("");
284 276
285 QStringList files = QDir( QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList(); 277 QStringList files = QDir( QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList();
286 278
@@ -288,20 +280,20 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par
288 280
289 m_labels->insertItem( Resource::loadPixmap("console/keys/" + files[i]), files[i]); 281 m_labels->insertItem( Resource::loadPixmap("console/keys/" + files[i]), files[i]);
290 } 282 }
291 connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int))); 283 connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int)));
292 connect (m_labels, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeLabelText(const QString&))); 284 connect (m_labels, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeLabelText(const QString&)));
293 285
294 l = new QLabel("Q Keycode", editKey); 286 l = new QLabel(tr("Q Keycode", "Qt Key Code for the OnScreen Keyboard"), editKey);
295 m_qvalues = new QComboBox(true, editKey); 287 m_qvalues = new QComboBox(true, editKey);
296 m_qvalues->setInsertionPolicy(QComboBox::AtTop); 288 m_qvalues->setInsertionPolicy(QComboBox::AtTop);
297 m_qvalues->setDuplicatesEnabled(false); 289 m_qvalues->setDuplicatesEnabled(false);
298 m_qvalues->insertItem(""); 290 m_qvalues->insertItem("");
299 connect (m_qvalues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeQCode(const QString&))); 291 connect (m_qvalues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeQCode(const QString&)));
300 292
301 l = new QLabel("Unicode Value", editKey); 293 l = new QLabel(tr("Unicode Value", "The Unicode value of the key"), editKey);
302 m_uniValues = new QComboBox(true, editKey); 294 m_uniValues = new QComboBox(true, editKey);
303 m_uniValues->setInsertionPolicy(QComboBox::AtTop); 295 m_uniValues->setInsertionPolicy(QComboBox::AtTop);
304 m_uniValues->setDuplicatesEnabled(false); 296 m_uniValues->setDuplicatesEnabled(false);
305 m_uniValues->insertItem(""); 297 m_uniValues->insertItem("");
306 connect (m_uniValues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeUnicode(const QString&))); 298 connect (m_uniValues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeUnicode(const QString&)));
307 299