]> vaikene.ee Git - evaf/blobdiff - src/apps/PswGen/GUI/gui.cpp
Changed to use Gui::Panel instead of Gui::Window.
[evaf] / src / apps / PswGen / GUI / gui.cpp
index 706522b1ef44aa30a19d6620b287d70c7dedda8f..1ced109fa27cb869ec691d7568d3c0378dd8cb79 100644 (file)
@@ -27,7 +27,7 @@
 #include <Common/iLogger>
 #include <Common/iRegistry>
 #include <SdiWindow/iSdiWindow>
-#include <Gui/Window>
+#include <Gui/Panel>
 
 #include <QtGui>
 
@@ -75,11 +75,11 @@ bool Module::init(QString const & args)
     SdiWindow::iSdiWindow * win = evafQueryInterface<SdiWindow::iSdiWindow>("iSdiWindow");
     EVAF_TEST_X(win, "No iSdiWindow interface");
 
-    Gui::Window * masterWidget = new Gui::Window;
-    win->addWindow(masterWidget);
+    Gui::Panel * panel = new Gui::Panel;
+    win->addPanel("PswGen", panel);
 
     QVBoxLayout * v = new QVBoxLayout;
-    masterWidget->setLayout(v);
+    panel->setLayout(v);
 
     QGridLayout * g = new QGridLayout;
     v->addLayout(g);
@@ -109,7 +109,7 @@ bool Module::init(QString const & args)
     }
     connect(wName, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)));
     g->addWidget(wName, 1, 1, 1, 2);
-    masterWidget->setFocusProxy(wName);
+    panel->setFocusProxy(wName);
 
     l = new QLabel(tr("&Length of the password:", VER_MODULE_NAME_STR));
     l->setAlignment(Qt::AlignRight);
@@ -147,15 +147,15 @@ bool Module::init(QString const & args)
     connect(wCopy, SIGNAL(clicked()), this, SLOT(copyClicked()));
     h->addWidget(wCopy);
 
-    QAction * a = new QAction(masterWidget);
+    QAction * a = new QAction(panel);
     a->setShortcut(Qt::Key_Return);
     connect(a, SIGNAL(triggered()), this, SLOT(generateClicked()));
-    masterWidget->addAction(a);
+    panel->addAction(a);
 
-    a = new QAction(masterWidget);
+    a = new QAction(panel);
     a->setShortcut(Qt::Key_Escape);
     connect(a, SIGNAL(triggered()), qApp, SLOT(quit()));
-    masterWidget->addAction(a);
+    panel->addAction(a);
 
     mReady = true;