Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

kcurrencycalculator.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kcurrencycalculator.h  -  description
00003                              -------------------
00004     begin                : Thu Apr 8 2004
00005     copyright            : (C) 2000-2004 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 KCURRENCYCALCULATOR_H
00024 #define KCURRENCYCALCULATOR_H
00025 
00026 // ----------------------------------------------------------------------------
00027 // QT Includes
00028 
00029 #include <qwidget.h>
00030 
00031 // ----------------------------------------------------------------------------
00032 // KDE Includes
00033 
00034 // ----------------------------------------------------------------------------
00035 // Project Includes
00036 
00037 #include "../dialogs/kcurrencycalculatordecl.h"
00038 #include <kmymoney/mymoneyfile.h>
00039 
00044 class KCurrencyCalculator : public KCurrencyCalculatorDecl
00045 {
00046   Q_OBJECT
00047 
00048 public:
00061   KCurrencyCalculator(const MyMoneySecurity& from, const MyMoneySecurity& to, const MyMoneyMoney& value, const MyMoneyMoney& shares, const QDate& date, const signed64 resultFraction = 100, QWidget *parent=0, const char *name=0);
00062   ~KCurrencyCalculator();
00063 
00064   const MyMoneyMoney price(void) const;
00065 
00066   void setupPriceEditor(void);
00067 
00068   static bool setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTransaction& t, const MyMoneySplit& s, const QMap<QCString, MyMoneyMoney>& priceInfo, QWidget* parentWidget);
00069 
00070 protected:
00071   void updateExample(const MyMoneyMoney& price);
00072 
00073 protected slots:
00074   void slotSetToAmount(void);
00075   void slotSetExchangeRate(void);
00076   void slotUpdateResult(const QString& txt);
00077   void slotUpdateRate(const QString& txt);
00078   virtual void accept(void);
00079 
00080 private:
00081   MyMoneySecurity     m_fromCurrency;
00082   MyMoneySecurity     m_toCurrency;
00083   MyMoneyMoney        m_result;
00084   MyMoneyMoney        m_value;
00085   signed64            m_resultFraction;
00086 };
00087 
00088 #endif

Generated on Sun Sep 7 03:57:34 2008 for KMyMoney by  doxygen 1.4.1