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

Search Toolkit Book for CGroupTableModel

+ Inheritance diagram for CGroupTableModel:
+ Collaboration diagram for CGroupTableModel:

Classes

struct  TRow
 

Public Member Functions

 CGroupTableModel ()
 
void SetNumRows (size_t n_rows)
 
void Clear ()
 
virtual void SetIcon (int row, const wxString &icon_alias)
 
virtual void SetStringValueAt (int row, int col, const wxString &value)
 
virtual void SetIntValueAt (int row, int col, const int &value)
 
virtual void FireDataChanged ()
 
CwxAbstractTableModel pure virtual functions
virtual wxString GetColumnType (int col) const
 Tries to extract actual type from row 0 value if it exists. More...
 
virtual wxString GetColumnName (int col) const
 Returns a default name for the column using spreadsheet conventions: A, B, C, ... More...
 
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 col) const
 
IwxDecoratedTableModel virtual functions
virtual wxString GetImageAliasAt (int row, int col) const
 
- 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 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 Attributes

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

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 131 of file object_list_widget_sel.cpp.

Constructor & Destructor Documentation

◆ CGroupTableModel()

CGroupTableModel::CGroupTableModel ( )

Definition at line 173 of file object_list_widget_sel.cpp.

References m_ColumnNames, and wxT.

Member Function Documentation

◆ Clear()

void CGroupTableModel::Clear ( void  )
inline

Definition at line 137 of file object_list_widget_sel.cpp.

References SetNumRows().

Referenced by CObjectListWidgetSel::x_FillWithObjects().

◆ FireDataChanged()

void CGroupTableModel::FireDataChanged ( )
virtual

◆ GetColumnName()

wxString CGroupTableModel::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 252 of file object_list_widget_sel.cpp.

References _ASSERT, and m_ColumnNames.

◆ GetColumnType()

wxString CGroupTableModel::GetColumnType ( int  col_idx) const
virtual

Tries to extract actual type from row 0 value if it exists.

Otherwise returns typeid(int) [anyway it is of no use in abcence of data]

Reimplemented from CwxAbstractTableModel.

Definition at line 239 of file object_list_widget_sel.cpp.

References wxT.

Referenced by SetIntValueAt(), and SetStringValueAt().

◆ GetImageAliasAt()

wxString CGroupTableModel::GetImageAliasAt ( int  row,
int  col 
) const
virtual

Reimplemented from IwxDecoratedTableModel.

Definition at line 264 of file object_list_widget_sel.cpp.

References _ASSERT, m_Icons, and row.

◆ GetNumColumns()

int CGroupTableModel::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 219 of file object_list_widget_sel.cpp.

References m_ColumnNames.

◆ GetNumRows()

int CGroupTableModel::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 214 of file object_list_widget_sel.cpp.

References m_Rows.

◆ GetValueAt()

wxVariant CGroupTableModel::GetValueAt ( int  row,
int  col 
) const
virtual

◆ SetIcon()

void CGroupTableModel::SetIcon ( int  row,
const wxString &  icon_alias 
)
virtual

Definition at line 186 of file object_list_widget_sel.cpp.

References _ASSERT, m_Icons, and row.

◆ SetIntValueAt()

void CGroupTableModel::SetIntValueAt ( int  row,
int  col,
const int value 
)
virtual

◆ SetNumRows()

void CGroupTableModel::SetNumRows ( size_t  n_rows)

Definition at line 179 of file object_list_widget_sel.cpp.

References m_Icons, and m_Rows.

Referenced by Clear(), and CObjectListWidgetSel::x_PopulateGroups().

◆ SetStringValueAt()

void CGroupTableModel::SetStringValueAt ( int  row,
int  col,
const wxString &  value 
)
virtual

Member Data Documentation

◆ m_ColumnNames

vector<wxString> CGroupTableModel::m_ColumnNames
protected

◆ m_Icons

vector<wxString> CGroupTableModel::m_Icons
protected

Definition at line 169 of file object_list_widget_sel.cpp.

Referenced by GetImageAliasAt(), SetIcon(), and SetNumRows().

◆ m_Rows

vector<TRow> CGroupTableModel::m_Rows
protected

The documentation for this class was generated from the following file:
Modified on Mon May 20 05:00:19 2024 by modify_doxy.py rev. 669887