00001 /*************************************************************************** 00002 $RCSfile$ 00003 ------------------- 00004 cvs : $Id: kbaccountlist.h 438 2005-08-08 15:25:59Z aquamaniac $ 00005 begin : Mon Mar 01 2004 00006 copyright : (C) 2004 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 *************************************************************************** 00010 * Please see toplevel file COPYING for license details * 00011 ***************************************************************************/ 00012 00013 #ifndef AQHBCI_KDE_ACCOUNTLIST_H 00014 #define AQHBCI_KDE_ACCOUNTLIST_H 00015 00016 00017 #include <klistview.h> 00018 #include <aqbanking/account.h> 00019 00020 #include <list> 00021 00022 class KBAccountListView; 00023 class KBAccountListViewItem; 00024 00025 00026 class KBAccountListViewItem: public KListViewItem { 00027 private: 00028 AB_ACCOUNT *_account; 00029 00030 void _populate(); 00031 00032 public: 00033 KBAccountListViewItem(KBAccountListView *parent, AB_ACCOUNT *acc); 00034 KBAccountListViewItem(KBAccountListView *parent, 00035 KListViewItem *after, 00036 AB_ACCOUNT *acc); 00037 KBAccountListViewItem(const KBAccountListViewItem &item); 00038 00039 virtual ~KBAccountListViewItem(); 00040 00041 AB_ACCOUNT *getAccount(); 00042 }; 00043 00044 00045 00046 class KBAccountListView: public KListView { 00047 private: 00048 public: 00049 KBAccountListView(QWidget *parent=0, const char *name=0); 00050 virtual ~KBAccountListView(); 00051 00052 void addAccount(AB_ACCOUNT *acc); 00053 void addAccounts(const std::list<AB_ACCOUNT*> &accs); 00054 00055 AB_ACCOUNT *getCurrentAccount(); 00056 std::list<AB_ACCOUNT*> getSelectedAccounts(); 00057 00058 }; 00059 00060 00061 00062 00063 #endif /* AQHBCI_KDE_ACCOUNTLIST_H */ 00064 00065 00066