📄 main.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 main: Main source file for LxBank*/ // ***************************************************************************//// $Name: $//// $State: Exp $//// $Log: main.cc,v $// Revision 1.11 2003/05/01 14:06:25 arafang// Format of bank code data file changed: was blz.txt - ascii, new blz.bin - binary//// Revision 1.10 2003/03/17 23:14:11 arafang// Create the lxbank home directory (~/.LxBank) if it does not exists.//// Revision 1.9 2003/02/10 00:27:12 franz// Make install target working//// Revision 1.8 2003/02/08 15:25:21 franz// Mail address changed.//// Revision 1.7 2003/01/26 23:09:41 franz// LxAccountSelectDialog: New method to delete accounts (remove).// Class LxAccountStmtPrint adapted to new account statement view layout.// Account update implemented.//// Revision 1.6 2003/01/17 00:56:43 franz// Getting account statements work.//// Revision 1.5 2003/01/03 17:15:32 franz// LxUserAddWizard able to create a DDV-Card user.//// Revision 1.4 2003/01/02 15:04:45 franz// Started to use the openHBCI lib.//// Revision 1.3 2002/06/02 22:03:19 franz// Remittance view lists improved.// Remittance work dialogs implemented.//// Revision 1.2 2002/04/07 23:20:47 franz// Worked on account view window.//// Revision 1.1.1.1 2002/04/05 08:33:43 franz// Gets LxBank under revision control//////#ifdef HAVE_CONFIG_H#include <config.h>#endif#include <stdlib.h>// #include <stream.h>#include <qapplication.h>#include <qmessagebox.h>#include <qdir.h> #include <qfile.h>#include <qtextstream.h> #include "LxHbci.h"#include "LxInteractor.h"#include "LxAccount.h"#include "LxMainWin.h"AccountList accounts;void setupAccountsList (LxHbci *);void setupAccountsList (LxHbci *hbciApi){ int count; LxAccount *account; list<HBCI::Pointer<HBCI::Account> > hbciAccounts = hbciApi->getAccounts (0, "*", "*"); list<HBCI::Pointer<HBCI::Account> >::iterator accIt; for (accIt = hbciAccounts.begin(), count = 1; accIt != hbciAccounts.end(); ++accIt, ++count){ account = new LxAccount( count, hbciApi, *accIt ); accounts.append (account); }}int main( int argc, char **argv ){ QApplication app( argc, argv ); string home ( getenv( "HOME" ) ); string conf ( "lxBankConfig" ); string lxBankHome ( home + "/.LxBank" ); QString LxBankHomeDir ( lxBankHome.c_str() ); QDir lxBankHomeDir ( LxBankHomeDir ); if ( !lxBankHomeDir.exists () ){ lxBankHomeDir.mkdir ( LxBankHomeDir ); } LxHbci *lxhbciapi = new LxHbci ( lxBankHome, conf ); HBCI::Pointer<HBCI::Interactor> hbciInterActer = new LxInteractor(); lxhbciapi->setInteractor ( hbciInterActer ); lxhbciapi->setSystemName(SYSTEMNAME); lxhbciapi->setSystemVersion(VERSION); setupAccountsList (lxhbciapi); LxMainWin w(lxhbciapi, &app); app.setMainWidget( &w ); w.show(); app.exec(); LxAccount *account; for ( account = accounts.first(); account != 0; account = accounts.next() ) { delete account; } delete lxhbciapi; return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -