summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/keyz-cfg/cfgdlg.cpp6
-rw-r--r--noncore/apps/keyz-cfg/cfgdlg.h2
-rw-r--r--noncore/apps/keyz-cfg/main.cpp12
3 files changed, 11 insertions, 9 deletions
diff --git a/noncore/apps/keyz-cfg/cfgdlg.cpp b/noncore/apps/keyz-cfg/cfgdlg.cpp
index 863f21e..3965198 100644
--- a/noncore/apps/keyz-cfg/cfgdlg.cpp
+++ b/noncore/apps/keyz-cfg/cfgdlg.cpp
@@ -2,13 +2,15 @@
2#include <qdir.h> 2#include <qdir.h>
3#include <qpe/qpeapplication.h> 3#include <qpe/qpeapplication.h>
4#include <qpe/qcopenvelope_qws.h> 4#include <qpe/qcopenvelope_qws.h>
5#include <unistd.h> 5#include <unistd.h>
6#include "cfgdlg.h" 6#include "cfgdlg.h"
7 7
8CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent), cfile(cf), application(app) { 8CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod):
9 QDialog(parent, "CfgDlg", mod), cfile(cf), application(app) {
10
9 setCaption(tr("keyz configurator")); 11 setCaption(tr("keyz configurator"));
10 12
11 QGridLayout* gl = new QGridLayout(this, 7, 5, 5, 5); 13 QGridLayout* gl = new QGridLayout(this, 7, 5, 5, 5);
12 14
13 QLabel* flabel = new QLabel("Available Keymaps", this); 15 QLabel* flabel = new QLabel("Available Keymaps", this);
14 files = new QListBox(this); 16 files = new QListBox(this);
@@ -24,13 +26,13 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent),
24 QLabel* l = new QLabel("Label", this); 26 QLabel* l = new QLabel("Label", this);
25 label = new QLineEdit(this); 27 label = new QLineEdit(this);
26 QLabel* adlabel = new QLabel("Auto Repeat Delay (ms)", this); 28 QLabel* adlabel = new QLabel("Auto Repeat Delay (ms)", this);
27 QLabel* aplabel = new QLabel("Auto Repeat Period (ms)", this); 29 QLabel* aplabel = new QLabel("Auto Repeat Period (ms)", this);
28 ad = new QSpinBox(50, 5000, 5, this); 30 ad = new QSpinBox(50, 5000, 5, this);
29 ap = new QSpinBox(0, 5000, 5, this); 31 ap = new QSpinBox(0, 5000, 5, this);
30 32
31 //QLabel* adms = new QLabel("ms", this); 33 //QLabel* adms = new QLabel("ms", this);
32 //QLabel* apms = new QLabel("ms", this); 34 //QLabel* apms = new QLabel("ms", this);
33 35
34 //QCheckBox* enable = new QCheckBox("Enable", t); 36 //QCheckBox* enable = new QCheckBox("Enable", t);
35 37
36 gl->setColStretch(0, 1); 38 gl->setColStretch(0, 1);
diff --git a/noncore/apps/keyz-cfg/cfgdlg.h b/noncore/apps/keyz-cfg/cfgdlg.h
index 16732ee..cbefdf1 100644
--- a/noncore/apps/keyz-cfg/cfgdlg.h
+++ b/noncore/apps/keyz-cfg/cfgdlg.h
@@ -11,13 +11,13 @@
11#include "cfgfile.h" 11#include "cfgfile.h"
12 12
13class CfgDlg : public QDialog { 13class CfgDlg : public QDialog {
14Q_OBJECT 14Q_OBJECT
15 15
16public: 16public:
17 CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *); 17 CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *, bool b = false);
18 virtual ~CfgDlg(); 18 virtual ~CfgDlg();
19 19
20protected: 20protected:
21 CfgFile* cfile; 21 CfgFile* cfile;
22 QApplication* application; 22 QApplication* application;
23 23
diff --git a/noncore/apps/keyz-cfg/main.cpp b/noncore/apps/keyz-cfg/main.cpp
index 55cc23e..4615562 100644
--- a/noncore/apps/keyz-cfg/main.cpp
+++ b/noncore/apps/keyz-cfg/main.cpp
@@ -1,22 +1,22 @@
1#include <stdio.h> 1#include <stdio.h>
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qlayout.h>
3#include <qmainwindow.h> 4#include <qmainwindow.h>
4 5
5#include "cfgdlg.h" 6#include "cfgdlg.h"
6 7
7int main( int argc, char **argv ) { 8int main( int argc, char **argv ) {
8 QPEApplication app(argc, argv); 9 QPEApplication app(argc, argv);
9 CfgFile cfile; 10 CfgFile cfile;
10 CfgParser cp; 11 CfgParser cp;
11 cp.load(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", cfile); 12 cp.load(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", cfile);
12 13
13 QMainWindow m;
14 CfgDlg c(&m, &cfile, &app);
15 app.showMainWidget(&m);
16 m.hide();
17 c.showMaximized();
18 14
19 int ret = app.exec(); 15 CfgDlg c(0, &cfile, &app, true);
16
17
18 app.showMainWidget(&c);
19 int ret = QPEApplication::execDialog(&c);
20 20
21 return ret; 21 return ret;
22} 22}