author | zecke <zecke> | 2004-03-14 19:35:00 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 19:35:00 (UTC) |
commit | 05c8d999941989a97a581fb5822437034ec10fd7 (patch) (side-by-side diff) | |
tree | 28ba32dcf84bf8297550bf0f79fc504855caf341 | |
parent | cbb87c7c24dfe46462602c73b10bd76ce81a3baf (diff) | |
download | opie-05c8d999941989a97a581fb5822437034ec10fd7.zip opie-05c8d999941989a97a581fb5822437034ec10fd7.tar.gz opie-05c8d999941989a97a581fb5822437034ec10fd7.tar.bz2 |
Input Methods -> ODP
-rw-r--r-- | inputmethods/dvorak/config.in | 4 | ||||
-rw-r--r-- | inputmethods/handwriting/config.in | 2 | ||||
-rw-r--r-- | inputmethods/jumpx/config.in | 2 | ||||
-rw-r--r-- | inputmethods/keyboard/config.in | 4 | ||||
-rw-r--r-- | inputmethods/kjumpx/config.in | 2 | ||||
-rw-r--r-- | inputmethods/multikey/config.in | 2 | ||||
-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 14 | ||||
-rw-r--r-- | inputmethods/multikey/multikey.pro | 2 | ||||
-rw-r--r-- | inputmethods/pickboard/config.in | 2 | ||||
-rw-r--r-- | inputmethods/unikeyboard/config.in | 2 |
10 files changed, 19 insertions, 17 deletions
diff --git a/inputmethods/dvorak/config.in b/inputmethods/dvorak/config.in index 13042b6..ed31b6a 100644 --- a/inputmethods/dvorak/config.in +++ b/inputmethods/dvorak/config.in @@ -1,6 +1,6 @@ config DVORAK boolean "opie-dvorak (keyboard in DVORAK layout)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && PICKBOARD + depends ( LIBQPE || LIBQPE-X11 ) && PICKBOARD comment "opie-dvorak needs opie-pickboard" - depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE && PICKBOARD) + depends !(( LIBQPE || LIBQPE-X11 ) && PICKBOARD) diff --git a/inputmethods/handwriting/config.in b/inputmethods/handwriting/config.in index 5aa4229..3a5fddb 100644 --- a/inputmethods/handwriting/config.in +++ b/inputmethods/handwriting/config.in @@ -1,8 +1,8 @@ config HANDWRITING boolean "opie-handwriting (Handwriting recognition)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) comment "opie-handwriting-classicset automatically selected" depends HANDWRITING comment "opie-handwriting-graffitiset automatically selected" depends HANDWRITING diff --git a/inputmethods/jumpx/config.in b/inputmethods/jumpx/config.in index 8358fab..f2779f8 100644 --- a/inputmethods/jumpx/config.in +++ b/inputmethods/jumpx/config.in @@ -1,4 +1,4 @@ config JUMPX boolean "opie-jumpx (keyboard optimized for single finger/stylus input)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/inputmethods/keyboard/config.in b/inputmethods/keyboard/config.in index 6673439..0fbb535 100644 --- a/inputmethods/keyboard/config.in +++ b/inputmethods/keyboard/config.in @@ -1,6 +1,6 @@ config KEYBOARD boolean "opie-keyboard (keyboard in QWERTY layout)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && PICKBOARD + depends ( LIBQPE || LIBQPE-X11 ) && PICKBOARD comment "opie-keyboard needs opie-pickboard" - depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE && PICKBOARD) + depends !(( LIBQPE || LIBQPE-X11 ) && PICKBOARD) diff --git a/inputmethods/kjumpx/config.in b/inputmethods/kjumpx/config.in index 7ba966c..8ccef5b 100644 --- a/inputmethods/kjumpx/config.in +++ b/inputmethods/kjumpx/config.in @@ -1,4 +1,4 @@ config KJUMPX boolean "opie-kjumpx (korean keyboard optimized for single finger/stylus input)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/inputmethods/multikey/config.in b/inputmethods/multikey/config.in index b34bd3d..ad7d1e8 100644 --- a/inputmethods/multikey/config.in +++ b/inputmethods/multikey/config.in @@ -1,4 +1,4 @@ config MULTIKEY boolean "opie-multikey (OnScreen keyboard for multiple languages)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && PICKBOARD + depends ( LIBQPE || LIBQPE-X11 ) && PICKBOARD && LIBQTAUX2 && LIBOPIEUI2 diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index 3e39415..1fba9bc 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp @@ -1,131 +1,133 @@ /* * TODO * make a font selection thing (size too) * make a keymap editor * make keys translucent * make vertical keys possible * * */ #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/resource.h> #include <qlayout.h> #include <qwidget.h> #include <qdialog.h> #include <qtabwidget.h> #include <qvbox.h> #include <qgrid.h> #include <qgroupbox.h> #include <qlabel.h> #include <qcheckbox.h> #include <qsizepolicy.h> #include <qpushbutton.h> #include <qlistbox.h> #include <qstringlist.h> #include <qtoolbutton.h> -#include <opie/ofiledialog.h> -#include <opie/colordialog.h> +#include <opie2/ofiledialog.h> +#include <opie2/qcolordialog.h> #include <qdir.h> #include <qfileinfo.h> #include "configdlg.h" #include "keyboard.h" +using namespace Opie; +using namespace Opie::Ui; // ConfigDlg::ConfigDlg() {{{1 ConfigDlg::ConfigDlg () : QDialog () { setCaption( tr("Multikey Configuration") ); Config config ("multikey"); config.setGroup("keymaps"); QString current_map = config.readEntry("current", 0); /* * 'general config' tab */ QVBoxLayout *base_lay = new QVBoxLayout(this); QTabWidget *tabs = new QTabWidget(this, "tabs"); QWidget *gen_box = new QWidget(tabs, "gen_tab"); QVBoxLayout *gen_lay = new QVBoxLayout(gen_box); gen_lay->setMargin(3); QGroupBox *map_group = new QGroupBox (2, Qt::Vertical, tr("Keymap File"), gen_box); QHBox *hbox1 = new QHBox(map_group); keymaps = new QListBox(hbox1); keymaps->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); QVBox *vbox1 = new QVBox(hbox1); QToolButton *tb1 = new QToolButton(vbox1, tr("Move Up")); tb1->setPixmap(Resource::loadPixmap("up")); tb1->setAutoRaise(TRUE); tb1->setFocusPolicy(QWidget::NoFocus); tb1->setToggleButton(FALSE); connect(tb1, SIGNAL(clicked()), this, SLOT(moveSelectedUp())); QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down")); tb2->setPixmap(Resource::loadPixmap("down")); tb2->setAutoRaise(TRUE); tb2->setFocusPolicy(QWidget::NoFocus); tb2->setToggleButton(FALSE); connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown())); QString cur(tr("Current Language")); keymaps->insertItem(cur); keymaps->setSelected(0, true); QDir map_dir(QPEApplication::qpeDir() + "/share/multikey", "*.keymap"); default_maps = map_dir.entryList(); // so i can access it in other places custom_maps = config.readListEntry("maps", QChar('|')); sw_maps = ConfigDlg::loadSw(); QStringList sw_copy(sw_maps); for (uint i = 0; i < sw_copy.count(); i++) { QString keymap_map; if (sw_copy[i][0] != '/') { /* share/multikey */ keymap_map = map_dir.absPath() + "/" + sw_copy[i]; } else { if (map_dir.exists(QFileInfo(sw_copy[i]).fileName(), false) || !QFile::exists(sw_copy[i])) { custom_maps.remove(sw_copy[i]); sw_maps.remove(sw_copy[i]); // remove it from the list too config.writeEntry("maps", custom_maps.join("|")); continue; } keymap_map = sw_copy[i]; } QFile map(keymap_map); if (map.open(IO_ReadOnly)) { QString line; bool found = 0; map.readLine(line, 1024); while (!map.atEnd()) { if (line.find(QRegExp("^title\\s*=\\s*")) != -1) { keymaps->insertItem(line.right(line.length() - line.find(QChar('=')) - 1).stripWhiteSpace()); found = 1; break; } map.readLine(line, 1024); } if (!found) keymaps->insertItem(keymap_map); map.close(); } if (keymap_map == current_map) { keymaps->setSelected(i + 1, true); @@ -342,165 +344,165 @@ void ConfigDlg::moveSelectedDown() int i = keymaps->currentItem(); /* Ignore Current Language */ if (i > 0 && i < (int)keymaps->count() - 1) { QString t = sw_maps[i-1]; sw_maps[i-1] = sw_maps[i]; sw_maps[i] = t; QString item = keymaps->currentText(); keymaps->removeItem(i); keymaps->insertItem(item, i+1); keymaps->setCurrentItem(i+1); } } void ConfigDlg::closeEvent(QCloseEvent *) { // tell the parent it was closed, so delete me emit configDlgClosed(); } void ConfigDlg::setMap(int index) { if (index == 0 || default_maps.find(sw_maps[index-1]) != default_maps.end()) { remove_button->setDisabled(true); } else { remove_button->setEnabled(true); } } // ConfigDlg::addMap() {{{1 void ConfigDlg::addMap() { QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); if (map.isNull()) return; Config config ("multikey"); config.setGroup("keymaps"); QStringList maps = config.readListEntry("maps", QChar('|')); maps.append(map); custom_maps.append(map); if (sw_maps.find(map) == sw_maps.end()) sw_maps.append(map); QFile map_file (map); if (map_file.open(IO_ReadOnly)) { QString line; bool found = 0; map_file.readLine(line, 1024); while (!map_file.atEnd()) { if (line.find(QRegExp("^title\\s*=\\s*")) != -1) { keymaps->insertItem(line.right(line.length() - line.find(QChar('=')) - 1).stripWhiteSpace()); found = 1; break; } map_file.readLine(line, 1024); } if (!found) keymaps->insertItem(map); map_file.close(); } keymaps->setSelected(keymaps->count() - 1, true); } // ConfigDlg::removeMap() {{{1 void ConfigDlg::removeMap() { // move selection up one keymaps->setSelected(keymaps->currentItem() - 1, true); // delete the next selected item cus you just moved it up keymaps->removeItem(keymaps->currentItem() + 1); custom_maps.remove(sw_maps[keymaps->currentItem()]); sw_maps.remove(sw_maps.at(keymaps->currentItem())); } /* ConfigDlg::slots for the color buttons {{{1 * * these four slots are almost the same, except for the names. i was thinking * of making a map with pointers to the buttons and names of the configEntry * so it could be one slot, but then there would be no way of telling which * of the buttons was clicked if they all connect to the same slot. * */ void ConfigDlg::keyColorClicked() { Config config ("multikey"); config.setGroup ("colors"); QStringList color = config.readListEntry("keycolor", QChar(',')); - QColor newcolor = OColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + QColor newcolor = QColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); color[0].setNum(newcolor.red()); color[1].setNum(newcolor.green()); color[2].setNum(newcolor.blue()); config.writeEntry("keycolor", color, QChar(',')); config.write(); keycolor_button->setPalette(QPalette(newcolor)); emit reloadKeyboard(); } void ConfigDlg::keyColorPressedClicked() { Config config ("multikey"); config.setGroup ("colors"); QStringList color = config.readListEntry("keycolor_pressed", QChar(',')); - QColor newcolor = OColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + QColor newcolor = QColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); color[0].setNum(newcolor.red()); color[1].setNum(newcolor.green()); color[2].setNum(newcolor.blue()); config.writeEntry("keycolor_pressed", color, QChar(',')); config.write(); keycolor_pressed_button->setPalette(QPalette(newcolor)); emit reloadKeyboard(); } void ConfigDlg::keyColorLinesClicked() { Config config ("multikey"); config.setGroup ("colors"); QStringList color = config.readListEntry("keycolor_lines", QChar(',')); - QColor newcolor = OColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + QColor newcolor = QColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); color[0].setNum(newcolor.red()); color[1].setNum(newcolor.green()); color[2].setNum(newcolor.blue()); config.writeEntry("keycolor_lines", color, QChar(',')); config.write(); keycolor_lines_button->setPalette(QPalette(newcolor)); emit reloadKeyboard(); } void ConfigDlg::textColorClicked() { Config config ("multikey"); config.setGroup ("colors"); QStringList color = config.readListEntry("textcolor", QChar(',')); - QColor newcolor = OColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); + QColor newcolor = QColorDialog::getColor(QColor(color[0].toInt(), color[1].toInt(), color[2].toInt())); color[0].setNum(newcolor.red()); color[1].setNum(newcolor.green()); color[2].setNum(newcolor.blue()); config.writeEntry("textcolor", color, QChar(',')); config.write(); textcolor_button->setPalette(QPalette(newcolor)); emit reloadKeyboard(); } diff --git a/inputmethods/multikey/multikey.pro b/inputmethods/multikey/multikey.pro index 0901006..3a7de06 100644 --- a/inputmethods/multikey/multikey.pro +++ b/inputmethods/multikey/multikey.pro @@ -1,18 +1,18 @@ TEMPLATE = lib CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ configdlg.h \ keyboardimpl.h SOURCES = keyboard.cpp \ configdlg.cpp \ keyboardimpl.cpp TARGET = qmultikey DESTDIR = $(OPIEDIR)/plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher -LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard +LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard -lqtaux2 -lopieui2 QMAKE_LFLAGS += -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/pickboard/config.in b/inputmethods/pickboard/config.in index 376d3a7..96676fa 100644 --- a/inputmethods/pickboard/config.in +++ b/inputmethods/pickboard/config.in @@ -1,4 +1,4 @@ config PICKBOARD boolean "opie-pickboard (lets you dictionary-based pick whole words based on partial input)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/inputmethods/unikeyboard/config.in b/inputmethods/unikeyboard/config.in index 923e941..e913bea 100644 --- a/inputmethods/unikeyboard/config.in +++ b/inputmethods/unikeyboard/config.in @@ -1,4 +1,4 @@ config UNIKEYBOARD boolean "opie-unikeyboard (basic method to enter arbitrary unicode characters)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) |