summaryrefslogtreecommitdiffstats
path: root/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h')
-rw-r--r--kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h
new file mode 100644
index 0000000..65a89de
--- /dev/null
+++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h
@@ -0,0 +1,106 @@
+/***************************************************************************
+ konlinebankingsetupwizard.h
+ -------------------
+ begin : Sat Jan 7 2006
+ copyright : (C) 2006 by Ace Jones
+ email : acejones@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. *
+ * *
+ ***************************************************************************/
+
+#ifndef KONLINEBANKINGSETUPWIZARD_H
+#define KONLINEBANKINGSETUPWIZARD_H
+
+// ----------------------------------------------------------------------------
+// Library Includes
+
+#include <libofx/libofx.h>
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+#include <qwidget.h>
+#include <qvaluelist.h>
+#include <qlistview.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include "konlinebankingsetupdecl.h"
+#include <kmymoney/mymoneykeyvaluecontainer.h>
+class OfxAppVersion;
+class OfxHeaderVersion;
+
+/**
+ * @author Ace Jones
+ */
+
+/**
+ * This class implementes a wizard for setting up an existing account
+ * with online banking.
+ *
+ * The user is asked to choose his bank from the supported bank, and
+ * his account.
+ *
+ * Currently works only with OFX Direct Connect, but I imagined that
+ * other protocols could be included here. To accomodate this, we'd
+ * add another page at the start of the wizard to ask which protocol
+ * they wanted.
+ *
+ */
+class KOnlineBankingSetupWizard : public KOnlineBankingSetupDecl
+{
+ Q_OBJECT
+public:
+ class ListViewItem: public MyMoneyKeyValueContainer, public QListViewItem
+ {
+ public:
+ ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps );
+ virtual void x(void);
+ };
+
+ KOnlineBankingSetupWizard(QWidget *parent=0, const char *name=0);
+ ~KOnlineBankingSetupWizard();
+
+ bool chosenSettings( MyMoneyKeyValueContainer& settings );
+
+ bool isInit(void) const { return m_fInit; }
+
+public slots:
+ void next();
+
+protected:
+ bool finishAccountPage(void);
+ bool finishLoginPage(void);
+ bool finishFiPage(void);
+ bool post(const char* request, const char* url,const char* filename);
+
+ static int ofxAccountCallback(struct OfxAccountData data, void * pv);
+ static int ofxStatusCallback(struct OfxStatusData data, void * pv);
+
+private:
+ /// \internal d-pointer class.
+ class Private;
+ /// \internal d-pointer instance.
+ Private* const d;
+
+ QValueList<OfxFiServiceInfo> m_bankInfo;
+ QValueList<OfxFiServiceInfo>::const_iterator m_it_info;
+ bool m_fDone;
+ bool m_fInit;
+ OfxAppVersion* m_appId;
+ OfxHeaderVersion* m_headerVersion;
+};
+
+#endif
+// vim:cin:si:ai:et:ts=2:sw=2: