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

📄 lxmainmenu.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 LxMainMenu: Main Menu for LxBank*/ // ***************************************************************************//// $Name:  $//// $State: Exp $//// $Log: LxMainMenu.cc,v $// Revision 1.16  2003/05/01 14:06:19  arafang// Format of bank code data file changed: was blz.txt - ascii, new blz.bin - binary//// Revision 1.15  2003/03/07 01:49:23  arafang// About messages changed.//// Revision 1.14  2003/02/08 15:25:21  franz// Mail address changed.//// Revision 1.13  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.12  2003/01/07 22:09:31  franz// Added user list dialog.//// Revision 1.11  2003/01/03 17:15:32  franz// LxUserAddWizard able to create a DDV-Card user.//// Revision 1.10  2003/01/02 15:04:45  franz// Started to use the openHBCI lib.//// Revision 1.9  2002/07/04 23:18:31  franz// Optimize performance of class LxAccount.// Add account close function.//// Revision 1.8  2002/07/02 23:09:45  franz// Now the accounts from the global accounts list are used within the program//// Revision 1.7  2002/06/02 22:03:19  franz// Remittance view lists improved.// Remittance work dialogs implemented.//// Revision 1.6  2002/05/15 00:38:18  franz// Started to switch to Qt3.// Class LxRemittanceViewButton renamed to LxPushButton.// Layout of LxAccountSelectDialog improved.//// Revision 1.5  2002/05/05 18:31:35  franz// Started with the implementatation of remittance views.//// Revision 1.4  2002/04/22 23:53:16  franz// Account open dialog implemented. This dialog presents a list of all// existing accounts. The information where the account data files are// located is stored in the LxBank resource directory '~/.LxBank' in the// file 'accounts.dat'.//// Revision 1.3  2002/04/19 23:51:20  franz// Account statement printing 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 <stream.h>#include "LxMainMenu.h"#include "LxAccountSelectDialog.h"#include "LxPushButtonActions.h"#include "LxUserAddWizard.h"#include "LxUserListDialog.h"#include <qmenudata.h> #include <qapplication.h>#include <qpopupmenu.h>#include <qmessagebox.h>#include <qkeycode.h>#include <qpixmap.h>#include <qinputdialog.h> #include <qlistview.h> #include <qvbox.h> #include "open.xpm"#include "close.xpm"#include "print.xpm"extern AccountList accounts;LxMainMenu::LxMainMenu( LxHbci *hbciapi, QWidget *parent, const char *name )        : QWidget(parent, name), hbciApi(hbciapi){  QPixmap openpix( open_xpm );  QPixmap closepix( close_xpm );  QPixmap printpix( print_xpm );  QPopupMenu *file = new QPopupMenu( this );  CHECK_PTR( file );  file->insertItem( openpix, tr("&Open"),  this, SLOT(open()), CTRL+Key_O );  file->insertItem( closepix, tr("&Close"),  this, SLOT(close()), CTRL+Key_C );  file->insertItem( printpix, tr("&Print"),  this, SLOT(print()), CTRL+Key_P );  file->insertSeparator();  file->insertItem( tr("E&xit"), qApp, SLOT(quit()), CTRL+Key_Q );  QPopupMenu *edit = new QPopupMenu( this );  CHECK_PTR( edit );  edit->insertItem( tr("&New User"), this, SLOT(createUser()) );  edit->insertItem( tr("&Users"), this, SLOT(users()) );//   QPopupMenu *edit = new QPopupMenu( this );//   CHECK_PTR( edit );//   edit->insertItem( tr("&Konto-Daten"), this, SLOT(kontoData()) );  QPopupMenu *help = new QPopupMenu( this );  CHECK_PTR( help );  help->insertItem( tr("&About"), this, SLOT(aboutLxBank()), CTRL+Key_H );  help->insertItem( tr("About &Qt"), this, SLOT(aboutQt()) );  menu = new QMenuBar(parent, "mainMenu");  CHECK_PTR( menu );  menu->setFrameStyle ( QFrame::Panel | QFrame::Raised );  menu->setLineWidth( 2 );  menu->insertItem( tr("&File"), file );  menu->insertItem( tr("&Edit"), edit );  menu->insertSeparator();  menu->insertItem( tr("&Help"), help );}void LxMainMenu::open(){  LxAccount *account;  LxAccountSelectDialog *accountsListWin =     new LxAccountSelectDialog ( hbciApi, &accounts, 				Lx::Open | Lx::Edit | Lx::Delete | Lx::Cancel,				"Open Account",				this, "accountsWindow", TRUE, 0 );  int result = accountsListWin->exec();  switch ( result ){  case Lx::Open:    account = accountsListWin->getSelectedAccount ();    if ( account ){      emit openAccount( account );    }    break;  case Lx::Cancel:  default:    ;  }  delete accountsListWin;}void LxMainMenu::close(){  emit closeAccount( );}void LxMainMenu::print(){  emit printAccStmt( );}void LxMainMenu::createUser(){  LxUserAddWizard *newUser = new LxUserAddWizard ( hbciApi );  newUser->exec();}void LxMainMenu::users(){   LxUserListDialog *userList = new LxUserListDialog ( hbciApi, &accounts, this );  userList->exec();}// void LxMainMenu::kontoData()// {// }void LxMainMenu::aboutLxBank(){  QString hdtxt(tr("About ")); hdtxt += SYSTEMNAME;  QString msgtxt("<center><font size=\"+1\"><strong>");  msgtxt += tr("This is "); msgtxt += SYSTEMNAME; msgtxt += tr("version "); msgtxt += VERSION;  msgtxt += "</strong></font><br>&copy; Franz Zimmermann<br><br><b>";  msgtxt += tr("Home banking for Linux using the HBCI standard.");  msgtxt += "</b><br><br>";  msgtxt += "<table><tr><td>";  msgtxt += tr("Author:");  msgtxt += "</td><td>Franz Zimmermann</td></tr>";  msgtxt += "<tr><td></td><td>83043 Bad Aibling</td></tr>";  msgtxt += "<tr><td>Mail:</td><td>arafang@users.sourceforge.net</td></tr>";  msgtxt += "<tr><td>www:</td><td>http://lxbank.sourceforge.net</td></tr></table></center";  QMessageBox::about( this, hdtxt, msgtxt);}void LxMainMenu::aboutQt(){    QMessageBox::aboutQt( this, "About Qt" );}

⌨️ 快捷键说明

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