2010-05-14 15:04:01 +02:00
|
|
|
#ifndef KISSCOUNT_H
|
|
|
|
#define KISSCOUNT_H
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <list>
|
|
|
|
|
2010-05-24 20:14:15 +02:00
|
|
|
#include <model/model.h>
|
2010-05-14 15:04:01 +02:00
|
|
|
#include <view/wxUI.h>
|
|
|
|
|
|
|
|
class wxUI;
|
|
|
|
class KissCount
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
KissCount();
|
|
|
|
~KissCount();
|
|
|
|
|
|
|
|
std::list<wxString> GetUsers();
|
|
|
|
bool IsValidUser(wxString user, wxString password);
|
|
|
|
void LoadUser(wxString user);
|
2010-05-16 10:35:34 +02:00
|
|
|
User* GetUser();
|
2010-06-27 21:39:49 +02:00
|
|
|
void ChangePassword(wxString password);
|
|
|
|
bool UserExists(wxString name);
|
|
|
|
void ChangeName(wxString name);
|
|
|
|
void NewUser(wxString name);
|
2010-06-22 11:35:21 +02:00
|
|
|
|
|
|
|
void LoadYear(int year, bool force=false);
|
|
|
|
|
2010-07-03 11:48:53 +02:00
|
|
|
wxString AddOperation(Operation op);
|
|
|
|
void UpdateOperation(Operation op);
|
|
|
|
void DeleteOperation(Operation op);
|
2010-06-24 21:02:42 +02:00
|
|
|
void DeleteOperations(int month, int year);
|
2010-06-22 11:35:21 +02:00
|
|
|
|
|
|
|
double GetAccountAmount(wxString id, int month, int year);
|
2010-06-12 15:59:27 +02:00
|
|
|
void SetAccountAmount(int month, int year, wxString accountId, double value);
|
2010-07-03 12:22:46 +02:00
|
|
|
wxString AddAccount(Account ac);
|
2010-07-03 11:48:53 +02:00
|
|
|
void UpdateAccount(Account ac);
|
|
|
|
void DeleteAccount(Account ac);
|
2010-06-02 22:14:11 +02:00
|
|
|
|
2010-07-03 11:48:53 +02:00
|
|
|
wxString AddCategory(Category category);
|
|
|
|
void UpdateCategory(Category category);
|
|
|
|
void DeleteCategory(Category category);
|
2010-06-22 11:35:21 +02:00
|
|
|
|
2010-06-23 14:25:00 +02:00
|
|
|
std::map<int, std::vector<int> > GetAllOperations();
|
2010-06-23 19:32:42 +02:00
|
|
|
|
|
|
|
void GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo);
|
2010-06-27 21:39:49 +02:00
|
|
|
void KillMe();
|
2010-05-14 15:04:01 +02:00
|
|
|
private:
|
|
|
|
wxUI* _wxUI;
|
|
|
|
Database* _db;
|
2010-05-16 10:35:34 +02:00
|
|
|
User* _user;
|
2010-05-14 15:04:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|