diff options
Diffstat (limited to 'src/base_tab')
| -rw-r--r-- | src/base_tab/BaseGameTab.hpp | 5 | ||||
| -rw-r--r-- | src/base_tab/BaseImportTab.hpp | 9 | ||||
| -rw-r--r-- | src/base_tab/gamebase/GameBase.hpp | 6 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/base_tab/BaseGameTab.hpp b/src/base_tab/BaseGameTab.hpp index 0abcffa..f09a269 100644 --- a/src/base_tab/BaseGameTab.hpp +++ b/src/base_tab/BaseGameTab.hpp @@ -11,7 +11,8 @@ */ class BaseGameTab : public TabBase_TabGames { std::shared_ptr<GameBase> base; - + void OnDelete(wxCommandEvent &event); + void OnApplyFilter(wxCommandEvent &event); public: std::shared_ptr<GameListManager> glm; @@ -23,8 +24,6 @@ public: BaseGameTab(wxFrame *parent, std::shared_ptr<GameBase> base); void Reset(std::shared_ptr<GameBase> base); - void OnDelete(wxCommandEvent &event); - void OnApplyFilter(wxCommandEvent &event); std::vector<std::shared_ptr<Game>> GetEditedGames(); std::vector<std::uint32_t> GetDeletedGameIds() {return(deleted);}; std::shared_ptr<Game> OpenGame(long gameid, long item); diff --git a/src/base_tab/BaseImportTab.hpp b/src/base_tab/BaseImportTab.hpp index 10342bd..24bda24 100644 --- a/src/base_tab/BaseImportTab.hpp +++ b/src/base_tab/BaseImportTab.hpp @@ -24,14 +24,15 @@ class BaseImportTab : public TabBase_TabImport { std::shared_ptr<GameBase> selected_base; void RefreshPendingImports(); + void OnLoad(wxCommandEvent &event); + void OnImportGame(wxCommandEvent &event); + void OnImportSelection(wxCommandEvent &event); + void OnImportDatabase(wxCommandEvent &event); + public: int import_ndb, import_ngames,import_nselect; BaseImportTab(wxFrame *parent, std::shared_ptr<GameBase> db, TabInfos *main_tab); void RefreshImportLists(); - void OnLoad(wxCommandEvent &event); - void OnImportGame(wxCommandEvent &event); - void OnImportSelection(wxCommandEvent &event); - void OnImportDatabase(wxCommandEvent &event); void Reset(std::shared_ptr<GameBase> base); std::vector<std::shared_ptr<Game>> GetGameToImport(); std::vector<std::string> GetDatabaseToImport() {return databases_to_import;}; diff --git a/src/base_tab/gamebase/GameBase.hpp b/src/base_tab/gamebase/GameBase.hpp index b2c1488..8e02fd1 100644 --- a/src/base_tab/gamebase/GameBase.hpp +++ b/src/base_tab/gamebase/GameBase.hpp @@ -48,4 +48,10 @@ std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfN * @return std::shared_ptr<Game> */ std::shared_ptr<Game> OpenGameX(const std::string &dbpath, long id); +/** + * @brief Save a given game in a database file (append to existing games in the db) + * + * @param dbpath path of the dadabase + * @param g shared pointer to a game + */ void SaveGame(const std::string &dbpath, std::shared_ptr<Game> g);
\ No newline at end of file |
