kforecastview.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                              kforecastview.h
00003                              -------------------
00004     copyright            : (C) 2007 by Alvaro Soliverez
00005     email                : asoliverez@gmail.com
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 KFORECASTVIEW_H
00018 #define KFORECASTVIEW_H
00019 
00020 // ----------------------------------------------------------------------------
00021 // QT Includes
00022 
00023 // ----------------------------------------------------------------------------
00024 // KDE Includes
00025 
00026 
00027 // ----------------------------------------------------------------------------
00028 // Project Includes
00029 
00030 #include <kmymoney/mymoneyaccount.h>
00031 #include <kmymoney/mymoneyutils.h>
00032 
00033 #include "../views/kforecastviewdecl.h"
00034 #include "../widgets/kmymoneyaccounttreeforecast.h"
00035 #include "../reports/kreportchartview.h"
00036 
00037 using namespace reports;
00038 
00046 class KForecastView : public KForecastViewDecl
00047 {
00048   Q_OBJECT
00049 private:
00050 
00051 public:
00052   KForecastView(QWidget *parent=0, const char *name=0);
00053   virtual ~KForecastView();
00054 
00055   void show(void);
00056 
00057 public slots:
00058   void slotLoadForecast(void);
00059   void slotManualForecast(void);
00060 
00061 protected:
00062   typedef enum {
00063     SummaryView = 0,
00064     ListView,
00065     AdvancedView,
00066     BudgetView,
00067     ChartView,
00068     // insert new values above this line
00069     MaxViewTabs
00070   } ForecastViewTab;
00071 
00072   QMap<QString, QString> m_nameIdx;
00073 
00074 
00078   void loadForecast(ForecastViewTab tab);
00079 
00083   void loadListView(void);
00084 
00088   void loadSummaryView(void);
00089 
00093   void loadAdvancedView(void);
00094 
00098   void loadBudgetView(void);
00099 
00103   void loadChartView(void);
00104 
00108   void loadForecastSettings(void);
00109 
00110 protected slots:
00111   void slotTabChanged(QWidget*);
00112 
00118   QValueList<MyMoneyPrice> getAccountPrices(const MyMoneyAccount& acc);
00119 
00120 private:
00121   void addAssetLiabilityRows(const MyMoneyForecast& forecast);
00122   void addIncomeExpenseRows(const MyMoneyForecast& forecast);
00123   void addTotalRow(KMyMoneyAccountTreeForecast* forecastList, const MyMoneyForecast& forecast);
00124   bool includeAccount(MyMoneyForecast& forecast, const MyMoneyAccount& acc);
00125   void loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* parentItem, int forecastType);
00126 
00127   bool                                m_needReload[MaxViewTabs];
00128   KMyMoneyAccountTreeForecastItem*    m_totalItem;
00129   KMyMoneyAccountTreeForecastItem*    m_assetItem;
00130   KMyMoneyAccountTreeForecastItem*    m_liabilityItem;
00131   KMyMoneyAccountTreeForecastItem*    m_incomeItem;
00132   KMyMoneyAccountTreeForecastItem*    m_expenseItem;
00133 
00134   KReportChartView* m_forecastChart;
00135 
00136 };
00137 
00138 #endif

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