OChess v0.0.2
Programmer's Manual
BaseImportTab.hpp
1#pragma once
2
3#include "ochess.hpp"
4#include "GameListManager.hpp"
5#include "game_tab/Game.hpp"
6#include <vector>
7#include <utility>
8
14 TabInfos *main_tab;
15 std::shared_ptr<GameListManager> glm;
16
17 // Import states data structures
18 std::vector<std::shared_ptr<Game>> games_to_import;
19 std::vector<std::string> databases_to_import;
21 std::unordered_map<std::string, std::unordered_map<long,std::shared_ptr<Game>>> selected_games_to_import;
22
23 std::shared_ptr<GameBase> base;
24 std::shared_ptr<GameBase> selected_base;
25
26 void RefreshPendingImports();
27 void OnLoad(wxCommandEvent &event);
28 void OnImportGame(wxCommandEvent &event);
29 void OnImportSelection(wxCommandEvent &event);
30 void OnImportDatabase(wxCommandEvent &event);
31
32public:
33 int import_ndb, import_ngames,import_nselect;
34 BaseImportTab(wxFrame *parent, std::shared_ptr<GameBase> db, TabInfos *main_tab);
35 void RefreshImportLists();
36 void Reset(std::shared_ptr<GameBase> base);
37 std::vector<std::shared_ptr<Game>> GetGameToImport();
38 std::vector<std::string> GetDatabaseToImport() {return databases_to_import;};
39};
A BaseTab sub-tab to import games.
Definition: BaseImportTab.hpp:13
std::unordered_map< std::string, std::unordered_map< long, std::shared_ptr< Game > > > selected_games_to_import
Hold games for each databases.
Definition: BaseImportTab.hpp:21
Class TabBase_TabImport.
Definition: gui.h:376
Used by each tab of the GUI to attach additional informations and features.
Definition: ochess.hpp:47