29 #ifndef _DISCREPANCY_DLG_H_
30 #define _DISCREPANCY_DLG_H_
49 #include <wx/string.h>
53 #include <wx/msgdlg.h>
54 #include <wx/button.h>
55 #include <wx/textctrl.h>
56 #include <wx/stattext.h>
57 #include <wx/listbox.h>
58 #include <wx/treelist.h>
59 #include <wx/dataview.h>
69 #define ID_CDISCR_DLG 10357
70 #define ID_CDISCR_CONF 10358
71 #define ID_CDISCR_LIST 10359
72 #define ID_DISCR_LEFT 10501
73 #define ID_DISCR_RIGHT 10502
74 #define ID_DISCR_PREV 10503
75 #define ID_DISCR_NEXT 10504
76 #define ID_DISCR_FIND_TEXT 10505
77 #define ID_DISCR_REFRESH 10506
78 #define ID_DISCR_CHECKALL 10507
79 #define ID_DISCR_UNCHECKALL 10508
80 #define ID_DISCR_AUTOFIX 10509
81 #define ID_DISCR_REPORT 10510
82 #define ID_DISCR_TESTNAME 10511
83 #define ID_DISCR_SETTINGS 10512
84 #define ID_DISCR_CLOSE 10513
85 #define ID_DISCR_OK 10514
86 #define ID_DISCR_TEXT 10515
87 #define ID_DISCR_LIST 10516
88 #define ID_DISCR_DETAILS 10517
89 #define ID_DISCR_CHECK 10518
90 #define ID_DISCR_UNCHECK 10519
91 #define ID_DISCR_TOGGLE 10520
92 #define ID_DISCR_ALL 10521
93 #define ID_DISCR_NONE 10522
94 #define ID_DISCR_DEFAULT 10523
95 #define ID_DISCR_EXPAND 10524
96 #define ID_DISCR_CONTRACT 10525
97 #define ID_DISCR_SEQUESTER 10526
98 #define ID_DISCR_CHECKFIXABLE 10527
99 #define ID_DISCR_SPR 10528
100 #define ID_DISCR_SPR_NAME 10529
101 #define ID_DISCR_REOPEN 10530
102 #define ID_CDISCR_PANEL 10531
103 #define ID_DISCR_SEGREGATE 10532
104 #define SYMBOL_DISCR_PANEL_STYLE wxTAB_TRAVERSAL
105 #define SYMBOL_DISCR_STYLE wxMINIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL|wxCLIP_CHILDREN
106 #define SYMBOL_DISCR_TITLE _("Discrepancy Test List")
112 class CDiscrepancyView;
126 DECLARE_DYNAMIC_CLASS(wxFrame)
127 DECLARE_EVENT_TABLE()
148 const wxPoint& pos = wxDefaultPosition,
149 const wxSize&
size = wxDefaultSize,
154 const wxString& workDir = wxEmptyString);
170 bool Create(wxWindow* parent,
172 const wxPoint& pos = wxDefaultPosition,
173 const wxSize&
size = wxDefaultSize,
196 void OnReopen(wxCommandEvent& event);
197 void OnClose(wxCommandEvent& evt);
242 DECLARE_DYNAMIC_CLASS(wxPanel)
243 DECLARE_EVENT_TABLE()
252 const wxPoint& pos = wxDefaultPosition,
253 const wxSize&
size = wxDefaultSize,
295 bool Create(wxWindow* parent,
297 const wxPoint& pos = wxDefaultPosition,
298 const wxSize&
size = wxDefaultSize,
307 void OnClick(wxCommandEvent& evt);
402 DECLARE_EVENT_TABLE()
408 vector<NDiscrepancy::eTestNames>* testlist,
409 vector<NDiscrepancy::eTestNames>* default_tests,
410 vector<NDiscrepancy::eTestNames>* add_tests,
411 vector<NDiscrepancy::eTestNames>* remove_tests,
415 const wxPoint& pos = wxDefaultPosition,
416 const wxSize&
size = wxDefaultSize,
419 bool Create(wxWindow* parent,
422 const wxPoint& pos = wxDefaultPosition,
423 const wxSize&
size = wxDefaultSize,
434 void OnCheck(wxCommandEvent& event);
436 void OnToggle(wxCommandEvent& event);
438 void OnOk(wxCommandEvent& event);
439 void OnClose(wxCommandEvent& event);
480 DECLARE_EVENT_TABLE()
487 void OnClose(wxCommandEvent& event);
512 virtual string GetDescr(
void)
const {
return "Discrepancy Test"; }
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CAppTask - default implementation of IAppTask, use it as a base class for custom tasks.
map< string, bool > m_MapDefaultTests
void OnSelectDefault(wxCommandEvent &event)
void OnSelectAll(wxCommandEvent &event)
wxStaticText * m_ProductRulesLabel
CDiscrepancyDlg::EReportType m_Type
CDiscrepancyConf(CDiscrepancyDlg::EReportType type, vector< NDiscrepancy::eTestNames > *testlist, vector< NDiscrepancy::eTestNames > *default_tests, vector< NDiscrepancy::eTestNames > *add_tests, vector< NDiscrepancy::eTestNames > *remove_tests, CDiscrepancyDlg *parent, wxWindowID id=10358, const wxString &caption=_("Discrepancy Test List"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxMINIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL|wxCLIP_CHILDREN)
bool Create(wxWindow *parent, wxWindowID id=10358, const wxString &caption=_("Discrepancy Test List"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxMINIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL|wxCLIP_CHILDREN)
void OnCheck(wxCommandEvent &event)
void OnFindPrev(wxCommandEvent &event)
vector< NDiscrepancy::eTestNames > * m_Tests
CDiscrepancyConf()
Constructors.
vector< NDiscrepancy::eTestNames > * m_DefaultTests
void OnFindNext(wxCommandEvent &event)
vector< NDiscrepancy::eTestNames > * m_RemoveTests
void OnToggle(wxCommandEvent &event)
vector< NDiscrepancy::eTestNames > * m_AddTests
map< NDiscrepancy::eTestNames, bool > m_MapTests
void OnClose(wxCommandEvent &event)
void OnSelectNone(wxCommandEvent &event)
void OnProductRules(wxCommandEvent &event)
CDiscrepancyDlg * m_DiscrepancyDlg
void OnOk(wxCommandEvent &event)
void OnUncheck(wxCommandEvent &event)
void OnTreeListCheck(wxTreeListEvent &event)
void OnFindText(wxCommandEvent &event)
void OnDetails(wxCommandEvent &event)
void OnCheckAll(wxCommandEvent &evt)
string RegisterRoot(bool separate=true)
wxStaticText * m_ProductRulesLabel
CDiscrepancyPanel * m_Panel
void OnReopen(wxCommandEvent &event)
wxButton * m_UncheckAllBtn
void SetWorkDir(const wxString &workDir)
void OnTestName(wxCommandEvent &evt)
static CDiscrepancyDlg * OpenDiscrepancyDlg(EReportType type, CScope &scope, IWorkbench *workbench, const wxString &workDir=wxEmptyString)
void OnUncheckAll(wxCommandEvent &evt)
bool NeedToReopen() const
wxButton * m_SegregateBtn
wxButton * m_SequesterBtn
const string GetProductRules()
void OnExpand(wxCommandEvent &evt)
ICommandProccessor * m_CmdProccessor
void OnContract(wxCommandEvent &evt)
void OnAutofix(wxCommandEvent &evt)
void SetProductRules(const string rules)
void OnCheckFixable(wxCommandEvent &evt)
void OnReport(wxCommandEvent &evt)
void WriteSettings(CGuiRegistry &gui_reg)
objects::CGBProjectHandle * m_Project
bool Create(wxWindow *parent, wxWindowID id=10357, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxMINIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL|wxCLIP_CHILDREN)
void OnClose(wxCommandEvent &evt)
void OnSegregate(wxCommandEvent &evt)
void OnSequester(wxCommandEvent &evt)
void OnSettings(wxCommandEvent &evt)
wxButton * m_CheckFixableBtn
void OnRefresh(wxCommandEvent &evt)
EReportType GetType() const
wxString GetSettingsPath()
void OnDataChanged(CEvent *evt)
void OnDetails(wxCommandEvent &event)
CDiscrepancyList()
Constructors.
bool Create(wxWindow *parent, wxWindowID id=10359, const wxString &caption=_("Discrepancy Test List"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxMINIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL|wxCLIP_CHILDREN)
void OnClose(wxCommandEvent &event)
void RunTests(CRef< CDiscrepancyReportJob > job)
CDiscrepancyPanel * m_Panel
CDiscrepancyHelper(CDiscrepancyPanel *panel)
void OnJobNotification(CEvent *evt)
virtual ~CDiscrepancyHelper()
CAppJobDispatcher::TJobID m_JobId
void CollectAutofix(CCustomTreeItem &item, NDiscrepancy::TReportObjectList &tofix)
void OnSegregate(wxCommandEvent &evt)
unsigned char GetStatus()
map< string, unsigned char > m_TreeState
vector< NDiscrepancy::eTestNames > m_TestList
CRef< CSelectionClient > m_SelectionClient
const CSerialObject * GetTopObject(const CSerialObject *obj)
CBioseq_Handle GetAccessionForObject(const CSerialObject *obj)
vector< NDiscrepancy::eTestNames > m_DefaultTests
wxString GetSettingsPath()
void OnDblClk(wxCommandEvent &evt)
void recursiveCdsTrnaOverlap(CDiscRepItem *item, vector< CRef< NDiscrepancy::CReportItem >> &reps, CScope &scope)
CDiscrepancyDlg::EReportType GetType() const
void OnRefresh(wxCommandEvent &evt)
void OnCheckAll(wxCommandEvent &evt)
ICommandProccessor * m_CmdProccessor
void OnClick(wxCommandEvent &evt)
void OnAutofix(wxCommandEvent &evt)
void OnListClk(wxCommandEvent &evt)
void WriteSettings(CGuiRegistry &gui_reg)
NDiscrepancy::CDiscrepancyGroup m_TGrp
void OnFindPrev(wxCommandEvent &evt)
IProjectView * FindGraphicalSequenceView(CConstRef< CSeq_id > id)
CDiscrepancyDlg::EReportType m_Type
string RegisterRoot(bool separate=true)
void SetProject(objects::CGBProjectHandle *project)
void OnFindNext(wxCommandEvent &evt)
objects::CGBProjectHandle * m_Project
bool Create(wxWindow *parent, wxWindowID id=10531, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
void OnUncheckAll(wxCommandEvent &evt)
CRef< NDiscrepancy::CDiscrepancySet > m_Tests
void OnListDblClk(wxCommandEvent &evt)
void SetCmdProccessor(ICommandProccessor *proc)
void OnFindText(wxCommandEvent &evt)
bool InvalidObject(const CSerialObject *obj, CScope &scope)
CRef< CDiscrepancyHelper > m_Helper
void OnReport(wxCommandEvent &evt)
void OnSequester(wxCommandEvent &evt)
void OnCheckFixable(wxCommandEvent &evt)
void Report(CCustomTreeItem &item, string &out, bool all)
vector< NDiscrepancy::eTestNames > m_RemoveTests
void Sequester(CCustomTreeItem &item, set< CBioseq_Handle > &out, CScope &scope, bool all)
void OpenEditor(const CSerialObject *ref, CScope &scope)
CDiscrepancyPanelHost * m_Host
vector< NDiscrepancy::eTestNames > m_AddTests
void OnContract(wxCommandEvent &evt)
void SetWorkDir(const wxString &dir)
virtual CConstIRef< IAppJobError > GetError()
Returns IAppJobError object describing internal error that caused the Job to fail.
virtual CRef< CObject > GetResult()
Returns the Job Result.
virtual EJobState Run()
Function that does all the useful work, called by the Engine.
const CGBProjectHandle * m_Proj
CRef< NDiscrepancy::CDiscrepancySet > m_Tests
CDiscrepancyReportJob(const CGBProjectHandle *proj, NDiscrepancy::CDiscrepancySet *tests)
virtual CConstIRef< IAppJobProgress > GetProgress()
return progress object, the function shall be synchronized internally.
virtual string GetDescr(void) const
Returns a human readable description of the Job (optional)
CEvent - generic event implementation TODO TODO - Attachments.
Base class to build jobs with cancel functionality.
CDiscrepancyDlg::EReportType m_Type
CGBProjectHandle & m_Proj
COpenDiscrepancyTask(CDiscrepancyDlg::EReportType type, CGBProjectHandle &proj, CWorkbench &wb)
virtual IAppTask::ETaskState x_Run()
override this function in derived classes
Base class for all serializable objects.
CWorkbench - default implementation of IWorkbench.
Undo/Redo interface for editing operations.
class IProjectView defines the abstract interface for views observing projects.
IWorkbench is the central interface in the application framework.
Include a standard set of the NCBI C++ Toolkit most basic headers.
vector< CRef< CReportObj > > TReportObjectList
wxDEFINE_EVENT(WIDTH_EVENT, wxCommandEvent)
#define SYMBOL_DISCR_TITLE
#define SYMBOL_DISCR_PANEL_STYLE
#define SYMBOL_DISCR_STYLE
std::ofstream out("events_result.xml")
main entry point for tests
Workaround for wxWidgets header errors in certain configurations; MUST be included (at least indirect...
static DbTestEntry * tests
ETaskState
List of task states defining the task management FSM.
static CAppJobDispatcher & GetInstance()
bool DeleteJob(TJobID job_id)
when a Job is deleted the listener is not notified
EJobState
Job states (describe FSM)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
virtual void UpdateButtons()