KissCount/src/view/AccountPanel.hpp

94 lines
2.5 KiB
C++
Raw Normal View History

2011-09-04 19:25:53 +02: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 ACCOUNTPANEL_H
#define ACCOUNTPANEL_H
// #include <wx/wx.h>
// #include <wx/grid.h>
// #include <wx/treectrl.h>
// #include <wx/pie/pieplot.h>
// #include <wx/chartpanel.h>
// #include <wx/radiobox.h>
#include "view.hpp"
#include <model/model.hpp>
// #include "grid/GridAccount.hpp"
// #include "grid/CalendarEditor.hpp"
// #include <wx/category/categorysimpledataset.h>
class GridAccount;
class AccountPanel: public KissPanel
{
Q_OBJECT;
public:
AccountPanel(KissCount* kiss, wxUI *parent);
~AccountPanel();
KissPanel* CreatePanel();
QPushButton* GetButton();
QString GetToolTip();
void OnShow();
void ChangeUser();
void LoadYear(int year, bool showMonth=true);
void ShowMonth(int month, int year);
void GenerateMonth(int month, int year);
void OnOperationModified();
void OnAccountModified();
void OnTreeRightClick();
void OnTreeChange();
void OnMenuGenerate();
void OnMenuDelete();
void OnCalendarChange();
void OnModeChange();
void OnGroup();
void OnUnGroup();
void OnUpdateNextMonths();
int _curMonth, _curYear;
private:
// wxTreeCtrl _tree;
// wxCalendarCtrl* _calendar;
// GridAccount* _grid;
// wxGrid *_statsGrid, *_accountsGrid;
// PiePlot* _pie;
double *_categoriesValues;
// wxRadioBox *_radioMode;
std::map<QString, int> _categoriesIndexes;
std::vector<Operation>* _curOperations;
QString* _categories, *_accounts;
std::map<QString, double> _accountsInitValues;
// CategorySimpleDataset* _dataset;
int _fixCosts;
void InitStatsGrid(User* user);
void InitAccountsGrid(User* user, int month, int year);
void UpdateStats();
void InsertOperation(User* user, Operation* op, int line, bool fix);
void GetTreeSelection(int* month, int* year);
};
#endif