Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef QBANKING_BANKING_H
00014 #define QBANKING_BANKING_H
00015
00016 #include <aqbanking/banking.h>
00017
00018 #include <qbanking/api.h>
00019
00020
00021
00022 #define QBANKING_PM_CFGMODULE "qbanking_cfg_module"
00023
00024
00025 #define QBANKING_IMPORTER_FLAGS_COMPLETE_DAYS 0x00000001
00026 #define QBANKING_IMPORTER_FLAGS_OVERWRITE_DAYS 0x00000002
00027 #define QBANKING_IMPORTER_FLAGS_ASK_ALL_DUPES 0x00000004
00028 #define QBANKING_IMPORTER_FLAGS_FUZZY 0x00000008
00029 #define QBANKING_IMPORTER_FLAGS_AS_ORDERS 0x00000010
00030
00031
00032
00033 #include <aqbanking/banking.h>
00034 #include <aqbanking/accstatus.h>
00035
00036 #include <qobject.h>
00037 #include <qdatetime.h>
00038 #include <qstring.h>
00039 #include <qstringlist.h>
00040 #include <qwidget.h>
00041 #include <qguardedptr.h>
00042
00043 #include <list>
00044
00045 class QTranslator;
00046
00047 class QBanking;
00048
00049 #include <qbanking/banking.h>
00050 #include <qbanking/qbflagstaff.h>
00051 #include <qbanking/qgui.h>
00052
00053 #include <gwenhywfar/plugin.h>
00054
00055
00056 class QBCfgModule;
00057 class QGui;
00058
00059
00060 class QBANKING_API QBanking: public AB_Banking {
00061 private:
00062 QGuardedPtr<QWidget> _parentWidget;
00063 GWEN_LOGGER_LEVEL _logLevel;
00064 QBFlagStaff *_flagStaff;
00065 QTranslator *_translator;
00066
00067 QGui *_gui;
00068
00069 GWEN_PLUGIN_MANAGER *_pluginManagerCfgModules;
00070 QBCfgModule *_appCfgModule;
00071
00072 std::list<QBCfgModule*> _cfgModules;
00073
00074 QString _appHelpPath;
00075
00076 AB_ACCOUNT *_getAccount(const char *accountId);
00077 static int _extractHTML(const char *text, GWEN_BUFFER *buf);
00078
00079 QBCfgModule *_findCfgModule(const char *modname);
00080 QBCfgModule *_loadCfgModule(const char *modname);
00081
00082 public:
00083 QBanking(const char *appname,
00084 const char *fname=0);
00085 virtual ~QBanking();
00086
00087 int init();
00088 int fini();
00089
00090 QGui *getGui() const;
00091 void setGui(QGui *g);
00092
00093 QWidget *getParentWidget() const { return _parentWidget;};
00094 void setParentWidget(QWidget *w) { _parentWidget=w;};
00095
00096 void setAppHelpPath(const QString &s);
00097
00098 virtual QBFlagStaff *flagStaff();
00099
00100 void setAccountAlias(AB_ACCOUNT *a, const char *alias);
00101
00102 void accountsUpdated();
00103 void outboxCountChanged(int count);
00104 void statusMessage(const QString &s);
00105
00106 virtual void invokeHelp(const QString &context,
00107 const QString &subject);
00108
00109 virtual bool mapAccount(const AB_ACCOUNT *a);
00110
00111 bool askMapAccount(const char *id,
00112 const char *bankCode,
00113 const char *accountId);
00114
00115
00116 virtual bool addTransaction(const AB_ACCOUNT *a, const AB_TRANSACTION *t);
00117 virtual bool setAccountStatus(const AB_ACCOUNT *a,
00118 const AB_ACCOUNT_STATUS *ast);
00119
00120 virtual bool importContext(AB_IMEXPORTER_CONTEXT *ctx,
00121 uint32_t flags);
00122
00123 virtual bool importAccountInfo(AB_IMEXPORTER_ACCOUNTINFO *ai,
00124 uint32_t flags);
00125
00126 virtual bool interactiveImport();
00127
00128
00140 virtual int print(const QString &docTitle,
00141 const QString &docType,
00142 const QString &descr,
00143 const QString &text);
00144
00166 AB_BANKINFO *selectBank(QWidget* parent=0,
00167 const QString &title=QString(""),
00168 const QString &country=QString("de"),
00169 const QString &bankCode=QString(""),
00170 const QString &swiftCode=QString(""),
00171 const QString &bankName=QString(""),
00172 const QString &location=QString(""));
00173
00174 void setupDialog(QWidget *parent=0);
00175
00184 QBCfgModule *getConfigModule(const char *modname);
00185
00190 void setAppConfigModule(QBCfgModule *mod);
00191
00199 static QBANKING_API std::string QStringToUtf8String(const QString &qs);
00200
00211 static QBANKING_API std::string guiString(const char *s);
00212
00219 static QBANKING_API bool isPure7BitAscii(const QString &s);
00220
00221 static QString sanitizedNumber(const QString &qs);
00222 static QString sanitizedAlphaNum(const QString &qs);
00223
00224 };
00225
00226
00227
00228
00229 #endif
00230
00231