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();
};

View file

@ -6102,5 +6102,96 @@
</object>
</object>
</object>
<object class="Panel" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">TabBase_TabManage</property>
<property name="pos"></property>
<property name="size">500,300</property>
<property name="subclass">; ; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">main_sizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">TODO</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText27</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>