summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/kmymoneyfile.cpp
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/views/kmymoneyfile.cpp
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/views/kmymoneyfile.cpp')
-rw-r--r--kmymoney2/views/kmymoneyfile.cpp114
1 files changed, 114 insertions, 0 deletions
diff --git a/kmymoney2/views/kmymoneyfile.cpp b/kmymoney2/views/kmymoneyfile.cpp
new file mode 100644
index 0000000..4046cc0
--- /dev/null
+++ b/kmymoney2/views/kmymoneyfile.cpp
@@ -0,0 +1,114 @@
+/***************************************************************************
+ kmymoneyfile.cpp - description
+ -------------------
+ begin : Mon Jun 10 2002
+ copyright : (C) 2000-2002 by Michael Edwardes
+ email : mte@users.sourceforge.net
+ Javier Campos Morales <javi_c@users.sourceforge.net>
+ Felix Rodriguez <frodriguez@users.sourceforge.net>
+ John C <thetacoturtle@users.sourceforge.net>
+ Thomas Baumgart <ipwizard@users.sourceforge.net>
+ Kevin Tambascio <ktambascio@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. *
+ * *
+ ***************************************************************************/
+
+/*
+ * This file is currently not used anymore, but kept here for reference purposes
+ */
+#if 0
+
+#include <klocale.h>
+
+#include "kmymoneyfile.h"
+#include "../mymoney/storage/mymoneyseqaccessmgr.h"
+
+KMyMoneyFile::KMyMoneyFile()
+{
+ // m_file = MyMoneyFile::instance();
+ m_storage = new MyMoneySeqAccessMgr;
+ // m_file->attachStorage(m_storage);
+ m_open = false; // lie a little bit for now
+}
+
+/*
+KMyMoneyFile::KMyMoneyFile(const QString&)
+{
+}
+*/
+
+KMyMoneyFile::~KMyMoneyFile()
+{
+ if(m_storage) {
+ MyMoneyFile::instance()->detachStorage(m_storage);
+ delete m_storage;
+ }
+
+ // if(m_file)
+ // delete m_file;
+}
+
+/*
+KMyMoneyFile *KMyMoneyFile::instance()
+{
+ if (_instance == 0) {
+ _instance = new KMyMoneyFile;
+ }
+
+ return _instance;
+}
+
+MyMoneyFile* KMyMoneyFile::file()
+{
+ return m_file;
+}
+*/
+
+MyMoneySeqAccessMgr* KMyMoneyFile::storage()
+{
+ return m_storage;
+}
+
+void KMyMoneyFile::reset()
+{
+/*
+ delete m_storage;
+ delete m_file;
+ m_storage = new MyMoneySeqAccessMgr;
+ m_file = new MyMoneyFile(m_storage);
+*/
+}
+
+void KMyMoneyFile::open()
+{
+ if(m_storage != 0)
+ close();
+
+ m_storage = new MyMoneySeqAccessMgr;
+ MyMoneyFile::instance()->attachStorage(m_storage);
+ m_open = true;
+}
+
+void KMyMoneyFile::close()
+{
+ if(m_storage != 0) {
+ MyMoneyFile::instance()->detachStorage(m_storage);
+ delete m_storage;
+ m_storage = 0;
+ }
+ m_open = false;
+}
+
+bool KMyMoneyFile::isOpen()
+{
+ return m_open;
+}
+
+#endif