/*************************************************************************** CPasswdDialog.cpp - description ------------------- begin : Wed Jan 14 2004 copyright : (C) 2004 by Alexander Theel email : alex.theel@gmx.net ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "CPasswdDialog.h" #include #include #include #include #include // ------------------------------------------------------------------------------- CPasswdDialog::CPasswdDialog( QWidget* pParent ) : IPasswdDialog( pParent, "CPasswdDialog", TRUE ) , msPasswd( "" ) // ------------------------------------------------------------------------------- { } // ------------------------------------------------------------------------------- void CPasswdDialog::setUp( const QString& sIEDescription ) // ------------------------------------------------------------------------------- { if ( (NULLPTR == mpIEDescription) || (NULLPTR == mpPasswdLineOne) || (NULLPTR == mpPasswdLineTwo) ) return; mpIEDescription->setText("'"+sIEDescription+"'"); mpPasswdLineOne->setText(""); mpPasswdLineTwo->setText(""); msPasswd = ""; mpPasswdLineOne->setFocus(); show(); exec(); } // ------------------------------------------------------------------------------- void CPasswdDialog::done() // ------------------------------------------------------------------------------- { if ( (NULLPTR == mpPasswdLineOne) || (NULLPTR == mpPasswdLineTwo) ) return; if ( mpPasswdLineOne->text().stripWhiteSpace().isEmpty() ) { (void) QMessageBox::warning( this, "TuxCards", "No password is entered.", "Change it." ); //std::cout<<"no passwd"<text().stripWhiteSpace().compare( mpPasswdLineTwo->text().stripWhiteSpace()) ) { (void) QMessageBox::warning( this, "TuxCards", "Passwords do not match.", "Change it." ); mpPasswdLineOne->setText(""); mpPasswdLineTwo->setText(""); mpPasswdLineOne->setFocus(); //std::cout<<"passwds do not match"<text().stripWhiteSpace(); //std::cout<<"CPasswdDialog::done() passwd="<