ochess/src/base_tab/BaseImportTab.hpp

26 lines
878 B
C++
Raw Normal View History

2022-12-26 16:23:14 +01:00
#pragma once
2022-12-23 16:49:33 +01:00
#include "ochess.hpp"
2022-12-25 19:43:05 +01:00
#include "GameListManager.hpp"
2022-12-26 16:23:14 +01:00
#include "game_tab/Game.hpp"
2022-12-23 16:49:33 +01:00
class BaseImportTab : public TabBase_TabImport {
2022-12-25 14:32:06 +01:00
TabInfos *main_tab;
2022-12-26 16:23:14 +01:00
std::shared_ptr<GameListManager> glm;
std::vector<std::shared_ptr<Game>> games_to_import;
std::vector<std::shared_ptr<GameBase>> databases_to_import;
2022-12-26 16:57:14 +01:00
std::unordered_map<long, std::shared_ptr<Game>> selected_games_to_import;
2022-12-26 16:23:14 +01:00
std::shared_ptr<GameBase> base;
std::shared_ptr<GameBase> selected_base;
2022-12-23 16:49:33 +01:00
2022-12-26 16:23:14 +01:00
void RefreshPendingImports();
2022-12-23 16:49:33 +01:00
public:
2022-12-26 16:23:14 +01:00
BaseImportTab(wxFrame *parent, std::shared_ptr<GameBase> db, TabInfos *main_tab);
2022-12-25 14:32:06 +01:00
void RefreshImportLists();
2022-12-25 19:43:05 +01:00
void OnLoad(wxCommandEvent &event);
2022-12-26 16:23:14 +01:00
void OnImportGame(wxCommandEvent &event);
void OnImportSelection(wxCommandEvent &event);
void OnImportDatabase(wxCommandEvent &event);
void Reset(std::shared_ptr<GameBase> base);
2022-12-26 16:57:14 +01:00
2022-12-23 16:49:33 +01:00
};