NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SrcEditDialog Class Reference

Search Toolkit Book for SrcEditDialog

#include <gui/packages/pkg_sequence_edit/srceditdialog.hpp>

+ Inheritance diagram for SrcEditDialog:
+ Collaboration diagram for SrcEditDialog:

Public Member Functions

 SrcEditDialog ()
 Constructors. More...
 
 SrcEditDialog (wxWindow *parent, objects::CSeq_entry_Handle seh, IWorkbench *workbench, CConstRef< objects::CSeq_submit > seqSubmit, wxWindowID id=10013, const wxString &caption=_("Source Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 
 SrcEditDialog (wxWindow *parent, const vector< CBioseq_Handle > &bioseq_handles, IWorkbench *workbench=NULL, wxWindowID id=10013, const wxString &caption=_("Source Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=10013, const wxString &caption=_("Source Editing"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 Creation. More...
 
 ~SrcEditDialog ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
void OnQualchoiceSelected (wxCommandEvent &event)
 wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_QUALCHOICE More...
 
void OnAddQual (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_QUAL_BUTTON More...
 
void OnLoadqualsClick (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_LOADQUALS More...
 
void OnExportQualsClick (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_EXPORT_QUALS More...
 
void OnClearQuals (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_QUALS_BTN More...
 
void OnClickOk (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK More...
 
void OnClickCancel (wxCommandEvent &event)
 wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL More...
 
void OnCopyCells (wxCommandEvent &event)
 
void OnPasteCells (wxCommandEvent &event)
 
void OnPasteAppendCells (wxCommandEvent &event)
 
void OnCopyCellsFromId (wxCommandEvent &event)
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
void GetQualChoices (wxArrayString &srcModNameStrings)
 
void x_RepopulateAddQualList ()
 
int GetCollapsible ()
 
bool IsReadOnlyColumn (string column_name)
 
CRef< CCmdCompositeGetCommand ()
 
void ChangeColumnName (int col, string qual_name)
 
void ResetSubPanels ()
 
int GetNewColumn (wxString new_col)
 
virtual const CObjectRowToScopedObjects (int row, TConstScopedObjects &objects, CBioseq_Handle &bsh)
 
void SetWorkDir (const wxString &workDir)
 
- Public Member Functions inherited from CReportEditingDialog
virtual bool Show (bool show=1)
 Report opening events in dialogs used in the editing package. More...
 
- Public Member Functions inherited from CSeqGridTableNav
 CSeqGridTableNav ()
 
virtual ~CSeqGridTableNav ()
 
void NavigateToTextViewPosition (TConstScopedObjects &objects, objects::CBioseq_Handle bsh, const CObject *obj, IWorkbench *workbench)
 
void JumpToTextView (int row)
 
virtual const CObjectRowToScopedObjects (int row, TConstScopedObjects &objects, objects::CBioseq_Handle &bsh)=0
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 

Public Attributes

wxChoice * m_QualList
 
wxButton * m_AddQualBtn
 
wxGrid * m_Grid
 

Private Member Functions

int x_FindColumn (const wxString &name)
 
CRef< objects::CSeq_table > x_GetSourceTableChoices (CRef< objects::CSeq_table > values)
 
CRef< CCmdCompositeApplySrcTableToSeqEntry (CRef< objects::CSeq_table >values_table)
 
bool OneRowOk (CRef< objects::CSeq_id > id, CRef< objects::CSeqTable_column > id_col)
 
string FindBadRows (CRef< objects::CSeq_table > src, CRef< objects::CSeq_table > dst)
 
CBioseq_Handle GetBioseqHandle (int row)
 
CRef< objects::CSeq_table > x_GetValuesTableFromGridPanel ()
 
CRef< objects::CSeqTable_column > FindSeqIDColumn (const objects::CSeq_table &table)
 
void CombineColumns (CRef< objects::CSeqTable_column > dst_id, CRef< objects::CSeqTable_column > dst_col, CRef< objects::CSeqTable_column > src_id, CRef< objects::CSeqTable_column > src_col)
 
int CombineTables (CRef< objects::CSeq_table > dst, const objects::CSeq_table &src)
 
bool SaveTableFile (wxWindow *parent, wxString &save_file_dir, wxString &save_file_name, CRef< objects::CSeq_table > values_table)
 
int FindRowForSeqId (CRef< objects::CSeqTable_column > id_col, CRef< objects::CSeq_id > id)
 
int CountColumnRowConflicts (CRef< objects::CSeqTable_column > dst_id, CRef< objects::CSeqTable_column > dst_col, CRef< objects::CSeqTable_column > src_id, CRef< objects::CSeqTable_column > src_col)
 
int CountTableColumnConflicts (CRef< objects::CSeq_table > dst, const objects::CSeq_table &src)
 
void FixTableAfterImport (CRef< objects::CSeq_table > input_table)
 
void DeleteTableRow (CRef< objects::CSeq_table > table, int row)
 
string GetLabelForTitle (string sTitle)
 
string FindBadColumns (CRef< objects::CSeq_table > table)
 

Private Attributes

vector< CBioseq_Handlem_BioseqHandles
 
objects::CSeq_entry_Handle m_SEH
 
CRef< objects::CSeq_table > m_Copied
 
CSeqTableGridPanelm_GridPanel
 
wxString m_SaveFileDir
 
wxString m_SaveFileName
 
CStringConstraintSelectm_StringConstraintPanel
 
CApplyEditconvertPanelm_AecrPanel
 
objects::CSeq_table::TColumns m_columns
 

Additional Inherited Members

- Protected Attributes inherited from CSeqGridTableNav
IWorkbenchm_Workbench
 
CConstRef< objects::CSeq_submit > m_SeqSubmit
 

Detailed Description

SrcEditDialog class declaration

Definition at line 88 of file srceditdialog.hpp.

Constructor & Destructor Documentation

◆ SrcEditDialog() [1/3]

SrcEditDialog::SrcEditDialog ( )

Constructors.

SrcEditDialog type definition

SrcEditDialog event table definition

SrcEditDialog constructors

Definition at line 109 of file srceditdialog.cpp.

References Init().

◆ SrcEditDialog() [2/3]

SrcEditDialog::SrcEditDialog ( wxWindow *  parent,
objects::CSeq_entry_Handle  seh,
IWorkbench workbench,
CConstRef< objects::CSeq_submit >  seqSubmit,
wxWindowID  id = 10013,
const wxString &  caption = _("Source Editing"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

◆ SrcEditDialog() [3/3]

SrcEditDialog::SrcEditDialog ( wxWindow *  parent,
const vector< CBioseq_Handle > &  bioseq_handles,
IWorkbench workbench = NULL,
wxWindowID  id = 10013,
const wxString &  caption = _("Source Editing"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

◆ ~SrcEditDialog()

SrcEditDialog::~SrcEditDialog ( )

Destructor.

SrcEditDialog destructor

Definition at line 172 of file srceditdialog.cpp.

Member Function Documentation

◆ ApplySrcTableToSeqEntry()

CRef< CCmdComposite > SrcEditDialog::ApplySrcTableToSeqEntry ( CRef< objects::CSeq_table >  values_table)
private

◆ ChangeColumnName()

void SrcEditDialog::ChangeColumnName ( int  col,
string  qual_name 
)

◆ CombineColumns()

void SrcEditDialog::CombineColumns ( CRef< objects::CSeqTable_column >  dst_id,
CRef< objects::CSeqTable_column >  dst_col,
CRef< objects::CSeqTable_column >  src_id,
CRef< objects::CSeqTable_column >  src_col 
)
private

Definition at line 983 of file srceditdialog.cpp.

References FindRowForSeqId(), i, and row.

Referenced by CombineTables().

◆ CombineTables()

int SrcEditDialog::CombineTables ( CRef< objects::CSeq_table >  dst,
const objects::CSeq_table &  src 
)
private

Definition at line 1005 of file srceditdialog.cpp.

References CombineColumns(), FindSeqIDColumn(), FindSeqTableColumnByName(), and ITERATE.

Referenced by OnLoadqualsClick().

◆ CountColumnRowConflicts()

int SrcEditDialog::CountColumnRowConflicts ( CRef< objects::CSeqTable_column >  dst_id,
CRef< objects::CSeqTable_column >  dst_col,
CRef< objects::CSeqTable_column >  src_id,
CRef< objects::CSeqTable_column >  src_col 
)
private

Definition at line 1110 of file srceditdialog.cpp.

References NStr::Equal(), FindRowForSeqId(), i, NStr::IsBlank(), and row.

Referenced by CountTableColumnConflicts().

◆ CountTableColumnConflicts()

int SrcEditDialog::CountTableColumnConflicts ( CRef< objects::CSeq_table >  dst,
const objects::CSeq_table &  src 
)
private

◆ Create()

bool SrcEditDialog::Create ( wxWindow *  parent,
wxWindowID  id = 10013,
const wxString &  caption = _("Source Editing"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

Creation.

SrcEditDialog creator

Definition at line 150 of file srceditdialog.cpp.

References CreateControls(), and ncbi::grid::netcache::search::fields::size.

Referenced by SrcEditDialog().

◆ CreateControls()

void SrcEditDialog::CreateControls ( )

◆ DeleteTableRow()

void SrcEditDialog::DeleteTableRow ( CRef< objects::CSeq_table >  table,
int  row 
)
private

Definition at line 1253 of file srceditdialog.cpp.

References NON_CONST_ITERATE, row, and table.

Referenced by FixTableAfterImport().

◆ FindBadColumns()

string SrcEditDialog::FindBadColumns ( CRef< objects::CSeq_table >  table)
private

◆ FindBadRows()

string SrcEditDialog::FindBadRows ( CRef< objects::CSeq_table >  src,
CRef< objects::CSeq_table >  dst 
)
private

◆ FindRowForSeqId()

int SrcEditDialog::FindRowForSeqId ( CRef< objects::CSeqTable_column >  id_col,
CRef< objects::CSeq_id >  id 
)
private

Definition at line 1095 of file srceditdialog.cpp.

References row.

Referenced by CombineColumns(), and CountColumnRowConflicts().

◆ FindSeqIDColumn()

CRef< objects::CSeqTable_column > SrcEditDialog::FindSeqIDColumn ( const objects::CSeq_table &  table)
private

Definition at line 972 of file srceditdialog.cpp.

References ITERATE, NULL, and table.

Referenced by CombineTables(), CountTableColumnConflicts(), FindBadRows(), and FixTableAfterImport().

◆ FixTableAfterImport()

void SrcEditDialog::FixTableAfterImport ( CRef< objects::CSeq_table >  input_table)
private

◆ GetBioseqHandle()

CBioseq_Handle SrcEditDialog::GetBioseqHandle ( int  row)
private

◆ GetBitmapResource()

wxBitmap SrcEditDialog::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 432 of file srceditdialog.cpp.

◆ GetCollapsible()

int SrcEditDialog::GetCollapsible ( )
inline

Definition at line 172 of file srceditdialog.hpp.

Referenced by CreateControls().

◆ GetCommand()

CRef< CCmdComposite > SrcEditDialog::GetCommand ( void  )

◆ GetIconResource()

wxIcon SrcEditDialog::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 445 of file srceditdialog.cpp.

◆ GetLabelForTitle()

string SrcEditDialog::GetLabelForTitle ( string  sTitle)
private

◆ GetNewColumn()

int SrcEditDialog::GetNewColumn ( wxString  new_col)

◆ GetQualChoices()

void SrcEditDialog::GetQualChoices ( wxArrayString &  srcModNameStrings)

◆ Init()

void SrcEditDialog::Init ( void  )

Initialises member variables.

Member initialisation

Definition at line 183 of file srceditdialog.cpp.

References m_AddQualBtn, m_QualList, m_SaveFileDir, m_SaveFileName, and NULL.

Referenced by SrcEditDialog().

◆ IsReadOnlyColumn()

bool SrcEditDialog::IsReadOnlyColumn ( string  column_name)
inline

Definition at line 173 of file srceditdialog.hpp.

Referenced by CreateControls(), and ResetSubPanels().

◆ OnAddQual()

void SrcEditDialog::OnAddQual ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_QUAL_BUTTON

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ADD_QUAL_BUTTON

Definition at line 498 of file srceditdialog.cpp.

References CSeqTableGridPanel::CollapseByCol(), CSeqTableGridPanel::GetCollapseColAndExpand(), GetNewColumn(), NStr::IsBlank(), m_AddQualBtn, m_GridPanel, m_QualList, and ToStdString().

◆ OnClearQuals()

void SrcEditDialog::OnClearQuals ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_QUALS_BTN

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_QUALS_BTN

Definition at line 547 of file srceditdialog.cpp.

References m_Grid, and row.

◆ OnClickCancel()

void SrcEditDialog::OnClickCancel ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON1

Definition at line 477 of file srceditdialog.cpp.

References _, CApplyEditconvertPanel::GetModified(), CSeqTableGridPanel::GetModified(), m_AecrPanel, and m_GridPanel.

◆ OnClickOk()

void SrcEditDialog::OnClickOk ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK

◆ OnCopyCells()

void SrcEditDialog::OnCopyCells ( wxCommandEvent &  event)

◆ OnCopyCellsFromId()

void SrcEditDialog::OnCopyCellsFromId ( wxCommandEvent &  event)

◆ OneRowOk()

bool SrcEditDialog::OneRowOk ( CRef< objects::CSeq_id >  id,
CRef< objects::CSeqTable_column >  id_col 
)
private

◆ OnExportQualsClick()

void SrcEditDialog::OnExportQualsClick ( wxCommandEvent &  event)

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_EXPORT_QUALS

wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_EXPORT_QUALS

Definition at line 703 of file srceditdialog.cpp.

References NStr::Find(), m_SaveFileDir, m_SaveFileName, NON_CONST_ITERATE, SaveTableFile(), and x_GetValuesTableFromGridPanel().

◆ OnLoadqualsClick()

void SrcEditDialog::OnLoadqualsClick ( wxCommandEvent &  event)

◆ OnPasteAppendCells()

void SrcEditDialog::OnPasteAppendCells ( wxCommandEvent &  event)

◆ OnPasteCells()

void SrcEditDialog::OnPasteCells ( wxCommandEvent &  event)

◆ OnQualchoiceSelected()

void SrcEditDialog::OnQualchoiceSelected ( wxCommandEvent &  event)

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_QUALCHOICE

wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_QUALCHOICE

Definition at line 733 of file srceditdialog.cpp.

References NStr::IsBlank(), m_AddQualBtn, m_QualList, and ToStdString().

◆ ResetSubPanels()

void SrcEditDialog::ResetSubPanels ( )

◆ RowToScopedObjects()

const CObject * SrcEditDialog::RowToScopedObjects ( int  row,
TConstScopedObjects objects,
CBioseq_Handle bsh 
)
virtual

◆ SaveTableFile()

bool SrcEditDialog::SaveTableFile ( wxWindow *  parent,
wxString &  save_file_dir,
wxString &  save_file_name,
CRef< objects::CSeq_table >  values_table 
)
private

◆ SetWorkDir()

void SrcEditDialog::SetWorkDir ( const wxString &  workDir)
inline

◆ ShowToolTips()

bool SrcEditDialog::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 423 of file srceditdialog.cpp.

◆ x_FindColumn()

int SrcEditDialog::x_FindColumn ( const wxString &  name)
private

Definition at line 369 of file srceditdialog.cpp.

References NStr::EqualNocase(), i, m_Grid, and ToStdString().

Referenced by GetQualChoices().

◆ x_GetSourceTableChoices()

CRef< objects::CSeq_table > SrcEditDialog::x_GetSourceTableChoices ( CRef< objects::CSeq_table >  values)
private

Definition at line 317 of file srceditdialog.cpp.

References NStr::Find(), i, NStr::IsBlank(), ITERATE, label, and NULL.

Referenced by CreateControls().

◆ x_GetValuesTableFromGridPanel()

CRef< objects::CSeq_table > SrcEditDialog::x_GetValuesTableFromGridPanel ( )
private

◆ x_RepopulateAddQualList()

void SrcEditDialog::x_RepopulateAddQualList ( )

Member Data Documentation

◆ m_AddQualBtn

wxButton* SrcEditDialog::m_AddQualBtn

Definition at line 177 of file srceditdialog.hpp.

Referenced by CreateControls(), Init(), OnAddQual(), and OnQualchoiceSelected().

◆ m_AecrPanel

CApplyEditconvertPanel* SrcEditDialog::m_AecrPanel
private

Definition at line 197 of file srceditdialog.hpp.

Referenced by CreateControls(), OnClickCancel(), and ResetSubPanels().

◆ m_BioseqHandles

vector<CBioseq_Handle> SrcEditDialog::m_BioseqHandles
private

◆ m_columns

objects::CSeq_table::TColumns SrcEditDialog::m_columns
private

Definition at line 198 of file srceditdialog.hpp.

Referenced by ApplySrcTableToSeqEntry(), and CreateControls().

◆ m_Copied

CRef<objects::CSeq_table> SrcEditDialog::m_Copied
private

Definition at line 192 of file srceditdialog.hpp.

◆ m_Grid

wxGrid* SrcEditDialog::m_Grid

◆ m_GridPanel

CSeqTableGridPanel* SrcEditDialog::m_GridPanel
private

◆ m_QualList

wxChoice* SrcEditDialog::m_QualList

◆ m_SaveFileDir

wxString SrcEditDialog::m_SaveFileDir
private

Definition at line 194 of file srceditdialog.hpp.

Referenced by Init(), OnExportQualsClick(), and SetWorkDir().

◆ m_SaveFileName

wxString SrcEditDialog::m_SaveFileName
private

Definition at line 195 of file srceditdialog.hpp.

Referenced by Init(), and OnExportQualsClick().

◆ m_SEH

objects::CSeq_entry_Handle SrcEditDialog::m_SEH
private

Definition at line 191 of file srceditdialog.hpp.

Referenced by CreateControls(), OneRowOk(), and SrcEditDialog().

◆ m_StringConstraintPanel

CStringConstraintSelect* SrcEditDialog::m_StringConstraintPanel
private

Definition at line 196 of file srceditdialog.hpp.

Referenced by CreateControls(), and ResetSubPanels().


The documentation for this class was generated from the following files:
Modified on Wed Jul 24 17:20:08 2024 by modify_doxy.py rev. 669887