summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/function_keyboard.cpp
Side-by-side diff
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.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index 0abe0d9..389618c 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -74,25 +74,25 @@ void FunctionKeyboard::load (const Profile& prof) {
QString h = "r" + QString::number(i) + "c" + QString::number(j);
QString values = prof.readEntry("keb_" + h);
if (!values.isEmpty()) {
QStringList l = QStringList::split(QChar('|'), values, TRUE);
keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt());
// load pixmap if used
if (!l[1].isEmpty()) {
- keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) );
+ keys[h].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + l[1] ) );
}
}
}
if (keys.isEmpty()) loadDefaults();
hide();
show();
}
void FunctionKeyboard::paintEvent(QPaintEvent *e) {
@@ -268,26 +268,25 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par
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(tr("Label"), editKey);
m_labels = new QComboBox(true, editKey);
m_labels->setInsertionPolicy(QComboBox::AtCurrent);
m_labels->insertItem("");
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]), files[i]);
+ m_labels->insertItem( Opie::Core::OResource::loadPixmap("console/keys/" + files[i]), files[i]);
}
connect (m_labels, SIGNAL(activated(int)), this, SLOT(slotChangeIcon(int)));
connect (m_labels, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeLabelText(const QString&)));
l = new QLabel(tr("Q Keycode", "Qt Key Code for the OnScreen Keyboard"), editKey);
m_qvalues = new QComboBox(true, editKey);
m_qvalues->setInsertionPolicy(QComboBox::AtTop);
m_qvalues->setDuplicatesEnabled(false);
m_qvalues->insertItem("");
connect (m_qvalues, SIGNAL(textChanged(const QString&)), this, SLOT(slotChangeQCode(const QString&)));
l = new QLabel(tr("Unicode Value", "The Unicode value of the key"), editKey);
@@ -319,25 +318,25 @@ void FunctionKeyboardConfig::load (const Profile& prof) {
QString h = "r" + QString::number(i) + "c" + QString::number(j);
QString values = prof.readEntry("keb_" + h);
if (!values.isEmpty()) {
QStringList l = QStringList::split(QChar('|'), values, TRUE);
kb->keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt());
// load pixmap if used
if (!l[1].isEmpty()) {
- kb->keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) );
+ kb->keys[h].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + l[1] ) );
}
}
}
}
void FunctionKeyboardConfig::save (Profile& prof) {
prof.writeEntry("keb_rows", m_rowBox->value());
prof.writeEntry("keb_cols", m_colBox->value());
QMap<QString, FKey>::Iterator it;
for ( it = kb->keys.begin(); it != kb->keys.end(); it++) {
@@ -394,25 +393,25 @@ void FunctionKeyboardConfig::slotChangeIcon(int index) {
m_labels->setEditable(true);
// why tf does the text get erased unless i do this?
m_labels->changeItem(m_labels->text(0), 0);
kb->keys[selectedHandle].pixFile = "";
delete kb->keys[selectedHandle].pix;
} else {
// is a pixmap
m_labels->setEditable(false);
kb->keys[selectedHandle].pixFile = m_labels->currentText();
- kb->keys[selectedHandle].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + m_labels->currentText() ) );
+ kb->keys[selectedHandle].pix = new QPixmap( Opie::Core::OResource::loadPixmap( "console/keys/" + m_labels->currentText() ) );
}
kb->paintKey(selectedRow, selectedCol);
}
void FunctionKeyboardConfig::slotChangeLabelText(const QString &label) {
kb->keys[selectedHandle].label = label;
kb->paintKey(selectedRow, selectedCol);
}
void FunctionKeyboardConfig::slotChangeQCode(const QString& qcode) {
kb->keys[selectedHandle].qcode = qcode.toUInt();