62 #include <wx/dialog.h>
63 #include <wx/imaglist.h>
64 #include <wx/richtext/richtextctrl.h>
164 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
165 wxPanel::Create( parent,
id, pos,
size, style );
170 GetSizer()->SetSizeHints(
this);
235 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
236 itemPanel1->SetSizer(itemBoxSizer2);
238 wxStaticText* itemStaticText3 =
new wxStaticText(itemPanel1, wxID_STATIC,
_(
"Set or Verify Type Information for each Table Column"), wxDefaultPosition, wxDefaultSize, 0);
239 itemStaticText3->SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
false,
wxT(
"Tahoma")));
240 itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT | wxTOP, 5);
244 itemBoxSizer2->Add(itemStaticBoxSizer5, 1, wxEXPAND | wxLEFT |wxRIGHT |wxBOTTOM, 5);
246 wxBoxSizer* itemBoxSizer7 =
new wxBoxSizer(wxHORIZONTAL);
247 itemStaticBoxSizer5->Add(itemBoxSizer7, 0, wxEXPAND | wxALL, 0);
249 m_ColumnNameStaticTxt =
new wxStaticText(itemStaticBoxSizer5->GetStaticBox(), wxID_STATIC,
_(
"Name:"), wxDefaultPosition, wxDefaultSize, 0);
257 m_SkipFormatBtn =
new wxCheckBox(itemStaticBoxSizer5->GetStaticBox(),
ID_SKIPBTN,
_(
"Skip Column"), wxDefaultPosition, wxDefaultSize, 0);
260 itemBoxSizer7->Add(
m_SkipFormatBtn, 0, wxALIGN_CENTER_VERTICAL| wxALL, 5);
262 m_MatchColumn =
new wxCheckBox(itemStaticBoxSizer5->GetStaticBox(),
ID_MATCH_COLUMN,
_(
"Match Column"), wxDefaultPosition, wxDefaultSize, 0);
264 itemBoxSizer7->Add(
m_MatchColumn, 0, wxALIGN_CENTER_VERTICAL | wxTOP|wxBOTTOM|wxRIGHT, 5);
266 wxArrayString m_MatchTypeStrings;
267 m_MatchTypeStrings.Add(
_(
"&SeqID"));
268 m_MatchTypeStrings.Add(
_(
"&Taxname"));
269 m_MatchTypeStrings.Add(
_(
"&Other"));
270 m_MatchType =
new wxRadioBox(itemStaticBoxSizer5->GetStaticBox(),
ID_MATCHTYPE, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_MatchTypeStrings, 1, wxRA_SPECIFY_ROWS);
272 itemBoxSizer7->Add(
m_MatchType, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
274 wxStaticBox* qual_box =
new wxStaticBox(itemStaticBoxSizer5->GetStaticBox(),
wxID_ANY, wxEmptyString);
275 wxStaticBoxSizer* itemStaticBoxSizer14 =
new wxStaticBoxSizer(qual_box, wxHORIZONTAL);
276 itemStaticBoxSizer5->Add(itemStaticBoxSizer14, 1, wxEXPAND | wxLEFT|wxRIGHT|wxBOTTOM, 5);
278 vector<CFieldNamePanel::EFieldType> field_types;
291 itemStaticBoxSizer14->Add(
m_Fields, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, 2);
294 wxBoxSizer* itemBoxSizerRules =
new wxBoxSizer(wxVERTICAL);
295 itemStaticBoxSizer14->Add(itemBoxSizerRules, 0, wxALIGN_LEFT | wxALL, 0);
297 wxStaticBox* itemStaticBoxSizer17Static =
new wxStaticBox(itemStaticBoxSizer14->GetStaticBox(),
wxID_ANY,
_(
"Text Update Rules"));
298 wxStaticBoxSizer* itemStaticBoxSizer17 =
new wxStaticBoxSizer(itemStaticBoxSizer17Static, wxVERTICAL);
299 itemBoxSizerRules->Add(itemStaticBoxSizer17, 1, wxEXPAND | wxTOP| wxRIGHT, 2);
301 wxBoxSizer* itemBoxSizer20 =
new wxBoxSizer(wxHORIZONTAL);
302 itemStaticBoxSizer17->Add(itemBoxSizer20, 0, wxALIGN_LEFT | wxALL, 0);
304 m_Replace =
new wxRadioButton(itemStaticBoxSizer17->GetStaticBox(),
ID_REPLACE_BTN,
_(
"Replace"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
306 itemBoxSizer20->Add(
m_Replace, 0, wxALIGN_LEFT | wxALL, 2);
308 m_Append =
new wxRadioButton(itemStaticBoxSizer17->GetStaticBox(),
ID_APPEND_BTN,
_(
"Append"), wxDefaultPosition, wxDefaultSize, 0);
310 itemBoxSizer20->Add(
m_Append, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
312 m_Prefix =
new wxRadioButton(itemStaticBoxSizer17->GetStaticBox(),
ID_PREFIX_BTN,
_(
"Prefix"), wxDefaultPosition, wxDefaultSize, 0);
314 itemBoxSizer20->Add(
m_Prefix, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2);
316 wxBoxSizer* itemBoxSizer21 =
new wxBoxSizer(wxHORIZONTAL);
317 itemStaticBoxSizer17->Add(itemBoxSizer21, 0, wxALIGN_LEFT | wxALL, 0);
319 m_LeaveOld =
new wxRadioButton(itemStaticBoxSizer17->GetStaticBox(),
ID_IGNORE_BTN,
_(
"Ignore new text"), wxDefaultPosition, wxDefaultSize, 0);
321 itemBoxSizer21->Add(
m_LeaveOld, 0, wxALIGN_LEFT | wxLEFT | wxALL, 2);
323 m_AddQual =
new wxRadioButton(itemStaticBoxSizer17->GetStaticBox(),
ID_ADD_QUAL_BTN,
_(
"Add new qual"), wxDefaultPosition, wxDefaultSize, 0);
325 itemBoxSizer21->Add(
m_AddQual, 0, wxALIGN_LEFT | wxLEFT | wxALL, 2);
327 wxStaticBox* itemStaticBoxSizer18Static =
new wxStaticBox(itemStaticBoxSizer14->GetStaticBox(),
wxID_ANY,
_(
"Separate New and Old Text with"));
328 wxStaticBoxSizer* itemStaticBoxSizer18 =
new wxStaticBoxSizer(itemStaticBoxSizer18Static, wxVERTICAL);
329 itemBoxSizerRules->Add(itemStaticBoxSizer18, 1, wxEXPAND | wxTOP | wxRIGHT, 2);
331 wxBoxSizer* itemBoxSizer27 =
new wxBoxSizer(wxHORIZONTAL);
332 itemStaticBoxSizer18->Add(itemBoxSizer27, 0, wxALIGN_LEFT|wxALL, 0);
334 m_Semicolon =
new wxRadioButton( itemStaticBoxSizer18->GetStaticBox(),
ID_SEMICOLON_BTN,
_(
"Semicolon"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
336 itemBoxSizer27->Add(
m_Semicolon, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
338 m_Space =
new wxRadioButton( itemStaticBoxSizer18->GetStaticBox(),
ID_SPACE_BTN,
_(
"Space"), wxDefaultPosition, wxDefaultSize, 0 );
340 itemBoxSizer27->Add(
m_Space, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
342 m_Colon =
new wxRadioButton( itemStaticBoxSizer18->GetStaticBox(),
ID_COLON_BTN,
_(
"Colon"), wxDefaultPosition, wxDefaultSize, 0 );
344 itemBoxSizer27->Add(
m_Colon, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
346 m_Comma =
new wxRadioButton( itemStaticBoxSizer18->GetStaticBox(),
ID_COMMA_BTN,
_(
"Comma"), wxDefaultPosition, wxDefaultSize, 0 );
348 itemBoxSizer27->Add(
m_Comma, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2);
352 itemStaticBoxSizer18->Add(
m_NoDelimiter, 0, wxALIGN_LEFT|wxALL, 2);
354 wxStaticBox* itemStaticBoxSizer19Static =
new wxStaticBox(itemStaticBoxSizer14->GetStaticBox(),
wxID_ANY,
_(
"Treat Blanks in Column"));
355 wxStaticBoxSizer* itemStaticBoxSizer19 =
new wxStaticBoxSizer(itemStaticBoxSizer19Static, wxVERTICAL);
356 itemBoxSizerRules->Add(itemStaticBoxSizer19, 1, wxEXPAND | wxTOP | wxRIGHT|wxBOTTOM, 2);
360 itemStaticBoxSizer19->Add(
m_IgnoreBlanks, 0, wxALIGN_LEFT|wxALL, 2);
364 itemStaticBoxSizer19->Add(
m_EraseValue, 0, wxALIGN_LEFT|wxALL, 2);
366 wxStaticBox* itemStaticBoxSizer38Static =
new wxStaticBox(itemPanel1,
wxID_ANY,
_(
"Click on Table Columns to Set Properties"));
367 wxStaticBoxSizer* itemStaticBoxSizer38 =
new wxStaticBoxSizer(itemStaticBoxSizer38Static, wxHORIZONTAL);
368 itemBoxSizer2->Add(itemStaticBoxSizer38, 1, wxGROW|wxLEFT|wxRIGHT, 5);
373 bool load_macro_fields =
true;
377 wxBoxSizer* itemBoxSizer42 =
new wxBoxSizer(wxHORIZONTAL);
378 itemBoxSizer2->Add(itemBoxSizer42, 0, wxALIGN_LEFT|wxALL, 0);
380 wxButton* itemButton43 =
new wxButton( itemPanel1,
ID_SPLIT_FIRST_COL,
_(
"Split First Col."), wxDefaultPosition, wxDefaultSize, 0 );
381 itemBoxSizer42->Add(itemButton43, 0, wxALIGN_LEFT| wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT|wxTOP, 5);
383 wxButton* itemButton44 =
new wxButton( itemPanel1,
ID_MULTISPACE_TO_TAB_BTN,
_(
"Multispaces to Tabs"), wxDefaultPosition, wxDefaultSize, 0 );
384 itemBoxSizer42->Add(itemButton44, 0, wxALIGN_CENTER|wxLEFT |wxRIGHT| wxTOP, 5);
387 itemBoxSizer42->Add(
m_MergeIDCols, 0, wxALIGN_CENTER| wxLEFT | wxRIGHT | wxTOP, 5);
391 itemBoxSizer42->Add(
m_MakeMailReport, 0, wxALIGN_CENTER| wxLEFT | wxRIGHT | wxTOP, 5);
393 wxButton* itemButton47 =
new wxButton( itemPanel1,
ID_APPLY_NO_CLOSE,
_(
"Apply (No Close)"), wxDefaultPosition, wxDefaultSize, 0 );
394 itemBoxSizer42->Add(itemButton47, 0, wxALIGN_CENTER| wxLEFT | wxRIGHT | wxTOP, 5);
419 return wxPanel::Show(show);
432 int focus_col_idx = -1;
444 bool has_match =
false;
452 if (this_column.GetQualifier().empty() && !has_match) {
458 this_column.SetMatchColumn(
true);
460 this_column.SetWidth((
int)this_column.GetName().length());
472 if (!this_column.GetSkipped()) {
479 if (this_column.GetQualifier().empty()) {
480 bool matched =
false;
482 if (col_name !=
"") {
490 string qual_name = qual.substr(ft_str.length(), qual.length()-ft_str.length());
494 this_column.SetQualifierType(ft_str);
495 this_column.SetQualifier(qual_name);
496 this_column.SetName(qual_name);
497 this_column.SetWidth((
int)this_column.GetName().length());
502 if (this_column.GetQualifier().empty()) {
506 if (!matched && focus_col_idx==-1)
507 focus_col_idx =
static_cast<int>(col);
521 wxLIST_STATE_SELECTED);
536 wxListEvent dummy_event;
544 wxListEvent dummy_event;
546 if (focus_col_idx==-1)
547 dummy_event.m_col = 1;
549 dummy_event.m_col = focus_col_idx;
565 if (!field_name.empty() &&
570 _ASSERT(!qual_type_str.empty());
571 current_col.SetQualifier(field_name);
572 current_col.SetQualifierType(qual_type_str);
574 if (!field_name.empty()) {
579 if (current_col.GetMatchColumn()) {
580 if (!field_name.empty()) {
581 field_name =
"match " + field_name;
584 field_name =
"match " + current_col.GetName();
587 current_col.SetName(field_name);
588 current_col.SetWidth(
static_cast<int>(field_name.length()));
623 row < m_ImportedTableData->GetNumRows(); ++
row) {
636 else if (value_to_sehs.
find(id_val) != value_to_sehs.
end()) {
641 if (seqid_str.empty()) {
650 msg +=
"\"" + id_val +
"\" does not appear to be a valid ID";
658 if (col < m_ImportedTableData->GetRow(
row).GetNumFields()) {
664 string updated_row = row_text.substr(0, field_pos.first);
665 updated_row += seqid_str;
666 updated_row += row_text.substr(field_pos.first + field_pos.second,
667 row_text.length()-(field_pos.first + field_pos.second));
676 if (dlg.ShowModal() != wxYES)
682 size_t match_col = -1;
706 auto inserted_it = unique_names.
insert(name);
711 if (inserted_it.second) {
725 vector<string> col_values;
728 row < m_ImportedTableData->GetNumRows(); ++
row) {
735 col_values.push_back(field_val);
805 bool allow_options = !match_column;
808 m_Space->Enable(allow_options);
809 m_Comma->Enable(allow_options);
810 m_Colon->Enable(allow_options);
832 wxWindowList &slist = win->GetChildren();
833 for (wxWindowList::iterator iter = slist.begin(); iter != slist.end(); ++iter)
835 wxWindow* child = *iter;
838 if (fieldvalue_panel || strcomm_fields_panel)
840 if (fieldvalue_panel)
844 else if (strcomm_fields_panel)
855 wxWindowList &slist = win->GetChildren();
856 for (wxWindowList::iterator iter = slist.begin(); iter != slist.end(); ++iter)
858 wxWindow* child = *iter;
910 int col =
event.GetColumn();
918 if ((
size_t)col < m_ImportedTableData->GetColumns().
size()) {
923 (
size_t)m_CurrentColumnIdx < m_ImportedTableData->GetColumns().
size()) {
970 if (fieldname !=
"") {
992 if (fieldname !=
"") {
1009 else if (prop ==
" ")
1011 else if (prop ==
",")
1013 else if (prop ==
":")
1022 if (prop ==
"ignore")
1024 else if (prop ==
"erase")
1030 if (prop ==
"replace")
1032 if (prop ==
"append")
1034 else if (prop ==
"prefix")
1036 else if (prop ==
"ignore")
1038 else if (prop==
"add_new_qual")
1068 (
size_t)m_CurrentColumnIdx < m_ImportedTableData->GetColumns().
size()) {
1071 if (event.IsChecked()) {
1124 wxDialog* parent =
nullptr;
1125 wxWindow* w = this->GetParent();
1128 parent =
dynamic_cast<wxDialog*
>(w);
1152 if (event.IsChecked()) {
1162 string name = this_column.GetName();
1168 this_column.SetWidth(
static_cast<int>(
m_PrevColName.length()));
1173 name = name.substr(6, name.length()-6);
1174 this_column.SetName(name);
1175 this_column.SetWidth(
static_cast<int>(name.length()));
1180 if (!this_column.GetSkipped()) {
1187 if (this_column.GetQualifier().empty()) {
1189 if (!col_name.empty()) {
1191 if (!qual.empty()) {
1196 string qual_name = qual.substr(ft_str.length(), qual.length()-ft_str.length());
1199 this_column.SetQualifierType(ft_str);
1200 this_column.SetQualifier(qual_name);
1201 this_column.SetName(qual_name);
1202 this_column.SetWidth((
int)this_column.GetName().length());
1206 if (this_column.GetQualifier().empty()) {
1215 string prev_qual_name = current_col.GetQualifier();
1221 if (field_name ==
"taxname") {
1248 if (!field_name.empty() && !qual_type_str.empty()) {
1250 current_col.SetQualifierType(qual_type_str);
1251 current_col.SetQualifier(field_name);
1254 if (!field_name.empty()) {
1255 current_col.SetName(
"match " + field_name);
1257 current_col.SetName(
"match " + current_col.GetName());
1259 current_col.SetWidth(
static_cast<int>(current_col.GetName().length()));
1261 current_col.SetMatchColumn(
true);
1265 current_col.SetMatchColumn(
false);
1271 current_col.SetWidth(
static_cast<int>(
m_PrevColName.length()));
1278 current_col.SetName(field_name);
1279 current_col.SetWidth(
static_cast<int>(field_name.length()));
1299 vector<size_t> merge_cols;
1300 merge_cols.push_back(1);
1301 merge_cols.push_back(2);
1314 first_column.SetWidth(
static_cast<int>(first_column.GetName().length()));
1320 for (
size_t i=3;
i<cols.size() && i<m_ImportedTableData->GetColumns().
size()+1; ++
i) {
1334 wxListEvent dummy_event;
1345 string constraint_field;
1347 if (constraint_field_panel)
1348 constraint_field = constraint_field_panel->
GetFieldName();
1351 constraint_field = constraint_field_type;
1354 constraint_field =
"RNA " + constraint_field;
1358 return constraint_field;
1365 if (!object_loader) {
1385 const CObject& ptr = obj_it->GetObject();
1386 const objects::CSeq_annot* annot =
dynamic_cast<const objects::CSeq_annot*
>(&ptr);
1387 if (annot && annot->IsSeq_table()) {
1390 input_table->Assign(annot->GetData().GetSeq_table());
1395 if (annot->CanGetDesc()) {
1397 if (annot_desc.
CanGet()) {
1399 CAnnot_descr_Base::Tdata::const_iterator tditer = desc_list_data.begin();
1401 for (; tditer!=desc_list_data.end(); ++tditer) {
1402 if ( (*tditer)->IsUser() )
1406 if (tditer != desc_list_data.end()) {
1411 ud = &(*tditer)->GetUser();
1417 column_properties->Assign(*
ud);
1420 if (make_mail_report) {
1435 report->SetTitle(
wxT(
"Organism Change Report"));
1437 report->ShowModal();
1442 report->SetTitle(
wxT(
"Organism Change Report"));
1460 meta_info_id->
SetStr(
"Column Meta Info");
1461 column_meta_info->
SetType(*meta_info_id);
1463 string label, properties;
1472 qualifier = col.GetName();
1473 if (qualifier.empty()) {
1474 LOG_POST(
Info <<
"Empty column name and qualifier in table reader");
1478 LOG_POST(
Info <<
"Generated new qualifier: " << qualifier);
1483 properties =
"&skipped=true";
1489 properties =
"&skipped=true";
1492 properties =
"&skipped=false";
1497 properties +=
"&name=" + col.GetName();
1498 properties +=
"&qualifier=" + qualifier;
1499 properties +=
"&qual_type=" + col.GetQualifierType();
1502 const auto& pmap = col.GetPropertyValues();
1503 for (
auto&& it : pmap) {
1504 properties +=
"&" + it.first +
"=" + it.second;
1516 if (dels.size() > 1) {
1517 LOG_POST(
Info <<
"Table reader: table has more than one delimiter.");
1518 for (
auto&& del_it : dels) {
1542 report->SetTitle(
wxT(
"Organism Change Report"));
1544 report->ShowModal();
1549 report->SetTitle(
wxT(
"Organism Change Report"));
1581 if (!current_col.GetMatchColumn())
1635 if (!fieldname.empty()) {
1637 current_col.SetQualifier(fieldname);
1644 current_col.SetWidth(
static_cast<int>(current_col.GetName().length()));
1672 for (
size_t i=3;
i<cols.size() && i<m_ImportedTableData->GetColumns().
size()-1; ++
i) {
1696 if (event.IsChecked())
1702 if (event.IsChecked())
1708 if (event.IsChecked())
1714 if (event.IsChecked())
1720 if (event.IsChecked())
1730 if (event.IsChecked())
1736 if (event.IsChecked())
1747 if (event.IsChecked())
1752 if (event.IsChecked())
1758 if (event.IsChecked())
1764 if (event.IsChecked())
1770 if (event.IsChecked())
1806 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
1810 Create(parent,
id, caption, pos,
size, style);
1821 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
1822 wxDialog::Create( parent,
id, caption, pos,
size, style );
1826 GetSizer()->SetSizeHints(
this);
1860 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
1861 itemDialog1->SetSizer(itemBoxSizer2);
1863 wxRichTextCtrl *RTCtrl =
new wxRichTextCtrl( itemDialog1,
wxID_ANY,
m_Text, wxDefaultPosition, wxSize(360, 400), wxRE_MULTILINE | wxRE_READONLY );
1865 itemBoxSizer2->Add(RTCtrl, 1, wxGROW|wxALL, 5);
1867 wxSizer* itemBoxSizer4 = itemDialog1->CreateButtonSizer(wxYES | wxNO);
1868 itemBoxSizer2->Add(itemBoxSizer4, 0, wxGROW|wxALL, 5);
1889 return wxNullBitmap;
User-defined methods of the data storage class.
EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX, CAdjustFeaturesForGaps::OnKnownUnknownSelected) EVT_CHECKBOX(ID_CADJUSTFEATURES_CHECKBOX1
bool GUI_AsyncExecUnit(IExecuteUnit &exec_unit, const wxString &msg)
const string kSequenceIdAbbrevColLabel
#define ID_ERASE_EXISTING_VALUE_BTN
#define ID_APPLY_NO_CLOSE
#define ID_SPLIT_FIRST_COL
#define ID_IGNORE_BLANKS_BTN
#define ID_MULTISPACE_TO_TAB_BTN
#define ID_MAIL_REPORT_CHECKBOX
#define ID_CTABLEIMPORTLISTCTRL3
void OnReplaceBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_REPLACE_BTN
wxRadioButton * m_LeaveOld
wxRadioButton * m_Replace
wxCheckBox * m_MakeMailReport
wxSize m_FieldsSize
Previous size of m_Fields - used to resize dialog as m_Fields layout changes.
void OnPageChanged(wxBookCtrlEvent &event)
Refresh the parent dialog upon changing the field type in the constraint panel.
CTableImportListCtrl * m_ColumnIdList
void x_EnableMachColumnFields(bool match_column)
Enable/ disable fields for match column.
void OnMailReportCheckboxClick(wxCommandEvent &event)
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_MAIL_REPORT_CHECKBOX
vector< wxString > m_FileNames
bool Create(wxWindow *parent, wxWindowID id=10230, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void OnMatchColumnClick(wxCommandEvent &event)
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_MATCH_COLUMN
void OnPrefixBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_PREFIX_BTN
void OnMatchTypeSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_MATCHTYPE
void OnIgnoreBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_IGNORE_BTN
wxRadioButton * m_AddQual
wxRadioButton * m_Semicolon
wxTextCtrl * m_ColumnNameTxtCtrl
CAttribTableColumnIdPanel()
Constructors.
void SaveSettings() const
string m_PrevColName
Fields to remember type information for col set to seq-id so that the values can be restored if seq-i...
void OnSpaceBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_SPACE_BTN
void OnAppendBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_APPEND_BTN
void ProcessUpdateFeatEvent(wxCommandEvent &event)
void x_TableReaderCommon(CIRef< IObjectLoader > object_loader, const wxString &msg, bool modal=false)
bool Show(bool show)
Override Show() to allow initialization each time window is displayed.
void x_EnableNonFormatEditControls(bool b)
Enables all controls except the format buttons since they can be used to skip a column (which greys-o...
void OnColonBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_COLON_BTN
void OnEraseExistingValueBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ERASE_EXISTING_VALUE_BTN
void x_TableReaderMacro(bool modal=false)
void OnMultispaceToTabBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MULTISPACE_TO_TAB_BTN
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnSemicolonBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_SEMICOLON_BTN
int m_CurrentColumnIdx
Index within listctrl/datasource of column being edited or -1.
shared_ptr< edit::CSeqIdGuesser > m_id_guesser
void OnMergeIDColsClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_MERGEIDCOLS
ICommandProccessor * m_CmdProccessor
CConstraintPanel * m_Constraint
wxCheckBox * m_SkipFormatBtn
void SetTopLevelEntry(CSeq_entry_Handle seq_entry)
wxStaticBox * m_ColumnPropertiesSizer
void Init()
Initialises member variables.
CSeq_entry_Handle m_TopSeqEntry
Top level seq submit entry.
void OnSplitFirstColClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SPLIT_FIRST_COL
void UpdateChildrenFeaturePanels(wxWindow *win)
Lists the features present in the top seq-entry first in the feature listbox.
void CreateControls()
Creates the controls and sizers.
void SetRegistryPath(const string &path)
wxStaticText * m_ColumnNameStaticTxt
~CAttribTableColumnIdPanel()
Destructor.
wxRadioButton * m_NoDelimiter
wxCheckBox * m_MatchColumn
CFieldChoicePanel * m_Fields
CRef< CTableImportDataSource > m_ImportedTableData
Contents of tabular file.
void x_RefreshParentWnd()
void OnNodelimiterBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_NODELIMITER_BTN
void UpdateStructuredCommentFields(wxWindow *win, const set< string > &fields)
void OnIgnoreBlanksBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_IGNORE_BLANKS_BTN
void OnCtableImportListCtrlColDragging(wxListEvent &event)
wxEVT_COMMAND_LIST_COL_DRAGGING event handler for ID_CTABLEIMPORTLISTCTRL3
void x_GuessQualifiers()
Guess column qualifiers - called on Show() or if table updated significantly.
void OnColumnNameTxtTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_COLUMNNAMETXT
wxRadioButton * m_IgnoreBlanks
void OnCtableImportListctrlColLeftClick(wxListEvent &event)
wxEVT_COMMAND_LIST_COL_CLICK event handler for ID_CTABLEIMPORTLISTCTRL3
wxRadioButton * m_EraseValue
void ProcessUpdateStructCommentEvent(wxCommandEvent &event)
void OnCommaBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_COMMA_BTN
string x_GetConstraintField(void)
void OnApplyNoCloseClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_APPLY_NO_CLOSE
static bool ShowToolTips()
Should we show tooltips?
void OnAddQualBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ADD_QUAL_BTN
void OnSkipBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_SKIPBTN
void x_EnableColumnEditControls(bool b)
If a column is currently selected, the controls to edit its type and name should be available,...
string GetFieldType(void) const
CFieldNamePanel * GetFieldNamePanel(void)
void ListPresentFeaturesFirst(objects::CSeq_entry_Handle seh)
CRef< edit::CStringConstraint > GetStringConstraint(void)
void ListPresentFeaturesFirst(const objects::CSeq_entry_Handle &entry, vector< const objects::CFeatListItem * > *featlist=nullptr)
virtual string GetFieldName(const bool subfield=false)
Returns the name of the field as selected in the panel.
bool SetFieldType(CFieldNamePanel::EFieldType field_type, bool is_pair=false)
static string AutoMatch(string field_name)
void SetShowLegalOnly(bool val)
virtual bool SetFieldName(const string &field)
CFieldNamePanel::EFieldType GetFieldType()
virtual string GetFieldName(const bool subfield=false)=0
Returns the name of the field as selected in the panel.
@ eFieldType_StructuredComment
static string GetFieldTypeName(EFieldType field_type)
static EFieldType GetFieldTypeFromName(const string &field_type_name)
void SetText(const wxString &text)
void SetText(const wxString &text)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
static bool ShowToolTips()
Should we show tooltips?
~CLongMessageDialog()
Destructor.
CLongMessageDialog()
Constructors.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
void OnClose(wxCloseEvent &event)
void OnNoClick(wxCommandEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnYesClick(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("ID Errors"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
string IsValid(const string &val)
static void s_GetValueToSehMap(objects::CSeq_entry_Handle seh, map< string, set< CSeq_entry_Handle > > &value_to_sehs, string id_field_name, CFieldNamePanel::EFieldType id_field_type, int id_subtype)
void ListStructCommentFields(const set< string > &field_names)
CRef< CSeq_annot > GetContainer()
bool GetMergeDelimiters() const
bool GetMultipleSpacesOnly() const
eColumnType GetType() const
void SetIsCurrent(bool b)
bool HasProperty(const string &prop_name)
void SetName(const string &n)
void SetQualifierType(const string &q)
void SetType(eColumnType t)
string GetProperty(const string &prop_name)
void SetMatchColumn(bool b)
For attribute table import we need to specify a column as the column to use in matching the table aga...
string GetQualifierType() const
void SetQualifier(const string &q)
bool GetMatchColumn() const
void SetProperty(const string &prop_name, const string &prop_value)
Add/update a column property.
string GetQualifier() const
const vector< char > & GetDelimiters() const
Return copy of current delimiter(s)
const CTableImportRow & GetRow(size_t row) const
Return a specific row.
void MergeColumns(vector< size_t > col_indices, char ch, bool no_merge_char=false)
Replace all delimiter characters separating cols in the array 'col_indices' with the delimiter char '...
const CTableDelimiterRules & GetDelimiterRules() const
Get set all delimiter rules (for delimited tables)
vector< CTableImportColumn > & GetColumns()
return the array of column data
const CTableImportColumn & GetColumn(size_t col) const
Return the specified column.
string GetField(size_t row, size_t col) const
return a specific field from a specific row, based on current table type and delimiter
void RecomputeRowFields(size_t row_idx)
Do same but only for 1 row.
int GetFirstImportRow() const
wxString GetFileName() const
Get name of file last passed to LoadTable.
void ConvertToSeqAnnot(CRef< CSeq_annot > annot_container)
Save data in table into annot_container.
string GetColumnName(size_t col) const
Return name of specified column.
bool ReplaceSpaces()
Replace all instances of multiple spaces with the current delimiter.
bool SplitColumn(size_t col_idx, char ch, bool split_on_whitespace=false)
Split column col_idx into 2 columns using the character 'ch' (if 'ch' does not appear in the column,...
void SetViewType(eDataViewType t)
Set/get view type.
void UpdateColumnImages(bool checkbox_only=false)
Update images on column headers.
void SetDataSource(CRef< CTableImportDataSource > ds)
Set/update data source (used to refresh view to match data source column info)
vector< pair< size_t, size_t > > & GetFields()
Get the array of field start/length pairs.
const string & GetValue() const
Get the entire row.
TVecMacroNames CreateMacros(const wxString &filename, CRef< objects::CUser_object > column_properties, const SColumnDelimiters &del_options, CConstraintPanel *panel=nullptr, bool test=false)
bool RunMacro(const TVecMacroNames ¯os, objects::CSeq_entry_Handle entry, ICommandProccessor *cmd_processor)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
virtual bool PreExecute()=0
virtual bool PostExecute()=0
vector< SObject > TObjects
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
#define ID_NODELIMITER_BTN
#define EVT_UPDATE_FEATURE_LIST(id, fn)
const char * kFieldTypeSeqId
const char * kFieldTypeTaxname
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
const string & GetMsg(void) const
Get message string.
void Info(CExceptionArgs_Base &args)
void NcbiErrorBox(const string &message, const string &title="Error")
specialized Message Box function for reporting critical errors
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
@ eBoth
Type and content, delimited by a vertical bar.
CScope & GetScope(void) const
Get scope this handle belongs to.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static const string BoolToString(bool value)
Convert bool to string.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static int Compare(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Compare of a substring with another string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static const char label[]
TStr & SetStr(void)
Select the variant.
void SetType(TType &value)
Assign a value to Type data member.
const Tdata & Get(void) const
Get the member data.
bool CanGet(void) const
Check if it is safe to call Get method.
list< CRef< CAnnotdesc > > Tdata
void MakeMailReportPostReport(CSeq_table &table, CScope &scope)
string GetReportFromMailReportTable(const CSeq_table &table, CScope *scope=nullptr)
CRef< CSeq_table > MakeMailReportPreReport(CSeq_entry_Handle seh)
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
const struct ncbi::grid::netcache::search::fields::SIZE size
static unsigned int ud(time_t one, time_t two)
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)