Improve db tab

This commit is contained in:
Loic Guegan 2022-12-23 18:23:05 +01:00
parent c49b48df01
commit 3b7cc1c847
7 changed files with 150 additions and 2 deletions

View file

@ -0,0 +1,8 @@
#include "BaseManageTab.hpp"
BaseManageTab::BaseManageTab(wxFrame *parent):
TabBase_TabManage(parent)
{
}

View file

@ -0,0 +1,10 @@
#include "ochess.hpp"
class BaseManageTab : public TabBase_TabManage {
public:
BaseManageTab(wxFrame *parent);
};

View file

@ -8,10 +8,12 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file)
// Games tab
games_tab=new BaseGameTab((wxFrame *)notebook,base_file);
notebook->AddPage(games_tab, "Games",true); // true for selecting the tab
// Import tab
import_tab=new BaseImportTab((wxFrame *)notebook);
notebook->AddPage(import_tab, "Import");
// Manage tab
manage_tab=new BaseManageTab((wxFrame *)notebook);
notebook->AddPage(manage_tab, "Manage");
RefreshLabel();
}

View file

@ -3,12 +3,13 @@
#include "ochess.hpp"
#include "BaseGameTab.hpp"
#include "BaseImportTab.hpp"
#include "BaseManageTab.hpp"
class BaseTab : public TabBase, public TabInfos {
std::shared_ptr<GameBase> base;
BaseGameTab *games_tab;
BaseImportTab *import_tab;
BaseManageTab * manage_tab;
public:
BaseTab(wxFrame *parent, std::string base_file);

View file

@ -614,3 +614,21 @@ TabBase_TabImport::TabBase_TabImport( wxWindow* parent, wxWindowID id, const wxP
TabBase_TabImport::~TabBase_TabImport()
{
}
TabBase_TabManage::TabBase_TabManage( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* main_sizer;
main_sizer = new wxBoxSizer( wxVERTICAL );
m_staticText27 = new wxStaticText( this, wxID_ANY, wxT("TODO"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText27->Wrap( -1 );
main_sizer->Add( m_staticText27, 0, wxALL, 5 );
this->SetSizer( main_sizer );
this->Layout();
}
TabBase_TabManage::~TabBase_TabManage()
{
}

View file

@ -347,3 +347,21 @@ class TabBase_TabImport : public wxPanel
};
///////////////////////////////////////////////////////////////////////////////
/// Class TabBase_TabManage
///////////////////////////////////////////////////////////////////////////////
class TabBase_TabManage : public wxPanel
{
private:
protected:
wxStaticText* m_staticText27;
public:
TabBase_TabManage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~TabBase_TabManage();
};