wxPanel::Create( parent,
id, pos,
size, style );
109GetSizer()->SetSizeHints(
this);
152wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
153itemPanel1->SetSizer(itemBoxSizer2);
155wxArrayString m_SeqTypeCtrlStrings;
156m_SeqTypeCtrlStrings.Add(
_(
"&Nucleotides"));
157m_SeqTypeCtrlStrings.Add(
_(
"&Proteins"));
158 m_SeqTypeCtrl=
newwxRadioBox( itemPanel1,
ID_RADIOBOX1,
_(
"Sequence Types"), wxDefaultPosition, wxDefaultSize, m_SeqTypeCtrlStrings, 1, wxRA_SPECIFY_ROWS );
160itemBoxSizer2->Add(
m_SeqTypeCtrl, 0, wxALIGN_LEFT|wxALL, 5);
162wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
163itemBoxSizer2->Add(itemBoxSizer4, 0, wxGROW|wxALL, 5);
165wxStaticText* itemStaticText5 =
newwxStaticText( itemPanel1, wxID_STATIC,
_(
"Local BLAST DB:"), wxDefaultPosition, wxDefaultSize, 0 );
166itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
168 m_DBCtrl=
newwxTextCtrl( itemPanel1,
ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
169itemBoxSizer4->Add(
m_DBCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
171wxBitmapButton* itemBitmapButton7 =
newwxBitmapButton( itemPanel1,
ID_BITMAPBUTTON, itemPanel1->
GetBitmapResource(
wxT(
"menu::open")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
172itemBitmapButton7->SetHelpText(
_(
"Select Local DB"));
174itemBitmapButton7->SetToolTip(
_(
"Select Local DB"));
175itemBoxSizer4->Add(itemBitmapButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
205 returnwxArtProvider::GetBitmap(name);
228wxString filter = proteins ?
229 wxT(
"Protein db files (*.p\?\?)|*.p\?\?") :
230 wxT(
"Nucleotide db files (*.n\?\?)|*.n\?\?");
235wxFileDialog dlg(parent,
wxT(
"Select a Local BLAST DB"), wxEmptyString, db,
237wxFD_OPEN | wxFD_FILE_MUST_EXIST);
239 if(dlg.ShowModal() == wxID_OK) {
240wxFileName fn(dlg.GetPath());
241wxString db_prefix = proteins ?
wxT(
"p") :
wxT(
"n");
242 if(!fn.GetExt().StartsWith(db_prefix)) {
243wxString
msg(
"Please select any of the local BLAST DB files whose extensions start with ");
250wxMessageBox(
msg,
wxT(
"Error"), wxOK | wxICON_ERROR);
253fn.SetExt(wxEmptyString);
254db = fn.GetFullPath();
263wxString db =
m_DBCtrl->GetValue();
282 if(!wxPanel::TransferDataToWindow())
291 returnwxPanel::TransferDataToWindow();
301wxDir dir(fn.GetPath());
304wxString ext = proteins ?
wxT(
".p??") :
wxT(
".n??");
307 boolcont = dir.GetFirst(&
tmp, fn.GetFullName() + ext, wxDIR_FILES);
310 if(
file.GetExt() !=
wxT(
"prt"))
312cont = dir.GetNext(&
tmp);
320 if(!wxPanel::TransferDataFromWindow())
323wxString db =
m_DBCtrl->GetValue();
326wxMessageBox(
wxT(
"Please, select a Local BLAST DB."),
wxT(
"Error"),
327wxOK | wxICON_ERROR,
this);
335wxMessageBox(
wxT(
"Invalid Local BLAST DB."),
wxT(
"Error"),
336wxOK | wxICON_ERROR,
this);
351 boolproteins = (
event.GetInt() == 1);
361wxString dbText =
m_DBCtrl->GetValue();
367 stringdb(dbText.ToUTF8());
375 text=
wxT(
"Create project items for sequences");
wxString GetProtDB() const
void SetProtSeqs(bool value)
void SetProtDB(wxString value)
void SetNucDB(wxString value)
wxString GetNucDB() const
wxCheckBox * m_CreateProjectItemsCtrl
wxRadioBox * m_SeqTypeCtrl
void CreateControls()
Creates the controls and sizers.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CLBLASTParamsPanel()
Constructors.
static bool ValidateLocalDatabase(const wxString &db, bool proteins)
~CLBLASTParamsPanel()
Destructor.
wxBoxSizer * m_SeqCountSizer
void OnSelectDir(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BITMAPBUTTON
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=ID_CLBLASTPARAMSPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
void OnDBTextUpdated(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL2
CLBLASTLoadParams & GetData()
Data access.
virtual bool TransferDataFromWindow()
Transfer data from the window.
virtual bool TransferDataToWindow()
Transfer data to the window.
void Init()
Initialises member variables.
static bool SelectDatabase(wxWindow *parent, wxString &db, bool proteins)
void OnTimer(wxTimerEvent &event)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void OnSeqTypeSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX1
static int CountSeqs(const string &db, bool proteins)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static void text(MDB_val *v)
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)
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