KissCount/model/User.h
2010-06-03 18:28:38 +02:00

51 lines
982 B
C++

#ifndef USER_H
#define USER_H
#include <vector>
#include <wx/wx.h>
#include "Preferences.h"
struct operation {
wxString id;
unsigned int day;
unsigned int month;
unsigned int year;
double amount;
wxString description;
wxString category;
bool fix_cost;
wxString account;
} ;
struct Account {
wxString id;
wxString name;
wxString number;
int amount;
bool shared;
bool _default;
};
class User
{
public:
~User();
wxString _id;
wxString _name;
wxString _password;
std::map<wxString, Account> _accounts;
std::map<unsigned int, std::map<unsigned int, std::vector<operation> >* > _operations;
Preferences _preferences;
wxString GetCategoryName(wxString catId);
wxString GetCategoryId(wxString catName);
wxString GetAccountName(wxString accountId);
wxString GetAccountId(wxString accountName);
int GetCategoriesNumber();
int GetAccountsNumber();
int GetOperationsNumber(int month, int year);
};
#endif