qbimporter.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: qbimporter.h 811 2006-01-20 14:52:36Z 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 QBANKING_IMPORTER_H
00014 #define QBANKING_IMPORTER_H
00015 
00016 
00017 class QBanking;
00018 class QBImporter;
00019 
00020 
00021 #include "qbimporter.ui.h"
00022 #include "qbanking.h"
00023 
00024 #include <list>
00025 #include <string>
00026 
00027 #include <qstring.h>
00028 
00029 #include <gwenhywfar/logger.h>
00030 
00031 
00032 class QBANKING_API QBImporter: public QBImporterUi {
00033   Q_OBJECT
00034 
00035 private:
00036 
00037 public:
00038   QBImporter(QBanking *kb,
00039              QWidget* parent=0,
00040              const char* name=0,
00041              bool modal=FALSE);
00042   QBImporter(QBanking *kb,
00043              GWEN_TYPE_UINT32 flags,
00044              QWidget* parent=0,
00045              const char* name=0,
00046              bool modal=FALSE);
00047   ~QBImporter();
00048 
00049   bool init();
00050   bool fini();
00051 
00052   static QBANKING_API bool import(QBanking *qb,
00053                                   GWEN_TYPE_UINT32 flags=
00054                                   QBANKING_IMPORTER_FLAGS_ASK_ALL_DUPES |
00055                                   QBANKING_IMPORTER_FLAGS_FUZZY,
00056                                   QWidget* parent=0);
00057 
00058 public slots:
00059   void back();
00060   void next();
00061   void reject();
00062   void accept();
00063 
00064   void help();
00065 
00066   void slotSelectFile();
00067   void slotFileNameChanged(const QString &s);
00068 
00069   void slotProfileSelected();
00070 
00071   void slotProfileDetails();
00072   void slotProfileEdit();
00073 
00074 private:
00075   QBanking *_app;
00076   GWEN_TYPE_UINT32 _flags;
00077   AB_IMEXPORTER_CONTEXT *_context;
00078   bool _aborted;
00079   GWEN_PLUGIN_DESCRIPTION_LIST2 *_importerList;
00080   QString _importerName;
00081   AB_IMEXPORTER *_importer;
00082   GWEN_DB_NODE *_profiles;
00083   GWEN_DB_NODE *_profile;
00084   std::list<QWidget*> _pagesDone;
00085   QString _logText;
00086   GWEN_DB_NODE *_dbData;
00087   GWEN_LOGGER_LEVEL _logLevel;
00088 
00089   bool _updateImporterList();
00090   bool _checkFileType(const QString &fname);
00091   bool _readFile(const QString &fname);
00092   bool _importData(AB_IMEXPORTER_CONTEXT *ctx);
00093 
00094   bool _doPage(QWidget *p);
00095   bool _undoPage(QWidget *p);
00096 
00097   bool enterPage(QWidget *p, bool back);
00098   bool leavePage(QWidget *p, bool back);
00099 
00100   bool initSelectSourcePage();
00101   bool doSelectSourcePage(QWidget *p);
00102   bool undoSelectSourcePage(QWidget *p);
00103 
00104   bool initSelectImporterPage();
00105   bool doSelectImporterPage(QWidget *p);
00106   bool undoSelectImporterPage(QWidget *p);
00107 
00108   bool initSelectProfilePage();
00109   bool doSelectProfilePage(QWidget *p);
00110   bool undoSelectProfilePage(QWidget *p);
00111 
00112   bool doWorkingPage(QWidget *p);
00113   bool undoWorkingPage(QWidget *p);
00114 
00115   bool doImportPage(QWidget *p);
00116 
00117   void save();
00118 
00119 
00120 };
00121 
00122 
00123 
00124 #endif // AQBANKING_KDE_EDITTRANS_H
00125 
00126 
00127 
00128 

Generated on Fri Nov 10 03:56:54 2006 for aqbanking by  doxygen 1.5.1