-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 2 | ||||
-rw-r--r-- | inputmethods/multikey/keyboard.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index a6e4dad..ac132d3 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp @@ -163,32 +163,34 @@ void ConfigDlg::pickTog() { * listItem. therefor you have to minus one to the index before you access it. * */ void ConfigDlg::setMap(int index) { if (index == 0) { remove_button->setDisabled(true); emit setMapToDefault(); } else if ((uint)index <= default_maps.count()) { remove_button->setDisabled(true); + emit setMapToFile(keymaps->text(index)); + } else { remove_button->setEnabled(true); emit setMapToFile(keymaps->text(index)); } } void ConfigDlg::addMap() { QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); Config config ("multikey"); config.setGroup("keymaps"); QStringList maps = config.readListEntry("maps", QChar('|')); maps.append(map); keymaps->insertItem(map); diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h index 805f0ed..8c4e666 100644 --- a/inputmethods/multikey/keyboard.h +++ b/inputmethods/multikey/keyboard.h @@ -56,33 +56,33 @@ public: Keys(); Keys(const char * filename); ~Keys(); ushort uni(const int row, const int col); int qcode(const int row, const int col); int width(const int row, const int col); bool pressed(const int row, const int col); bool *pressedPtr(const int row, const int col); ushort shift(const ushort); QPixmap *pix(const int row, const int col); int numKeys(const int row); void setKeysFromFile(const char *filename); void setKey(const int row, const int qcode, const ushort unicode, const int width, QPixmap *pix); void setPressed(const int row, const int col, const bool pressed); QString lang; - QString title; + QString label; private: typedef struct Key { int qcode; // are qt key codes just unicode values? ushort unicode; int width; // not pixels but relative key width. normal key is 2 // only needed for keys like ctrl that can have multiple keys pressed at once bool *pressed; QPixmap *pix; }; QList<Key> keys[6]; QMap<ushort,ushort> shiftMap; |