summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/configdlg.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/multikey/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp14
1 files changed, 8 insertions, 6 deletions
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
@@ -5,55 +5,57 @@
* 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));
@@ -414,93 +416,93 @@ void ConfigDlg::removeMap() {
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();
}