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

Search Toolkit Book for CCDSTranslationPanel

#include "cds_translation_panel.hpp"
(Private to src/gui/widgets/edit.)

+ Inheritance diagram for CCDSTranslationPanel:
+ Collaboration diagram for CCDSTranslationPanel:

Public Types

enum  {
  ID_CCDSTRANSLATIONPANEL = 10079 , ID_CHOICE1 , ID_CHOICE2 , ID_CHECKBOX ,
  ID_COMBOBOX , ID_FORCE_NEAR_BTN , ID_TEXTCTRL27 , ID_PREDICT_INTERVAL ,
  ID_RETRANSLATE_LINK , ID_HYPERLINKCTRL2 , ID_IMPORT_CDS_PROTEIN , ID_RETRANSLATE_ON_OK_BTN ,
  ID_CHECKBOX3 , ID_UPDATE_GENE_SPAN
}
 Control identifiers. More...
 

Public Member Functions

 CCDSTranslationPanel ()
 Constructors. More...
 
 CCDSTranslationPanel (wxWindow *parent, objects::CSeq_feat &feat, objects::CScope &scope, wxWindowID id=ID_CCDSTRANSLATIONPANEL, const wxString &caption=_("CDS TranslationPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 
bool Create (wxWindow *parent, wxWindowID id=ID_CCDSTRANSLATIONPANEL, const wxString &caption=_("CDS TranslationPanel"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
 Creation. More...
 
 ~CCDSTranslationPanel ()
 Destructor. More...
 
void Init ()
 Initialises member variables. More...
 
void CreateControls ()
 Creates the controls and sizers. More...
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
void SetProduct (objects::CSeq_feat &feat)
 
void SetProtein (objects::CBioseq &bioseq)
 
void OnPredictIntervalHyperlinkClicked (wxHyperlinkEvent &event)
 wxEVT_COMMAND_HYPERLINK event handler for ID_PREDICT_INTERVAL More...
 
void OnRetranslateLinkHyperlinkClicked (wxHyperlinkEvent &event)
 wxEVT_COMMAND_HYPERLINK event handler for ID_RETRANSLATE_LINK More...
 
void AdjustForStopCodonHyperlinkClicked (wxHyperlinkEvent &event)
 wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL2 More...
 
void OnImportCdsProteinHyperlinkClicked (wxHyperlinkEvent &event)
 wxEVT_COMMAND_HYPERLINK event handler for ID_IMPORT_CDS_PROTEIN More...
 
void OnProductChanged (wxCommandEvent &event)
 
void OnRetranslateOnOkChanged (wxCommandEvent &event)
 
wxBitmap GetBitmapResource (const wxString &name)
 Retrieves bitmap resources. More...
 
wxIcon GetIconResource (const wxString &name)
 Retrieves icon resources. More...
 
bool ShouldUpdatemRNALocation ()
 
bool ShouldUpdateGeneLocation ()
 
bool ShouldRetranslate ()
 
void Retranslate ()
 
bool ShouldCreateNewProductSeq ()
 
void SetProductId (const string &val)
 
CRef< objects::CSeq_id > GetProductId ()
 
void DisableRetranslateOnOk (bool exception, bool pseudo)
 
void UpdateForceNear ()
 
IRegSettings interface implementation
virtual void SetRegistryPath (const string &reg_path)
 
virtual void LoadSettings ()
 
virtual void SaveSettings () const
 
- Public Member Functions inherited from IRegSettings
virtual ~IRegSettings ()
 

Static Public Member Functions

static bool ShowToolTips ()
 Should we show tooltips? More...
 
static bool IsValidException (const string &text)
 

Public Attributes

wxChoice * m_GeneticCode
 
wxChoice * m_Frame
 
wxCheckBox * m_ConflictCtrl
 
wxStaticText * m_ProteinLengthTxt
 
wxOwnerDrawnComboBox * m_ProductCtrl
 
wxCheckBox * m_ForceNear
 
wxTextCtrl * m_TranslationCtrl
 
wxHyperlinkCtrl * m_RetranslateLink
 
wxCheckBox * m_RetranslateOnOkBtn
 
wxCheckBox * m_UpdatemRNASpan
 
wxCheckBox * m_UpdateGeneSpan
 
CRef< objects::CSeq_feat > m_EditedFeat
 
objects::CScope * m_Scope
 
CRef< objects::CBioseq > m_EditedBioseq
 

Private Member Functions

wxTreebook * x_GetTree ()
 
bool x_IsPseudo ()
 
void x_SetLocationForProtein (CRef< objects::CSeq_feat > cds, objects::CSeq_entry_Handle seh)
 
void x_SetProtein (const objects::CBioseq &protein, CRef< objects::CSeq_feat > cds, objects::CSeq_entry_Handle seh)
 
bool x_CollectData ()
 
void x_NormalizeGeneticCodeName (string &code_name)
 
void x_Translate (void)
 
void x_UpdateForceNear (const string &val)
 

Private Attributes

bool m_add_stop_codon
 
string m_RegPath
 
map< string, CConstRef< objects::CSeq_id > > m_SeqIds
 

Detailed Description

CCDSTranslationPanel class declaration

Definition at line 81 of file cds_translation_panel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Control identifiers.

Enumerator
ID_CCDSTRANSLATIONPANEL 
ID_CHOICE1 
ID_CHOICE2 
ID_CHECKBOX 
ID_COMBOBOX 
ID_FORCE_NEAR_BTN 
ID_TEXTCTRL27 
ID_PREDICT_INTERVAL 
ID_RETRANSLATE_LINK 
ID_HYPERLINKCTRL2 
ID_IMPORT_CDS_PROTEIN 
ID_RETRANSLATE_ON_OK_BTN 
ID_CHECKBOX3 
ID_UPDATE_GENE_SPAN 

Definition at line 163 of file cds_translation_panel.hpp.

Constructor & Destructor Documentation

◆ CCDSTranslationPanel() [1/2]

CCDSTranslationPanel::CCDSTranslationPanel ( )

Constructors.

CCDSTranslationPanel type definition

CCDSTranslationPanel event table definition

CCDSTranslationPanel constructors

Definition at line 143 of file cds_translation_panel.cpp.

References Init().

◆ CCDSTranslationPanel() [2/2]

CCDSTranslationPanel::CCDSTranslationPanel ( wxWindow *  parent,
objects::CSeq_feat &  feat,
objects::CScope &  scope,
wxWindowID  id = ID_CCDSTRANSLATIONPANEL,
const wxString &  caption = _("CDS TranslationPanel"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

◆ ~CCDSTranslationPanel()

CCDSTranslationPanel::~CCDSTranslationPanel ( )

Destructor.

CCDSTranslationPanel destructor

Definition at line 228 of file cds_translation_panel.cpp.

References SaveSettings().

Member Function Documentation

◆ AdjustForStopCodonHyperlinkClicked()

void CCDSTranslationPanel::AdjustForStopCodonHyperlinkClicked ( wxHyperlinkEvent &  event)

◆ Create()

bool CCDSTranslationPanel::Create ( wxWindow *  parent,
wxWindowID  id = ID_CCDSTRANSLATIONPANEL,
const wxString &  caption = _("CDS TranslationPanel"),
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize(400, 300),
long  style = wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL 
)

◆ CreateControls()

void CCDSTranslationPanel::CreateControls ( )

◆ DisableRetranslateOnOk()

void CCDSTranslationPanel::DisableRetranslateOnOk ( bool  exception,
bool  pseudo 
)

◆ GetBitmapResource()

wxBitmap CCDSTranslationPanel::GetBitmapResource ( const wxString &  name)

Retrieves bitmap resources.

Get bitmap resources

Definition at line 690 of file cds_translation_panel.cpp.

◆ GetIconResource()

wxIcon CCDSTranslationPanel::GetIconResource ( const wxString &  name)

Retrieves icon resources.

Get icon resources

Definition at line 703 of file cds_translation_panel.cpp.

◆ GetProductId()

CRef< CSeq_id > CCDSTranslationPanel::GetProductId ( void  )

◆ Init()

void CCDSTranslationPanel::Init ( void  )

◆ IsValidException()

bool CCDSTranslationPanel::IsValidException ( const string text)
static

◆ LoadSettings()

void CCDSTranslationPanel::LoadSettings ( )
virtual

◆ OnImportCdsProteinHyperlinkClicked()

void CCDSTranslationPanel::OnImportCdsProteinHyperlinkClicked ( wxHyperlinkEvent &  event)

◆ OnPredictIntervalHyperlinkClicked()

void CCDSTranslationPanel::OnPredictIntervalHyperlinkClicked ( wxHyperlinkEvent &  event)

wxEVT_COMMAND_HYPERLINK event handler for ID_PREDICT_INTERVAL

wxEVT_COMMAND_HYPERLINK event handler for ID_PREDICT_INTERVAL

Definition at line 1483 of file cds_translation_panel.cpp.

References GetBioseqHandleForMultihomeLocation(), CTSE_Handle::GetTopLevelEntry(), CBioseq_Handle::GetTSE_Handle(), m_EditedFeat, m_Scope, TransferDataToWindow(), and x_SetLocationForProtein().

◆ OnProductChanged()

void CCDSTranslationPanel::OnProductChanged ( wxCommandEvent &  event)

Definition at line 1491 of file cds_translation_panel.cpp.

References UpdateForceNear().

◆ OnRetranslateLinkHyperlinkClicked()

void CCDSTranslationPanel::OnRetranslateLinkHyperlinkClicked ( wxHyperlinkEvent &  event)

wxEVT_COMMAND_HYPERLINK event handler for ID_RETRANSLATE_LINK

wxEVT_COMMAND_HYPERLINK event handler for ID_HYPERLINKCTRL1

Definition at line 851 of file cds_translation_panel.cpp.

References _, i, CGenericPropsPanel::ResetPseudo(), Retranslate(), wxT, x_GetTree(), and x_IsPseudo().

◆ OnRetranslateOnOkChanged()

void CCDSTranslationPanel::OnRetranslateOnOkChanged ( wxCommandEvent &  event)

◆ Retranslate()

void CCDSTranslationPanel::Retranslate ( )

◆ SaveSettings()

void CCDSTranslationPanel::SaveSettings ( ) const
virtual

◆ SetProduct()

void CCDSTranslationPanel::SetProduct ( objects::CSeq_feat &  feat)

◆ SetProductId()

void CCDSTranslationPanel::SetProductId ( const string val)

◆ SetProtein()

void CCDSTranslationPanel::SetProtein ( objects::CBioseq &  bioseq)

◆ SetRegistryPath()

void CCDSTranslationPanel::SetRegistryPath ( const string reg_path)
virtual

Implements IRegSettings.

Definition at line 171 of file cds_translation_panel.cpp.

References m_RegPath.

◆ ShouldCreateNewProductSeq()

bool CCDSTranslationPanel::ShouldCreateNewProductSeq ( )

Definition at line 791 of file cds_translation_panel.cpp.

References m_ForceNear.

Referenced by CEditObjectSeq_feat::x_HandleCdsProduct().

◆ ShouldRetranslate()

bool CCDSTranslationPanel::ShouldRetranslate ( )
inline

Definition at line 186 of file cds_translation_panel.hpp.

References m_RetranslateOnOkBtn.

Referenced by CEditObjectSeq_feat::x_HandleCdsProduct().

◆ ShouldUpdateGeneLocation()

bool CCDSTranslationPanel::ShouldUpdateGeneLocation ( )
inline

Definition at line 185 of file cds_translation_panel.hpp.

References m_UpdateGeneSpan.

Referenced by CEditObjectSeq_feat::x_AdjustGene().

◆ ShouldUpdatemRNALocation()

bool CCDSTranslationPanel::ShouldUpdatemRNALocation ( )
inline

Definition at line 184 of file cds_translation_panel.hpp.

References m_UpdatemRNASpan.

Referenced by CEditObjectSeq_feat::x_UpdatemRNA().

◆ ShowToolTips()

bool CCDSTranslationPanel::ShowToolTips ( )
static

Should we show tooltips?

Should we show tooltips?

Definition at line 681 of file cds_translation_panel.cpp.

Referenced by CreateControls().

◆ TransferDataFromWindow()

bool CCDSTranslationPanel::TransferDataFromWindow ( )
virtual

◆ TransferDataToWindow()

bool CCDSTranslationPanel::TransferDataToWindow ( )
virtual

◆ UpdateForceNear()

void CCDSTranslationPanel::UpdateForceNear ( )

◆ x_CollectData()

bool CCDSTranslationPanel::x_CollectData ( )
private

◆ x_GetTree()

wxTreebook * CCDSTranslationPanel::x_GetTree ( )
private

Definition at line 519 of file cds_translation_panel.cpp.

References NULL.

Referenced by OnRetranslateLinkHyperlinkClicked(), and x_IsPseudo().

◆ x_IsPseudo()

bool CCDSTranslationPanel::x_IsPseudo ( )
private

◆ x_NormalizeGeneticCodeName()

void CCDSTranslationPanel::x_NormalizeGeneticCodeName ( string code_name)
private

Definition at line 400 of file cds_translation_panel.cpp.

Referenced by CreateControls(), and TransferDataToWindow().

◆ x_SetLocationForProtein()

void CCDSTranslationPanel::x_SetLocationForProtein ( CRef< objects::CSeq_feat >  cds,
objects::CSeq_entry_Handle  seh 
)
private

◆ x_SetProtein()

void CCDSTranslationPanel::x_SetProtein ( const objects::CBioseq &  protein,
CRef< objects::CSeq_feat >  cds,
objects::CSeq_entry_Handle  seh 
)
private

◆ x_Translate()

void CCDSTranslationPanel::x_Translate ( void  )
private

◆ x_UpdateForceNear()

void CCDSTranslationPanel::x_UpdateForceNear ( const string val)
private

Member Data Documentation

◆ m_add_stop_codon

bool CCDSTranslationPanel::m_add_stop_codon
private

Definition at line 212 of file cds_translation_panel.hpp.

Referenced by TransferDataToWindow(), x_SetProtein(), and x_Translate().

◆ m_ConflictCtrl

wxCheckBox* CCDSTranslationPanel::m_ConflictCtrl

◆ m_EditedBioseq

CRef<objects::CBioseq> CCDSTranslationPanel::m_EditedBioseq

◆ m_EditedFeat

CRef<objects::CSeq_feat> CCDSTranslationPanel::m_EditedFeat

◆ m_ForceNear

wxCheckBox* CCDSTranslationPanel::m_ForceNear

◆ m_Frame

wxChoice* CCDSTranslationPanel::m_Frame

◆ m_GeneticCode

wxChoice* CCDSTranslationPanel::m_GeneticCode

◆ m_ProductCtrl

wxOwnerDrawnComboBox* CCDSTranslationPanel::m_ProductCtrl

◆ m_ProteinLengthTxt

wxStaticText* CCDSTranslationPanel::m_ProteinLengthTxt

Definition at line 154 of file cds_translation_panel.hpp.

Referenced by CreateControls(), Init(), and TransferDataToWindow().

◆ m_RegPath

string CCDSTranslationPanel::m_RegPath
private

Definition at line 213 of file cds_translation_panel.hpp.

Referenced by LoadSettings(), SaveSettings(), and SetRegistryPath().

◆ m_RetranslateLink

wxHyperlinkCtrl* CCDSTranslationPanel::m_RetranslateLink

Definition at line 158 of file cds_translation_panel.hpp.

Referenced by CreateControls(), and Init().

◆ m_RetranslateOnOkBtn

wxCheckBox* CCDSTranslationPanel::m_RetranslateOnOkBtn

◆ m_Scope

objects::CScope* CCDSTranslationPanel::m_Scope

◆ m_SeqIds

map<string, CConstRef<objects::CSeq_id> > CCDSTranslationPanel::m_SeqIds
private

Definition at line 214 of file cds_translation_panel.hpp.

Referenced by CreateControls(), GetProductId(), and x_UpdateForceNear().

◆ m_TranslationCtrl

wxTextCtrl* CCDSTranslationPanel::m_TranslationCtrl

◆ m_UpdateGeneSpan

wxCheckBox* CCDSTranslationPanel::m_UpdateGeneSpan

◆ m_UpdatemRNASpan

wxCheckBox* CCDSTranslationPanel::m_UpdatemRNASpan

Definition at line 160 of file cds_translation_panel.hpp.

Referenced by CreateControls(), Init(), and ShouldUpdatemRNALocation().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:33 2024 by modify_doxy.py rev. 669887