wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle ) : m_TopSeqEntry(seh)
71 for( ; b_iter ; ++b_iter )
75 if(!
m_Found&& b_iter->GetSeq_entry_Handle().HasParentEntry())
80 Create(parent,
id, caption, pos,
size, style);
85SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
86wxDialog::Create( parent,
id, caption, pos,
size, style );
91GetSizer()->SetSizeHints(
this);
116wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
117itemDialog1->SetSizer(itemBoxSizer2);
119wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
120itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
122wxArrayString itemChoiceStrings, itemChoiceStringsWritable;
126wxMessageBox(
wxT(
"No LatLon records found"),
wxT(
"Error"), wxOK | wxICON_ERROR);
133wxMessageBox(
wxT(
"No LatLon records found or all records correctly formatted"),
wxT(
"Error"), wxOK | wxICON_ERROR);
139itemBoxSizer3->Add(
m_GridPanel, 0, wxALIGN_TOP|wxALL, 5);
142 m_Grid->SetTable(gridAdapter,
true);
143 m_Grid->AutoSizeColumns();
144 intl_height =
m_Grid->GetColLabelSize();
145 m_Grid->SetColLabelSize( 2 * l_height );
152 if((*it)->IsSetHeader() && (*it)->GetHeader().IsSetTitle() )
154 stringtitle = (*it)->GetHeader().GetTitle();
157itemChoiceStrings.Add(wxString(title));
159itemChoiceStringsWritable.Add(wxString(title));
168 if(glyph_col >= 0 && glyph_col+1 <
m_Grid->GetNumberCols())
174wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
175itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
180wxBoxSizer* itemBoxSizer13 =
newwxBoxSizer(wxHORIZONTAL);
181itemBoxSizer2->Add(itemBoxSizer13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
183wxButton* itemButton14 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
184itemBoxSizer13->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
186wxButton* itemButton15 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
187itemBoxSizer13->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
198expand_col->
SetHeader().SetTitle(
"");
199expand_col->
SetHeader().SetField_name(
"expand");
200expand_col->
SetData().SetString();
203current_col->
SetHeader().SetTitle(
"Lat-Lon");
204current_col->
SetHeader().SetField_name(
"current");
205current_col->
SetData().SetString();
208country_col->
SetHeader().SetTitle(
"Country");
209country_col->
SetHeader().SetField_name(
"country");
210country_col->
SetData().SetString();
213suggested_col->
SetHeader().SetTitle(
"Suggested Correction");
214suggested_col->
SetHeader().SetField_name(
"suggested");
215suggested_col->
SetData().SetString();
221bogus_col->
SetHeader().SetField_name(
"");
222bogus_col->
SetData().SetString();
225 table->SetColumns().push_back(id_col);
226 table->SetColumns().push_back(expand_col);
227 table->SetColumns().push_back(current_col);
228 table->SetColumns().push_back(country_col);
229 table->SetColumns().push_back(suggested_col);
230 table->SetColumns().push_back(bogus_col);
234 for( vector<string>::iterator fi =
m_LatLon.begin(); fi !=
m_LatLon.end() ; ++fi )
244id_col->
SetData().SetId().push_back(
id);
245expand_col->
SetData().SetString().push_back(
"");
246current_col->
SetData().SetString().push_back(*fi);
247country_col->
SetData().SetString().push_back(country);
248suggested_col->
SetData().SetString().push_back(
msg);
249bogus_col->
SetData().SetString().push_back(
"");
262 boolselect_all =
false;
265 if(wxMessageBox(
ToWxString(
"Apply to all?"),
wxT(
"Nothing is selected"), wxOK | wxCANCEL,
NULL) == wxOK)
273 for(
size_t row= 0;
row< values_table->
GetColumn(
"current").GetData().GetString().
size(); ++
row)
279 if((old_latlon != new_latlon || old_country != new_country)
280&& (
m_Grid->IsInSelection(
static_cast<int>(
row),0) || select_all))
281 m_LatLonCountry[make_pair(old_latlon, old_country)] = make_pair(new_latlon, new_country);
286 for( ; b_iter ; ++b_iter )
306 return "Invalid operation in Country Conflict Tool";
366wxMessageDialog dlg(
this,
_(
"Discard modifications?"),
_(
"Attention"),wxOK|wxCANCEL|wxCENTRE);
367 if(dlg.ShowModal() == wxID_OK)
381 if((*subsource)->IsSetSubtype() &&
383&& (*subsource)->IsSetName())
385latlon = (*subsource)->GetName();
393 if((*subsource)->IsSetSubtype() &&
395&& (*subsource)->IsSetName())
397country = (*subsource)->GetName();
401 if(!latlon.empty() && !country.empty())
411 boolmodified =
false;
416 if((*subsource)->IsSetSubtype() &&
418(*subsource)->IsSetName())
420latlon = (*subsource)->GetName();
428 if((*subsource)->IsSetSubtype() &&
430(*subsource)->IsSetName())
432country = (*subsource)->GetName();
437 if(latlon.empty() || country.empty())
445 stringnew_latlon = it->second.first;
446 stringnew_country = it->second.second;
450 if((*subsource)->IsSetSubtype() &&
452(*subsource)->IsSetName())
454(*subsource)->SetName(new_latlon);
461 if((*subsource)->IsSetSubtype() &&
463&& (*subsource)->IsSetName())
465(*subsource)->SetName(new_country);
478 if((*it)->IsSource()) {
485 if((*it)->IsSource()) {
488new_desc->
Assign(orig_desc);
517new_feat->
Assign(feat_it->GetOriginalFeature());
void AddCommand(IEditCommand &command)
static bool ShowToolTips()
Should we show tooltips?
CStringConstraintSelect * m_StringConstraintPanel
void x_ApplyToDescriptors(const objects::CSeq_entry &se, CCmdComposite *composite)
CRef< CCmdComposite > GetCommand()
map< pair< string, string >, pair< string, string > > m_LatLonCountry
CRef< CCmdComposite > GetCommandFromValuesTable(CRef< objects::CSeq_table >)
vector< string > m_Country
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void x_GatherLatLon(const objects::CBioSource &biosource)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
objects::CSeq_entry_Handle m_TopSeqEntry
vector< string > m_ReplaceLatLon
CSeqTableGridPanel * m_GridPanel
vector< string > m_LatLon
void x_FindBioSource(objects::CSeq_entry_Handle tse, CCmdComposite *composite=NULL)
~CCountryConflict()
Destructor.
CRef< objects::CSeq_table > GetChoices(CRef< objects::CSeq_table > values_table)
void OnClickOk(wxCommandEvent &event)
void OnClickCancel(wxCommandEvent &event)
bool x_ApplyToBioSource(objects::CBioSource &biosource)
void Init()
Initialises member variables.
bool IsReadOnlyColumn(string column_name)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Country Conflict Tool"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void CreateControls()
Creates the controls and sizers.
CRef< objects::CSeq_table > GetValuesTableFromSeqEntry()
CCountryConflict()
Constructors.
void MakeColumnReadOnly(int pos, bool val=true)
void InitColumnCollapse(int col)
CRef< objects::CSeq_table > GetValuesTable()
namespace ncbi::objects::
const CSeqTable_column & GetColumn(CTempString column_name) const
static string ValidateLatLonCountry(const string &countryname, string &lat_lon, bool check_state, ELatLonCountryErr &errcode)
const_iterator end() const
const_iterator find(const key_type &key) const
USING_SCOPE(ncbi::objects)
const char * kSequenceIdColLabel
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
bool HasParentEntry(void) const
Check if current seq-entry has a parent.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
@ eSubtype_lat_lon
+/- decimal degrees
const TColumns & GetColumns(void) const
Get the Columns member data.
void SetHeader(THeader &value)
Assign a value to Header data member.
vector< CRef< CSeqTable_column > > TColumns
void SetData(TData &value)
Assign a value to Data data member.
TNum_rows GetNum_rows(void) const
Get the Num_rows member data.
const TString & GetString(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
@ eField_id_location_id
location Seq-id
void SetData(TData &value)
Assign a value to Data data member.
const TSet & GetSet(void) const
Get the variant data.
bool IsSet(void) const
Check if variant Set is selected.
TSource & SetSource(void)
Select the variant.
@ eMol_na
just a nucleic acid
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const struct ncbi::grid::netcache::search::fields::SIZE size
Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.
#define FOR_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)
FOR_EACH_SUBSOURCE_ON_BIOSOURCE EDIT_EACH_SUBSOURCE_ON_BIOSOURCE.
#define EDIT_EACH_SUBSOURCE_ON_BIOSOURCE(Itr, Var)
#define FOR_EACH_SEQENTRY_ON_SEQSET(Itr, Var)
FOR_EACH_SEQENTRY_ON_SEQSET EDIT_EACH_SEQENTRY_ON_SEQSET.
#define FOR_EACH_SEQDESC_ON_SEQENTRY(Itr, Var)
FOR_EACH_SEQDESC_ON_SEQENTRY EDIT_EACH_SEQDESC_ON_SEQENTRY.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4