-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/cfgdlg.h | 2 | ||||
-rw-r--r-- | noncore/apps/keyz-cfg/main.cpp | 12 |
3 files changed, 10 insertions, 8 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 @@ -5,7 +5,9 @@ #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); 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 @@ -14,7 +14,7 @@ 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: 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,5 +1,6 @@ #include <stdio.h> #include <qpe/qpeapplication.h> +#include <qlayout.h> #include <qmainwindow.h> #include "cfgdlg.h" @@ -10,13 +11,12 @@ int main( int argc, char **argv ) { 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; } |