diff options
author | rtk0c <[email protected]> | 2021-04-09 23:17:45 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-04-09 23:17:45 -0700 |
commit | 4303d0be47526b35e5bb3e3be001da227dae5d96 (patch) | |
tree | 6e79502e9966f835756d30929ea3f7127ba3080b /core/src/Model/Project.hpp | |
parent | ce8660cc5bfc12e6e3f75d4cce22492783ca9066 (diff) |
Fix crash on load entries
- TODO format time properly
- TODO add Purchases table visualization
Diffstat (limited to 'core/src/Model/Project.hpp')
-rw-r--r-- | core/src/Model/Project.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/core/src/Model/Project.hpp b/core/src/Model/Project.hpp index dca10d0..748ca82 100644 --- a/core/src/Model/Project.hpp +++ b/core/src/Model/Project.hpp @@ -1,7 +1,7 @@ #pragma once #include "Model/Items.hpp" -#include "Model/TransactionDatabase.hpp" +#include "Model/TransactionsModel.hpp" #include <json/forwards.h> #include <filesystem> @@ -17,7 +17,7 @@ private: std::filesystem::path mRootPath; std::string mRootPathString; std::string mName; - TransactionDatabase mDb; + TransactionModel mDb; public: /// Load the project from a directory containing the cplt_project.json file. @@ -27,11 +27,6 @@ public: /// This function assumes the given directory will exist and is empty. Project(std::filesystem::path rootPath, std::string name); - Project(const Project&) = delete; - Project& operator=(const Project&) = delete; - Project(Project&&) = default; - Project& operator=(Project&&) = default; - /// Path to a *directory* that contains the project file. const std::filesystem::path& GetPath() const; const std::string& GetPathString() const; @@ -39,8 +34,8 @@ public: const std::string& GetName() const; void SetName(std::string name); - const TransactionDatabase& GetDatabase() const; - TransactionDatabase& GetDatabase(); + const TransactionModel& GetTransactionsModel() const; + TransactionModel& GetTransactionsModel(); Json::Value Serialize(); void WriteToDisk(); |