2012-02-05 15:54:09 +01:00
|
|
|
/*
|
|
|
|
Copyright 2010-2011 Grégory Soutadé
|
|
|
|
|
|
|
|
This file is part of KissCount.
|
|
|
|
|
|
|
|
KissCount is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
KissCount is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with KissCount. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef STATSPANEL_H
|
|
|
|
#define STATSPANEL_H
|
|
|
|
|
|
|
|
#include <QtGui>
|
|
|
|
#include <KDChartWidget>
|
|
|
|
|
|
|
|
#include "view.hpp"
|
|
|
|
#include <model/model.hpp>
|
|
|
|
|
|
|
|
class StatsPanel: public KissPanel
|
|
|
|
{
|
|
|
|
Q_OBJECT;
|
|
|
|
|
|
|
|
public:
|
2012-06-29 20:33:33 +02:00
|
|
|
StatsPanel(KissCount* kiss, wxUI *parent, bool lowResolution);
|
2012-02-05 15:54:09 +01:00
|
|
|
|
|
|
|
KissPanel* CreatePanel();
|
|
|
|
QString GetToolTip();
|
|
|
|
void OnShow();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void OnRangeChange(int);
|
|
|
|
void OnAccountChange(QListWidgetItem*);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QCalendarWidget* _calendarFrom, *_calendarTo;
|
|
|
|
QComboBox* _monthFrom, *_yearFrom, *_monthTo, *_yearTo;
|
|
|
|
QTableWidget *_statsGrid;
|
|
|
|
KDChart::Widget* _pie;
|
2012-04-30 21:15:51 +02:00
|
|
|
int *_categoriesValues;
|
2012-02-05 15:54:09 +01:00
|
|
|
//CategorySimpleDataset* _dataset;
|
|
|
|
KDChart::Widget *_plot ;
|
|
|
|
QString* _categories;
|
|
|
|
std::map<int, int> _categoriesIndexes;
|
2012-02-11 11:40:09 +01:00
|
|
|
QBoxLayout *_hbox2, *_vbox2, *_vbox3;
|
2012-02-05 15:54:09 +01:00
|
|
|
QListWidget* _account;
|
|
|
|
|
|
|
|
void UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearTo);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|