NCBI C++ ToolKit
gbqual_panel.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: gbqual_panel.cpp 46871 2021-11-18 22:43:21Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Colleen Bollin
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 ////@begin includes
32 ////@end includes
33 
35 
38 #include "rpttype_panel.hpp"
39 
40 #include <wx/bitmap.h>
41 #include <wx/icon.h>
42 #include <wx/scrolwin.h>
43 #include <wx/hyperlink.h>
44 #include <wx/statline.h>
45 #include <wx/sizer.h>
46 #include <wx/stattext.h>
47 
50 
51 ////@begin XPM images
52 ////@end XPM images
53 
54 
55 const char* CGBQualPanel::stRNA_FMet = "tRNA-fMet";
56 const char* CGBQualPanel::stRNA_IMet = "tRNA-iMet";
57 /*!
58  * CGBQualPanel type definition
59  */
60 
61 IMPLEMENT_DYNAMIC_CLASS( CGBQualPanel, wxPanel )
62 
63 
64 /*!
65  * CGBQualPanel event table definition
66  */
67 
68 BEGIN_EVENT_TABLE( CGBQualPanel, wxPanel )
69 
70 ////@begin CGBQualPanel event table entries
71 ////@end CGBQualPanel event table entries
72 
74 
75 
76 /*!
77  * CGBQualPanel constructors
78  */
79 
81 {
82  Init();
83 }
84 
85 CGBQualPanel::CGBQualPanel( wxWindow* parent, CSerialObject& object,
86  wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
87  : m_Object(&object)
88 {
89  Init();
90  m_Object = dynamic_cast<CSeq_feat*>(&object);
91  const CSeq_feat& seqfeat = dynamic_cast<const CSeq_feat&>(*m_Object);
92  m_EditedFeat.Reset((CSerialObject*)CSeq_feat::GetTypeInfo()->Create());
93  m_EditedFeat->Assign(seqfeat);
94  Create(parent, id, caption, pos, size, style);
95 }
96 
97 
98 /*!
99  * CGBQualPanel creator
100  */
101 
102 bool CGBQualPanel::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
103 {
104 ////@begin CGBQualPanel creation
105  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
106  wxPanel::Create( parent, id, pos, size, style );
107 
108  CreateControls();
109  if (GetSizer())
110  {
111  GetSizer()->SetSizeHints(this);
112  }
113  Centre();
114 ////@end CGBQualPanel creation
115  return true;
116 }
117 
118 
119 /*!
120  * CGBQualPanel destructor
121  */
122 
124 {
125 ////@begin CGBQualPanel destruction
126 ////@end CGBQualPanel destruction
127 }
128 
129 
130 /*!
131  * Member initialisation
132  */
133 
135 {
136 ////@begin CGBQualPanel member initialisation
138  m_Sizer = NULL;
139 ////@end CGBQualPanel member initialisation
140 }
141 
142 
143 /*!
144  * Control creation for CGBQualPanel
145  */
146 
147 
149 {
150  bool rval = false;
151 
152  if (feat.IsSetData() && feat.GetData().IsImp()) {
153  rval = false;
154  } else if (!feat.IsSetQual()) {
155  rval = false;
156  } else {
157  CSeqFeatData::ESubtype subtype = feat.GetData().GetSubtype();
158  for (CSeq_feat::TQual::const_iterator qual = feat.GetQual().begin();
159  qual != feat.GetQual().end() && !rval;
160  qual++) {
161  if (!AlwaysHandledElsewhere(CSeqFeatData::GetQualifierType((*qual)->GetQual()))) {
162  rval = true;
163  }
164  }
165  }
166  return rval;
167 }
168 
169 
171 {
172 ////@begin CGBQualPanel content construction
173  CGBQualPanel* itemPanel1 = this;
174 
175  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
176  itemPanel1->SetSizer(itemBoxSizer2);
177  int height = 450;
178 #ifdef NCBI_OS_MSWIN
179  height = 300;
180 #endif
181  m_ScrolledWindow = new wxScrolledWindow( itemPanel1, ID_CGBQUALSCROLLEDWND, wxDefaultPosition, wxSize(-1,height), wxTAB_TRAVERSAL );
182  itemBoxSizer2->Add(m_ScrolledWindow, 1, wxGROW|wxALL, 5);
183  m_ScrolledWindow->SetScrollbars(1, 1, 0, 0);
184  m_Sizer = new wxBoxSizer(wxVERTICAL);
185  m_ScrolledWindow->SetSizer(m_Sizer);
186 
187  //itemBoxSizer2->Add(450, 0, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
188 
189 ////@end CGBQualPanel content construction
190  CSeq_feat& edited_feat = dynamic_cast<CSeq_feat&>(*m_EditedFeat);
191  m_TotalHeight = 0;
192  m_TotalWidth = 0;
193  m_NumRows = 0;
194  m_ScrollRate = 0;
195  int row_height = 0;
196  int row_width = 0;
197 
198  CSeqFeatData::ESubtype subtype = edited_feat.GetData().GetSubtype();
199 
200  // need to collect rpt_type qualifiers, place quals
201  string parseable_rpt_types = "";
202 
203  vector<bool> placed;
204  vector<CSeqFeatData::EQualifier> subtypes;
205  if (edited_feat.IsSetQual()) {
206  CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
207  while (qual != edited_feat.SetQual().end()) {
208  if ((*qual)->IsSetQual() && NStr::EqualNocase((*qual)->GetQual(), "rpt_type")
209  && (*qual)->IsSetVal() && CRptTypePanel::IsParseable((*qual)->GetVal())) {
210  if (!NStr::IsBlank(parseable_rpt_types)) {
211  parseable_rpt_types = parseable_rpt_types + ";";
212  }
213  parseable_rpt_types = parseable_rpt_types + (*qual)->GetVal();
214  qual = edited_feat.SetQual().erase(qual);
215  } else {
216  placed.push_back(false);
217  subtypes.push_back(CSeqFeatData::GetQualifierType((*qual)->GetQual()));
218  qual++;
219  }
220  }
221  }
222  if (!NStr::IsBlank(parseable_rpt_types)) {
223  CRef<CGb_qual> new_qual(new CGb_qual());
224  new_qual->SetQual("rpt_type");
225  new_qual->SetVal(parseable_rpt_types);
226  edited_feat.SetQual().push_back(new_qual);
227  placed.push_back(false);
228  subtypes.push_back(CSeqFeatData::eQual_rpt_type);
229  }
230 
232  // list mandatory qualifiers first
233  ITERATE (CSeqFeatData::TQualifiers, required, mandatory) {
234  if (AlwaysHandledElsewhere(*required)) {
235  continue;
236  }
237  bool have_any = false;
238  // do we have any of this type?
239  if (edited_feat.IsSetQual()) {
240  int pos = 0;
241  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
242  qual != edited_feat.SetQual().end();
243  qual++, pos++) {
244  if (!placed[pos] && subtypes[pos] == *required) {
245  x_AddRow (*qual);
246  placed[pos] = true;
247  have_any = true;
248  }
249  }
250  }
251  if (!have_any && !PreferredHandledElsewhere(subtype, *required)) {
252  CRef<CGb_qual> new_qual(new CGb_qual());
253  new_qual->SetQual(CSeqFeatData::GetQualifierAsString(*required));
254  edited_feat.SetQual().push_back(new_qual);
255  placed.push_back(true);
256  subtypes.push_back(*required);
257  x_AddRow (new_qual);
258  }
259  }
260 
261  // list optional qualifiers next
262  for (auto required : CSeqFeatData::GetLegalQualifiers(subtype)) {
263  if (AlwaysHandledElsewhere(required)) {
264  continue;
265  }
266  // if mandatory, was already listed
267  bool is_mandatory = false;
268  ITERATE(CSeqFeatData::TQualifiers, m, mandatory) {
269  if (*m == required) {
270  is_mandatory = true;
271  break;
272  }
273  }
274  if (is_mandatory) {
275  continue;
276  }
277  bool have_any = false;
278  // do we have any of this type?
279  if (edited_feat.IsSetQual()) {
280  int pos = 0;
281  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
282  qual != edited_feat.SetQual().end();
283  qual++, pos++) {
284  if (!placed[pos] && subtypes[pos] == required) {
285  x_AddRow (*qual);
286  placed[pos] = true;
287  have_any = true;
288  }
289  }
290  }
291  if (!have_any && !PreferredHandledElsewhere(subtype, required)) {
292  string key = CSeqFeatData::GetQualifierAsString(required);
293  if (!NStr::IsBlank(key)) {
294  CRef<CGb_qual> new_qual(new CGb_qual());
295  new_qual->SetQual(CSeqFeatData::GetQualifierAsString(required));
296  edited_feat.SetQual().push_back(new_qual);
297  placed.push_back(true);
298  subtypes.push_back(required);
299  x_AddRow (new_qual);
300  }
301  }
302  }
303 
304  bool any_unplaced = false;
305  int i = 0;
306  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
307  qual != edited_feat.SetQual().end();
308  qual++, i++) {
309  if (!placed[i] && !AlwaysHandledElsewhere(CSeqFeatData::GetQualifierType((*qual)->GetQual())) ) {
310  any_unplaced = true;
311  break;
312  }
313  }
314 
315  if (any_unplaced) {
316  wxStaticLine* itemStaticLine = new wxStaticLine( m_ScrolledWindow, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
317  m_Sizer->Add(itemStaticLine, 0, wxGROW|wxALL, 5);
318  itemStaticLine->GetClientSize(&row_width, &row_height);
319  m_TotalHeight += row_height;
320 
321  // then list unplaced qualifiers
322  int pos = 0;
323  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
324  qual != edited_feat.SetQual().end();
325  qual++, pos++) {
326  if (!placed[pos] && !AlwaysHandledElsewhere(CSeqFeatData::GetQualifierType((*qual)->GetQual()))) {
327  x_AddRow (*qual);
328  placed[pos] = true;
329  }
330  }
331  }
332 
333  bool any_illegal = false;
334  i = 0;
335  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
336  qual != edited_feat.SetQual().end();
337  qual++, i++) {
338  if (!placed[i]) {
339  any_illegal = true;
340  break;
341  }
342  }
343 
344  if (any_illegal) {
345  wxStaticLine* itemStaticLine = new wxStaticLine( m_ScrolledWindow, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
346  m_Sizer->Add(itemStaticLine, 0, wxGROW|wxALL, 5);
347  itemStaticLine->GetClientSize(&row_width, &row_height);
348  m_TotalHeight += row_height;
349 
350  // then list illegal qualifiers
351  int pos = 0;
352  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
353  qual != edited_feat.SetQual().end();
354  qual++, pos++) {
355  if (!placed[pos]) {
356  x_AddRow (*qual);
357  placed[pos] = true;
358  }
359  }
360  }
361 
362  //m_ScrolledWindow->SetVirtualSize(m_TotalWidth + 10, m_TotalHeight);
363  m_ScrolledWindow->FitInside();
364  m_ScrolledWindow->SetScrollRate(0, m_ScrollRate);
365 }
366 
367 
369 {
370  m_TotalHeight = 0;
371  m_TotalWidth = 0;
372  m_ScrollRate = 0;
373  m_NumRows = 0;
374  wxSizerItemList::iterator node = m_Sizer->GetChildren().begin();
375  for (; node != m_Sizer->GetChildren().end(); ++node) {
376  wxWindow *row = (*node)->GetWindow();
377  if (!row) {
378  continue;
379  }
380  int row_width;
381  int row_height;
382  row->GetClientSize(&row_width, &row_height);
383  if (row_width > m_TotalWidth) {
384  m_TotalWidth = row_width;
385  }
386  if (row_height < m_ScrollRate || m_ScrollRate == 0) {
387  m_ScrollRate = row_height;
388  }
389  m_TotalHeight += row_height;
390  m_NumRows++;
391  }
392 
393  //m_ScrolledWindow->SetVirtualSize(m_TotalWidth + 10, m_TotalHeight);
394  m_ScrolledWindow->FitInside();
395  m_ScrolledWindow->SetScrollRate(0, m_ScrollRate);
396 }
397 
398 
400 {
402  row->TransferDataToWindow();
403  m_Sizer->Add(row, 0, wxALIGN_LEFT|wxALL, 0);
404  int row_width;
405  int row_height;
406  row->GetClientSize(&row_width, &row_height);
407  if (row_width > m_TotalWidth) {
408  m_TotalWidth = row_width;
409  }
410  m_TotalHeight += row_height;
411  m_ScrollRate = row_height;
412  m_NumRows++;
413 }
414 
416 {
417  bool found_product = false;
418  wxSizerItemList::iterator node = m_Sizer->GetChildren().begin();
419  for (; node != m_Sizer->GetChildren().end(); ++node) {
420  wxWindow *w = (*node)->GetWindow();
421  if (!w) {
422  continue;
423  }
424  CSingleGbQualSubPanel* singlequal_panel = dynamic_cast<CSingleGbQualSubPanel*> (w);
425  if (singlequal_panel) {
426  CRef<CGb_qual> qual = singlequal_panel->GetGbQual();
427  if (!qual->IsSetQual() || !NStr::EqualNocase(qual->GetQual(), "product")) {
428  continue;
429  }
430 
431  found_product = true;
432  if ((NStr::EqualNocase(qual->GetVal(), stRNA_FMet) && (NStr::EqualNocase(value, stRNA_IMet) || value.empty()))
433  || (NStr::EqualNocase(qual->GetVal(), stRNA_IMet) && (NStr::EqualNocase(value, stRNA_FMet) || value.empty()))) {
434  qual->SetVal(value);
435  singlequal_panel->SetGbQual(qual);
436  break;
437  }
438 
439  }
440  }
441 
442  if (!found_product && !value.empty()) {
443  // another row is needed
444  CRef<CGb_qual> new_qual(new CGb_qual("product", value));
445  x_AddRow(new_qual);
446  }
447 }
448 
449 
451 {
452  if (!wxPanel::TransferDataToWindow())
453  return false;
454 
455  wxSizerItemList::iterator node = m_Sizer->GetChildren().begin();
456  for (; node != m_Sizer->GetChildren().end(); ++node) {
457  wxWindow *w = (*node)->GetWindow();
458  if (!w) {
459  continue;
460  }
461  CSingleGbQualSubPanel* singlequal_panel = dynamic_cast<CSingleGbQualSubPanel*> (w);
462  if (singlequal_panel) {
463  singlequal_panel->TransferDataToWindow();
464  }
465  }
466 
467  return true;
468 }
469 
470 
472 {
473  if (!wxPanel::TransferDataFromWindow())
474  return false;
475 
476  CSeq_feat& edited_feat = dynamic_cast<CSeq_feat&>(*m_EditedFeat);
477  edited_feat.ResetQual();
478 
479  wxSizerItemList::iterator node = m_Sizer->GetChildren().begin();
480  for (; node != m_Sizer->GetChildren().end(); ++node) {
481  wxWindow *w = (*node)->GetWindow();
482  if (!w) {
483  continue;
484  }
485  CRef<CGb_qual> edited_qual;
486  CSingleGbQualSubPanel* singlequal_panel = dynamic_cast<CSingleGbQualSubPanel*> (w);
487  if (singlequal_panel) {
488  edited_qual = singlequal_panel->GetGbQual();
489  if (edited_qual && edited_qual->IsSetVal() && (!NStr::IsBlank(edited_qual->GetVal()) || NStr::Equal(edited_qual->GetQual(), "replace")))
490  {
491  edited_feat.SetQual().push_back(edited_qual);
492  }
493  }
494  }
495  return true;
496 }
497 
498 
499 void CGBQualPanel::PopulateGBQuals(objects::CSeq_feat& seq_feat)
500 {
502  CSeq_feat& edited_feat = dynamic_cast<CSeq_feat&>(*m_EditedFeat);
503  seq_feat.ResetQual();
504 
505  for (CSeq_feat::TQual::iterator qual = edited_feat.SetQual().begin();
506  qual != edited_feat.SetQual().end();
507  qual++) {
508  if ((*qual)->IsSetQual() && !NStr::IsBlank((*qual)->GetQual())
510  && (*qual)->IsSetVal() &&
511  (!NStr::IsBlank((*qual)->GetVal()) || NStr::Equal((*qual)->GetQual(), "replace"))) {
512  if (NStr::EqualNocase((*qual)->GetQual(), "rpt_type")
513  && CRptTypePanel::IsParseable((*qual)->GetVal())) {
514  // add rpt_types back individually
515  vector<string> tokens;
516  NStr::Split((*qual)->GetVal(), ";", tokens);
517  ITERATE (vector<string>, tok, tokens) {
518  CRef<CGb_qual> new_qual(new CGb_qual());
519  new_qual->SetQual("rpt_type");
520  new_qual->SetVal(*tok);
521  seq_feat.SetQual().push_back(new_qual);
522  }
523  } else {
524  CRef<CGb_qual> new_qual(new CGb_qual());
525  new_qual->Assign(**qual);
526  seq_feat.SetQual().push_back(new_qual);
527  }
528  }
529  }
530 }
531 
532 
533 /*!
534  * Should we show tooltips?
535  */
536 
538 {
539  return true;
540 }
541 
542 /*!
543  * Get bitmap resources
544  */
545 
546 wxBitmap CGBQualPanel::GetBitmapResource( const wxString& name )
547 {
548  // Bitmap retrieval
549 ////@begin CGBQualPanel bitmap retrieval
550  wxUnusedVar(name);
551  return wxNullBitmap;
552 ////@end CGBQualPanel bitmap retrieval
553 }
554 
555 /*!
556  * Get icon resources
557  */
558 
559 wxIcon CGBQualPanel::GetIconResource( const wxString& name )
560 {
561  // Icon retrieval
562 ////@begin CGBQualPanel icon retrieval
563  wxUnusedVar(name);
564  return wxNullIcon;
565 ////@end CGBQualPanel icon retrieval
566 }
567 
568 
570 {
571  // experiment and inference get their own panels
572  if (qual_type == CSeqFeatData::eQual_experiment || qual_type == CSeqFeatData::eQual_inference) {
573  return true;
574  }
575  // pseudo and pseudogene are handled separately
576  if (qual_type == CSeqFeatData::eQual_pseudogene || qual_type == CSeqFeatData::eQual_pseudo) {
577  return true;
578  }
579  return false;
580 }
581 
583 {
584  if (qual_type == CSeqFeatData::eQual_note) {
585  return true;
586  }
587  if (qual_type == CSeqFeatData::eQual_citation
588  || qual_type == CSeqFeatData::eQual_db_xref
589  || qual_type == CSeqFeatData::eQual_exception
590  || qual_type == CSeqFeatData::eQual_gene
591  || qual_type == CSeqFeatData::eQual_gene_synonym
592  || qual_type == CSeqFeatData::eQual_insertion_seq
593  || qual_type == CSeqFeatData::eQual_label
594  || qual_type == CSeqFeatData::eQual_locus_tag
595  || qual_type == CSeqFeatData::eQual_note
596  || qual_type == CSeqFeatData::eQual_partial
597  || qual_type == CSeqFeatData::eQual_product
598  || qual_type == CSeqFeatData::eQual_pseudo
599  || qual_type == CSeqFeatData::eQual_rpt_unit
600  || qual_type == CSeqFeatData::eQual_transposon
601  || qual_type == CSeqFeatData::eQual_trans_splicing
603  || qual_type == CSeqFeatData::eQual_standard_name
604  || qual_type == CSeqFeatData::eQual_usedin) {
605  return true;
606  }
607 
608  if (qual_type == CSeqFeatData::eQual_product) {
609  if (feat_subtype == CSeqFeatData::eSubtype_mat_peptide
610  || feat_subtype == CSeqFeatData::eSubtype_sig_peptide
611  || feat_subtype == CSeqFeatData::eSubtype_transit_peptide
612  || feat_subtype == CSeqFeatData::eSubtype_C_region
613  || feat_subtype == CSeqFeatData::eSubtype_D_segment
614  || feat_subtype == CSeqFeatData::eSubtype_exon
615  || feat_subtype == CSeqFeatData::eSubtype_J_segment
616  || feat_subtype == CSeqFeatData::eSubtype_misc_feature
617  || feat_subtype == CSeqFeatData::eSubtype_N_region
618  || feat_subtype == CSeqFeatData::eSubtype_S_region
619  || feat_subtype == CSeqFeatData::eSubtype_V_region
620  || feat_subtype == CSeqFeatData::eSubtype_V_segment
621  || feat_subtype == CSeqFeatData::eSubtype_variation) {
622  return false;
623  } else {
624  return true;
625  }
626  }
627 
628  if (feat_subtype == CSeqFeatData::eSubtype_gene)
629  {
630  if ( qual_type == CSeqFeatData::eQual_allele ||
631  qual_type == CSeqFeatData::eQual_gene_synonym ||
632  qual_type == CSeqFeatData::eQual_locus_tag ||
633  qual_type == CSeqFeatData::eQual_map
634  )
635  return true;
636  else
637  return false;
638  }
639 
640 
641  if (feat_subtype == CSeqFeatData::eSubtype_cdregion) {
642  if (qual_type == CSeqFeatData::eQual_codon_start
643  || qual_type == CSeqFeatData::eQual_codon
644  || qual_type == CSeqFeatData::eQual_EC_number
645  || qual_type == CSeqFeatData::eQual_gdb_xref
646  || qual_type == CSeqFeatData::eQual_number
647  || qual_type == CSeqFeatData::eQual_protein_id
648  || qual_type == CSeqFeatData::eQual_transl_except
649  || qual_type == CSeqFeatData::eQual_transl_table
650  || qual_type == CSeqFeatData::eQual_translation
651  || qual_type == CSeqFeatData::eQual_allele
652  || qual_type == CSeqFeatData::eQual_translation
653  || qual_type == CSeqFeatData::eQual_function
654  || qual_type == CSeqFeatData::eQual_old_locus_tag) {
655  return true;
656  }
657  }
658 
659 
660 
661  if (qual_type == CSeqFeatData::eQual_map
662  && feat_subtype != CSeqFeatData::eSubtype_repeat_region
663  && feat_subtype != CSeqFeatData::eSubtype_gap) {
664  return true;
665  }
666  if (qual_type == CSeqFeatData::eQual_operon
667  && feat_subtype != CSeqFeatData::eSubtype_operon) {
668  return true;
669  }
670  return false;
671 }
672 
673 
static bool ShowToolTips()
Should we show tooltips?
wxBoxSizer * m_Sizer
void Init()
Initialises member variables.
virtual bool TransferDataToWindow()
CRef< CSerialObject > m_EditedFeat
virtual bool TransferDataFromWindow()
wxScrolledWindow * m_ScrolledWindow
static const char * stRNA_IMet
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CGBQualPanel()
Constructors.
void CreateControls()
Creates the controls and sizers.
void PopulateGBQuals(objects::CSeq_feat &seq_feat)
static bool PanelNeeded(objects::CSeq_feat &seq_feat)
~CGBQualPanel()
Destructor.
static const char * stRNA_FMet
void x_AddRow(CRef< objects::CGb_qual > qual)
void Update_tRNA_ProductQual(const string &value)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CSerialObject * m_Object
bool Create(wxWindow *parent, wxWindowID id=ID_CGBQUALPANEL, const wxString &caption=_("GBQual Panel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
@Gb_qual.hpp User-defined methods of the data storage class.
Definition: Gb_qual.hpp:61
static bool IsParseable(const string &val)
EQualifier
List of available qualifiers for feature keys.
@ eQual_ribosomal_slippage
ESubtype GetSubtype(void) const
const TLegalQualifiers & GetLegalQualifiers(void) const
Get a list of all the legal qualifiers for the feature.
const TQualifiers & GetMandatoryQualifiers(void) const
Get the list of all mandatory qualifiers for the feature.
@ eSubtype_transit_peptide
static EQualifier GetQualifierType(CTempString qual)
convert qual string to enumerated value
static CTempString GetQualifierAsString(EQualifier qual)
Convert a qualifier from an enumerated value to a string representation or empty if not found.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
Base class for all serializable objects.
Definition: serialbase.hpp:150
void SetGbQual(CRef< objects::CGb_qual > &qual)
CRef< objects::CGb_qual > GetGbQual()
static void Init(void)
Definition: cursor6.c:76
USING_SCOPE(objects)
bool AlwaysHandledElsewhere(CSeqFeatData::EQualifier qual_type)
bool PreferredHandledElsewhere(CSeqFeatData::ESubtype feat_subtype, CSeqFeatData::EQualifier qual_type)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
Definition: ncbistr.cpp:3461
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
Definition: ncbistr.hpp:5384
const TVal & GetVal(void) const
Get the Val member data.
Definition: Gb_qual_.hpp:259
void SetQual(const TQual &value)
Assign a value to Qual data member.
Definition: Gb_qual_.hpp:221
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
Definition: Seq_feat_.hpp:913
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
Definition: Seq_feat_.hpp:1135
bool IsImp(void) const
Check if variant Imp is selected.
const TQual & GetQual(void) const
Get the Qual member data.
Definition: Seq_feat_.hpp:1147
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
bool IsSetQual(void) const
Check if a value has been assigned to Qual data member.
Definition: Gb_qual_.hpp:200
void SetVal(const TVal &value)
Assign a value to Val data member.
Definition: Gb_qual_.hpp:268
const TQual & GetQual(void) const
Get the Qual member data.
Definition: Gb_qual_.hpp:212
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Seq_feat_.hpp:1153
bool IsSetVal(void) const
Check if a value has been assigned to Val data member.
Definition: Gb_qual_.hpp:247
void ResetQual(void)
Reset Qual data member.
Definition: Seq_feat_.cpp:136
END_EVENT_TABLE()
int i
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
#define row(bind, expected)
Definition: string_bind.c:73
Modified on Sun May 19 04:41:18 2024 by modify_doxy.py rev. 669887