NCBI C++ ToolKit
|
Search Toolkit Book for CSourceFieldNamePanel
#include <gui/widgets/edit/source_field_name_panel.hpp>
Public Member Functions | |
CSourceFieldNamePanel () | |
Constructors. More... | |
CSourceFieldNamePanel (wxWindow *parent, bool additional_items=false, wxWindowID id=ID_CSOURCEFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) | |
bool | Create (wxWindow *parent, wxWindowID id=ID_CSOURCEFIELDNAMEPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL) |
Creation. More... | |
~CSourceFieldNamePanel () | |
Destructor. More... | |
void | Init () |
Initialises member variables. More... | |
void | CreateControls () |
Creates the controls and sizers. More... | |
void | OnTextQualBtnSelected (wxCommandEvent &event) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN More... | |
void | OnTaxonomyBtnSelected (wxCommandEvent &event) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN More... | |
void | OnLocationBtnSelected (wxCommandEvent &event) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN More... | |
void | OnOriginBtnSelected (wxCommandEvent &event) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN More... | |
void | OnSrcSublistSelected (wxCommandEvent &event) |
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST More... | |
wxBitmap | GetBitmapResource (const wxString &name) |
Retrieves bitmap resources. More... | |
wxIcon | GetIconResource (const wxString &name) |
Retrieves icon resources. More... | |
void | HideSourceType () |
void | DoNotShowSubList (bool val) |
virtual string | GetFieldName (const bool subfield=false) |
Returns the name of the field as selected in the panel. More... | |
virtual bool | SetFieldName (const string &field) |
virtual vector< string > | GetChoices (bool &allow_other) |
virtual string | GetMacroFieldName (const string &target, const string &selected_field=kEmptyStr) |
void | SetSourceSubpanelSelection (const string &sel) |
void | AddAdditionalItems (void) |
virtual void | ClearValues (void) |
![]() | |
CFieldNamePanel () | |
Constructors. More... | |
~CFieldNamePanel () | |
Destructor. More... | |
virtual vector< string > | GetMacroValues () |
virtual void | SetShowLegalOnly (bool show) |
virtual string | GetMacroFieldLabel (const string &target, const string &selected_field=kEmptyStr) |
Static Public Member Functions | |
static bool | ShowToolTips () |
Should we show tooltips? More... | |
static vector< string > | s_GetSourceOriginOptions () |
static vector< string > | s_GetSourceLocationOptions () |
![]() | |
static string | GetFieldTypeName (EFieldType field_type) |
static EFieldType | GetFieldTypeFromName (const string &field_type_name) |
static bool | IsFeature (const string &target) |
static bool | IsDescriptor (const string &target) |
Public Attributes | |
wxRadioButton * | m_TextQualifier |
wxRadioButton * | m_Taxonomy |
wxRadioButton * | m_Location |
wxRadioButton * | m_Origin |
wxListBox * | m_SourceSubList |
wxRadioBox * | m_SourceType |
Private Member Functions | |
void | x_ChooseTextQualifier () |
void | x_ChooseTaxonomy () |
void | x_ChooseLocation () |
Private Attributes | |
bool | m_AdditionalItems |
bool | m_DoNotShowSubList |
bool | m_is_taxonomy_panel |
bool | m_first_run |
Additional Inherited Members | |
![]() | |
void | x_UpdateParent (void) |
bool | x_IsParentAECRDlg (void) |
void | x_UpdateAECRDlgLayout (void) |
bool | x_ShouldDecreaseStrConstrPanel (void) |
CSourceFieldNamePanel class declaration
Definition at line 57 of file source_field_name_panel.hpp.
anonymous enum |
Definition at line 122 of file source_field_name_panel.hpp.
CSourceFieldNamePanel::CSourceFieldNamePanel | ( | ) |
Constructors.
CSourceFieldNamePanel type definition
CSourceFieldNamePanel event table definition
CSourceFieldNamePanel constructors
Definition at line 80 of file source_field_name_panel.cpp.
References Init().
CSourceFieldNamePanel::CSourceFieldNamePanel | ( | wxWindow * | parent, |
bool | additional_items = false , |
||
wxWindowID | id = ID_CSOURCEFIELDNAMEPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Definition at line 85 of file source_field_name_panel.cpp.
References Create(), Init(), and ncbi::grid::netcache::search::fields::size.
CSourceFieldNamePanel::~CSourceFieldNamePanel | ( | ) |
Destructor.
CSourceFieldNamePanel destructor
Definition at line 117 of file source_field_name_panel.cpp.
|
inline |
Definition at line 145 of file source_field_name_panel.hpp.
References m_AdditionalItems, and x_ChooseTextQualifier().
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 195 of file source_field_name_panel.cpp.
References m_is_taxonomy_panel, m_Location, m_Origin, m_SourceSubList, m_SourceType, m_Taxonomy, m_TextQualifier, x_ChooseTaxonomy(), and x_ChooseTextQualifier().
bool CSourceFieldNamePanel::Create | ( | wxWindow * | parent, |
wxWindowID | id = ID_CSOURCEFIELDNAMEPANEL , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxSize(400, 300) , |
||
long | style = wxTAB_TRAVERSAL |
||
) |
Creation.
CSourceFieldNamePanel creator
Definition at line 97 of file source_field_name_panel.cpp.
References CreateControls(), and ncbi::grid::netcache::search::fields::size.
Referenced by CSourceFieldNamePanel().
void CSourceFieldNamePanel::CreateControls | ( | ) |
Creates the controls and sizers.
Control creation for CSourceFieldNamePanel
Definition at line 144 of file source_field_name_panel.cpp.
References _, ID_CSOURCEFIELD_LOCATION_BTN, ID_CSOURCEFIELD_ORIGIN_BTN, ID_CSOURCEFIELD_SRC_SUBLIST, ID_CSOURCEFIELD_SRCTYPES, ID_CSOURCEFIELD_TAXONOMY_BTN, ID_CSOURCEFIELD_TEXT_QUAL_BTN, m_Location, m_Origin, m_SourceSubList, m_SourceType, m_Taxonomy, m_TextQualifier, and x_ChooseTextQualifier().
Referenced by Create().
|
inline |
Definition at line 120 of file source_field_name_panel.hpp.
References m_DoNotShowSubList, and val.
Referenced by CFieldChoicePanel::SetFieldType().
wxBitmap CSourceFieldNamePanel::GetBitmapResource | ( | const wxString & | name | ) |
Retrieves bitmap resources.
Get bitmap resources
Definition at line 231 of file source_field_name_panel.cpp.
Reimplemented from CFieldNamePanel.
Definition at line 419 of file source_field_name_panel.cpp.
References CSubSource::eVocabulary_insdc, CSubSource::GetSubtypeValue(), NStr::IsBlank(), CSubSource::IsValidSubtypeName(), m_Location, m_Origin, m_SourceSubList, m_TextQualifier, CSubSource::NeedsNoText(), s_GetSourceLocationOptions(), s_GetSourceOriginOptions(), s_GetTrueFalseList(), ToStdString(), and val.
Returns the name of the field as selected in the panel.
In case of names composed of multiple words, for example, feature_name + qualifier when the subfield parameter is true, the qualifier name is returned only.
Implements CFieldNamePanel.
Definition at line 262 of file source_field_name_panel.cpp.
References m_Location, m_Origin, m_SourceSubList, m_SourceType, m_Taxonomy, m_TextQualifier, ToStdString(), and val.
wxIcon CSourceFieldNamePanel::GetIconResource | ( | const wxString & | name | ) |
Retrieves icon resources.
Get icon resources
Definition at line 244 of file source_field_name_panel.cpp.
|
virtual |
Reimplemented from CFieldNamePanel.
Definition at line 519 of file source_field_name_panel.cpp.
References NStr::EqualNocase(), COrgMod::eVocabulary_insdc, CSubSource::eVocabulary_insdc, CFieldNamePanel::IsFeature(), NMacroUtil::IsStructVoucherPart(), COrgMod::IsValidSubtypeName(), CSubSource::IsValidSubtypeName(), kDbXref, kFwdPrimerName, kFwdPrimerSeq, kHost, kNatHost, kOrgModNote, kRevPrimerName, kRevPrimerSeq, kSubSourceNote, m_Location, m_Origin, m_SourceSubList, m_Taxonomy, m_TextQualifier, QualifierNamesAreEquivalent(), str(), string, ToStdString(), and val.
void CSourceFieldNamePanel::HideSourceType | ( | ) |
Definition at line 253 of file source_field_name_panel.cpp.
References m_SourceType.
Referenced by CMacroAdvStringConstraintPanel< T >::CreateControls(), and CFieldChoicePanel::SetFieldType().
void CSourceFieldNamePanel::Init | ( | void | ) |
Initialises member variables.
Member initialisation
Definition at line 128 of file source_field_name_panel.cpp.
References m_Location, m_Origin, m_SourceSubList, m_Taxonomy, m_TextQualifier, and NULL.
Referenced by CSourceFieldNamePanel().
void CSourceFieldNamePanel::OnLocationBtnSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_LOCATION_BTN
Definition at line 648 of file source_field_name_panel.cpp.
References x_ChooseLocation(), and CFieldNamePanel::x_UpdateParent().
void CSourceFieldNamePanel::OnOriginBtnSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ORIGIN_BTN
Definition at line 660 of file source_field_name_panel.cpp.
References m_SourceSubList, and CFieldNamePanel::x_UpdateParent().
void CSourceFieldNamePanel::OnSrcSublistSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_SRC_SUBLIST
Definition at line 672 of file source_field_name_panel.cpp.
References CFieldNamePanel::x_UpdateParent().
void CSourceFieldNamePanel::OnTaxonomyBtnSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TAXONOMY_BTN
Definition at line 636 of file source_field_name_panel.cpp.
References x_ChooseTaxonomy(), and CFieldNamePanel::x_UpdateParent().
void CSourceFieldNamePanel::OnTextQualBtnSelected | ( | wxCommandEvent & | event | ) |
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TEXT_QUAL_BTN
Definition at line 624 of file source_field_name_panel.cpp.
References x_ChooseTextQualifier(), and CFieldNamePanel::x_UpdateParent().
|
static |
Definition at line 397 of file source_field_name_panel.cpp.
References ENUM_METHOD_NAME.
Referenced by GetChoices(), and CMacroEditorContext::GetFieldNames().
|
static |
Definition at line 384 of file source_field_name_panel.cpp.
Referenced by GetChoices(), and CMacroEditorContext::GetFieldNames().
Implements CFieldNamePanel.
Definition at line 288 of file source_field_name_panel.cpp.
References NStr::EndsWith(), NStr::EqualNocase(), COrgMod::eVocabulary_insdc, CSubSource::eVocabulary_insdc, NStr::FindNoCase(), COrgMod::GetSubtypeValue(), CSubSource::GetSubtypeValue(), COrgMod::IsValidSubtypeName(), CSubSource::IsValidSubtypeName(), kColl_suffix(), kDbXref, kFwdPrimerName, kFwdPrimerSeq, kHost, kInst_suffix(), kNatHost, kOrgModNote, kRevPrimerName, kRevPrimerSeq, kSpecid_suffix(), kSubSourceNote, m_first_run, m_is_taxonomy_panel, m_Location, m_Origin, m_SourceSubList, m_SourceType, m_Taxonomy, m_TextQualifier, NPOS, QualifierNamesAreEquivalent(), x_ChooseLocation(), x_ChooseTaxonomy(), x_ChooseTextQualifier(), and CFieldNamePanel::x_UpdateParent().
Referenced by CConstraintPanel::CreateControls(), and CQualChoicePanel::CreateControls().
Definition at line 375 of file source_field_name_panel.cpp.
References m_SourceSubList.
Referenced by CFieldChoicePanel::SetSubpanelSelection().
|
static |
Should we show tooltips?
Should we show tooltips?
Definition at line 222 of file source_field_name_panel.cpp.
|
private |
Definition at line 613 of file source_field_name_panel.cpp.
References m_SourceSubList.
Referenced by OnLocationBtnSelected(), and SetFieldName().
|
private |
Definition at line 600 of file source_field_name_panel.cpp.
References _, and m_SourceSubList.
Referenced by ClearValues(), OnTaxonomyBtnSelected(), and SetFieldName().
|
private |
Definition at line 453 of file source_field_name_panel.cpp.
References NStr::EqualNocase(), COrgMod_Base::eSubtype_bio_material, COrgMod_Base::eSubtype_culture_collection, COrgMod_Base::eSubtype_other, CSubSource_Base::eSubtype_other, COrgMod_Base::eSubtype_specimen_voucher, CSubSource::GetSubtypeName(), COrgMod::GetSubtypeName(), i, NStr::IsBlank(), CSubSource::IsDiscouraged(), ITERATE, kAllNotes, kAllPrimers, kColl_suffix(), kDbXref, kFwdPrimerName, kFwdPrimerSeq, kHost, kInst_suffix(), kNatHost, kOrgModNote, kRevPrimerName, kRevPrimerSeq, kSpecid_suffix(), kSubSourceNote, m_AdditionalItems, m_SourceSubList, ToWxString(), and wxT.
Referenced by AddAdditionalItems(), ClearValues(), CreateControls(), OnTextQualBtnSelected(), and SetFieldName().
|
private |
Definition at line 154 of file source_field_name_panel.hpp.
Referenced by AddAdditionalItems(), and x_ChooseTextQualifier().
|
private |
Definition at line 155 of file source_field_name_panel.hpp.
Referenced by DoNotShowSubList().
|
private |
Definition at line 157 of file source_field_name_panel.hpp.
Referenced by SetFieldName().
|
private |
Definition at line 156 of file source_field_name_panel.hpp.
Referenced by ClearValues(), and SetFieldName().
wxRadioButton* CSourceFieldNamePanel::m_Location |
Definition at line 133 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetChoices(), GetFieldName(), GetMacroFieldName(), Init(), and SetFieldName().
wxRadioButton* CSourceFieldNamePanel::m_Origin |
Definition at line 134 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetChoices(), GetFieldName(), GetMacroFieldName(), Init(), and SetFieldName().
wxListBox* CSourceFieldNamePanel::m_SourceSubList |
Definition at line 135 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetChoices(), GetFieldName(), GetMacroFieldName(), Init(), OnOriginBtnSelected(), SetFieldName(), SetSourceSubpanelSelection(), x_ChooseLocation(), x_ChooseTaxonomy(), and x_ChooseTextQualifier().
wxRadioBox* CSourceFieldNamePanel::m_SourceType |
Definition at line 136 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetFieldName(), HideSourceType(), and SetFieldName().
wxRadioButton* CSourceFieldNamePanel::m_Taxonomy |
Definition at line 132 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetFieldName(), GetMacroFieldName(), Init(), and SetFieldName().
wxRadioButton* CSourceFieldNamePanel::m_TextQualifier |
Definition at line 131 of file source_field_name_panel.hpp.
Referenced by ClearValues(), CreateControls(), GetChoices(), GetFieldName(), GetMacroFieldName(), Init(), and SetFieldName().