summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/function_keyboard.cpp
authorharlekin <harlekin>2002-10-23 15:29:20 (UTC)
committer harlekin <harlekin>2002-10-23 15:29:20 (UTC)
commitd3c2817cea75b9b84ea02a102e7048abf109f848 (patch) (side-by-side diff)
treea7ac3e77b5907b7a0e154a8b3bbc770d67459996 /noncore/apps/opie-console/function_keyboard.cpp
parent30f9875a844ff59a51c65d542e2ed1c5a214af9d (diff)
downloadopie-d3c2817cea75b9b84ea02a102e7048abf109f848.zip
opie-d3c2817cea75b9b84ea02a102e7048abf109f848.tar.gz
opie-d3c2817cea75b9b84ea02a102e7048abf109f848.tar.bz2
right widget size when comming back rom fullscreen
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.cpp10
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 977a384..c314949 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -167,92 +167,92 @@ QSize FunctionKeyboard::sizeHint() const {
void FunctionKeyboard::loadDefaults() {
/* what keys should be default? */
keys.insert( "r0c0", FKey ("F1", 4144, 0));
keys.insert( "r0c1", FKey ("F2", 4145, 0));
keys.insert( "r0c2", FKey ("F3", 4145, 0));
keys.insert( "r0c3", FKey ("F4", 4146, 0));
keys.insert( "r0c4", FKey ("F5", 4147, 0));
keys.insert( "r0c5", FKey ("F6", 4148, 0));
keys.insert( "r0c6", FKey ("F7", 4149, 0));
keys.insert( "r0c7", FKey ("F8", 4150, 0));
keys.insert( "r0c8", FKey ("F9", 4151, 0));
keys.insert( "r0c9", FKey ("F10", 4152, 0));
keys.insert( "r0c10", FKey ("F11", 4153, 0));
keys.insert( "r1c7", FKey ("Ho", 4112, 0));
keys.insert( "r1c8", FKey ("End", 4113, 0));
keys.insert( "r1c9", FKey ("PU", 4118, 0));
keys.insert( "r1c10", FKey ("PD", 4119, 0));
}
/* FunctionKeyboardConfig {{{1 */
-FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent) :
- ProfileDialogKeyWidget(name, parent) {
+FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na )
+ : ProfileDialogKeyWidget(name, parent, na) {
kb = new FunctionKeyboard(this);
QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimentions"), this);
QLabel *l = new QLabel("Rows", dimentions);
QSpinBox *m_rowBox = new QSpinBox(1, 15, 1, dimentions);
connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int)));
l = new QLabel("Columns", dimentions);
m_colBox = new QSpinBox(1, 15, 1, dimentions);
connect (m_colBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeCols(int)));
QGroupBox *editKey = new QGroupBox(2, Qt::Horizontal, tr("Edit Key"), this);
l = new QLabel("Label", editKey);
/*
m_labels = new QComboBox(false, editKey);
labels->insertItem("text");
QStringList files = QDir(QPEApplication::qpeDir() + "pics/console/keys/", "*.png").entryList();
for (uint i = 0; i < files.count(); i++) {
m_labels->insertItem(Resource::loadPixmap("console/keys/" + files[i]));
}
connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int)));
*/
QVBoxLayout *root = new QVBoxLayout(this, 2);
root->addWidget(kb);
root->addWidget(dimentions);
root->addWidget(editKey);
}
FunctionKeyboardConfig::~FunctionKeyboardConfig() {
}
void FunctionKeyboardConfig::load (const Profile& prof) {
- int i = prof.readNumEntry("keb_rows", 1);
- //m_rowBox->setValue(i);
+ //int i = prof.readNumEntry("keb_rows", 1);
+ m_rowBox->setValue( 2 );
}
void FunctionKeyboardConfig::save (Profile& prof) {
- //prof.writeEntry("keb_rows", m_rowBox->value());
+ prof.writeEntry("keb_rows", m_rowBox->value());
}
void FunctionKeyboardConfig::slotChangeRows(int r) {
kb->changeRows(r);
// have to do this so the whole thing gets redrawn
kb->hide(); kb->show();
}
void FunctionKeyboardConfig::slotChangeCols(int c) {
kb->changeCols(c);
}
void FunctionKeyboardConfig::slotKeyPressed(ushort, ushort, bool, bool, bool, ushort row, ushort col) {
}
void FunctionKeyboardConfig::slotChangeIcon(int index) {
if (index == 0) {
// is text
//if(!labels->editable()) labels->setEditable(true);
} else {