diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 11:50:16 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 11:50:16 +0100 |
| commit | 32a0b3e31f1bb0024e96915f58afd991a992d945 (patch) | |
| tree | c1c654728c330c22ca1a40a8981604afb56e0dfa /src/base_tab/BaseTab.cpp | |
| parent | bdfc577a3b8c360d48c4d094d532786de44c5aed (diff) | |
Update BaseTab implementation
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
| -rw-r--r-- | src/base_tab/BaseTab.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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 <wx/filename.h> + +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 |
