96 wxWindowID
id,
const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
97 : m_Errs(errs),
m_Scope(scope), m_TopSeqEntry(top_seq_entry), m_SeqSubmit(seq_submit), m_Workbench(workbench)
100 Create(parent,
id, caption, pos,
size, style);
111 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
112 wxDialog::Create( parent,
id, caption, pos,
size, style );
117 GetSizer()->SetSizeHints(
this);
157 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
158 itemDialog1->SetSizer(itemBoxSizer2);
160 wxFlexGridSizer* itemFlexGridSizer3 =
new wxFlexGridSizer(0, 2, 0, 0);
161 itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
163 m_Verbose =
new wxCheckBox(itemDialog1,
wxID_ANY,
_(
"Verbose"), wxDefaultPosition, wxDefaultSize, 0);
164 itemBoxSizer2->Add(
m_Verbose, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
166 wxBoxSizer* itemBoxSizer4 =
new wxBoxSizer(wxHORIZONTAL);
167 itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
169 wxButton* itemButton5 =
new wxButton( itemDialog1,
ID_REPORT_BTN,
_(
"Report"), wxDefaultPosition, wxDefaultSize, 0 );
170 itemBoxSizer4->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
172 wxButton* itemButton6 =
new wxButton( itemDialog1,
ID_VALID_REPORT_DISMISS,
_(
"Dismiss"), wxDefaultPosition, wxDefaultSize, 0 );
173 itemBoxSizer4->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
178 itemBoxSizer4->Add(itemButton11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
181 itemBoxSizer4->Add(itemButton12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
187 vector<string> errcodes;
191 errcodes.push_back(pValidErrItem->GetErrCode());
193 sort(errcodes.begin(), errcodes.end());
194 vector<string>::iterator
final = unique(errcodes.begin(), errcodes.end());
195 errcodes.resize( std::distance(errcodes.begin(),
final) );
197 ITERATE(vector<string>, it, errcodes) {
198 wxCheckBox* box =
new wxCheckBox( itemDialog1,
wxID_ANY,
ToWxString(*it), wxDefaultPosition, wxDefaultSize, 0 );
199 itemFlexGridSizer3->Add(box, 0, wxALIGN_LEFT|wxALL, 5);
259 report->SetTitle(
wxT(
"Validator Report"));
263 if ((*it)->GetValue()) {
270 objects::CObjectManager& objmgr =
m_Scope->GetObjectManager();
271 objects::validator::CValidErrorFormat formatter(objmgr);
273 if ((*it)->GetValue() || !any) {
274 vector<CConstRef<CValidErrItem> > err_list;
278 err_list.push_back(pValidErrItem);
282 if (err_list.size() > 0) {
283 msg += err_list[0]->GetErrCode();
285 msg +=
"\t" + err_list[0]->GetVerbose();
291 msg += formatter.FormatForSubmitterReport(**err, *
m_Scope);
304 objects::CObjectManager& objmgr =
m_Scope->GetObjectManager();
305 objects::validator::CValidErrorFormat formatter(objmgr);
307 if ((*it)->GetValue()) {
308 vector<CConstRef<CValidErrItem> > err_list;
312 string accession = pValidErrItem->GetAccession();
317 bsh =
m_Scope->GetBioseqHandle(acc_id);
366 wxWindow *main_window = GetParent();
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CUndoManager & GetUndoManager()
void SetText(const wxString &text)
void SetWorkDir(const wxString &workDir)
CProjectService - a service providing API for operations with Workspaces and Projects.
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
void SetSubsets(const set< objects::CBioseq_Handle > &selected)
void OnSequester(wxCommandEvent &event)
CConstRef< objects::CSeq_submit > m_SeqSubmit
objects::CSeq_entry_Handle m_TopSeqEntry
void OnValidReportDismissClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_VALID_REPORT_DISMISS
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Create(wxWindow *parent, wxWindowID id=10384, const wxString &caption=_("Validator Report"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void Init()
Initialises member variables.
vector< wxCheckBox * > m_Opts
~CValidatorReportCfgDlg()
Destructor.
void OnSegregate(wxCommandEvent &event)
objects::CScope * m_Scope
void GetSelected(set< objects::CBioseq_Handle > &selected)
CValidatorReportCfgDlg()
Constructors.
void OnReportBtnClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_REPORT_BTN
void CreateControls()
Creates the controls and sizers.
CObjectFor< objects::CValidError::TErrs > * m_Errs
static bool ShowToolTips()
Should we show tooltips?
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
Undo/Redo interface for editing operations.
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
T & GetData(void)
Get data as a reference.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
#define ID_VALID_REPORT_DISMISS
#define ID_VALID_REPORT_SEGREGATE_BTN
#define ID_VALID_REPORT_SEQUESTER_BTN
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)