From 32a0b3e31f1bb0024e96915f58afd991a992d945 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 24 Feb 2022 11:50:16 +0100 Subject: Update BaseTab implementation --- src/base_tab/BaseTab.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/base_tab/BaseTab.cpp') diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp index e69de29..9c46d9b 100644 --- a/src/base_tab/BaseTab.cpp +++ b/src/base_tab/BaseTab.cpp @@ -0,0 +1,24 @@ +#include "BaseTab.hpp" +#include + +BaseTab::BaseTab(wxFrame *parent) + : BasePanelBF(parent), TabInfos(TabInfos::BASE), base(NULL) { + LoadFile("/home/loic/text.PGn"); +} + +void BaseTab::ApplyPreferences() {} + +void BaseTab::LoadFile(std::string path) { + wxFileName file(path); + wxString ext = file.GetExt().Lower(); + if (ext == "pgn") { + base = new PGNGameBase(path); + } + + if (base != NULL) { + while(base->HasNextGame()){ + Game *g=base->GetNextGame(); + + } + } +} \ No newline at end of file -- cgit v1.2.3