First pass
This commit is contained in:
@@ -36,9 +36,9 @@ KissCount::KissCount(const char* bdd_filename) : _user(0)
|
||||
|
||||
_wxUI->SetLanguage(wxLocale::GetSystemLanguage());
|
||||
|
||||
_wxUI->Show(true);
|
||||
_wxUI->Centre();
|
||||
_wxUI->Disable();
|
||||
_wxUI->show();
|
||||
// _wxUI->Centre();
|
||||
// _wxUI->Disable();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -64,17 +64,17 @@ KissCount::~KissCount()
|
||||
if (_user) delete _user;
|
||||
}
|
||||
|
||||
std::list<wxString> KissCount::GetUsers()
|
||||
std::list<std::string> KissCount::GetUsers()
|
||||
{
|
||||
return _db->GetUsers();
|
||||
}
|
||||
|
||||
bool KissCount::IsValidUser(const wxString& user, const wxString& password)
|
||||
bool KissCount::IsValidUser(const std::string& user, const std::string& password)
|
||||
{
|
||||
return _db->IsValidUser(user, password) ;
|
||||
}
|
||||
|
||||
void KissCount::LoadUser(const wxString& user)
|
||||
void KissCount::LoadUser(const std::string& user)
|
||||
{
|
||||
if (_user) delete _user;
|
||||
_user = _db->LoadUser(user) ;
|
||||
@@ -100,12 +100,12 @@ User* KissCount::GetUser()
|
||||
return _user;
|
||||
}
|
||||
|
||||
double KissCount::GetAccountAmount(const wxString& id, int month, int year)
|
||||
double KissCount::GetAccountAmount(int id, int month, int year)
|
||||
{
|
||||
return _db->GetAccountAmount(id, month, year);
|
||||
}
|
||||
|
||||
double KissCount::CalcAccountAmount(const wxString& id, int month, int year, bool* had_values)
|
||||
double KissCount::CalcAccountAmount(int id, int month, int year, bool* had_values)
|
||||
{
|
||||
return _db->CalcAccountAmount(id, month, year, had_values);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ void KissCount::UpdateOperation(Operation& op, bool checkTransfert)
|
||||
// Unlink
|
||||
if (checkTransfert)
|
||||
{
|
||||
op.transfert = wxT("");
|
||||
op.transfert = 0;
|
||||
_user->LinkOrUnlinkOperation(op);
|
||||
}
|
||||
|
||||
@@ -126,9 +126,9 @@ void KissCount::UpdateOperation(Operation& op, bool checkTransfert)
|
||||
_user->LinkOrUnlinkOperation(op);
|
||||
}
|
||||
|
||||
wxString KissCount::AddOperation(Operation& op, bool checkTransfert)
|
||||
int KissCount::AddOperation(Operation& op, bool checkTransfert)
|
||||
{
|
||||
wxString ret = _db->AddOperation(_user, op, checkTransfert);
|
||||
int ret = _db->AddOperation(_user, op, checkTransfert);
|
||||
|
||||
if (checkTransfert && op.transfert.Length())
|
||||
_user->LinkOrUnlinkOperation(op);
|
||||
@@ -140,7 +140,7 @@ void KissCount::DeleteOperation(Operation& op)
|
||||
{
|
||||
if (op.transfert.Length())
|
||||
{
|
||||
op.transfert = wxT("");
|
||||
op.transfert = 0;
|
||||
_user->LinkOrUnlinkOperation(op);
|
||||
}
|
||||
_db->DeleteOperation(_user, op);
|
||||
@@ -159,22 +159,22 @@ void KissCount::DeleteOperations(int month, int year)
|
||||
}
|
||||
}
|
||||
|
||||
double KissCount::MetaAmount(const wxString& id)
|
||||
double KissCount::MetaAmount(int id)
|
||||
{
|
||||
return _db->MetaAmount(id);
|
||||
}
|
||||
|
||||
double KissCount::MetaPositiveAmount(const wxString& id)
|
||||
double KissCount::MetaPositiveAmount(int id)
|
||||
{
|
||||
return _db->MetaPositiveAmount(id);
|
||||
}
|
||||
|
||||
void KissCount::SetAccountAmount(const wxString& accountId, int month, int year, double amount)
|
||||
void KissCount::SetAccountAmount(int accountId, int month, int year, double amount)
|
||||
{
|
||||
_db->SetAccountAmount(accountId, month, year, amount);
|
||||
}
|
||||
|
||||
wxString KissCount::AddAccount(Account& ac)
|
||||
int KissCount::AddAccount(Account& ac)
|
||||
{
|
||||
wxDateTime curDate;
|
||||
|
||||
@@ -196,7 +196,7 @@ void KissCount::UpdateAccount(Account& ac)
|
||||
std::sort(_user->_accounts.begin(), _user->_accounts.end(), Account());
|
||||
}
|
||||
|
||||
void KissCount::DeleteAccount(Account& ac, const wxString& replacement)
|
||||
void KissCount::DeleteAccount(Account& ac, int replacement)
|
||||
{
|
||||
std::map<unsigned int, std::map<unsigned int, std::vector<Operation> >* >::iterator it2;
|
||||
|
||||
@@ -209,27 +209,27 @@ void KissCount::DeleteAccount(Account& ac, const wxString& replacement)
|
||||
LoadYear(it2->first, true);
|
||||
}
|
||||
|
||||
void KissCount::AddSharedAccount(Account& ac, const wxString& granted)
|
||||
void KissCount::AddSharedAccount(Account& ac, const std::string& granted)
|
||||
{
|
||||
_db->AddSharedAccount(ac, granted);
|
||||
}
|
||||
|
||||
void KissCount::RemoveSharedAccount(Account& ac, const wxString& granted)
|
||||
void KissCount::RemoveSharedAccount(Account& ac, const std::string& granted)
|
||||
{
|
||||
_db->RemoveSharedAccount(ac, granted);
|
||||
}
|
||||
|
||||
std::map<wxString, wxString> KissCount::getSharedAccountOwners(const wxString& account)
|
||||
std::map<int, int> KissCount::getSharedAccountOwners(int account)
|
||||
{
|
||||
return _db->getSharedAccountOwners(account);
|
||||
}
|
||||
|
||||
wxString KissCount::getSharedAccountOwner(const wxString& account)
|
||||
int KissCount::getSharedAccountOwner(int account)
|
||||
{
|
||||
return _db->getSharedAccountOwner(account);
|
||||
}
|
||||
|
||||
wxString KissCount::AddCategory(Category& category)
|
||||
int KissCount::AddCategory(Category& category)
|
||||
{
|
||||
category.id = _db->AddCategory(_user, category);
|
||||
_user->AddCategory(category);
|
||||
@@ -243,7 +243,7 @@ void KissCount::UpdateCategory(Category& category)
|
||||
_user->UpdateCategory(category);
|
||||
}
|
||||
|
||||
void KissCount::DeleteCategory(Category& category, const wxString& replacement)
|
||||
void KissCount::DeleteCategory(Category& category, int replacement)
|
||||
{
|
||||
std::map<unsigned int, std::map<unsigned int, std::vector<Operation> >* >::iterator it;
|
||||
|
||||
@@ -264,7 +264,7 @@ std::map<int, std::vector<int> > KissCount::GetAllOperations()
|
||||
void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo)
|
||||
{
|
||||
std::vector<Operation>::iterator it, it2;
|
||||
std::map<wxString, wxString> meta;
|
||||
std::map<int, int> meta;
|
||||
Operation op;
|
||||
|
||||
_db->GenerateMonth(_user, monthFrom, yearFrom, monthTo, yearTo);
|
||||
@@ -317,17 +317,17 @@ void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int year
|
||||
_wxUI->GenerateMonth(monthTo, yearTo);
|
||||
}
|
||||
|
||||
void KissCount::ChangePassword(const wxString& password)
|
||||
void KissCount::ChangePassword(const std::string& password)
|
||||
{
|
||||
_db->ChangePassword(_user, password);
|
||||
}
|
||||
|
||||
bool KissCount::UserExists(const wxString& name)
|
||||
bool KissCount::UserExists(const std::string& name)
|
||||
{
|
||||
return _db->UserExists(name);
|
||||
}
|
||||
|
||||
void KissCount::ChangeName(const wxString& name)
|
||||
void KissCount::ChangeName(const std::string& name)
|
||||
{
|
||||
_db->ChangeName(_user, name);
|
||||
_user->_name = name;
|
||||
@@ -339,13 +339,13 @@ wxString default_cats[] = {
|
||||
_("Unexpected"), _("Other")
|
||||
};
|
||||
|
||||
void KissCount::NewUser(const wxString& name)
|
||||
void KissCount::NewUser(const std::string& name)
|
||||
{
|
||||
wxDateTime curDate;
|
||||
Account ac = {
|
||||
/*.id = */wxT(""),
|
||||
/*.id = */0,
|
||||
/*.name = */_("Account 1"),
|
||||
/*.number = */wxT(""),
|
||||
/*.number = */0,
|
||||
/*.shared = */false,
|
||||
/*.blocked = */false,
|
||||
/*._default = */true,
|
||||
@@ -360,20 +360,20 @@ void KissCount::NewUser(const wxString& name)
|
||||
|
||||
AddAccount(ac);
|
||||
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Fix") ; cat.backcolor = view::OWN_YELLOW ; cat.forecolor = *wxBLACK; cat.fix_cost = true;
|
||||
cat.parent = 0 ; cat.name = "Fix" ; cat.backcolor = view::OWN_YELLOW ; cat.forecolor = Qt::black; cat.fix_cost = true;
|
||||
AddCategory(cat);
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Groceries") ; cat.backcolor = view::OWN_GREEN; cat.forecolor = *wxBLACK; cat.fix_cost = false;
|
||||
cat.parent = 0 ; cat.name = "Groceries" ; cat.backcolor = view::OWN_GREEN; cat.forecolor = Qt::black; cat.fix_cost = false;
|
||||
AddCategory(cat);
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Hobbies") ; cat.backcolor = view::OWN_GREEN; cat.forecolor = *wxBLACK; cat.fix_cost = false;
|
||||
cat.parent = 0 ; cat.name = "Hobbies" ; cat.backcolor = view::OWN_GREEN; cat.forecolor = Qt::black; cat.fix_cost = false;
|
||||
AddCategory(cat);
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Car") ; cat.backcolor = view::OWN_GREEN; cat.forecolor = *wxBLACK; cat.fix_cost = false;
|
||||
cat.parent = 0 ; cat.name = "Car" ; cat.backcolor = view::OWN_GREEN; cat.forecolor = Qt::black; cat.fix_cost = false;
|
||||
AddCategory(cat);
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Unexpected") ; cat.backcolor = view::OWN_GREEN; cat.forecolor = *wxBLACK; cat.fix_cost = false;
|
||||
cat.parent = 0 ; cat.name = "Unexpected" ; cat.backcolor = view::OWN_GREEN; cat.forecolor = Qt::black; cat.fix_cost = false;
|
||||
AddCategory(cat);
|
||||
cat.parent = wxT("0") ; cat.name = wxT("Other") ; cat.backcolor = view::OWN_GREEN; cat.forecolor = *wxBLACK; cat.fix_cost = false;
|
||||
cat.parent = 0 ; cat.name = "Other" ; cat.backcolor = view::OWN_GREEN; cat.forecolor = Qt::black; cat.fix_cost = false;
|
||||
AddCategory(cat);
|
||||
|
||||
SetOperationOrder(wxT("ASC"));
|
||||
SetOperationOrder("ASC");
|
||||
|
||||
_db->GenerateMonth(_user, -1, -1, (int)curDate.GetMonth(), curDate.GetYear());
|
||||
}
|
||||
@@ -389,27 +389,27 @@ void KissCount::KillMe()
|
||||
|
||||
void KissCount::SetLanguage(wxLanguage language)
|
||||
{
|
||||
_user->_preferences[wxT("language")] = wxString::Format(wxT("%d"), language) ;
|
||||
_db->UpdatePreference(_user, wxT("language"));
|
||||
_user->_preferences["language"] = wxString::Format(wxT("%d"), language) ;
|
||||
_db->UpdatePreference(_user, "language");
|
||||
}
|
||||
|
||||
/*
|
||||
ASC (default) or DESC
|
||||
*/
|
||||
void KissCount::SetOperationOrder(const wxString& order)
|
||||
void KissCount::SetOperationOrder(const std::string& order)
|
||||
{
|
||||
_user->_preferences[wxT("operation_order")] = order;
|
||||
_db->UpdatePreference(_user, wxT("operation_order"));
|
||||
_user->_preferences["operation_order"] = order;
|
||||
_db->UpdatePreference(_user, "operation_order");
|
||||
}
|
||||
|
||||
const wxString& KissCount::GetOperationOrder()
|
||||
const std::string& KissCount::GetOperationOrder()
|
||||
{
|
||||
return _user->_preferences[wxT("operation_order")] ;
|
||||
return _user->_preferences["operation_order"] ;
|
||||
}
|
||||
|
||||
std::vector<Operation>* KissCount::Search(wxString* description, wxDateTime* dateFrom, wxDateTime* dateTo,
|
||||
wxString* amountFrom, wxString* amountTo,
|
||||
std::vector<wxString> categories, int types, std::vector<wxString> accounts)
|
||||
std::vector<Operation>* KissCount::Search(std::string* description, wxDateTime* dateFrom, wxDateTime* dateTo,
|
||||
int* amountFrom, int* amountTo,
|
||||
std::vector<int> categories, int types, std::vector<int> accounts)
|
||||
{
|
||||
|
||||
return _db->Search(_user, description, dateFrom, dateTo, amountFrom, amountTo, categories, types, accounts, true);
|
||||
@@ -460,8 +460,8 @@ bool KissCount::SearchPreviousOperation(Operation* res, Operation& op, int month
|
||||
}
|
||||
|
||||
void KissCount::GetStats(int monthFrom, int yearFrom, int monthTo, int yearTo,
|
||||
std::map<wxString, std::map<int, std::map<int, double> > >* accountAmounts,
|
||||
std::map<wxString, double>* categories)
|
||||
std::map<int, std::map<int, std::map<int, double> > >* accountAmounts,
|
||||
std::map<int, double>* categories)
|
||||
{
|
||||
wxString monthF = wxString::Format(wxT("%d"), monthFrom);
|
||||
wxString monthT = wxString::Format(wxT("%d"), monthTo);
|
||||
@@ -472,8 +472,8 @@ void KissCount::GetStats(int monthFrom, int yearFrom, int monthTo, int yearTo,
|
||||
}
|
||||
|
||||
void KissCount::GetMonthStats(int month, int year, int nbDays,
|
||||
std::map<wxString, std::vector<double> >* operations,
|
||||
std::map<wxString, double>* categories)
|
||||
std::map<int, std::vector<double> >* operations,
|
||||
std::map<int, double>* categories)
|
||||
{
|
||||
wxString monthS = wxString::Format(wxT("%d"), month);
|
||||
wxString yearS = wxString::Format(wxT("%d"), year);
|
||||
@@ -482,70 +482,76 @@ void KissCount::GetMonthStats(int month, int year, int nbDays,
|
||||
}
|
||||
|
||||
|
||||
std::map<wxString, double>* KissCount::GetNotChecked(int month, int year)
|
||||
std::map<int, double>* KissCount::GetNotChecked(int month, int year)
|
||||
{
|
||||
return _db->GetNotChecked(_user, month, year);
|
||||
}
|
||||
|
||||
std::map<wxString, double>* KissCount::GetVirtualAmount(int month, int year)
|
||||
std::map<int, double>* KissCount::GetVirtualAmount(int month, int year)
|
||||
{
|
||||
return _db->GetVirtualAmount(_user, month, year);
|
||||
}
|
||||
|
||||
wxFont KissCount::ExtractFont(wxString strFont)
|
||||
QFont KissCount::ExtractFont(std::string strFont)
|
||||
{
|
||||
long int pos, pointSize, family, style, weight;
|
||||
long int pointSize, family, style, weight;
|
||||
size_t pos;
|
||||
std::string tmp;
|
||||
wxString faceName;
|
||||
|
||||
if (!strFont.Length())
|
||||
if (!strFont.size())
|
||||
{
|
||||
DEFAULT_FONT(f);
|
||||
return f;
|
||||
}
|
||||
|
||||
pos = strFont.Find(wxT(";"));
|
||||
pos = strFont.find(";");
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
strFont.SubString(0, pos).ToLong(&pointSize);
|
||||
strFont = strFont.SubString(pos+1, strFont.Length());
|
||||
tmp = substring(strFont, 0, pos);
|
||||
pointSize = QString(tmp).toInt();
|
||||
strFont = strFont.substring(pos+1, strFont.size());
|
||||
}
|
||||
|
||||
pos = strFont.find(";");
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
tmp = substring(strFont, 0, pos);
|
||||
family = QString(tmp).toInt();
|
||||
strFont = strFont.substring(pos+1, strFont.size());
|
||||
}
|
||||
|
||||
pos = strFont.find(";");
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
tmp = substring(strFont, 0, pos);
|
||||
style = QString(tmp).toInt();
|
||||
strFont = strFont.substring(pos+1, strFont.size());
|
||||
}
|
||||
|
||||
pos = strFont.Find(wxT(";"));
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
strFont.SubString(0, pos).ToLong(&family);
|
||||
strFont = strFont.SubString(pos+1, strFont.Length());
|
||||
}
|
||||
|
||||
pos = strFont.Find(wxT(";"));
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
strFont.SubString(0, pos).ToLong(&style);
|
||||
strFont = strFont.SubString(pos+1, strFont.Length());
|
||||
}
|
||||
|
||||
pos = strFont.Find(wxT(";"));
|
||||
|
||||
if (pos != -1)
|
||||
{
|
||||
strFont.SubString(0, pos).ToLong(&weight);
|
||||
strFont = strFont.SubString(pos+1, strFont.Length());
|
||||
tmp = substring(strFont, 0, pos);
|
||||
weight = QString(tmp).toInt();
|
||||
strFont = strFont.substring(pos+1, strFont.size());
|
||||
}
|
||||
|
||||
faceName = strFont;
|
||||
|
||||
return wxFont(pointSize, family, style, weight, false, faceName) ;
|
||||
return QFont(faceName, pointSize, weight);
|
||||
}
|
||||
|
||||
wxString KissCount::CompactFont(const wxFont& font)
|
||||
std::string KissCount::CompactFont(const QFont& font)
|
||||
{
|
||||
wxString res = wxString::Format(wxT("%d;%d;%d;%d;"), font.GetPointSize(), font.GetFamily(), font.GetStyle(), font.GetWeight());
|
||||
res += font.GetFaceName();
|
||||
QString res = QString::sprintf("%d;%d;%d;%d;", font.pointSize(), 0, 0, font.weight());
|
||||
res += font.family();
|
||||
|
||||
return res;
|
||||
return res.toStdString();
|
||||
}
|
||||
|
||||
void KissCount::UnRegisterImportEngine(ImportEngine* engine)
|
||||
@@ -580,7 +586,7 @@ wxString KissCount::GetImportEngineExtensions()
|
||||
return res;
|
||||
}
|
||||
|
||||
ImportEngine* KissCount::GetImportEngine(wxString path)
|
||||
ImportEngine* KissCount::GetImportEngine(std::string path)
|
||||
{
|
||||
std::vector<ImportEngine*>::iterator it;
|
||||
std::vector<ImportEngine*>* importEngines = KissCount::GetImportEngines();
|
||||
@@ -615,13 +621,13 @@ void KissCount::RegisterExportEngine(ExportEngine* engine)
|
||||
|
||||
wxString KissCount::GetExportEngineExtensions()
|
||||
{
|
||||
wxString res;
|
||||
std::string res;
|
||||
std::vector<ExportEngine*>::iterator it;
|
||||
int i;
|
||||
std::vector<ExportEngine*>* exportEngines = KissCount::GetExportEngines();
|
||||
|
||||
for(i=0; i<(int)exportEngines->size()-1; i++)
|
||||
res = res + (*exportEngines)[i]->GetFileExt() + wxT("|") ;
|
||||
res = res + (*exportEngines)[i]->GetFileExt() + "|" ;
|
||||
|
||||
if (exportEngines->size())
|
||||
res = res + (*exportEngines)[i]->GetFileExt();
|
||||
@@ -629,7 +635,7 @@ wxString KissCount::GetExportEngineExtensions()
|
||||
return res;
|
||||
}
|
||||
|
||||
ExportEngine* KissCount::GetExportEngine(wxString path)
|
||||
ExportEngine* KissCount::GetExportEngine(std::string path)
|
||||
{
|
||||
std::vector<ExportEngine*>::iterator it;
|
||||
std::vector<ExportEngine*>* exportEngines = KissCount::GetExportEngines();
|
||||
|
@@ -22,112 +22,115 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <model/import/ImportEngine.hpp>
|
||||
#include <model/export/ExportEngine.hpp>
|
||||
#include <model/model.hpp>
|
||||
|
||||
#include <wx/display.h>
|
||||
|
||||
#include <view/wxUI.hpp>
|
||||
|
||||
#define APP_VERSION "0.3"
|
||||
|
||||
#define ESCAPE_CHARS(s) { \
|
||||
#define ESCAPE_CHARS(s) s
|
||||
/*{ \
|
||||
if (s.Find(wxT("\\\"")) == wxNOT_FOUND) \
|
||||
s.Replace(wxT("\""), wxT("\\\""), true); \
|
||||
if (s.Find(wxT("\\\'")) == wxNOT_FOUND) \
|
||||
s.Replace(wxT("\'"), wxT("\\\'"), true); \
|
||||
}
|
||||
|
||||
#define UNESCAPE_CHARS(s) { \
|
||||
*/
|
||||
#define UNESCAPE_CHARS(s) s
|
||||
/*{ \
|
||||
s.Replace(wxT("\\\""), wxT("\""), true); \
|
||||
s.Replace(wxT("\\\'"), wxT("\'"), true); \
|
||||
}
|
||||
*/
|
||||
class wxUI;
|
||||
class Database;
|
||||
class ImportEngine;
|
||||
class ExportEngine;
|
||||
|
||||
class KissCount
|
||||
class KissCount : public QApplication
|
||||
{
|
||||
public:
|
||||
KissCount(const char* bdd_filename);
|
||||
~KissCount();
|
||||
|
||||
std::list<wxString> GetUsers();
|
||||
bool IsValidUser(const wxString& user, const wxString& password);
|
||||
void LoadUser(const wxString& user);
|
||||
std::list<std::string> GetUsers();
|
||||
bool IsValidUser(const std::string& user, const std::string& password);
|
||||
void LoadUser(const std::string& user);
|
||||
User* GetUser();
|
||||
void ChangePassword(const wxString& password);
|
||||
bool UserExists(const wxString& name);
|
||||
void ChangeName(const wxString& name);
|
||||
void NewUser(const wxString& name);
|
||||
void ChangePassword(const std::string& password);
|
||||
bool UserExists(const std::string& name);
|
||||
void ChangeName(const std::string& name);
|
||||
void NewUser(const std::string& name);
|
||||
|
||||
void LoadYear(int year, bool force=false);
|
||||
|
||||
wxString AddOperation(Operation& op, bool checkTransfert=true);
|
||||
int AddOperation(Operation& op, bool checkTransfert=true);
|
||||
void UpdateOperation(Operation& op, bool checkTransfert=true);
|
||||
void DeleteOperation(Operation& op);
|
||||
void DeleteOperations(int month, int year);
|
||||
double MetaAmount(const wxString& id);
|
||||
double MetaPositiveAmount(const wxString& id);
|
||||
double MetaAmount(int id);
|
||||
double MetaPositiveAmount(int id);
|
||||
|
||||
double GetAccountAmount(const wxString& id, int month, int year);
|
||||
void SetAccountAmount(const wxString& accountId, int month, int year, double value);
|
||||
double CalcAccountAmount(const wxString& id, int month, int year, bool* had_values);
|
||||
double GetAccountAmount(int id, int month, int year);
|
||||
void SetAccountAmount(int accountId, int month, int year, double value);
|
||||
double CalcAccountAmount(int id, int month, int year, bool* had_values);
|
||||
|
||||
wxString AddAccount(Account& ac);
|
||||
int AddAccount(Account& ac);
|
||||
void UpdateAccount(Account& ac);
|
||||
void DeleteAccount(Account& ac, const wxString& replacement);
|
||||
void AddSharedAccount(Account& ac, const wxString& granted);
|
||||
void RemoveSharedAccount(Account& ac, const wxString& granted);
|
||||
std::map<wxString, wxString> getSharedAccountOwners(const wxString& account);
|
||||
wxString getSharedAccountOwner(const wxString& account);
|
||||
void DeleteAccount(Account& ac, int replacement);
|
||||
void AddSharedAccount(Account& ac, const std::string& granted);
|
||||
void RemoveSharedAccount(Account& ac, const std::string& granted);
|
||||
std::map<int, int> getSharedAccountOwners(int account);
|
||||
int getSharedAccountOwner(int account);
|
||||
|
||||
wxString AddCategory(Category& category);
|
||||
int AddCategory(Category& category);
|
||||
void UpdateCategory(Category& category);
|
||||
void DeleteCategory(Category& category, const wxString& replacement);
|
||||
void DeleteCategory(Category& category, int replacement);
|
||||
|
||||
std::map<int, std::vector<int> > GetAllOperations();
|
||||
|
||||
void GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo);
|
||||
void KillMe();
|
||||
|
||||
void SetLanguage(wxLanguage language);
|
||||
void SetOperationOrder(const wxString& order);
|
||||
const wxString& GetOperationOrder();
|
||||
|
||||
std::vector<Operation>* Search(wxString* description, wxDateTime* dateFrom, wxDateTime* dateTo,
|
||||
wxString* amountFrom, wxString* amountTo,
|
||||
std::vector<wxString> categories, int types, std::vector<wxString> accounts);
|
||||
void SetLanguage(std::string language);
|
||||
void SetOperationOrder(const std::string& order);
|
||||
const std::string& GetOperationOrder();
|
||||
|
||||
std::vector<Operation>* Search(std::string* description, QDate* dateFrom, QDate* dateTo,
|
||||
int* amountFrom, int* amountTo,
|
||||
std::vector<int> categories, int types, std::vector<int> accounts);
|
||||
|
||||
bool SearchPreviousOperation(Operation* res, Operation& op, int month, int year, bool limitToType);
|
||||
|
||||
void GetStats(int monthFrom, int yearFrom, int monthTo, int yearTo,
|
||||
std::map<wxString, std::map<int, std::map<int, double> > >* accountAmounts,
|
||||
std::map<wxString, double>* categories);
|
||||
std::map<int, std::map<int, std::map<int, double> > >* accountAmounts,
|
||||
std::map<int, double>* categories);
|
||||
|
||||
void GetMonthStats(int month, int year, int nbDays,
|
||||
std::map<wxString, std::vector<double> >* operations,
|
||||
std::map<wxString, double>* categories);
|
||||
std::map<int, std::vector<double> >* operations,
|
||||
std::map<int, double>* categories);
|
||||
|
||||
std::map<wxString, double>* GetNotChecked(int month, int year);
|
||||
std::map<wxString, double>* GetVirtualAmount(int month, int year);
|
||||
std::map<int, double>* GetNotChecked(int month, int year);
|
||||
std::map<int, double>* GetVirtualAmount(int month, int year);
|
||||
|
||||
static wxFont ExtractFont(wxString strFont);
|
||||
static wxString CompactFont(const wxFont& font);
|
||||
static QFont ExtractFont(std::string);
|
||||
static std::string CompactFont(const QFont& font);
|
||||
|
||||
static void RegisterImportEngine(ImportEngine* engine);
|
||||
static void UnRegisterImportEngine(ImportEngine* engine);
|
||||
|
||||
wxString GetImportEngineExtensions();
|
||||
ImportEngine* GetImportEngine(wxString path);
|
||||
std::string GetImportEngineExtensions();
|
||||
ImportEngine* GetImportEngine(std::string path);
|
||||
|
||||
static void RegisterExportEngine(ExportEngine* engine);
|
||||
static void UnRegisterExportEngine(ExportEngine* engine);
|
||||
|
||||
wxString GetExportEngineExtensions();
|
||||
ExportEngine* GetExportEngine(wxString path);
|
||||
std::string GetExportEngineExtensions();
|
||||
ExportEngine* GetExportEngine(std::string path);
|
||||
|
||||
void UpdateImportPattern();
|
||||
|
||||
|
Reference in New Issue
Block a user