Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

pwd_dlg.h File Reference

#include "../password.h"

Include dependency graph for pwd_dlg.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool enterpassword (Password &pwd, bool firstTime=false, bool cancelAllowed=false, bool defaultAllowed=true)


Function Documentation

bool enterpassword Password pwd,
bool  firstTime = false,
bool  cancelAllowed = false,
bool  defaultAllowed = true
 

opens a dialog box for entering a password.

Parameters:
pwd Reference to a password class which may either contain a password or may be empty.
firstTime If true, the dialog will ask for a new password. If false and pwd is empty, the function returns immediately true. If pwd contains a password, a dialog pops up that will ask for the password
cancelAllowed Is there a cancel button (which will return false). If there is no cancel button and firsttime is false, there will be a exit button which will throw a NoMapLoaded exception when pressed.
defaultAllowed If firstTime is also true, there will be default button which copies the CGameoptions::defaultPassword to pwd
Returns:
true if password successfully entered. false if the cancel button has been pressed (if available). the current map will be deleted and a NoMapLoaded exception thrown if the exit button has been pressed (if available)

Definition at line 154 of file pwd_dlg.cpp.

References Password::empty(), PasswordDialog::getSuccess(), CGameOptions::Instance(), PasswordDialog::RunModal(), and PG_Widget::Show().

Referenced by authenticateUser(), changePassword(), k_loadmap(), and networksupervisor().


Generated on Tue Jun 24 02:05:55 2008 for Advanced Strategic Command by  doxygen 1.4.2