NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CAlignSeqTableModel Class Reference

Search Toolkit Book for CAlignSeqTableModel

CAlignSeqTableModel. More...

#include <gui/widgets/hit_matrix/align_seq_table.hpp>

+ Inheritance diagram for CAlignSeqTableModel:
+ Collaboration diagram for CAlignSeqTableModel:

Classes

struct  SRow
 

Public Types

typedef IHitMatrixDataSource::TIdVector TIdVector
 

Public Member Functions

void Init (IHitMatrixDataSource &ds, const TIdVector &ids)
 
void Clear ()
 
const IHitSeqIdGetId (int row) const
 
ITableModel virtual functions implementation
virtual int GetNumRows () const
 Returns the number of rows in the model. More...
 
virtual int GetNumColumns () const
 Returns the number of columns in the model. More...
 
virtual wxVariant GetValueAt (int row, int column) const
 
virtual wxString GetColumnType (int col_ix) const
 CAlignSeqTableModel. More...
 
virtual wxString GetColumnName (int col_ix) const
 Returns a default name for the column using spreadsheet conventions: A, B, C, ... More...
 
- Public Member Functions inherited from CwxAbstractTableModel
 CwxAbstractTableModel ()
 CwxAbstractTableModel. More...
 
virtual void AddTMListener (IwxTableModelListener &aTMEar)
 
virtual void RemoveTMListener (IwxTableModelListener &aTMEar)
 
- Public Member Functions inherited from IwxDecoratedTableModel
virtual ~IwxDecoratedTableModel ()
 
virtual wxString GetColumnTitle (int col_idx) const
 All the same methods of IwxTableModel, plus. More...
 
virtual CIRef< IwxStringFormatGetColumnFormat (int) const
 
virtual wxString GetImageAliasAt (int, int) const
 
virtual wxString GetTooltipTextAt (int, int) const
 
virtual wxColor GetBackgroundColor (int) const
 
- Public Member Functions inherited from IwxTableModel
virtual ~IwxTableModel ()
 
virtual wxString GetTypeAt (int, int col) const
 
virtual bool IsEditableAt (int, int) const
 
virtual void SetValueAt (int, int, const wxVariant &)
 

Protected Member Functions

string x_GetTitle (objects::CBioseq_Handle &handle) const
 
string x_GetOrganism (objects::CBioseq_Handle &handle) const
 
string x_GetLength (objects::CBioseq_Handle &handle) const
 
- Protected Member Functions inherited from CwxAbstractTableModel
virtual void x_FireDataChanged ()
 
virtual void x_FireStructureChanged ()
 
virtual void x_FireRowsInserted (int first_row, int last_row=-1)
 
virtual void x_FireRowsUpdated (int first_row, int last_row=-1)
 
virtual void x_FireRowsDeleted (int first_row, int last_row=-1)
 
virtual void x_FireCellUpdated (int row, int col)
 
virtual void x_FireTableChanged (const CwxTableModelNotice &note)
 

Protected Attributes

vector< SRow * > m_Rows
 
- Protected Attributes inherited from CwxAbstractTableModel
list< IwxTableModelListener * > m_ListenerList
 List of TM Listeners Listeners are just stored, no deletion upon removal. More...
 

Detailed Description

CAlignSeqTableModel.

Definition at line 47 of file align_seq_table.hpp.

Member Typedef Documentation

◆ TIdVector

Definition at line 50 of file align_seq_table.hpp.

Member Function Documentation

◆ Clear()

void CAlignSeqTableModel::Clear ( void  )

Definition at line 154 of file align_seq_table.cpp.

References GetNumRows(), i, and m_Rows.

Referenced by Init().

◆ GetColumnName()

wxString CAlignSeqTableModel::GetColumnName ( int  col_idx) const
virtual

Returns a default name for the column using spreadsheet conventions: A, B, C, ...

Z, AA, AB, etc. If column cannot be found, returns an empty name. AnyType has a type of string.

There is one static instance of string inside, so it is refilled every next call. It is enough for drawing purposes, but if someone needs more, (s)he should implement more.

Reimplemented from CwxAbstractTableModel.

Definition at line 144 of file align_seq_table.cpp.

References kAlignSeqColumnsNum, and sColumns.

◆ GetColumnType()

wxString CAlignSeqTableModel::GetColumnType ( int  col_ix) const
virtual

CAlignSeqTableModel.

Reimplemented from CwxAbstractTableModel.

Definition at line 48 of file align_seq_table.cpp.

References wxT.

◆ GetId()

const IHitSeqId * CAlignSeqTableModel::GetId ( int  row) const

Definition at line 163 of file align_seq_table.cpp.

References GetNumRows(), m_Rows, NULL, and row.

Referenced by CwxChooseSeqDlg::x_GetSelectedId().

◆ GetNumColumns()

int CAlignSeqTableModel::GetNumColumns ( ) const
virtual

Returns the number of columns in the model.

A CTableControl uses this method to determine how many columns it should create and display by default.

Implements CwxAbstractTableModel.

Definition at line 110 of file align_seq_table.cpp.

References kAlignSeqColumnsNum.

◆ GetNumRows()

int CAlignSeqTableModel::GetNumRows ( ) const
virtual

Returns the number of rows in the model.

A CTableControl uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.

Implements CwxAbstractTableModel.

Definition at line 103 of file align_seq_table.cpp.

References m_Rows.

Referenced by Clear(), GetId(), and GetValueAt().

◆ GetValueAt()

wxVariant CAlignSeqTableModel::GetValueAt ( int  row,
int  column 
) const
virtual

Implements CwxAbstractTableModel.

Definition at line 116 of file align_seq_table.cpp.

References GetNumRows(), m_Rows, r(), row, and ToWxString().

◆ Init()

void CAlignSeqTableModel::Init ( IHitMatrixDataSource ds,
const TIdVector ids 
)

◆ x_GetLength()

string CAlignSeqTableModel::x_GetLength ( objects::CBioseq_Handle &  handle) const
protected

Definition at line 96 of file align_seq_table.cpp.

References CBioseq_Handle::GetBioseqLength(), NStr::IntToString(), and str().

Referenced by Init().

◆ x_GetOrganism()

string CAlignSeqTableModel::x_GetOrganism ( objects::CBioseq_Handle &  handle) const
protected

Definition at line 83 of file align_seq_table.cpp.

References COrg_ref::GetLabel(), GetOrg_ref(), and str().

Referenced by Init().

◆ x_GetTitle()

string CAlignSeqTableModel::x_GetTitle ( objects::CBioseq_Handle &  handle) const
protected

Definition at line 77 of file align_seq_table.cpp.

Referenced by Init().

Member Data Documentation

◆ m_Rows

vector<SRow*> CAlignSeqTableModel::m_Rows
protected

Definition at line 81 of file align_seq_table.hpp.

Referenced by Clear(), GetId(), GetNumRows(), GetValueAt(), and Init().


The documentation for this class was generated from the following files:
Modified on Mon Jun 17 05:04:09 2024 by modify_doxy.py rev. 669887