43 #include <wx/cshelp.h>
44 #include <wx/button.h>
81 : m_CmdProcessor(
proc), m_WorkDir(dir), m_Seh(seh)
95 SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY);
96 wxPanel::Create( parent,
id, pos,
size, style );
101 GetSizer()->SetSizeHints(
this);
141 wxBoxSizer* itemBoxSizer2 =
new wxBoxSizer(wxVERTICAL);
142 itemPanel1->SetSizer(itemBoxSizer2);
144 wxBoxSizer* itemBoxSizer1 =
new wxBoxSizer(wxHORIZONTAL);
145 itemBoxSizer2->Add(itemBoxSizer1, 0, wxALIGN_LEFT|wxALL, 0);
147 wxButton* itemButton2 =
new wxButton( itemPanel1,
ID_IMPORT_FTABLE_BTN,
_(
"Import from feature table"), wxDefaultPosition, wxDefaultSize, 0 );
148 itemBoxSizer1->Add(itemButton2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
160 m_FeatureTable->SetInitialSize(wxSize(100 * font.GetPointSize() / 10, 100));
226 LOG_POST(
Error <<
"Importing feature table in the submission wizard failed: " << e.
GetMsg());
229 catch (
const exception& e) {
230 LOG_POST(
Error <<
"Importing feature table in the submission wizard failed: " << e.
what());
262 auto start = chrono::steady_clock::now();
263 objects::CFlatFileConfig ff_config;
264 ff_config.SetFormatFTable();
266 ff_config.SetShowContigFeatures().SetShowContigSources();
267 ff_config.SetShowPeptides();
268 ff_config.SetViewNuc();
270 if (!
input.showProteinId) {
271 ff_config.SetHideProteinID();
273 if (!
input.showSrcFeature) {
274 ff_config.SetHideSourceFeatures();
278 objects::CFlatFileGenerator ff(ff_config);
282 ff.Generate(
input.seh, ostr);
284 auto diff = chrono::steady_clock::now() - start;
286 chrono::duration_cast<chrono::milliseconds>(diff).
count() <<
" ms");
293 catch (
const std::exception& e) {
315 string err_msg =
"Feature generation failed: ";
316 if (!errMsg.empty()) {
320 err_msg +=
"Unknown fatal error";
void SetText(const wxString &text)
void SetFindMode(int mode)
static CGuiRegistry & GetInstance()
access the application-wide singleton
CIRef< IEditCommand > ImportFeaturesFromFile(const wxString &workDir=wxEmptyString, const string &format_id=kEmptyStr)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
void OnImportFeatTableClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ORGINFOBTN
virtual void OnJobFailed(const string &, CJobAdapter &adapter)
void OnContextHelpClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CONTEXT_HELP
static bool Create5ColFeatTable(SFeatTableParams &input, string &output, string &error, ICanceled &canceled)
virtual bool TransferDataToWindow()
void x_SetFontAsTextPanel()
bool Create(wxWindow *parent, wxWindowID id=ID_CSUBANNOTATIONPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
CSubAnnotationPanel()
Constructors.
ICommandProccessor * m_CmdProcessor
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CGenericPanel * m_FeatureTable
~CSubAnnotationPanel()
Destructor.
objects::CSeq_entry_Handle m_Seh
CRef< CJobAdapter > m_JobAdapter
virtual void OnJobResult(CObject *result, CJobAdapter &adapter)
static bool ShowToolTips()
Should we show tooltips?
static wxFont GetFont(int size)
Interface for testing cancellation request in a long lasting operation.
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
static SQLCHAR output[256]
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
void Info(CExceptionArgs_Base &args)
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
void NcbiErrorBox(const string &message, const string &title="Error")
specialized Message Box function for reporting critical errors
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual bool IsCanceled(void) const =0
const struct ncbi::grid::netcache::search::fields::SIZE size
wxString ToWxString(const string &s)