Logo Search packages:      
Sourcecode: yapet version File versions  Download package

PasswordDialog Class Reference

#include <passworddialog.h>

Inheritance diagram for PasswordDialog:

YAPETUI::BaseWindow

List of all members.


Detailed Description

Shows a dialog for entering the password.

Depending on the PWTYPE, it shows either one or two password input widgets. If PWTYPE is NEW_PW, it shows two input widgets, one for the password and the other to confirm the password. If the passwords matches and the user doesn't cancel the dialog, a Key is generated and put on the heap. The pointer to the key can be obtained by calling getKey(). The memory occupied by this key is NOT freed by this class.

If PWTYPE is EXISTING_PW, only one widget for entering the password is displayed. The same rules as for NEW_PW apply in regard to the key.

Definition at line 82 of file passworddialog.h.


Public Member Functions

YAPET::KeygetKey () const
 Returns the key generated from the password.
 PasswordDialog (PWTYPE pt, std::string fn) throw (YAPETUI::UIException)
 Constructor.
void refresh () throw (YAPETUI::UIException)
void resize () throw (YAPETUI::UIException)
void run () throw (YAPETUI::UIException)
 Displays the password dialog.

Protected Types

enum  MinDimension { MIN_Y = 24, MIN_X = 80 }
 The minimum dimensions supported. More...

Protected Member Functions

int maxX () const
 The maximum x value of the screen.
int maxY () const
 The maximum y value of the screen.
int minX () const
 The minimum x value of the screen.
int minY () const
 The minimum y value of the screen.

Static Protected Member Functions

static void deleteAll ()
 Delete all registered windows.
static void endCurses ()
 Ends the curses mode.
static void initCurses ()
 Initializes (n)curses.
static void refreshAll ()
 Calls the refresh() method of all registered windows.
static void registerBaseWindow (BaseWindow *r)
 Register a base window.
static void resizeAll ()
 Calls the resize() method of all registered windows.
static void unregisterBaseWindow (BaseWindow *r)
 un-registers a base window.

Private Types

enum  { HEIGHT_NEW = 9, HEIGHT_EX = 7 }

Private Member Functions

void createWindow () throw (YAPETUI::UIException)
int getHeight () const
int getStartX () const
int getStartY () const
int getWidth () const
const PasswordDialogoperator= (const PasswordDialog &)
 PasswordDialog (const PasswordDialog &)

Private Attributes

YAPETUI::Buttoncancelbutton
std::string filename
YAPET::Keykey
YAPETUI::Buttonokbutton
YAPETUI::PasswordWidgetpwidget1
YAPETUI::PasswordWidgetpwidget2
PWTYPE pwtype
WINDOW * window

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index