ksplittransactiondlg.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ksplittransactiondlg.h  -  description
00003                              -------------------
00004     begin                : Thu Jan 10 2002
00005     copyright            : (C) 2000-2002 by Michael Edwardes
00006     email                : mte@users.sourceforge.net
00007                            Javier Campos Morales <javi_c@users.sourceforge.net>
00008                            Felix Rodriguez <frodriguez@users.sourceforge.net>
00009                            John C <thetacoturtle@users.sourceforge.net>
00010                            Thomas Baumgart <ipwizard@users.sourceforge.net>
00011                            Kevin Tambascio <ktambascio@users.sourceforge.net>
00012  ***************************************************************************/
00013 
00014 /***************************************************************************
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef KSPLITTRANSACTIONDLG_H
00024 #define KSPLITTRANSACTIONDLG_H
00025 
00026 // ----------------------------------------------------------------------------
00027 // QT Includes
00028 
00029 // ----------------------------------------------------------------------------
00030 // KDE Includes
00031 
00032 #include <kpopupmenu.h>
00033 #include <kiconloader.h>
00034 
00035 // ----------------------------------------------------------------------------
00036 // Project Includes
00037 
00038 #include <kmymoney/mymoneymoney.h>
00039 #include <kmymoney/mymoneyaccount.h>
00040 #include <kmymoney/mymoneytransaction.h>
00041 
00042 class kMyMoneyEdit;
00043 class kMyMoneyLineEdit;
00044 
00045 #include "../dialogs/ksplittransactiondlgdecl.h"
00046 
00051 class KSplitTransactionDlg : public KSplitTransactionDlgDecl
00052 {
00053   Q_OBJECT
00054 
00055 public:
00056   KSplitTransactionDlg(const MyMoneyTransaction& t,
00057                        const MyMoneySplit& s,
00058                        const MyMoneyAccount& acc,
00059                        const bool amountValid,
00060                        const bool deposit,
00061                        const MyMoneyMoney& calculatedValue,
00062                        const QMap<QString, MyMoneyMoney>& priceInfo,
00063                        QWidget* parent = 0, const char* name = 0);
00064 
00065   virtual ~KSplitTransactionDlg();
00066 
00075   const MyMoneyTransaction& transaction(void) const { return m_transaction; };
00076 
00084   MyMoneyMoney diffAmount(void);
00085 
00092   MyMoneyMoney splitsValue(void);
00093 
00094 private:
00098   void updateSums(void);
00099 
00100 public slots:
00101   int exec(void);
00102 
00103 protected slots:
00104   void accept();
00105   void reject();
00106   void slotClearAllSplits(void);
00107   void slotClearUnusedSplits(void);
00108   void slotSetTransaction(const MyMoneyTransaction& t);
00109   void slotCreateCategory(const QString& txt, QString& id);
00110   void slotMergeSplits(void);
00111 
00113   void initSize(void);
00114 
00115 signals:
00124   void createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent);
00125 
00132   void objectCreation(bool state);
00133 
00134 private:
00138   MyMoneyTransaction     m_transaction;
00139 
00143   MyMoneyAccount         m_account;
00144 
00148   MyMoneySplit           m_split;
00149 
00153   int                    m_precision;
00154 
00159   bool                   m_amountValid;
00160 
00165   bool                   m_isDeposit;
00166 
00171   MyMoneyMoney           m_calculatedValue;
00172 };
00173 
00174 #endif

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