First runnable version
This commit is contained in:
@@ -85,10 +85,10 @@ public:
|
||||
|
||||
Database(const char* filename, KissCount* kiss);
|
||||
|
||||
std::list<std::string> GetUsers();
|
||||
std::list<QString> GetUsers();
|
||||
bool IsValidUser(const QString& user, const QString& password);
|
||||
|
||||
User* LoadUser(const std::string& name);
|
||||
User* LoadUser(const QString& name);
|
||||
void LoadYear(User* user, int year);
|
||||
|
||||
void UpdateOperation(User* user, Operation& op, bool checkTransfert=true);
|
||||
@@ -106,25 +106,25 @@ public:
|
||||
int AddAccount(User* user, Account& ac);
|
||||
void UpdateAccount(Account& ac);
|
||||
void DeleteAccount(User* user, Account& ac, int replacement);
|
||||
void AddSharedAccount(Account& ac, const std::string& granted);
|
||||
void RemoveSharedAccount(Account& ac, const std::string& granted);
|
||||
void AddSharedAccount(Account& ac, const QString& granted);
|
||||
void RemoveSharedAccount(Account& ac, int granted);
|
||||
|
||||
int AddCategory(User* user, Category& category);
|
||||
void UpdateCategory(Category& category);
|
||||
void DeleteCategory(User* user, Category& category, int replacement);
|
||||
bool LoadCategory(int id, const std::string& name, Category& category);
|
||||
bool LoadCategory(int id, const QString& name, Category& category);
|
||||
|
||||
std::map<int, std::vector<int> > GetAllOperations(User* user);
|
||||
void GenerateMonth(User* user, int monthFrom, int yearFrom, int monthTo, int yearTo);
|
||||
|
||||
void ChangePassword(User* user, const std::string& password);
|
||||
bool UserExists(const std::string& name);
|
||||
void ChangeName(User* user, const std::string& name);
|
||||
void NewUser(const std::string& name);
|
||||
void ChangePassword(User* user, const QString& password);
|
||||
bool UserExists(const QString& name);
|
||||
void ChangeName(User* user, const QString& name);
|
||||
void NewUser(const QString& name);
|
||||
|
||||
void UpdatePreference(User* user, const std::string& preference);
|
||||
void UpdatePreference(User* user, const QString& preference);
|
||||
|
||||
std::vector<Operation>* Search(User* user, std::string* description, QDate* dateFrom, QDate* dateTo,
|
||||
std::vector<Operation>* Search(User* user, QString* description, QDate* dateFrom, QDate* dateTo,
|
||||
int* amountFrom, int* amountTo,
|
||||
std::vector<int> categories, int types, std::vector<int> accounts, bool wildcards);
|
||||
|
||||
@@ -138,11 +138,11 @@ public:
|
||||
|
||||
void KillMe(User* user);
|
||||
bool GetOperation(int id, Operation* op);
|
||||
std::map<std::string, std::string> getSharedAccountOwners(int account);
|
||||
int getSharedAccountOwner(int account);
|
||||
std::map<QString, QString> getSharedAccountOwners(int account);
|
||||
QString getSharedAccountOwner(int account);
|
||||
|
||||
std::map<int, int>* GetNotChecked(User* user, int month, int year);
|
||||
std::map<int, int>* GetVirtualAmount(User* user, int month, int year);
|
||||
std::map<int, double>* GetNotChecked(User* user, int month, int year);
|
||||
std::map<int, double>* GetVirtualAmount(User* user, int month, int year);
|
||||
|
||||
void UpdateImportPattern(User* user);
|
||||
|
||||
@@ -150,12 +150,12 @@ public:
|
||||
|
||||
void CheckDatabaseVersion();
|
||||
|
||||
static QString HashPassword(const QString& password);
|
||||
private:
|
||||
KissCount* _kiss;
|
||||
QSqlDatabase _db;
|
||||
|
||||
void CreateDatabase();
|
||||
QString HashPassword(const QString& password);
|
||||
void LinkOrUnlinkOperation(User* user, Operation& op);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user