mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-06-14 01:47:40 +00:00
Improve db tab
This commit is contained in:
parent
c49b48df01
commit
3b7cc1c847
7 changed files with 150 additions and 2 deletions
8
src/base_tab/BaseManageTab.cpp
Normal file
8
src/base_tab/BaseManageTab.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "BaseManageTab.hpp"
|
||||
|
||||
|
||||
BaseManageTab::BaseManageTab(wxFrame *parent):
|
||||
TabBase_TabManage(parent)
|
||||
{
|
||||
|
||||
}
|
10
src/base_tab/BaseManageTab.hpp
Normal file
10
src/base_tab/BaseManageTab.hpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "ochess.hpp"
|
||||
|
||||
|
||||
|
||||
class BaseManageTab : public TabBase_TabManage {
|
||||
|
||||
|
||||
public:
|
||||
BaseManageTab(wxFrame *parent);
|
||||
};
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
18
src/gui.cpp
18
src/gui.cpp
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
18
src/gui.h
18
src/gui.h
|
@ -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();
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue