From 4303d0be47526b35e5bb3e3be001da227dae5d96 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 9 Apr 2021 23:17:45 -0700 Subject: Fix crash on load entries - TODO format time properly - TODO add Purchases table visualization --- core/src/Model/Project.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'core/src/Model/Project.hpp') 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 #include @@ -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(); -- cgit v1.2.3-70-g09d2