Password Generator Dialog. More...
#include <pwgendialog.h>


Public Member Functions | |
| const YAPET::UI::secstring & | getPassword () |
| bool | isCanceled () const |
| PWGenDialog () throw (YAPET::UI::UIException) | |
| void | refresh () throw (YAPET::UI::UIException) |
| void | resize () throw (YAPET::UI::UIException) |
| void | run () throw (YAPET::UI::UIException) |
| virtual | ~PWGenDialog () |
Private Member Functions | |
| int | CheckBoxOptions2Charpools (uint16_t o) const |
| void | createWindow () throw (YAPET::UI::UIException) |
| std::string | getNameOfRNG () const |
| void | initCheckBoxItems () |
| const PWGenDialog & | operator= (const PWGenDialog &) |
| void | printTitles () throw (YAPET::UI::UIException) |
| PWGenDialog (const PWGenDialog &bla) | |
| int | startX () |
| int | startY () |
| int | windowHeight () |
| int | windowWidth () |
Private Attributes | |
| YAPET::UI::Button * | cancelbutton |
| bool | canceled |
| int | ckbox_options |
| YAPET::UI::CheckBoxGroup * | ckbxgroup |
| std::vector< std::string > | ckbxitems |
| YAPET::UI::Button * | okbutton |
| YAPET::UI::secstring | password |
| YAPET::UI::InputWidget * | pwdisplay |
| YAPET::PWGEN::PWGen | pwgen |
| size_t | pwlen |
| YAPET::UI::IntInWidget * | pwleninput |
| YAPET::UI::Button * | regenbutton |
| WINDOW * | window |
Display the Password generator dialog.
Definition at line 70 of file pwgendialog.h.
| PWGenDialog::PWGenDialog | ( | const PWGenDialog & | bla | ) | [inline, private] |
Definition at line 87 of file pwgendialog.h.
| PWGenDialog::PWGenDialog | ( | ) | throw (YAPET::UI::UIException) |
The default password length and character pools are taken from YAPET::GLOBALS::Globals
Definition at line 159 of file pwgendialog.cc.
References createWindow(), YAPET::PWGEN::RNG::getAvailableRNGs(), YAPET::GLOBALS::Globals::getPWGenRNG(), pwgen, and YAPET::PWGEN::PWGen::setNewRNG().

| PWGenDialog::~PWGenDialog | ( | ) | [virtual] |
Definition at line 182 of file pwgendialog.cc.
References cancelbutton, CheckBoxOptions2Charpools(), ckbxgroup, YAPET::UI::IntInWidget::getInt(), YAPET::UI::CheckBoxGroup::getOptions(), okbutton, pwdisplay, pwleninput, regenbutton, YAPET::GLOBALS::Globals::setCharacterPools(), YAPET::GLOBALS::Globals::setPasswordLength(), and window.

| int PWGenDialog::CheckBoxOptions2Charpools | ( | uint16_t | o | ) | const [private] |
Definition at line 70 of file pwgendialog.cc.
References YAPET::PWGEN::DIGITS, YAPET::PWGEN::LETTERS, YAPET::PWGEN::OTHER, YAPET::PWGEN::PUNCT, and YAPET::PWGEN::SPECIAL.
Referenced by run(), and ~PWGenDialog().

| void PWGenDialog::createWindow | ( | ) | throw (YAPET::UI::UIException) [private] |
Definition at line 94 of file pwgendialog.cc.
References cancelbutton, ckbox_options, ckbxgroup, ckbxitems, YAPET::PWGEN::PWGen::generatePassword(), YAPET::UI::Button::getLength(), YAPET::PWGEN::PWGen::getPassword(), initCheckBoxItems(), okbutton, pwdisplay, pwgen, pwlen, pwleninput, regenbutton, YAPET::UI::InputWidget::setText(), startX(), startY(), window, windowHeight(), and windowWidth().
Referenced by PWGenDialog(), and resize().


| std::string PWGenDialog::getNameOfRNG | ( | ) | const [private] |
Definition at line 49 of file pwgendialog.cc.
References YAPET::PWGEN::AUTO, YAPET::PWGEN::DEVRANDOM, YAPET::PWGEN::DEVURANDOM, YAPET::PWGEN::PWGen::getRNGUsed(), YAPET::PWGEN::LRAND48, YAPET::PWGEN::NONE, pwgen, and YAPET::PWGEN::RAND.
Referenced by printTitles().


| const YAPET::UI::secstring& PWGenDialog::getPassword | ( | ) | [inline] |
Definition at line 135 of file pwgendialog.h.
References password.
Referenced by PasswordRecord::run().

| void PWGenDialog::initCheckBoxItems | ( | ) | [private] |
Definition at line 83 of file pwgendialog.cc.
References ckbx_strings, and ckbxitems.
Referenced by createWindow().

| bool PWGenDialog::isCanceled | ( | ) | const [inline] |
Definition at line 139 of file pwgendialog.h.
References canceled.
Referenced by PasswordRecord::run().

| const PWGenDialog& PWGenDialog::operator= | ( | const PWGenDialog & | ) | [inline, private] |
Definition at line 90 of file pwgendialog.h.
| void PWGenDialog::printTitles | ( | ) | throw (YAPET::UI::UIException) [private] |
Definition at line 138 of file pwgendialog.cc.
References getNameOfRNG(), and window.
Referenced by refresh().


| void PWGenDialog::refresh | ( | ) | throw (YAPET::UI::UIException) [virtual] |
Implements YAPET::UI::BaseWindow.
Definition at line 380 of file pwgendialog.cc.
References box(), cancelbutton, ckbxgroup, YAPET::UI::MESSAGEBOX, okbutton, printTitles(), pwdisplay, pwlen, pwleninput, YAPET::UI::Button::refresh(), YAPET::UI::InputWidget::refresh(), YAPET::UI::CheckBoxGroup::refresh(), regenbutton, YAPET::UI::Colors::setcolor(), YAPET::UI::IntInWidget::setInt(), and window.
Referenced by run().


| void PWGenDialog::resize | ( | ) | throw (YAPET::UI::UIException) [virtual] |
Implements YAPET::UI::BaseWindow.
Definition at line 403 of file pwgendialog.cc.
References cancelbutton, ckbxgroup, createWindow(), okbutton, pwdisplay, pwleninput, regenbutton, and window.

| void PWGenDialog::run | ( | ) | throw (YAPET::UI::UIException) |
Definition at line 217 of file pwgendialog.cc.
References cancelbutton, canceled, CheckBoxOptions2Charpools(), ckbxgroup, YAPET::UI::InputWidget::clearText(), YAPET::UI::Button::focus(), YAPET::UI::CheckBoxGroup::focus(), YAPET::UI::InputWidget::focus(), YAPET::PWGEN::PWGen::generatePassword(), YAPET::CONFIG::Config::getDefPWLength(), YAPET::UI::IntInWidget::getInt(), YAPET::CONSTS::Consts::getMaxPWLength(), YAPET::UI::CheckBoxGroup::getOptions(), YAPET::PWGEN::PWGen::getPassword(), YAPET::UI::InputWidget::getText(), YAPET::UI::InputWidget::hasText(), KEY_ESC, okbutton, password, pwdisplay, pwgen, pwlen, pwleninput, refresh(), regenbutton, YAPET::UI::BaseWindow::resizeAll(), YAPET::UI::MessageBox::run(), YAPET::UI::IntInWidget::setInt(), YAPET::PWGEN::PWGen::setNewPool(), and YAPET::UI::InputWidget::setText().
Referenced by PasswordRecord::run(), and MainWindow::run().


| int PWGenDialog::startX | ( | ) | [inline, private] |
Definition at line 105 of file pwgendialog.h.
References YAPET::UI::BaseWindow::minX().
Referenced by createWindow().


| int PWGenDialog::startY | ( | ) | [inline, private] |
Definition at line 109 of file pwgendialog.h.
References YAPET::UI::BaseWindow::maxY(), and windowHeight().
Referenced by createWindow().


| int PWGenDialog::windowHeight | ( | ) | [inline, private] |
Definition at line 98 of file pwgendialog.h.
Referenced by createWindow(), and startY().

| int PWGenDialog::windowWidth | ( | ) | [inline, private] |
Definition at line 94 of file pwgendialog.h.
References YAPET::UI::BaseWindow::maxX().
Referenced by createWindow().


YAPET::UI::Button* PWGenDialog::cancelbutton [private] |
Definition at line 78 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
bool PWGenDialog::canceled [private] |
Definition at line 83 of file pwgendialog.h.
Referenced by isCanceled(), and run().
int PWGenDialog::ckbox_options [private] |
Definition at line 82 of file pwgendialog.h.
Referenced by createWindow().
YAPET::UI::CheckBoxGroup* PWGenDialog::ckbxgroup [private] |
Definition at line 73 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
std::vector<std::string> PWGenDialog::ckbxitems [private] |
Definition at line 85 of file pwgendialog.h.
Referenced by createWindow(), and initCheckBoxItems().
YAPET::UI::Button* PWGenDialog::okbutton [private] |
Definition at line 77 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
YAPET::UI::secstring PWGenDialog::password [private] |
Definition at line 79 of file pwgendialog.h.
Referenced by getPassword(), and run().
YAPET::UI::InputWidget* PWGenDialog::pwdisplay [private] |
Definition at line 74 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
YAPET::PWGEN::PWGen PWGenDialog::pwgen [private] |
Definition at line 80 of file pwgendialog.h.
Referenced by createWindow(), getNameOfRNG(), PWGenDialog(), and run().
size_t PWGenDialog::pwlen [private] |
Definition at line 81 of file pwgendialog.h.
Referenced by createWindow(), refresh(), and run().
YAPET::UI::IntInWidget* PWGenDialog::pwleninput [private] |
Definition at line 75 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
YAPET::UI::Button* PWGenDialog::regenbutton [private] |
Definition at line 76 of file pwgendialog.h.
Referenced by createWindow(), refresh(), resize(), run(), and ~PWGenDialog().
WINDOW* PWGenDialog::window [private] |
Definition at line 72 of file pwgendialog.h.
Referenced by createWindow(), printTitles(), refresh(), resize(), and ~PWGenDialog().
1.7.1