Diffstat (limited to 'noncore/applets/keyhelper/keyhelperconf') (more/less context) (ignore whitespace changes)
9 files changed, 1509 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidget.cpp b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.cpp new file mode 100644 index 0000000..b0767cf --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.cpp @@ -0,0 +1,307 @@ +#include "KHCWidget.h" + +KHCWidget::KHCWidget(QWidget* parent, const char* name, WFlags fl) + : KHCWidgetBase(parent, name, fl) +{ + m_isEnable = true; + setLayout(); + setHandler(); + + txtOrgKey->installEventFilter(this); + txtMapKey->installEventFilter(this); +} + +KHCWidget::~KHCWidget() +{ +} + +void KHCWidget::setLayout() +{ + QBoxLayout* topLayout = new QVBoxLayout(this, 5); + + QBoxLayout* orgLayout1 = new QHBoxLayout(topLayout); + orgLayout1->addWidget(lblOriginal); + orgLayout1->addWidget(txtOrgKey); + + QBoxLayout* orgLayout2 = new QHBoxLayout(topLayout); + orgLayout2->addWidget(lblOrgK); + orgLayout2->addWidget(lblOrgKeycode); +#if 0 + orgLayout2->addWidget(lblOrgM); + orgLayout2->addWidget(lblOrgModifiers); +#endif + orgLayout2->addWidget(lblOrgU); + orgLayout2->addWidget(lblOrgUnicode); + orgLayout2->addWidget(chkOrgShift); + orgLayout2->addWidget(chkOrgCtrl); + orgLayout2->addWidget(chkOrgAlt); + + QBoxLayout* mapLayout1 = new QHBoxLayout(topLayout); + mapLayout1->addWidget(lblMapping); + mapLayout1->addWidget(txtMapKey); + + QBoxLayout* mapLayout2 = new QHBoxLayout(topLayout); + mapLayout2->addWidget(lblMapK); + mapLayout2->addWidget(lblMapKeycode); +#if 0 + mapLayout2->addWidget(lblMapM); + mapLayout2->addWidget(lblMapModifiers); +#endif + mapLayout2->addWidget(lblMapU); + mapLayout2->addWidget(lblMapUnicode); + mapLayout2->addWidget(chkMapShift); + mapLayout2->addWidget(chkMapCtrl); + mapLayout2->addWidget(chkMapAlt); + + QBoxLayout* btnLayout = new QHBoxLayout(topLayout); + btnLayout->addWidget(btnGen); + btnLayout->addWidget(btnCopy); + btnLayout->addWidget(btnCtrl); + + topLayout->addWidget(mleDefine); +} + +void KHCWidget::setHandler() +{ + connect(btnGen, SIGNAL(clicked()), this, SLOT(onClick_Gen())); + connect(btnCopy, SIGNAL(clicked()), this, SLOT(onClick_Copy())); + connect(btnCtrl, SIGNAL(clicked()), this, SLOT(onClick_Ctrl())); +} + +bool KHCWidget::eventFilter(QObject* o, QEvent* e) +{ + if(::strcmp(o->name(), "txtOrgKey") == 0){ + if(e->type() == QEvent::KeyPress){ + QKeyEvent* ke = (QKeyEvent*)e; + if(ke->isAutoRepeat() == false){ + onPress_Org(ke); + } + return(true); + } + } else if(::strcmp(o->name(), "txtMapKey") == 0){ + if(e->type() == QEvent::KeyPress){ + QKeyEvent* ke = (QKeyEvent*)e; + if(ke->isAutoRepeat() == false){ + onPress_Map(ke); + } + return(true); + } + } + + return QWidget::eventFilter(o, e); +} + +void KHCWidget::onPress_Org(QKeyEvent* ke) +{ + /* keycode */ + const QString& name = KeyNames::getName(ke->key()); + if(name == QString::null){ + lblOrgKeycode->setText(QString::number(ke->key(), 16)); + } else { + lblOrgKeycode->setText(name); + } + /* modifiers */ + chkOrgShift->setChecked(ke->state() & Qt::ShiftButton); + chkOrgCtrl->setChecked(ke->state() & Qt::ControlButton); + chkOrgAlt->setChecked(ke->state() & Qt::AltButton); + + /* unicode */ + if(ke->text()[0].isPrint()){ + lblOrgUnicode->setText(ke->text()); + } else { + lblOrgUnicode->setText(QString::number(ke->ascii(), 16)); + } + m_OrgkeyData.setData(ke); +} + +void KHCWidget::onPress_Map(QKeyEvent* ke) +{ + /* keycode */ + const QString& name = KeyNames::getName(ke->key()); + if(name == QString::null){ + lblMapKeycode->setText(QString::number(ke->key(), 16)); + } else { + lblMapKeycode->setText(name); + } + /* modifiers */ + chkMapShift->setChecked(ke->state() & Qt::ShiftButton); + chkMapCtrl->setChecked(ke->state() & Qt::ControlButton); + chkMapAlt->setChecked(ke->state() & Qt::AltButton); + + /* unicode */ + if(ke->text()[0].isPrint()){ + lblMapUnicode->setText(ke->text()); + } else { + lblMapUnicode->setText(QString::number(ke->ascii(), 16)); + } + m_MapkeyData.setData(ke); +} + +void KHCWidget::onClick_Gen() +{ + mleDefine->clear(); + if(m_OrgkeyData.key == 0 + || m_MapkeyData.key == 0){ + return; + } + /* original key */ + QString line; + const QString& name = KeyNames::getName(m_OrgkeyData.key); + line = "<define "; + if(name == QString::null){ + line.append("code=\""); + line.append(QString::number(m_OrgkeyData.key, 16)); + } else { + line.append("key=\""); + line.append(name); + } + line.append("\">"); + mleDefine->append(line); + + /* original modifiers */ + bool need = false; + line = "<modifier"; + if(chkOrgShift->isChecked()){ + line.append(" Shift=\"On\""); + need = true; + } + if(chkOrgCtrl->isChecked()){ + line.append(" Control=\"On\""); + need = true; + } + if(chkOrgAlt->isChecked()){ + line.append(" Alt=\"On\""); + need = true; + } + line.append("/>"); + if(need){ + mleDefine->append(line); + } + + /* mapping key */ + const QString& mapname = KeyNames::getName(m_MapkeyData.key); + line = "<map"; + if(mapname == QString::null){ + line.append(" code=\""); + line.append(QString::number(m_MapkeyData.key, 16)); + } else { + line.append(" key=\""); + line.append(mapname); + } + line.append("\"/>"); + mleDefine->append(line); + + /* mapping modifiers */ + need = false; + line = "<map_modifier"; + bool on = chkMapShift->isChecked(); + if(chkOrgShift->isChecked() != on){ + line.append(" Shift=\""); + if(on){ + line.append("On\""); + } else { + line.append("Off\""); + } + need = true; + } + on = chkMapCtrl->isChecked(); + if(chkOrgCtrl->isChecked() != on){ + line.append(" Control=\""); + if(on){ + line.append("On\""); + } else { + line.append("Off\""); + } + need = true; + } + on = chkMapAlt->isChecked(); + if(chkOrgAlt->isChecked() != on){ + line.append(" Alt=\""); + if(on){ + line.append("On\""); + } else { + line.append("Off\""); + } + need = true; + } + line.append("/>"); + if(need){ + mleDefine->append(line); + } + + /* mapping unicode */ + bool found = false; + for(const QWSServer::KeyMap* m = QWSServer::keyMap(); + m->key_code != 0; m++){ + if(m->key_code == m_MapkeyData.key){ + if(m_MapkeyData.state & Qt::ControlButton){ + if(m->ctrl_unicode == m_MapkeyData.ascii){ + found = true; + break; + } + } else if(m_MapkeyData.state & Qt::ShiftButton){ + if(m->shift_unicode == m_MapkeyData.ascii){ + found = true; + break; + } + } else { + if(m->unicode == m_MapkeyData.ascii){ + found = true; + break; + } + } + } + } + if(found == false){ + if(m_MapkeyData.text[0].isPrint()){ + line = "<map_unicode"; + if(m_MapkeyData.state & Qt::ControlButton){ + line.append(" ctrl_unicode=\""); + } else if(m_MapkeyData.state & Qt::ShiftButton){ + line.append(" shift_unicode=\""); + } else { + line.append(" unicode=\""); + } + line.append(m_MapkeyData.text); + line.append("\"/>"); + mleDefine->append(line); + } else { + mleDefine->clear(); + mleDefine->append("Not Support"); + return; + } + } + + /* close tag */ + line = "</define>"; + mleDefine->append(line); +} + +void KHCWidget::onClick_Copy() +{ + mleDefine->selectAll(); + mleDefine->copy(); + mleDefine->deselect(); +} + +void KHCWidget::onClick_Ctrl() +{ + if(m_isEnable){ + QCopEnvelope e("QPE/KeyHelper", "disable()"); + btnCtrl->setText(tr("Enable")); + //btnCtrl->update(); + } else { + QCopEnvelope e("QPE/KeyHelper", "enable()"); + btnCtrl->setText(tr("Disable")); + //btnCtrl->update(); + } + m_isEnable = !m_isEnable; +} + +void KHCWidget::closeEvent(QCloseEvent* ce) +{ + qDebug("closeEvent()"); + QCopEnvelope e("QPE/KeyHelper", "enable()"); + ce->accept(); +} + diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h new file mode 100644 index 0000000..08b29b3 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidget.h @@ -0,0 +1,68 @@ +#ifndef _KHC_WIDGET_H_ +#define _KHC_WIDGET_H_ + +#include <stdlib.h> + +#include <qlabel.h> +#include <qpushbutton.h> +#include <qlineedit.h> +#include <qmultilineedit.h> +#include <qgroupbox.h> +#include <qcheckbox.h> +#include <qlayout.h> + +#include <qwindowsystem_qws.h> + +#include <qpe/qcopenvelope_qws.h> + +#include "KHCWidgetBase.h" +#include "KeyNames.h" + +struct KeyData +{ + KeyData(){ + key = 0; + state = 0; + ascii = 0; + } + void setData(QKeyEvent* ke) { + key = ke->key(); + state = ke->state(); + ascii = ke->ascii(); + text = ke->text(); + } + int key; + int state; + int ascii; + QString text; +}; + +class KHCWidget : public KHCWidgetBase +{ + Q_OBJECT +public: + KHCWidget(QWidget* parent=0, const char* name=0, WFlags fl=0); + virtual ~KHCWidget(); + +protected: + void closeEvent(QCloseEvent* ce); + +private: + void setLayout(); + void setHandler(); + + void onPress_Org(QKeyEvent* ke); + void onPress_Map(QKeyEvent* ke); + + bool eventFilter(QObject* o, QEvent* e); + + bool m_isEnable; + KeyData m_OrgkeyData; + KeyData m_MapkeyData; +private slots: + void onClick_Gen(); + void onClick_Copy(); + void onClick_Ctrl(); +}; + +#endif /* _KHC_WIDGET_H_ */ diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.cpp b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.cpp new file mode 100644 index 0000000..16841f1 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.cpp @@ -0,0 +1,162 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'KHCWidgetBase.ui' +** +** Created: Mon Feb 28 09:58:22 2005 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "KHCWidgetBase.h" + +#include <qcheckbox.h> +#include <qlabel.h> +#include <qlineedit.h> +#include <qmultilineedit.h> +#include <qpushbutton.h> +#include <qlayout.h> +#include <qvariant.h> +#include <qtooltip.h> +#include <qwhatsthis.h> + +/* + * Constructs a KHCWidgetBase which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +KHCWidgetBase::KHCWidgetBase( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "KHCWidgetBase" ); + resize( 431, 388 ); + setCaption( tr( "KeyHelperConf" ) ); + + btnCtrl = new QPushButton( this, "btnCtrl" ); + btnCtrl->setGeometry( QRect( 280, 150, 121, 31 ) ); + btnCtrl->setText( tr( "Disable" ) ); + + btnGen = new QPushButton( this, "btnGen" ); + btnGen->setGeometry( QRect( 10, 150, 110, 31 ) ); + btnGen->setText( tr( "Generate" ) ); + + btnCopy = new QPushButton( this, "btnCopy" ); + btnCopy->setGeometry( QRect( 140, 150, 121, 31 ) ); + btnCopy->setText( tr( "Copy" ) ); + + lblOrgK = new QLabel( this, "lblOrgK" ); + lblOrgK->setGeometry( QRect( 20, 50, 50, 20 ) ); + lblOrgK->setText( tr( "K" ) ); + + lblMapK = new QLabel( this, "lblMapK" ); + lblMapK->setGeometry( QRect( 20, 120, 20, 20 ) ); + lblMapK->setText( tr( "K" ) ); + + lblMapKeycode = new QLabel( this, "lblMapKeycode" ); + lblMapKeycode->setGeometry( QRect( 40, 120, 80, 21 ) ); + lblMapKeycode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, lblMapKeycode->sizePolicy().hasHeightForWidth() ) ); + lblMapKeycode->setFrameShape( QLabel::Panel ); + lblMapKeycode->setFrameShadow( QLabel::Sunken ); + lblMapKeycode->setText( tr( "keycode" ) ); + + txtMapKey = new QLineEdit( this, "txtMapKey" ); + txtMapKey->setGeometry( QRect( 200, 80, 200, 22 ) ); + + txtOrgKey = new QLineEdit( this, "txtOrgKey" ); + txtOrgKey->setGeometry( QRect( 190, 10, 200, 22 ) ); + + lblOriginal = new QLabel( this, "lblOriginal" ); + lblOriginal->setGeometry( QRect( 10, 10, 120, 31 ) ); + lblOriginal->setFrameShape( QLabel::Box ); + lblOriginal->setFrameShadow( QLabel::Raised ); + lblOriginal->setText( tr( "Original Key" ) ); + + lblMapping = new QLabel( this, "lblMapping" ); + lblMapping->setGeometry( QRect( 10, 80, 120, 21 ) ); + lblMapping->setFrameShape( QLabel::Box ); + lblMapping->setFrameShadow( QLabel::Raised ); + lblMapping->setText( tr( "Mapping Key" ) ); + + mleDefine = new QMultiLineEdit( this, "mleDefine" ); + mleDefine->setGeometry( QRect( 10, 200, 391, 110 ) ); + mleDefine->setReadOnly( TRUE ); + + lblOrgKeycode = new QLabel( this, "lblOrgKeycode" ); + lblOrgKeycode->setGeometry( QRect( 50, 50, 70, 21 ) ); + lblOrgKeycode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, lblOrgKeycode->sizePolicy().hasHeightForWidth() ) ); + lblOrgKeycode->setFrameShape( QLabel::Panel ); + lblOrgKeycode->setFrameShadow( QLabel::Sunken ); + lblOrgKeycode->setText( tr( "keycode" ) ); + + lblOrgU = new QLabel( this, "lblOrgU" ); + lblOrgU->setGeometry( QRect( 130, 50, 20, 21 ) ); + lblOrgU->setText( tr( "U" ) ); + + lblOrgUnicode = new QLabel( this, "lblOrgUnicode" ); + lblOrgUnicode->setGeometry( QRect( 150, 50, 80, 21 ) ); + lblOrgUnicode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, lblOrgUnicode->sizePolicy().hasHeightForWidth() ) ); + lblOrgUnicode->setFrameShape( QLabel::Panel ); + lblOrgUnicode->setFrameShadow( QLabel::Sunken ); + lblOrgUnicode->setText( tr( "unicode" ) ); + + lblMapU = new QLabel( this, "lblMapU" ); + lblMapU->setGeometry( QRect( 130, 120, 20, 21 ) ); + lblMapU->setText( tr( "U" ) ); + + lblMapUnicode = new QLabel( this, "lblMapUnicode" ); + lblMapUnicode->setGeometry( QRect( 150, 120, 80, 21 ) ); + lblMapUnicode->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, lblMapUnicode->sizePolicy().hasHeightForWidth() ) ); + lblMapUnicode->setFrameShape( QLabel::Panel ); + lblMapUnicode->setFrameShadow( QLabel::Sunken ); + lblMapUnicode->setText( tr( "unicode" ) ); + + chkMapShift = new QCheckBox( this, "chkMapShift" ); + chkMapShift->setGeometry( QRect( 260, 120, 33, 19 ) ); + chkMapShift->setText( tr( "S" ) ); + chkMapShift->setAutoResize( TRUE ); + + chkMapCtrl = new QCheckBox( this, "chkMapCtrl" ); + chkMapCtrl->setGeometry( QRect( 310, 120, 34, 19 ) ); + chkMapCtrl->setText( tr( "C" ) ); + chkMapCtrl->setAutoResize( TRUE ); + + chkMapAlt = new QCheckBox( this, "chkMapAlt" ); + chkMapAlt->setGeometry( QRect( 360, 120, 34, 19 ) ); + chkMapAlt->setText( tr( "A" ) ); + chkMapAlt->setAutoResize( TRUE ); + + chkOrgShift = new QCheckBox( this, "chkOrgShift" ); + chkOrgShift->setGeometry( QRect( 250, 50, 33, 19 ) ); + chkOrgShift->setText( tr( "S" ) ); + chkOrgShift->setAutoResize( TRUE ); + + chkOrgCtrl = new QCheckBox( this, "chkOrgCtrl" ); + chkOrgCtrl->setGeometry( QRect( 300, 50, 34, 19 ) ); + chkOrgCtrl->setText( tr( "C" ) ); + chkOrgCtrl->setAutoResize( TRUE ); + + chkOrgAlt = new QCheckBox( this, "chkOrgAlt" ); + chkOrgAlt->setGeometry( QRect( 350, 50, 34, 19 ) ); + chkOrgAlt->setText( tr( "A" ) ); + chkOrgAlt->setAutoResize( TRUE ); + + // tab order + setTabOrder( txtOrgKey, chkOrgShift ); + setTabOrder( chkOrgShift, chkOrgCtrl ); + setTabOrder( chkOrgCtrl, chkOrgAlt ); + setTabOrder( chkOrgAlt, txtMapKey ); + setTabOrder( txtMapKey, chkMapShift ); + setTabOrder( chkMapShift, chkMapCtrl ); + setTabOrder( chkMapCtrl, chkMapAlt ); + setTabOrder( chkMapAlt, btnGen ); + setTabOrder( btnGen, btnCopy ); + setTabOrder( btnCopy, btnCtrl ); + setTabOrder( btnCtrl, mleDefine ); +} + +/* + * Destroys the object and frees any allocated resources + */ +KHCWidgetBase::~KHCWidgetBase() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.h b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.h new file mode 100644 index 0000000..8193b61 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.h @@ -0,0 +1,56 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'KHCWidgetBase.ui' +** +** Created: Mon Feb 28 09:54:07 2005 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef KHCWIDGETBASE_H +#define KHCWIDGETBASE_H + +#include <qvariant.h> +#include <qwidget.h> +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QCheckBox; +class QLabel; +class QLineEdit; +class QMultiLineEdit; +class QPushButton; + +class KHCWidgetBase : public QWidget +{ + Q_OBJECT + +public: + KHCWidgetBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~KHCWidgetBase(); + + QPushButton* btnCtrl; + QPushButton* btnGen; + QPushButton* btnCopy; + QLabel* lblOrgK; + QLabel* lblMapK; + QLabel* lblMapKeycode; + QLineEdit* txtMapKey; + QLineEdit* txtOrgKey; + QLabel* lblOriginal; + QLabel* lblMapping; + QMultiLineEdit* mleDefine; + QLabel* lblOrgKeycode; + QLabel* lblOrgU; + QLabel* lblOrgUnicode; + QLabel* lblMapU; + QLabel* lblMapUnicode; + QCheckBox* chkMapShift; + QCheckBox* chkMapCtrl; + QCheckBox* chkMapAlt; + QCheckBox* chkOrgShift; + QCheckBox* chkOrgCtrl; + QCheckBox* chkOrgAlt; + +}; + +#endif // KHCWIDGETBASE_H diff --git a/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.ui b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.ui new file mode 100644 index 0000000..2be0772 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KHCWidgetBase.ui @@ -0,0 +1,569 @@ +<!DOCTYPE UI><UI> +<class>KHCWidgetBase</class> +<widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>KHCWidgetBase</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>431</width> + <height>388</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>KeyHelperConf</string> + </property> + <widget> + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnCtrl</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>280</x> + <y>150</y> + <width>121</width> + <height>31</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Disable</string> + </property> + </widget> + <widget> + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnGen</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>10</x> + <y>150</y> + <width>110</width> + <height>31</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Generate</string> + </property> + </widget> + <widget> + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnCopy</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>140</x> + <y>150</y> + <width>121</width> + <height>31</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Copy</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblOrgK</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>20</x> + <y>50</y> + <width>50</width> + <height>20</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>K</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblMapK</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>20</x> + <y>120</y> + <width>20</width> + <height>20</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>K</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblMapKeycode</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>40</x> + <y>120</y> + <width>80</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>1</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Panel</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Sunken</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>keycode</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtMapKey</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>200</x> + <y>80</y> + <width>200</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtOrgKey</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>190</x> + <y>10</y> + <width>200</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblOriginal</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>10</x> + <y>10</y> + <width>120</width> + <height>31</height> + </rect> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Box</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Raised</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>Original Key</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblMapping</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>10</x> + <y>80</y> + <width>120</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Box</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Raised</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>Mapping Key</string> + </property> + </widget> + <widget> + <class>QMultiLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>mleDefine</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>10</x> + <y>200</y> + <width>391</width> + <height>110</height> + </rect> + </property> + <property stdset="1"> + <name>readOnly</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblOrgKeycode</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>50</x> + <y>50</y> + <width>70</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>1</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Panel</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Sunken</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>keycode</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblOrgU</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>130</x> + <y>50</y> + <width>20</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>U</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblOrgUnicode</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>150</x> + <y>50</y> + <width>80</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>1</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Panel</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Sunken</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>unicode</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblMapU</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>130</x> + <y>120</y> + <width>20</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>U</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>lblMapUnicode</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>150</x> + <y>120</y> + <width>80</width> + <height>21</height> + </rect> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>1</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>Panel</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Sunken</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>unicode</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkMapShift</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>260</x> + <y>120</y> + <width>33</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>S</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkMapCtrl</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>310</x> + <y>120</y> + <width>34</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>C</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkMapAlt</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>360</x> + <y>120</y> + <width>34</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>A</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkOrgShift</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>250</x> + <y>50</y> + <width>33</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>S</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkOrgCtrl</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>300</x> + <y>50</y> + <width>34</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>C</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkOrgAlt</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>350</x> + <y>50</y> + <width>34</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>A</string> + </property> + <property stdset="1"> + <name>autoResize</name> + <bool>true</bool> + </property> + </widget> +</widget> +<tabstops> + <tabstop>txtOrgKey</tabstop> + <tabstop>chkOrgShift</tabstop> + <tabstop>chkOrgCtrl</tabstop> + <tabstop>chkOrgAlt</tabstop> + <tabstop>txtMapKey</tabstop> + <tabstop>chkMapShift</tabstop> + <tabstop>chkMapCtrl</tabstop> + <tabstop>chkMapAlt</tabstop> + <tabstop>btnGen</tabstop> + <tabstop>btnCopy</tabstop> + <tabstop>btnCtrl</tabstop> + <tabstop>mleDefine</tabstop> +</tabstops> +</UI> diff --git a/noncore/applets/keyhelper/keyhelperconf/KeyNames.cpp b/noncore/applets/keyhelper/keyhelperconf/KeyNames.cpp new file mode 100644 index 0000000..e3d90b4 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KeyNames.cpp @@ -0,0 +1,274 @@ +#include "KeyNames.h" + +QMap<QString, int> KeyNames::codemap; +QMap<int, QString> KeyNames::namemap; + +static struct { + int code; + char* name; +} stKeyNames[] = { +{Qt::Key_Escape, "Escape"}, +{Qt::Key_Tab, "Tab"}, +{Qt::Key_Backtab, "Backtab"}, +{Qt::Key_BackTab, "BackTab"}, +{Qt::Key_Backtab, "Backtab"}, +{Qt::Key_Backspace, "Backspace"}, +{Qt::Key_BackSpace, "BackSpace"}, +{Qt::Key_Backspace, "Backspace"}, +{Qt::Key_Return, "Return"}, +{Qt::Key_Enter, "Enter"}, +{Qt::Key_Insert, "Insert"}, +{Qt::Key_Delete, "Delete"}, +{Qt::Key_Pause, "Pause"}, +{Qt::Key_Print, "Print"}, +{Qt::Key_SysReq, "SysReq"}, +{Qt::Key_Home, "Home"}, +{Qt::Key_End, "End"}, +{Qt::Key_Left, "Left"}, +{Qt::Key_Up, "Up"}, +{Qt::Key_Right, "Right"}, +{Qt::Key_Down, "Down"}, +{Qt::Key_Prior, "Prior"}, +{Qt::Key_PageUp, "PageUp"}, +{Qt::Key_Prior, "Prior"}, +{Qt::Key_Next, "Next"}, +{Qt::Key_PageDown, "PageDown"}, +{Qt::Key_Next, "Next"}, +{Qt::Key_Shift, "Shift"}, +{Qt::Key_Control, "Control"}, +{Qt::Key_Meta, "Meta"}, +{Qt::Key_Alt, "Alt"}, +{Qt::Key_CapsLock, "CapsLock"}, +{Qt::Key_NumLock, "NumLock"}, +{Qt::Key_ScrollLock, "ScrollLock"}, +{Qt::Key_F1, "F1"}, +{Qt::Key_F2, "F2"}, +{Qt::Key_F3, "F3"}, +{Qt::Key_F4, "F4"}, +{Qt::Key_F5, "F5"}, +{Qt::Key_F6, "F6"}, +{Qt::Key_F7, "F7"}, +{Qt::Key_F8, "F8"}, +{Qt::Key_F9, "F9"}, +{Qt::Key_F10, "F10"}, +{Qt::Key_F11, "F11"}, +{Qt::Key_F12, "F12"}, +{Qt::Key_F13, "F13"}, +{Qt::Key_F14, "F14"}, +{Qt::Key_F15, "F15"}, +{Qt::Key_F16, "F16"}, +{Qt::Key_F17, "F17"}, +{Qt::Key_F18, "F18"}, +{Qt::Key_F19, "F19"}, +{Qt::Key_F20, "F20"}, +{Qt::Key_F21, "F21"}, +{Qt::Key_F22, "F22"}, +{Qt::Key_F23, "F23"}, +{Qt::Key_F24, "F24"}, +{Qt::Key_F25, "F25"}, +{Qt::Key_F26, "F26"}, +{Qt::Key_F27, "F27"}, +{Qt::Key_F28, "F28"}, +{Qt::Key_F29, "F29"}, +{Qt::Key_F30, "F30"}, +{Qt::Key_F31, "F31"}, +{Qt::Key_F32, "F32"}, +{Qt::Key_F33, "F33"}, +{Qt::Key_F34, "F34"}, +{Qt::Key_F35, "F35"}, +{Qt::Key_Super_L, "Super_L"}, +{Qt::Key_Super_R, "Super_R"}, +{Qt::Key_Menu, "Menu"}, +{Qt::Key_Hyper_L, "Hyper_L"}, +{Qt::Key_Hyper_R, "Hyper_R"}, +{Qt::Key_Help, "Help"}, +{Qt::Key_Space, "Space"}, +{Qt::Key_Any, "Any"}, +{Qt::Key_Space, "Space"}, +{Qt::Key_Exclam, "Exclam"}, +{Qt::Key_QuoteDbl, "QuoteDbl"}, +{Qt::Key_NumberSign, "NumberSign"}, +{Qt::Key_Dollar, "Dollar"}, +{Qt::Key_Percent, "Percent"}, +{Qt::Key_Ampersand, "Ampersand"}, +{Qt::Key_Apostrophe, "Apostrophe"}, +{Qt::Key_ParenLeft, "ParenLeft"}, +{Qt::Key_ParenRight, "ParenRight"}, +{Qt::Key_Asterisk, "Asterisk"}, +{Qt::Key_Plus, "Plus"}, +{Qt::Key_Comma, "Comma"}, +{Qt::Key_Minus, "Minus"}, +{Qt::Key_Period, "Period"}, +{Qt::Key_Slash, "Slash"}, +{Qt::Key_0, "0"}, +{Qt::Key_1, "1"}, +{Qt::Key_2, "2"}, +{Qt::Key_3, "3"}, +{Qt::Key_4, "4"}, +{Qt::Key_5, "5"}, +{Qt::Key_6, "6"}, +{Qt::Key_7, "7"}, +{Qt::Key_8, "8"}, +{Qt::Key_9, "9"}, +{Qt::Key_Colon, "Colon"}, +{Qt::Key_Semicolon, "Semicolon"}, +{Qt::Key_Less, "Less"}, +{Qt::Key_Equal, "Equal"}, +{Qt::Key_Greater, "Greater"}, +{Qt::Key_Question, "Question"}, +{Qt::Key_At, "At"}, +{Qt::Key_A, "A"}, +{Qt::Key_B, "B"}, +{Qt::Key_C, "C"}, +{Qt::Key_D, "D"}, +{Qt::Key_E, "E"}, +{Qt::Key_F, "F"}, +{Qt::Key_G, "G"}, +{Qt::Key_H, "H"}, +{Qt::Key_I, "I"}, +{Qt::Key_J, "J"}, +{Qt::Key_K, "K"}, +{Qt::Key_L, "L"}, +{Qt::Key_M, "M"}, +{Qt::Key_N, "N"}, +{Qt::Key_O, "O"}, +{Qt::Key_P, "P"}, +{Qt::Key_Q, "Q"}, +{Qt::Key_R, "R"}, +{Qt::Key_S, "S"}, +{Qt::Key_T, "T"}, +{Qt::Key_U, "U"}, +{Qt::Key_V, "V"}, +{Qt::Key_W, "W"}, +{Qt::Key_X, "X"}, +{Qt::Key_Y, "Y"}, +{Qt::Key_Z, "Z"}, +{Qt::Key_BracketLeft, "BracketLeft"}, +{Qt::Key_Backslash, "Backslash"}, +{Qt::Key_BracketRight, "BracketRight"}, +{Qt::Key_AsciiCircum, "AsciiCircum"}, +{Qt::Key_Underscore, "Underscore"}, +{Qt::Key_QuoteLeft, "QuoteLeft"}, +{Qt::Key_BraceLeft, "BraceLeft"}, +{Qt::Key_Bar, "Bar"}, +{Qt::Key_BraceRight, "BraceRight"}, +{Qt::Key_AsciiTilde, "AsciiTilde"}, +{Qt::Key_nobreakspace, "nobreakspace"}, +{Qt::Key_exclamdown, "exclamdown"}, +{Qt::Key_cent, "cent"}, +{Qt::Key_sterling, "sterling"}, +{Qt::Key_currency, "currency"}, +{Qt::Key_yen, "yen"}, +{Qt::Key_brokenbar, "brokenbar"}, +{Qt::Key_section, "section"}, +{Qt::Key_diaeresis, "diaeresis"}, +{Qt::Key_copyright, "copyright"}, +{Qt::Key_ordfeminine, "ordfeminine"}, +{Qt::Key_guillemotleft, "guillemotleft"}, +{Qt::Key_notsign, "notsign"}, +{Qt::Key_hyphen, "hyphen"}, +{Qt::Key_registered, "registered"}, +{Qt::Key_macron, "macron"}, +{Qt::Key_degree, "degree"}, +{Qt::Key_plusminus, "plusminus"}, +{Qt::Key_twosuperior, "twosuperior"}, +{Qt::Key_threesuperior, "threesuperior"}, +{Qt::Key_acute, "acute"}, +{Qt::Key_mu, "mu"}, +{Qt::Key_paragraph, "paragraph"}, +{Qt::Key_periodcentered, "periodcentered"}, +{Qt::Key_cedilla, "cedilla"}, +{Qt::Key_onesuperior, "onesuperior"}, +{Qt::Key_masculine, "masculine"}, +{Qt::Key_guillemotright, "guillemotright"}, +{Qt::Key_onequarter, "onequarter"}, +{Qt::Key_onehalf, "onehalf"}, +{Qt::Key_threequarters, "threequarters"}, +{Qt::Key_questiondown, "questiondown"}, +{Qt::Key_Agrave, "Agrave"}, +{Qt::Key_Aacute, "Aacute"}, +{Qt::Key_Acircumflex, "Acircumflex"}, +{Qt::Key_Atilde, "Atilde"}, +{Qt::Key_Adiaeresis, "Adiaeresis"}, +{Qt::Key_Aring, "Aring"}, +{Qt::Key_AE, "AE"}, +{Qt::Key_Ccedilla, "Ccedilla"}, +{Qt::Key_Egrave, "Egrave"}, +{Qt::Key_Eacute, "Eacute"}, +{Qt::Key_Ecircumflex, "Ecircumflex"}, +{Qt::Key_Ediaeresis, "Ediaeresis"}, +{Qt::Key_Igrave, "Igrave"}, +{Qt::Key_Iacute, "Iacute"}, +{Qt::Key_Icircumflex, "Icircumflex"}, +{Qt::Key_Idiaeresis, "Idiaeresis"}, +{Qt::Key_ETH, "ETH"}, +{Qt::Key_Ntilde, "Ntilde"}, +{Qt::Key_Ograve, "Ograve"}, +{Qt::Key_Oacute, "Oacute"}, +{Qt::Key_Ocircumflex, "Ocircumflex"}, +{Qt::Key_Otilde, "Otilde"}, +{Qt::Key_Odiaeresis, "Odiaeresis"}, +{Qt::Key_multiply, "multiply"}, +{Qt::Key_Ooblique, "Ooblique"}, +{Qt::Key_Ugrave, "Ugrave"}, +{Qt::Key_Uacute, "Uacute"}, +{Qt::Key_Ucircumflex, "Ucircumflex"}, +{Qt::Key_Udiaeresis, "Udiaeresis"}, +{Qt::Key_Yacute, "Yacute"}, +{Qt::Key_THORN, "THORN"}, +{Qt::Key_ssharp, "ssharp"}, +{Qt::Key_agrave, "agrave"}, +{Qt::Key_aacute, "aacute"}, +{Qt::Key_acircumflex, "acircumflex"}, +{Qt::Key_atilde, "atilde"}, +{Qt::Key_adiaeresis, "adiaeresis"}, +{Qt::Key_aring, "aring"}, +{Qt::Key_ae, "ae"}, +{Qt::Key_ccedilla, "ccedilla"}, +{Qt::Key_egrave, "egrave"}, +{Qt::Key_eacute, "eacute"}, +{Qt::Key_ecircumflex, "ecircumflex"}, +{Qt::Key_ediaeresis, "ediaeresis"}, +{Qt::Key_igrave, "igrave"}, +{Qt::Key_iacute, "iacute"}, +{Qt::Key_icircumflex, "icircumflex"}, +{Qt::Key_idiaeresis, "idiaeresis"}, +{Qt::Key_eth, "eth"}, +{Qt::Key_ntilde, "ntilde"}, +{Qt::Key_ograve, "ograve"}, +{Qt::Key_oacute, "oacute"}, +{Qt::Key_ocircumflex, "ocircumflex"}, +{Qt::Key_otilde, "otilde"}, +{Qt::Key_odiaeresis, "odiaeresis"}, +{Qt::Key_division, "division"}, +{Qt::Key_oslash, "oslash"}, +{Qt::Key_ugrave, "ugrave"}, +{Qt::Key_uacute, "uacute"}, +{Qt::Key_ucircumflex, "ucircumflex"}, +{Qt::Key_udiaeresis, "udiaeresis"}, +{Qt::Key_yacute, "yacute"}, +{Qt::Key_thorn, "thorn"}, +{Qt::Key_ydiaeresis, "ydiaeresis"}, +{Qt::Key_unknown, "unknown"}, +{0,0}, +}; + +void KeyNames::setCodeMap() +{ + int i; + + codemap.clear(); + for(i=0; stKeyNames[i].code != 0; i++){ + codemap.insert(stKeyNames[i].name, stKeyNames[i].code); + } +} + +void KeyNames::setNameMap() +{ + int i; + + namemap.clear(); + for(i=0; stKeyNames[i].code != 0; i++){ + namemap.insert(stKeyNames[i].code, stKeyNames[i].name); + } +} diff --git a/noncore/applets/keyhelper/keyhelperconf/KeyNames.h b/noncore/applets/keyhelper/keyhelperconf/KeyNames.h new file mode 100644 index 0000000..edd7dc5 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/KeyNames.h @@ -0,0 +1,49 @@ +#ifndef _KEY_NAMES_H_ +#define _KEY_NAMES_H_ + +#include <qstring.h> +#include <qmap.h> +#include <qnamespace.h> + +class KeyNames +{ +public: + static const QString& getName(int code){ + if(namemap.isEmpty()) setNameMap(); + if(namemap.contains(code)){ + return(namemap[code]); + } else { + return(QString::null); + } + } + static void clearName(){ + namemap.clear(); + } + static int getCode(const QString& s){ + if(codemap.isEmpty()) setCodeMap(); + if(codemap.contains(s)){ + return(codemap[s]); + } else { + return(0); + } + } + static void setCode(const QString& s, int code){ + if(codemap.contains(s) == false){ + codemap.insert(s, code); + } + } + static void clearCode(){ + codemap.clear(); + } + static void reset(){ + clearCode(); + } +private: + static QMap<QString, int> codemap; + static QMap<int, QString> namemap; + + static void setCodeMap(); + static void setNameMap(); +}; + +#endif /* _KEY_NAMES_H_ */ diff --git a/noncore/applets/keyhelper/keyhelperconf/keyhelperconf.pro b/noncore/applets/keyhelper/keyhelperconf/keyhelperconf.pro new file mode 100644 index 0000000..f84db3d --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/keyhelperconf.pro @@ -0,0 +1,13 @@ +CONFIG = qt warn_on quick-app +HEADERS = KHCWidget.h \ + KeyNames.h +SOURCES = KHCWidget.cpp \ + KeyNames.cpp \ + khcmain.cpp +INTERFACES = KHCWidgetBase.ui +DESTDIR = $(OPIEDIR)/bin +INCLUDEPATH += . $(OPIEDIR)/include +DEPENDPATH += $(OPIEDIR)/include +LIBS += -lqpe + +include( $(OPIEDIR)/include.pro ) diff --git a/noncore/applets/keyhelper/keyhelperconf/khcmain.cpp b/noncore/applets/keyhelper/keyhelperconf/khcmain.cpp new file mode 100644 index 0000000..757bde0 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperconf/khcmain.cpp @@ -0,0 +1,11 @@ +#include <qpe/qpeapplication.h> +#include "KHCWidget.h" + +int main(int argc, char* argv[]) +{ + QPEApplication a(argc, argv); + + KHCWidget w; + a.showMainWidget(&w); + return a.exec(); +} |