aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseImportTab.hpp
blob: 320fdc825509f90552089cc6ba35f671f570ab11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "ochess.hpp"
#include "GameListManager.hpp"
#include "game_tab/Game.hpp"

class BaseImportTab : public TabBase_TabImport {
  TabInfos *main_tab;
  std::shared_ptr<GameListManager> glm;
  std::vector<std::shared_ptr<Game>> games_to_import;
  std::vector<std::shared_ptr<GameBase>> databases_to_import;
  std::unordered_map<long, std::shared_ptr<Game>> selected_games_to_import;
  std::shared_ptr<GameBase> base;
  std::shared_ptr<GameBase> selected_base;

  void RefreshPendingImports();
public:
    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);
    
};