KissCount

KissCount Git Source Tree

Root/src/view/StatsPanel.hpp

1/*
2 Copyright 2010-2011 Grégory Soutadé
3
4 This file is part of KissCount.
5
6 KissCount is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 KissCount is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with KissCount. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef STATSPANEL_H
21#define STATSPANEL_H
22
23#include <QtGui>
24#include <KDChartWidget>
25#include "CostRepartitionBanner.hpp"
26
27#include "view.hpp"
28#include <model/model.hpp>
29
30class StatsPanel: public KissPanel
31{
32 Q_OBJECT;
33
34public:
35 StatsPanel(KissCount* kiss, wxUI *parent, bool lowResolution);
36
37 KissPanel* CreatePanel();
38 QString GetToolTip();
39 void OnShow();
40
41private slots:
42 void OnRangeChange(int);
43 void OnAccountChange(QListWidgetItem*);
44
45private:
46 QCalendarWidget* _calendarFrom, *_calendarTo;
47 QComboBox* _monthFrom, *_yearFrom, *_monthTo, *_yearTo;
48 CostRepartitionBanner* _costRepartitionBanner;
49 int *_categoriesValues;
50 //CategorySimpleDataset* _dataset;
51 KDChart::Widget *_plot ;
52 QString* _categories;
53 std::map<int, int> _categoriesIndexes;
54 QBoxLayout *_hbox2, *_vbox2, *_vbox3;
55 QListWidget* _account;
56
57 void UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearTo);
58};
59
60#endif

Archive Download this file