: m_Workbench(
nullptr)
122wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle )
123: m_Workbench(wb), m_params(params), m_SelectionClient(new
CSelectionClient(
"Validate Errors"))
140wxPanel::Create( parent,
id, pos,
size, style );
163SetCursor(wxCursor(wxNullCursor));
164wxSetCursor(wxNullCursor);
197wxPanel* itemPanel2 =
this;
199wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxVERTICAL);
200itemPanel2->SetSizer(itemBoxSizer3);
202wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
203itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5);
205wxStaticBox* itemStaticBoxSizer7Static =
newwxStaticBox(itemPanel2,
wxID_ANY,
_(
"Status"));
206wxStaticBoxSizer* itemStaticBoxSizer7 =
newwxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
207itemBoxSizer4->Add(itemStaticBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
209 m_SummaryText=
newwxStaticText( itemPanel2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxSize(450, -1), 0 );
210itemStaticBoxSizer7->Add(
m_SummaryText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
212 m_Modified=
newwxStaticText( itemPanel2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxSize(450, -1), 0 );
213itemStaticBoxSizer7->Add(
m_Modified, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
215wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel2, wxID_STATIC,
_(
"Severity"), wxDefaultPosition, wxDefaultSize, 0 );
216itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
218wxArrayString m_SeverityStrings;
219m_SeverityStrings.Add(
_(
"INFO"));
220m_SeverityStrings.Add(
_(
"WARN"));
221m_SeverityStrings.Add(
_(
"ERROR"));
222m_SeverityStrings.Add(
_(
"REJECT"));
225itemBoxSizer4->Add(
m_Severity, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
227wxStaticText* itemStaticText7 =
newwxStaticText( itemPanel2, wxID_STATIC,
_(
"Filter"), wxDefaultPosition, wxDefaultSize, 0 );
228itemBoxSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
230wxArrayString m_FilterStrings;
231m_FilterStrings.Add(
_(
"ALL"));
233 m_Filter->SetStringSelection(
_(
"ALL"));
234itemBoxSizer4->Add(
m_Filter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
323statusText =
"Validation failed!";
327statusText =
"Validation complete, no errors found!";
349 stringstatusText =
"Failed: ";
353statusText += errMsg;
355statusText +=
"Unknown fatal error";
413main_objects.push_back(
m_objects.back());
423 stringstatusText =
"Validating...";
446statusText =
"Validation failed!";
448<<
"CTableDataValidate failed to start job: " 454 if(!statusText.empty())
484 stringerrcode =
m_Filter->GetStringSelection().ToStdString();
537 auto& tbl_data =
data->SetData();
548err_counts[
error->GetSeverity()]++;
554severity =
"Reject";
561tbl_data.emplace_back(severity, accession, title,
msg);
562 size_titem_index = tbl_data.size() - 1;
565 unsigned interr_code =
error->GetErrIndex();
569tbl_data[item_index].m_ImgIndex = 3;
572tbl_data[item_index].m_Selectable =
true;
636 constvector< CIRef<IProjectView> >& views = doc->
GetViews();
638 for(
const auto& view : views)
650prj_view->GetMainObject(
objects);
655prj_view->SetOrigObject(obj);
662 longitem =
event.GetIndex();
679 unsigned interr_code =
error->GetErrIndex();
686 stringaccession =
error->GetAccession();
692bsh =
m_Scope->GetBioseqHandle(*
id);
730 longitem =
event.GetIndex();
742 unsigned interr_code =
error->GetErrIndex();
760 if(
f&&
f->IsSetLocation())
771 for(
auto row= 0;
row< num_rows;
row++)
802 longitem =
event.GetIndex();
812 stringdescription =
error->GetErrCode();
824 msg<<
"Suppress "<< description <<
"?";
825 intanswer = wxMessageBox(
msg,
wxT(
"Supress validator test"), wxYES_NO | wxICON_QUESTION,
this);
836suppress->
Assign(*desc_it);
837validator::CValidErrorFormat::AddSuppression(suppress->
SetUser(), err_index);
846validator::CValidErrorFormat::AddSuppression(suppress->
SetUser(), err_index);
871 for(
longitem = 0; item <
m_ErrorListCtrl->GetItemCount(); ++item) {
875 stringaccession =
error->GetAccession();
881bsh =
m_Scope->GetBioseqHandle(acc_id);
884 catch(
constexception&) {}
899seq_submit.
Reset(sub);
901 if(!top_seq_entry) {
906}
catch(exception &) {}
933 m_Modified->SetLabel(
_(
"Data has been modified, please refresh"));
938 m_Modified->SetLabel(
_(
"Current project has been removed."));
948wxPoint p =
event.GetPosition();
957 longitem = p.y / rect0.GetHeight();
958 #if defined(__WXMSW__) 965SetCursor(wxCursor(wxNullCursor));
966wxSetCursor(wxNullCursor);
975SetCursor(wxCursor(wxNullCursor));
976wxSetCursor(wxNullCursor);
984 boolhand_cursor =
false;
994 unsigned interr_code =
error->GetErrIndex();
1002hand_cursor =
true;
1007SetCursor(wxCursor(wxCURSOR_HAND));
1008wxSetCursor(wxCursor(wxCURSOR_HAND));
1012SetCursor(wxCursor(wxNullCursor));
1013wxSetCursor(wxNullCursor);
CSeq_entry_Handle GetSeqEntryForSeqdesc(CRef< CScope > scope, const CSeqdesc &seq_desc)
IAppJobListener Interface for components that need to be notified about changes in Jobs.
string GetItemText(long item) const
void SetData(CRef< CErrorData > error_data)
long GetActualIndex(long item) const
CEvent - generic event implementation TODO TODO - Attachments.
wxString GetWorkDir() const
virtual const TViews & GetViews(void) const
Retrieve the existing views for this class.
CUndoManager & GetUndoManager()
CSeqGraphicWidget * GetWidget()
CProjectService - a service providing API for operations with Workspaces and Projects.
EEventSubtype GetSubtype() const
void SetSelectedObjects(TConstScopedObjects &objs)
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
namespace ncbi::objects::
Base class for all serializable objects.
void SetObjectType(EObjectType obj_type)
@ eObjectType_ValidationSuppression
static const string & ConvertSeverity(EDiagSev sev)
const string GetErrCode() const
EDiagSev GetSeverity() const
static bool ShowToolTips()
Should we show tooltips?
void OnErrcodeChoiceSelected(wxCommandEvent &event)
CRef< CJobAdapter > m_JobAdapter
CRef< CObjectFor< objects::CValidError::TErrs > > m_errs
objects::CGBProjectHandle * m_ProjectHandle
void OnChildFocus(wxChildFocusEvent &evt)
objects::CProjectItem * m_ProjectItem
string GetItemText(long item) const
void OnListItemActivated(wxListEvent &event)
bool x_IsSelectable(const CSerialObject *obj)
void Init()
Initialises member variables.
void x_LaunchEditor(CRef< objects::CValidErrItem > error)
void OnListItemRightClick(wxListEvent &event)
void OnListItemSelected(wxListEvent &event)
void OnValidatorSeveritySelected(wxCommandEvent &event)
CErrorListCtrl * m_ErrorListCtrl
IProjectView * x_FindGraphicalSequenceView(CRef< objects::CSeq_id > id)
CIRef< IFlatFileCtrl > m_FlatFileCtrl
CRef< objects::CUser_object > m_params
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
void GetSelected(set< objects::CBioseq_Handle > &selected)
void x_GetObjectsFromProjectItem()
TConstScopedObjects m_objects
virtual ~CValidatePanel()
Destructor.
void x_ConnectListener(void)
vector< size_t > m_visible
void GetTopSeqAndSeqSubmit(objects::CSeq_entry_Handle &top_seq_entry, CConstRef< objects::CSeq_submit > &seq_submit)
virtual void OnJobResult(CObject *result, CJobAdapter &adapter)
void x_DisconnectListener(void)
CRef< objects::CScope > m_Scope
void OnMouseMove(wxMouseEvent &event)
wxStaticText * m_SummaryText
void x_UpdateList(const string &statusText)
bool m_SelectionClientAttached
bool Create(wxWindow *parent, wxWindowID id=17001, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSUNKEN_BORDER|wxTAB_TRAVERSAL)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool x_MatchFilter(const objects::CValidErrItem &valitem) const
CRef< CSelectionClient > m_SelectionClient
virtual void OnJobFailed(const string &, CJobAdapter &adapter)
bool x_MatchSeverity(const objects::CValidErrItem &valitem) const
void x_OnDataChanged(CEvent *evt)
wxStaticText * m_Modified
CValidatePanel()
Constructors.
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
class IProjectView defines the abstract interface for views observing projects.
virtual wxWindow * GetWindow()=0
returns a pointer to the wxWindow representing the client
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
bool IsEditable(int err_code, const CSerialObject &obj, objects::CSeq_entry_Handle seh)
void LaunchEditor(int err_code, const CSerialObject &obj, objects::CSeq_entry_Handle seh, IWorkbench *wb)
IMPLEMENT_CLASS(CFloatingFrame, CFloatingFrameBaseClass) const static long kFloatFrameStyle
CFloatingFrame.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
EDiagSev
Severity level for the posted diagnostics.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
@ eDiag_Info
Informational message.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
@ eDiag_Critical
Critical error message.
void Error(CExceptionArgs_Base &args)
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
objects::CSeq_entry_Handle GetTopSeqEntryFromScopedObject(SConstScopedObject &obj)
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
vector< SConstScopedObject > TConstScopedObjects
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
@ fParse_Default
By default in ParseIDs and IsValid, allow raw parsable non-numeric accessions and plausible local acc...
TRange GetTotalRange(void) const
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
vector< CSeq_entry_Handle > TTSE_Handles
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
CSeq_entry_Handle GetParentEntry(void) const
Return a handle for the parent seq-entry of the bioseq.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
T & GetData(void)
Get data as a reference.
void Reset(void)
Reset reference object.
#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.
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.
const TLocation & GetLocation(void) const
Get the Location member data.
bool IsSetLocation(void) const
feature made from Check if a value has been assigned to Location data member.
TUser & SetUser(void)
Select the variant.
@ e_User
user defined object
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
const TEntrys & GetEntrys(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
bool IsEntrys(void) const
Check if variant Entrys is selected.
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
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_VALIDATE_FRAME_ERRCODE
#define ID_VALIDATE_FRAME_SEVERITY
#define ID_VALIDATE_FRAME_TEXTCTRL
wxString ToWxString(const string &s)
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