author | zecke <zecke> | 2004-07-15 22:35:55 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 22:35:55 (UTC) |
commit | 422e7757feae169d8c931f2f0ac1d5acc201f846 (patch) (side-by-side diff) | |
tree | 33e9493dcc04a1f6f2e251aa17d292d6b347e03a | |
parent | 652bde59f89394d8091b3ac53635059e52d9f8a0 (diff) | |
download | opie-422e7757feae169d8c931f2f0ac1d5acc201f846.zip opie-422e7757feae169d8c931f2f0ac1d5acc201f846.tar.gz opie-422e7757feae169d8c931f2f0ac1d5acc201f846.tar.bz2 |
When you've startet this application and the clicked
on its symbol you got a blank and unnamed widget.
This was the QMainWindow which was manually hidden, but then
raised by QPEApplication::raiseAppropriate. Now soleley use
QPEApplication::showMainWidget and execDialog for showing the widget
TODO: CleanUp more and use quicklaunc technology
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.h | 2 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/main.cpp | 12 |
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 @@ #include <qdir.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <unistd.h> #include "cfgdlg.h" -CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent), cfile(cf), application(app) { +CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app, bool mod): + QDialog(parent, "CfgDlg", mod), cfile(cf), application(app) { + setCaption(tr("keyz configurator")); QGridLayout* gl = new QGridLayout(this, 7, 5, 5, 5); QLabel* flabel = new QLabel("Available Keymaps", this); files = new QListBox(this); @@ -24,13 +26,13 @@ CfgDlg::CfgDlg(QWidget* parent, CfgFile* cf, QApplication* app):QDialog(parent), QLabel* l = new QLabel("Label", this); label = new QLineEdit(this); QLabel* adlabel = new QLabel("Auto Repeat Delay (ms)", this); QLabel* aplabel = new QLabel("Auto Repeat Period (ms)", this); ad = new QSpinBox(50, 5000, 5, this); ap = new QSpinBox(0, 5000, 5, this); - + // QLabel* adms = new QLabel("ms", this); // QLabel* apms = new QLabel("ms", this); // QCheckBox* enable = new QCheckBox("Enable", t); 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 @@ #include "cfgfile.h" class CfgDlg : public QDialog { Q_OBJECT public: - CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *); + CfgDlg(QWidget* parent, CfgFile* cfile, QApplication *, bool b = false); virtual ~CfgDlg(); protected: CfgFile* cfile; QApplication* application; 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 @@ #include <stdio.h> #include <qpe/qpeapplication.h> +#include <qlayout.h> #include <qmainwindow.h> #include "cfgdlg.h" int main( int argc, char **argv ) { QPEApplication app(argc, argv); CfgFile cfile; CfgParser cp; cp.load(QPEApplication::qpeDir()+"/share/zkb/zkb.xml", cfile); - QMainWindow m; - CfgDlg c(&m, &cfile, &app); - app.showMainWidget(&m); - m.hide(); - c.showMaximized(); - int ret = app.exec(); + CfgDlg c(0, &cfile, &app, true); + + + app.showMainWidget(&c); + int ret = QPEApplication::execDialog(&c); return ret; } |