92 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
93 CFormattedQualPanel::Create( parent,
id, pos,
size, style );
98 GetSizer()->SetSizeHints(
this);
139 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
140 itemCFormattedQualPanel1->SetSizer(itemBoxSizer2);
142 wxBoxSizer* itemBoxSizer3 =
new wxBoxSizer(wxHORIZONTAL);
143 itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_LEFT|wxALL, 0);
145 wxStaticText* itemStaticText4 =
new wxStaticText( itemCFormattedQualPanel1, wxID_STATIC,
_(
"Category"), wxDefaultPosition, wxSize(120, -1), 0 );
146 itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
148 wxStaticText* itemStaticText5 =
new wxStaticText( itemCFormattedQualPanel1, wxID_STATIC,
_(
"Experiment"), wxDefaultPosition, wxSize(250, -1), 0 );
149 itemBoxSizer3->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
151 wxStaticText* itemStaticText6 =
new wxStaticText( itemCFormattedQualPanel1, wxID_STATIC,
_(
"PMID or doi (optional)"), wxDefaultPosition, wxSize(120, -1), 0 );
152 itemBoxSizer3->Add(itemStaticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
154 m_ScrolledWindow =
new wxScrolledWindow( itemCFormattedQualPanel1,
ID_SCROLLEDWINDOW, wxDefaultPosition, wxSize(300, 300), wxSUNKEN_BORDER|wxVSCROLL|wxTAB_TRAVERSAL );
157 m_Sizer =
new wxFlexGridSizer(0, 2, 0, 0);
206 m_Sizer->Add(panel, 0, wxGROW);
209 wxT(
"Delete"),
wxT(
""), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
210 m_Sizer->Add(itemHyperlinkCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
218 if (!wxPanel::TransferDataToWindow())
228 bool add_last_blank =
true;
231 while (
m_Sizer->GetItemCount() > 0) {
233 m_Sizer->GetItem(pos)->DeleteWindows();
239 CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
240 while (qual != edited_feat.
SetQual().end()) {
241 if ((*qual)->IsSetQual() &&
NStr::EqualNocase((*qual)->GetQual(),
"experiment")) {
243 if ((*qual)->IsSetVal()) {
244 value = (*qual)->GetVal();
249 add_last_blank =
false;
251 add_last_blank =
true;
259 if (add_last_blank) {
263 int win_height, win_width;
289 if (!wxPanel::TransferDataFromWindow())
296 wxSizerItemList::iterator node =
m_Sizer->GetChildren().begin();
297 for (; node !=
m_Sizer->GetChildren().end(); ++node) {
298 wxWindow *w = (*node)->GetWindow();
303 if (singlequal_panel) {
304 if (pos != skip_index) {
308 edited_feat.
SetQual().push_back(edited_qual);
330 wxSizerItemList& itemList =
m_Sizer->GetChildren();
331 auto num_items = itemList.size();
332 if (num_items > 1 && wnd == (itemList[num_items - 2])->GetWindow()) {
337 int win_height, win_width;
358 for (CSeq_feat::TQual::iterator qual = edited_feat.
SetQual().begin();
359 qual != edited_feat.
SetQual().end();
361 if ((*qual)->IsSetQual() && !
NStr::IsBlank((*qual)->GetQual())
363 && (*qual)->IsSetVal() && !
NStr::IsBlank((*qual)->GetVal())) {
367 seq_feat.SetQual().push_back(new_qual);
380 for(wxSizerItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) {
381 wxWindow* child = (**it).GetWindow();
382 if (child && child == wnd)
398 wxWindow* wnd = (wxWindow*)event.GetEventObject();
402 wxSizerItemList& itemList =
m_Sizer->GetChildren();
wxFlexGridSizer * m_Sizer
bool x_GetExperiments(bool keep_blanks=false, int skip_index=-1)
virtual bool TransferDataToWindow()
void PopulateGBQuals(objects::CSeq_feat &seq_feat)
virtual void OnChildChange(wxWindow *wnd)
static bool ShowToolTips()
Should we show tooltips?
void x_AddExperiment(string value)
void OnDelete(wxHyperlinkEvent &event)
wxScrolledWindow * m_ScrolledWindow
virtual bool TransferDataFromWindow()
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
int x_FindRow(wxWindow *wnd, wxSizerItemList &itemList)
bool Create(wxWindow *parent, wxWindowID id=ID_CINFERENCELISTPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CRef< CSerialObject > m_EditedFeat
CExperimentListPanel()
Constructors.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
~CExperimentListPanel()
Destructor.
bool x_SetExperiments(bool keep_blanks=false)
@Gb_qual.hpp User-defined methods of the data storage class.
static void RemoveRepresentedQuals(objects::CSeq_feat &feat, const string &qual_name)
virtual void x_AdjustForControl(CQualListItemPanel *panel, wxHyperlinkCtrl *itemHyperlinkCtrl)
namespace ncbi::objects::
Base class for all serializable objects.
virtual string GetValue()
virtual void SetValue(string val)
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 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.
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
TQual & SetQual(void)
Assign a value to Qual data member.
void ResetQual(void)
Reset Qual data member.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
#define row(bind, expected)