NCBI C++ ToolKit
|
Search Toolkit Book for CExportTableDlg
#include <gui/packages/pkg_sequence_edit/export_table.hpp>
Public Member Functions | |
CExportTableDlg () | |
Constructors. More... | |
CExportTableDlg (wxWindow *parent, objects::CSeq_entry_Handle seh, wxWindowID id=ID_EXPORT_TABLE_DLG, const wxString &caption=_("Export Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_EXPORT_TABLE_DLG, const wxString &caption=_("Export Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL) |
Creation. More... | |
~CExportTableDlg () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
void | SaveTable (const wxString &workDir=wxEmptyString) |
void | SaveTableFile (wxWindow *parent, wxString &save_file_dir, wxString &save_file_name, const list< map< string, string > > &table, const set< string > &columns) |
![]() | |
virtual bool | Show (bool show=1) |
Report opening events in dialogs used in the editing package. More... | |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static void | RemoveEmptyColsAndRows (CRef< CSeq_table > values_table) |
Private Types | |
enum | { ID_EXPORT_TABLE_DLG = 12100 , ID_EXPTABLE_CHKBOX1 , ID_EXPTABLE_LISTBOX , ID_EXPTABLE_RADBTN1 , ID_EXPTABLE_RADBTN2 , ID_EXPTABLE_RADBTN3 , ID_EXPTABLE_RADBTN4 , ID_EXPTABLE_RADBTN5 , ID_EXPTABLE_RADBTN6 , ID_EXPTABLE_RADBTN7 , ID_EXPTABLE_CHKBOX2 } |
Private Member Functions | |
void | AddBioSource (const CBioSource &biosource) |
void | GetDesc (const CSeq_entry &se) |
void | FindBioSource (objects::CSeq_entry_Handle tse) |
void | AddDeflinesToTable (list< map< string, string > > &table, set< string > &columns) |
void | AddCdsGeneMrnaTable (list< map< string, string > > &table, set< string > &columns) |
void | AddFeaturesToTable (list< map< string, string > > &table, set< string > &columns) |
void | AddPubsToTable (list< map< string, string > > &table, set< string > &columns) |
void | AddDblinkToTable (list< map< string, string > > &table, set< string > &columns) |
void | AddRnaToTable (list< map< string, string > > &table, set< string > &columns) |
void | AddSourceToTable (list< map< string, string > > &table, set< string > &columns) |
void | RunExcel (wxString FileName) |
Private Attributes | |
objects::CSeq_entry_Handle | m_TopSeqEntry |
wxCheckBox * | m_SourceCheck |
wxCheckBox * | m_ExcelCheck |
wxRadioButton * | m_NoneRB |
wxRadioButton * | m_FeatureRB |
wxRadioButton * | m_CdsGeneProtRB |
wxRadioButton * | m_RnaRB |
wxRadioButton * | m_PubRB |
wxRadioButton * | m_DbLinkRB |
wxRadioButton * | m_DeflineRB |
wxListBox * | m_SourceChoice |
set< string > | m_source_choices |
wxString | m_SaveFileDir |
wxString | m_SaveFileName |
Definition at line 74 of file export_table.hpp.
|
private |
Definition at line 130 of file export_table.hpp.
CExportTableDlg::CExportTableDlg | ( | ) |
CExportTableDlg::CExportTableDlg | ( | wxWindow * | parent, |
objects::CSeq_entry_Handle | seh, | ||
wxWindowID | id = ID_EXPORT_TABLE_DLG , |
||
const wxString & | caption = _("Export Table") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL |
||
) |
Definition at line 84 of file export_table.cpp.
References Create(), FindBioSource(), Init(), m_TopSeqEntry, and ncbi::grid::netcache::search::fields::size.
CExportTableDlg::~CExportTableDlg | ( | ) |
Destructor.
Definition at line 110 of file export_table.cpp.
|
private |
Definition at line 216 of file export_table.cpp.
References NStr::EqualNocase(), COrgMod_Base::eSubtype_bio_material, COrgMod_Base::eSubtype_culture_collection, COrgMod_Base::eSubtype_specimen_voucher, FOR_EACH_ORGMOD_ON_BIOSOURCE, FOR_EACH_SUBSOURCE_ON_BIOSOURCE, GetSubtypeName(), CBioSource::GetTaxname(), set< Key, Compare >::insert(), NStr::IsBlank(), CBioSource::IsSetTaxname(), kHost, kNatHost, kOrgModNote, kSubSourceNote, m_source_choices, and ToStdString().
Referenced by FindBioSource(), and GetDesc().
|
private |
Definition at line 332 of file export_table.cpp.
References CreateAction(), CSeq_id::eContent, CFieldNamePanel::eFieldType_CDSGeneProt, eGetId_Best, map_checker< Container >::empty(), set< Key, Compare >::end(), CSeqFeatData::eSubtype_cdregion, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_prot, set< Key, Compare >::find(), IEditingActionFeat::GetActionFeatSubtype(), CScope::GetBioseqHandle(), CSeq_feat_Handle::GetFeatSubtype(), GetId(), CSeq_id::GetLabel(), CSeq_feat_Handle::GetLocation(), CSeq_feat_Handle::GetProduct(), CMappedFeat::GetSeq_feat_Handle(), IEditingAction::GetValues(), set< Key, Compare >::insert(), CSeq_feat_Handle::IsSetProduct(), m_TopSeqEntry, NULL, prot, IEditingActionFeat::SetFeat(), table, value, and IEditingActionFeat::x_FindGeneForFeature().
Referenced by SaveTable().
|
private |
Definition at line 880 of file export_table.cpp.
References CreateAction(), CSeqdesc_Base::e_User, CSeq_id::eContent, CFieldNamePanel::eFieldType_DBLink, eGetId_Best, map_checker< Container >::empty(), NStr::EqualNocase(), CDBLinkFieldType::GetFieldNames(), GetId(), CSeq_id::GetLabel(), IEditingAction::GetValues(), set< Key, Compare >::insert(), m_TopSeqEntry, IEditingActionDesc::SetDesc(), table, and value.
Referenced by SaveTable().
|
private |
Definition at line 772 of file export_table.cpp.
References CSeqdesc_Base::e_Title, CSeq_id::eContent, eGetId_Best, GetId(), CSeq_id::GetLabel(), CSeqdesc_Base::GetTitle(), set< Key, Compare >::insert(), m_TopSeqEntry, table, and value.
Referenced by SaveTable().
|
private |
Definition at line 800 of file export_table.cpp.
References CSeq_id::eContent, eGetId_Best, map_checker< Container >::empty(), FOR_EACH_GBQUAL_ON_SEQFEAT, CScope::GetBioseqHandle(), GetId(), CSeq_id::GetLabel(), set< Key, Compare >::insert(), m_TopSeqEntry, CSeqFeatData::SubtypeValueToName(), table, and value.
Referenced by SaveTable().
|
private |
Definition at line 835 of file export_table.cpp.
References CreateAction(), CSeqdesc_Base::e_Pub, CSeq_id::eContent, CFieldNamePanel::eFieldType_Pub, eGetId_Best, map_checker< Container >::empty(), CPubFieldType::GetFieldNames(), GetId(), CSeq_id::GetLabel(), IEditingAction::GetValues(), set< Key, Compare >::insert(), m_TopSeqEntry, IEditingActionDesc::SetDesc(), table, and value.
Referenced by SaveTable().
|
private |
Definition at line 501 of file export_table.cpp.
References CreateAction(), CSeqFeatData_Base::e_Rna, CSeq_id::eContent, CFieldNamePanel::eFieldType_RNA, eGetId_Best, map_checker< Container >::empty(), CSeqFeatData::eSubtype_any, CSeqFeatData::eSubtype_gene, CSeqFeatData::eSubtype_ncRNA, CSeqFeatData::eSubtype_tmRNA, CSeqFeatData::eSubtype_tRNA, IEditingActionFeat::GetActionFeatSubtype(), CScope::GetBioseqHandle(), GetId(), CSeq_id::GetLabel(), IEditingAction::GetValues(), set< Key, Compare >::insert(), m_TopSeqEntry, NULL, rna, IEditingActionFeat::SetFeat(), table, value, and IEditingActionFeat::x_FindGeneForFeature().
Referenced by SaveTable().
|
private |
Definition at line 615 of file export_table.cpp.
References map_checker< Container >::begin(), set< Key, Compare >::begin(), CreateAction(), CSeqFeatData_Base::e_Biosrc, CSeqdesc_Base::e_Source, CSeq_id::eContent, CFieldNamePanel::eFieldType_Source, eGetId_Best, map_checker< Container >::empty(), map_checker< Container >::end(), set< Key, Compare >::end(), GetId(), CSeq_id::GetLabel(), IEditingAction::GetValues(), i, set< Key, Compare >::insert(), m_source_choices, m_SourceChoice, m_TopSeqEntry, IEditingActionBiosource::SetDesc(), IEditingActionBiosource::SetFeat(), table, and value.
Referenced by SaveTable().
bool CExportTableDlg::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_EXPORT_TABLE_DLG , |
||
const wxString & | caption = _("Export Table") , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL |
||
) |
Creation.
Definition at line 94 of file export_table.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CExportTableDlg().
void CExportTableDlg::CreateControls | ( | ) |
Creates the controls and sizers.
Definition at line 124 of file export_table.cpp.
References _, set< Key, Compare >::begin(), set< Key, Compare >::end(), ID_EXPTABLE_CHKBOX1, ID_EXPTABLE_CHKBOX2, ID_EXPTABLE_LISTBOX, ID_EXPTABLE_RADBTN1, ID_EXPTABLE_RADBTN2, ID_EXPTABLE_RADBTN3, ID_EXPTABLE_RADBTN4, ID_EXPTABLE_RADBTN5, ID_EXPTABLE_RADBTN6, ID_EXPTABLE_RADBTN7, m_CdsGeneProtRB, m_DbLinkRB, m_DeflineRB, m_ExcelCheck, m_FeatureRB, m_NoneRB, m_PubRB, m_RnaRB, m_source_choices, m_SourceCheck, m_SourceChoice, ToWxString(), and wxID_ANY.
Referenced by Create().
|
private |
Definition at line 279 of file export_table.cpp.
References AddBioSource(), CSeqFeatData_Base::e_Biosrc, CSeqFeatData_Base::GetBiosrc(), CSeq_feat_Handle::GetData(), and GetDesc().
Referenced by CExportTableDlg().
wxBitmap CExportTableDlg::GetBitmapResource | ( | const wxString & | name | ) |
|
private |
Definition at line 262 of file export_table.cpp.
References AddBioSource(), FOR_EACH_SEQDESC_ON_SEQENTRY, FOR_EACH_SEQENTRY_ON_SEQSET, CSeq_entry_Base::GetSet(), and CSeq_entry_Base::IsSet().
Referenced by FindBioSource().
wxIcon CExportTableDlg::GetIconResource | ( | const wxString & | name | ) |
void CExportTableDlg::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 119 of file export_table.cpp.
References m_ExcelCheck, and NULL.
Referenced by CExportTableDlg().
|
static |
Definition at line 711 of file export_table.cpp.
References CSeq_table_Base::GetNum_rows(), i, CSeq_table_Base::SetColumns(), CSeq_table_Base::SetNum_rows(), and ncbi::grid::netcache::search::fields::size.
Referenced by CSequenceEditingEventHandler::ExportStructuredCommentsTable().
|
private |
void CExportTableDlg::SaveTable | ( | const wxString & | workDir = wxEmptyString | ) |
Definition at line 289 of file export_table.cpp.
References AddCdsGeneMrnaTable(), AddDblinkToTable(), AddDeflinesToTable(), AddFeaturesToTable(), AddPubsToTable(), AddRnaToTable(), AddSourceToTable(), m_CdsGeneProtRB, m_DbLinkRB, m_DeflineRB, m_ExcelCheck, m_FeatureRB, m_PubRB, m_RnaRB, m_SaveFileDir, m_SaveFileName, m_SourceCheck, RunExcel(), SaveTableFile(), and table.
Referenced by CSequenceEditingEventHandler::ExportTable(), and CEditingBtnsPanel::ExportTable().
void CExportTableDlg::SaveTableFile | ( | wxWindow * | parent, |
wxString & | save_file_dir, | ||
wxString & | save_file_name, | ||
const list< map< string, string > > & | table, | ||
const set< string > & | columns | ||
) |
Definition at line 929 of file export_table.cpp.
References _, set< Key, Compare >::empty(), CCSVExporter::Field(), CCSVExporter::NewRow(), out(), table, and wxT.
Referenced by SaveTable().
|
static |
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 124 of file export_table.hpp.
Referenced by CreateControls(), Init(), and SaveTable().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 125 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 128 of file export_table.hpp.
Referenced by SaveTable().
|
private |
Definition at line 128 of file export_table.hpp.
Referenced by SaveTable().
Definition at line 127 of file export_table.hpp.
Referenced by AddBioSource(), AddSourceToTable(), and CreateControls().
|
private |
Definition at line 124 of file export_table.hpp.
Referenced by CreateControls(), and SaveTable().
|
private |
Definition at line 126 of file export_table.hpp.
Referenced by AddSourceToTable(), and CreateControls().
|
private |
Definition at line 123 of file export_table.hpp.
Referenced by AddCdsGeneMrnaTable(), AddDblinkToTable(), AddDeflinesToTable(), AddFeaturesToTable(), AddPubsToTable(), AddRnaToTable(), AddSourceToTable(), and CExportTableDlg().