kreconciledlg.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kreconciledlg.h
00003                              -------------------
00004     copyright            : (C) 2000 by Michael Edwardes
00005     email                : mte@users.sourceforge.net
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef KRECONCILEDLG_H
00018 #define KRECONCILEDLG_H
00019 
00020 #include <qlabel.h>
00021 #include <klistview.h>
00022 #include <qpushbutton.h>
00023 
00024 #include "../mymoney/mymoneyfile.h"
00025 #include "../mymoney/mymoneymoney.h"
00026 
00027 #include "kreconciledlgdecl.h"
00028 
00029 // This dialog is used for reconciliation.
00030 class KReconcileDlg : public KReconcileDlgDecl  {
00031    Q_OBJECT
00032 public: 
00033     KReconcileDlg(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const QDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file, QWidget *parent=0, const char *name=0);
00034     ~KReconcileDlg();
00035 //  void updateData(void);
00036   void resetData(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const QDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file);
00039 protected:
00040   void resizeEvent(QResizeEvent*);
00041 
00042 protected slots:
00043   void slotDebitSelected(QListViewItem*, const QPoint&, int);
00044   void slotCreditSelected(QListViewItem*, const QPoint&, int);
00045   void finishClicked();
00046   void cancelClicked();
00048   void editClicked();
00049 
00050 signals:
00051   void reconcileFinished(bool);
00052 
00053 private:
00054     MyMoneyMoney m_endingBalance;
00055     MyMoneyMoney m_previousBalance;
00056     MyMoneyMoney m_clearedBalance;
00057   MyMoneyMoney m_debitBalance;
00058   MyMoneyMoney m_creditBalance;
00059     
00060     MyMoneyFile* m_file;
00061     //MyMoneyBank m_bankIndex;
00062     MyMoneyAccount *m_accountIndex;
00063 
00064   QList<MyMoneyTransaction> m_debitsQList;
00065   QList<MyMoneyTransaction> m_creditsQList;
00066   QList<MyMoneyTransaction> m_reconciledTransactions;
00067 
00068   bool m_balanced;  // true when the account is balanced (determined by doDifference)
00069 
00070   QDate m_endingDate;
00071 
00072   void loadLists(void);
00073   void insertTransactions(void);
00074   void doDifference(void);
00076   bool inTransactions(MyMoneyTransaction *debittrans);
00078   bool inDebits(MyMoneyTransaction *transaction);
00080   bool inCredits(MyMoneyTransaction *transaction);
00081 
00082   void reloadLists();
00083   void clearReconcile();
00084 
00085 public slots: // Public slots
00087   void slotTransactionChanged();
00088 };
00089 
00090 #endif

Generated on Wed Jan 26 13:03:17 2011 for KMyMoney by  doxygen 1.5.6