wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
94 Create(parent,
id, caption, pos,
size, style);
102 bool CGBQualPanel::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
105SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
106wxPanel::Create( parent,
id, pos,
size, style );
111GetSizer()->SetSizeHints(
this);
158 for(CSeq_feat::TQual::const_iterator qual = feat.
GetQual().begin();
159qual != feat.
GetQual().end() && !rval;
175wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
176itemPanel1->SetSizer(itemBoxSizer2);
184 m_Sizer=
newwxBoxSizer(wxVERTICAL);
201 stringparseable_rpt_types =
"";
204vector<CSeqFeatData::EQualifier> subtypes;
206CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
207 while(qual != edited_feat.
SetQual().end()) {
211parseable_rpt_types = parseable_rpt_types +
";";
213parseable_rpt_types = parseable_rpt_types + (*qual)->GetVal();
214qual = edited_feat.
SetQual().erase(qual);
216placed.push_back(
false);
224new_qual->
SetQual(
"rpt_type");
225new_qual->
SetVal(parseable_rpt_types);
226edited_feat.
SetQual().push_back(new_qual);
227placed.push_back(
false);
237 boolhave_any =
false;
241 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
242qual != edited_feat.
SetQual().end();
244 if(!placed[pos] && subtypes[pos] == *required) {
254edited_feat.
SetQual().push_back(new_qual);
255placed.push_back(
true);
256subtypes.push_back(*required);
267 boolis_mandatory =
false;
269 if(*m == required) {
270is_mandatory =
true;
277 boolhave_any =
false;
281 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
282qual != edited_feat.
SetQual().end();
284 if(!placed[pos] && subtypes[pos] == required) {
296edited_feat.
SetQual().push_back(new_qual);
297placed.push_back(
true);
298subtypes.push_back(required);
304 boolany_unplaced =
false;
306 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
307qual != edited_feat.
SetQual().end();
310any_unplaced =
true;
316wxStaticLine* itemStaticLine =
newwxStaticLine(
m_ScrolledWindow, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
317 m_Sizer->Add(itemStaticLine, 0, wxGROW|wxALL, 5);
318itemStaticLine->GetClientSize(&row_width, &row_height);
323 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
324qual != edited_feat.
SetQual().end();
333 boolany_illegal =
false;
335 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
336qual != edited_feat.
SetQual().end();
345wxStaticLine* itemStaticLine =
newwxStaticLine(
m_ScrolledWindow, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
346 m_Sizer->Add(itemStaticLine, 0, wxGROW|wxALL, 5);
347itemStaticLine->GetClientSize(&row_width, &row_height);
352 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
353qual != edited_feat.
SetQual().end();
374wxSizerItemList::iterator node =
m_Sizer->GetChildren().begin();
375 for(; node !=
m_Sizer->GetChildren().end(); ++node) {
376wxWindow *
row= (*node)->GetWindow();
382 row->GetClientSize(&row_width, &row_height);
402 row->TransferDataToWindow();
403 m_Sizer->Add(
row, 0, wxALIGN_LEFT|wxALL, 0);
406 row->GetClientSize(&row_width, &row_height);
417 boolfound_product =
false;
418wxSizerItemList::iterator node =
m_Sizer->GetChildren().begin();
419 for(; node !=
m_Sizer->GetChildren().end(); ++node) {
420wxWindow *w = (*node)->GetWindow();
425 if(singlequal_panel) {
431found_product =
true;
442 if(!found_product && !
value.empty()) {
452 if(!wxPanel::TransferDataToWindow())
455wxSizerItemList::iterator node =
m_Sizer->GetChildren().begin();
456 for(; node !=
m_Sizer->GetChildren().end(); ++node) {
457wxWindow *w = (*node)->GetWindow();
462 if(singlequal_panel) {
473 if(!wxPanel::TransferDataFromWindow())
479wxSizerItemList::iterator node =
m_Sizer->GetChildren().begin();
480 for(; node !=
m_Sizer->GetChildren().end(); ++node) {
481wxWindow *w = (*node)->GetWindow();
487 if(singlequal_panel) {
488edited_qual = singlequal_panel->
GetGbQual();
491edited_feat.
SetQual().push_back(edited_qual);
505 for(CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
506qual != edited_feat.
SetQual().end();
508 if((*qual)->IsSetQual() && !
NStr::IsBlank((*qual)->GetQual())
510&& (*qual)->IsSetVal() &&
515vector<string> tokens;
517 ITERATE(vector<string>, tok, tokens) {
519new_qual->
SetQual(
"rpt_type");
521seq_feat.SetQual().push_back(new_qual);
525new_qual->
Assign(**qual);
526seq_feat.SetQual().push_back(new_qual);
static bool ShowToolTips()
Should we show tooltips?
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.
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.
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::
Base class for all serializable objects.
void SetGbQual(CRef< objects::CGb_qual > &qual)
virtual bool TransferDataToWindow()
CRef< objects::CGb_qual > GetGbQual()
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.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
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.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
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.
const TVal & GetVal(void) const
Get the Val member data.
void SetQual(const TQual &value)
Assign a value to Qual data member.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
bool IsImp(void) const
Check if variant Imp is selected.
const TQual & GetQual(void) const
Get the Qual member data.
const TData & GetData(void) const
Get the Data member data.
bool IsSetQual(void) const
Check if a value has been assigned to Qual data member.
void SetVal(const TVal &value)
Assign a value to Val data member.
const TQual & GetQual(void) const
Get the Qual member data.
TQual & SetQual(void)
Assign a value to Qual data member.
bool IsSetVal(void) const
Check if a value has been assigned to Val data member.
void ResetQual(void)
Reset Qual data member.
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
#define row(bind, expected)
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