X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FPswGen%2FGUI%2Fgui.cpp;h=1ced109fa27cb869ec691d7568d3c0378dd8cb79;hb=388264abc0442ea0e4c6dca6812cb755053c79d5;hp=50eaca11a541c2acb0a89ec8d7e832cc24156320;hpb=8d44aa97324c1fb3e5d36d03d5d6b7386cbb589e;p=evaf
diff --git a/src/apps/PswGen/GUI/gui.cpp b/src/apps/PswGen/GUI/gui.cpp
index 50eaca1..1ced109 100644
--- a/src/apps/PswGen/GUI/gui.cpp
+++ b/src/apps/PswGen/GUI/gui.cpp
@@ -27,18 +27,18 @@
#include
#include
#include
+#include
#include
-using namespace eVaf;
-
VER_EXPORT_VERSION_INFO()
-Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, PswGen::GUI::Module)
+Q_EXPORT_PLUGIN2(VER_MODULE_NAME_STR, eVaf::PswGen::GUI::Module)
//-------------------------------------------------------------------
+using namespace eVaf;
using namespace eVaf::PswGen::GUI;
int const Module::DefaultPasswordLength = 16;
@@ -75,8 +75,11 @@ bool Module::init(QString const & args)
SdiWindow::iSdiWindow * win = evafQueryInterface("iSdiWindow");
EVAF_TEST_X(win, "No iSdiWindow interface");
+ Gui::Panel * panel = new Gui::Panel;
+ win->addPanel("PswGen", panel);
+
QVBoxLayout * v = new QVBoxLayout;
- win->widget()->setLayout(v);
+ panel->setLayout(v);
QGridLayout * g = new QGridLayout;
v->addLayout(g);
@@ -106,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);
- win->widget()->setFocusProxy(wName);
+ panel->setFocusProxy(wName);
l = new QLabel(tr("&Length of the password:", VER_MODULE_NAME_STR));
l->setAlignment(Qt::AlignRight);
@@ -144,15 +147,15 @@ bool Module::init(QString const & args)
connect(wCopy, SIGNAL(clicked()), this, SLOT(copyClicked()));
h->addWidget(wCopy);
- QAction * a = new QAction(win->widget());
+ QAction * a = new QAction(panel);
a->setShortcut(Qt::Key_Return);
connect(a, SIGNAL(triggered()), this, SLOT(generateClicked()));
- win->widget()->addAction(a);
+ panel->addAction(a);
- a = new QAction(win->widget());
+ a = new QAction(panel);
a->setShortcut(Qt::Key_Escape);
connect(a, SIGNAL(triggered()), qApp, SLOT(quit()));
- win->widget()->addAction(a);
+ panel->addAction(a);
mReady = true;