• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

qbanking.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id$
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 Q4BANKING_BANKING_H
00014 #define Q4BANKING_BANKING_H
00015 
00016 #include <aqbanking/banking.h>
00017 
00018 #include <q4banking/api.h>
00019 //Added by qt3to4:
00020 #include <QtCore/QTranslator>
00021 
00022 
00023 
00024 #define Q4BANKING_PM_CFGMODULE        "q4banking_cfg_module"
00025 
00026 
00027 #define Q4BANKING_IMPORTER_FLAGS_COMPLETE_DAYS  0x00000001
00028 #define Q4BANKING_IMPORTER_FLAGS_OVERWRITE_DAYS 0x00000002
00029 #define Q4BANKING_IMPORTER_FLAGS_ASK_ALL_DUPES  0x00000004
00030 #define Q4BANKING_IMPORTER_FLAGS_FUZZY          0x00000008
00031 #define Q4BANKING_IMPORTER_FLAGS_AS_ORDERS      0x00000010
00032 
00033 
00034 
00035 #include <aqbanking/banking.h>
00036 #include <aqbanking/accstatus.h>
00037 
00038 #include <Qt/qobject.h>
00039 #include <Qt/qdatetime.h>
00040 #include <Qt/qstring.h>
00041 #include <Qt/qstringlist.h>
00042 #include <Qt/qwidget.h> // needed for QPointer<QWidget>
00043 #include <Qt/qpointer.h>
00044 
00045 #include <list>
00046 
00047 class QTranslator;
00048 
00049 class QBanking;
00050 
00051 #include <q4banking/banking.h>
00052 #include <q4banking/qbflagstaff.h>
00053 #include <q4banking/qgui.h>
00054 
00055 #include <gwenhywfar/plugin.h>
00056 
00057 
00058 class QBCfgModule;
00059 class QGui;
00060 
00061 
00062 class Q4BANKING_API QBanking: public AB_Banking {
00063 private:
00064   QPointer<QWidget> _parentWidget;
00065   GWEN_LOGGER_LEVEL _logLevel;
00066   QBFlagStaff *_flagStaff;
00067   QTranslator *_translator;
00068 
00069   QGui *_gui;
00070 
00071   GWEN_PLUGIN_MANAGER *_pluginManagerCfgModules;
00072   QBCfgModule *_appCfgModule;
00073 
00074   std::list<QBCfgModule*> _cfgModules;
00075 
00076   QString _appHelpPath;
00077 
00078   AB_ACCOUNT *_getAccount(const char *accountId);
00079   static int _extractHTML(const char *text, GWEN_BUFFER *buf);
00080 
00081   QBCfgModule *_findCfgModule(const char *modname);
00082   QBCfgModule *_loadCfgModule(const char *modname);
00083 
00084 public:
00085   QBanking(const char *appname,
00086            const char *fname=0);
00087   virtual ~QBanking();
00088 
00089   int init();
00090   int fini();
00091 
00092   QGui *getGui() const;
00093   void setGui(QGui *g);
00094 
00095   QWidget *getParentWidget() const { return _parentWidget;};
00096   void setParentWidget(QWidget *w) { _parentWidget=w;};
00097 
00098   void setAppHelpPath(const QString &s);
00099 
00100   virtual QBFlagStaff *flagStaff();
00101 
00102   void setAccountAlias(AB_ACCOUNT *a, const char *alias);
00103 
00104   void accountsUpdated();
00105   void outboxCountChanged(int count);
00106   void statusMessage(const QString &s);
00107 
00108   virtual void invokeHelp(const QString &context,
00109                           const QString &subject);
00110 
00111   virtual bool mapAccount(const AB_ACCOUNT *a);
00112 
00113   bool askMapAccount(const char *id,
00114                      const char *bankCode,
00115                      const char *accountId);
00116 
00117 
00118   virtual bool addTransaction(const AB_ACCOUNT *a, const AB_TRANSACTION *t);
00119   virtual bool setAccountStatus(const AB_ACCOUNT *a,
00120                                 const AB_ACCOUNT_STATUS *ast);
00121 
00122   virtual bool importContext(AB_IMEXPORTER_CONTEXT *ctx,
00123                              uint32_t flags);
00124 
00125   virtual bool importAccountInfo(AB_IMEXPORTER_ACCOUNTINFO *ai,
00126                                  uint32_t flags);
00127 
00128   virtual bool interactiveImport();
00129 
00130 
00142   virtual int print(const QString &docTitle,
00143                     const QString &docType,
00144                     const QString &descr,
00145                     const QString &text);
00146 
00168   AB_BANKINFO *selectBank(QWidget* parent=0,
00169                           const QString &title=QString(""),
00170                           const QString &country=QString("de"),
00171                           const QString &bankCode=QString(""),
00172                           const QString &swiftCode=QString(""),
00173                           const QString &bankName=QString(""),
00174                           const QString &location=QString(""));
00175 
00176   void setupDialog(QWidget *parent=0);
00177 
00186   QBCfgModule *getConfigModule(const char *modname);
00187 
00192   void setAppConfigModule(QBCfgModule *mod);
00193 
00201   static Q4BANKING_API std::string QStringToUtf8String(const QString &qs);
00202 
00213   static Q4BANKING_API std::string guiString(const char *s);
00214 
00221   static Q4BANKING_API bool isPure7BitAscii(const QString &s);
00222 
00223   static QString sanitizedNumber(const QString &qs);
00224   static QString sanitizedAlphaNum(const QString &qs);
00225 
00226 };
00227 
00228 
00229 
00230 
00231 #endif /* Q4BANKING_BANKING_H */
00232 
00233 

Generated on Tue Aug 3 2010 17:34:15 for aqbanking by  doxygen 1.7.1