⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lxuseraddwizard.cc

📁 LxBank是一个基于Qt/X的家庭储蓄应用程序
💻 CC
字号:
// ****************************************************************************// // LxBank - home-banking for Linux using the HBCI standard// // Author: Franz Zimmermann                                   83043 Bad Aibling// // Copyright (C) 2002-2003 Franz Zimmermann  -  arafang@users.sourceforge.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.// // This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// // You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.// // ***************************************************************************//// ***************************************************************************// /*! \file    \brief LxUserAddWizard: Add a new banking user (owner of a security medium)*/ // ***************************************************************************//// $Name:  $//// $State: Exp $//// $Log: LxUserAddWizard.cc,v $// Revision 1.7  2003/05/03 20:27:05  arafang// Use LxBankSelectionList within LxUserAddWizard to show a list// with BTX-names to put into the Short-Name input field.//// Revision 1.6  2003/02/08 15:25:21  franz// Mail address changed.//// Revision 1.5  2003/01/17 00:56:43  franz// Getting account statements work.//// Revision 1.4  2003/01/11 18:35:22  franz// Complete methods of class LxInteractor.// Worked on class LxPinDialog.// Improve class LxUserAddWizard.// Implement methods removeUser and getAccounts in class LxUserListDialog.// Button enable/dissable bug fixed in class LxRemittanceView.//// Revision 1.3  2003/01/07 22:09:31  franz// Added user list dialog.//// Revision 1.2  2003/01/03 17:15:32  franz// LxUserAddWizard able to create a DDV-Card user.//// Revision 1.1  2003/01/02 15:04:45  franz// Started to use the openHBCI lib.////#ifdef HAVE_CONFIG_H#include <config.h>#endif#include "LxUserAddWizard.h"#include "LxContextSelectDialog.h"#include "LxDDVcardInitDialog.h"#include "LxBankSelectionList.h"#include <stream.h> #include <qwidget.h>#include <qhbox.h>#include <qvbox.h>#include <qlayout.h> #include <qgroupbox.h>#include <qbuttongroup.h>#include <qradiobutton.h>#include <qcheckbox.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qfiledialog.h>#include <qfontmetrics.h>#include <qfont.h>#include <qcolor.h>#include <qlabel.h>#include <qvalidator.h>#include <qmessagebox.h>#include <vector>LxUserAddWizard::LxUserAddWizard( LxHbci *hbciapi, QWidget *parent, const char *name )  : QWizard( parent, name, TRUE ), hbciApi(hbciapi), securityMode (0), HBCIversion(HBCI_VERSION_210),    HBCIversionSelected(false), DDVcontextIndex(0), DDVcardCheckResult(false),    complete(0), bankUserDataComplete(UnComplete){  setCaption("User add Wizard");  complete = BankCodeChecked | BankServerChecked | BankShortNameChecked | BankCountryChecked | UserIdChecked | UserNameChecked;  setupMediumSelectionPage();  setupDDVmediumCheckPage();  setupRDHmediumFilePage();  setupRDHmediumCheckPage();  setupBankUserDataPage();  setupHBCIversionSelectionPage();  setupFinishPage();}LxUserAddWizard::~LxUserAddWizard(){}void LxUserAddWizard::setupMediumSelectionPage(){  mediumSelectionPage = new QHBox( this );  mediumSelectionPage->setSpacing(10);  choices = new QButtonGroup ( 1, Qt::Horizontal, 			       tr("Medium Type"), mediumSelectionPage, "mediumChoice");  rdhMedium = new QRadioButton ( tr("RDH - Security File or Disk"), choices );  ddvMedium = new QRadioButton ( tr("DDV - Chip Card"), choices );  mediumSelectionPage->setStretchFactor (choices, 1);  rdhMedium->setEnabled (FALSE);  connect ( choices, SIGNAL (clicked ( int ) ),	    this, SLOT ( mediumChoiceDone ( int ) ) );  addPage( mediumSelectionPage, tr("Security Medium") );  setBackEnabled ( mediumSelectionPage, FALSE );  setNextEnabled ( mediumSelectionPage, FALSE );}void LxUserAddWizard::setupDDVmediumCheckPage(){  DDVmediumCheckPage = new QVBox( this );  DDVmediumCheckPage->setSpacing(10);  DDVmediumCheckPage->setMargin ( 10 );  DDVmediumCheckPage->setFrameStyle ( QFrame::Box | QFrame::Raised );  QString labelTxt(tr("I will now try to analyse the card.<br>"		   "Only the following card types are supported:"		   "<ul>"		   "<li><b>DDV type 0:</b> old version of DDV cards, but still in use.</li>" 		   "<li><b>DDV type 1:</b> newer cards, issued by some banks this year.</li>" 		   "</ul>"		   "Press the button below to check if your card works."));  DDVcheckExplain = new QLabel (labelTxt, DDVmediumCheckPage, "DDVmediumCheckLabel");  DDVcheckExplain->setFrameStyle ( QFrame::Panel | QFrame::Sunken );  DDVcheckExplain->setBackgroundMode( PaletteBase );  DDVcheckExplain->setMinimumWidth( 400 );  DDVmediumCheckPage->setStretchFactor (DDVcheckExplain, 1);  QHBox *DDVcheckBox = new QHBox( DDVmediumCheckPage );  DDVcheckBox->setSpacing(10);  DDVcheckButton = new QPushButton( tr("Check DDV-Card"), DDVcheckBox, "DDVmediumCheckButton");  DDVcheckResultLabel = new QLabel ( tr("Result:"), DDVcheckBox, "DDVcheckResultlabel");  DDVcheckResultLabel->setAlignment (Qt::AlignRight | Qt::AlignVCenter);  DDVcheckResult = new QLabel ( DDVcheckBox, "DDVcheckResult");  DDVcheckResult->setMinimumWidth ( 150 );  DDVcheckResult->setFrameStyle ( QFrame::Panel | QFrame::Sunken );  DDVcheckResult->setBackgroundMode( PaletteBase );  DDVcheckBox->setStretchFactor ( DDVcheckResultLabel, 1 );  connect ( DDVcheckButton, SIGNAL (clicked ( ) ),	    this, SLOT ( DDVcheckButtonClicked ( ) ) );  addPage( DDVmediumCheckPage, tr("Check DDV-Medium") );  setBackEnabled ( DDVmediumCheckPage, TRUE );  setNextEnabled ( DDVmediumCheckPage, FALSE );}void LxUserAddWizard::setupRDHmediumFilePage(){  RDHmediumFilePage = new QHBox( this );  RDHmediumFilePage->setSpacing(10);  QHBox *hbox = new QHBox ( RDHmediumFilePage );  hbox->setSpacing(10);  RDHmediumFileName = new QLineEdit ( hbox, "RDHfileName" );  QString btxt( "..." );  QPushButton *fileBrowse = new QPushButton ( "...", hbox );  QFontMetrics fm( fileBrowse->font () );  QRect rec ( fm.boundingRect(btxt) );  fileBrowse->setFixedWidth ( rec.width() + 15 );  RDHmediumFileName->setFocus();  connect ( fileBrowse, SIGNAL (clicked () ),	    this, SLOT ( RDHfileBrowseClicked () ) );  connect ( RDHmediumFileName, SIGNAL ( textChanged ( const QString & ) ),	    this, SLOT ( RDHfileNameTextChanged ( const QString & ) ) );  connect ( RDHmediumFileName, SIGNAL ( returnPressed () ),	    this, SLOT ( RDHfileNameReturnPressed () ) );  addPage( RDHmediumFilePage, tr("RDH Security File") );  setBackEnabled ( RDHmediumFilePage, TRUE );  setNextEnabled ( RDHmediumFilePage, FALSE );}void LxUserAddWizard::setupRDHmediumCheckPage(){  RDHmediumCheckPage = new QHBox( this );  RDHmediumCheckPage->setSpacing(10);  addPage( RDHmediumCheckPage, tr("Check RDH-Medium") );  setBackEnabled ( RDHmediumCheckPage, TRUE );  setNextEnabled ( RDHmediumCheckPage, FALSE );}void LxUserAddWizard::setupBankUserDataPage(){  bankUserDataPage = new QVBox( this );  bankUserDataPage->setSpacing(10);  // bank data  bankDataBox = new QGroupBox( 2, Qt::Horizontal, tr("Institute"), bankUserDataPage );  bankDataBox->setInsideSpacing(10);  bankDataBox->setInsideMargin ( 10 );  bankDataBox->setFrameStyle ( QFrame::Box | QFrame::Raised );  // code (BLZ)  bankCodeLabel = new QLabel(tr("Code (BLZ):"), bankDataBox);  bankCodeInput = new QLineEdit( bankDataBox);  bankCodeInput->setMaxLength( 8 );  bankCodeInput->setValidator(new QIntValidator(10000000, 99999999, bankCodeInput));  // server  bankServerLabel = new QLabel(tr("Server:"), bankDataBox);  bankServerInput = new QLineEdit( bankDataBox);  bankServerInput->setValidator(new QRegExpValidator(QRegExp("[0-9a-zA-Z-.]+"), bankServerInput));  // short name  bankShortNameLabel = new QLabel(tr("Short Name:"), bankDataBox);  bankShortNameBox = new QHBox( bankDataBox );  bankShortNameInput = new QLineEdit( bankShortNameBox);  bankShortNameInput->setMaxLength( 24 );  bankShortNameSelect = new QPushButton("?", bankShortNameBox);  bankShortNameSelect->setFixedWidth (25);  bankShortNameSelect->setEnabled (FALSE);  bankShortNameInput->setValidator(new QRegExpValidator(QRegExp("^[0-9a-zA-Z-漩

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -