CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWAdapterRowHeaderTableManager Class Reference

#include <Fireworks/TableWidget/interface/FWAdapterRowHeaderTableManager.h>

Inheritance diagram for FWAdapterRowHeaderTableManager:
FWTableManagerBase

List of all members.

Public Member Functions

virtual FWTableCellRendererBasecellRenderer (int iRow, int iCol) const
 FWAdapterRowHeaderTableManager (FWTableManagerBase *)
virtual std::vector< std::string > getTitles () const
 returns the title names for each column
virtual void implSort (int col, bool sortOrder)
 Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.
virtual int numberOfColumns () const
 Number of columns in the table.
virtual int numberOfRows () const
 Number of rows in the table.
int unsortedRowNumber (int) const
 when passed the index to the sorted order of the rows it returns the original row number from the underlying data
virtual ~FWAdapterRowHeaderTableManager ()

Private Member Functions

 FWAdapterRowHeaderTableManager (const FWAdapterRowHeaderTableManager &)
const
FWAdapterRowHeaderTableManager
operator= (const FWAdapterRowHeaderTableManager &)

Private Attributes

const FWTableManagerBasem_table

Detailed Description

Description: a TableManager used to pass the row header info of another table as the body of this table

Usage: This class is an implementation detail of how the FWTableWidget handles the row headers. The drawing of the row headers is done by the same widget as handles the drawing of the body. The FWAdapterRowHeaderTableManager is used to make the row header information appear to be just another table so that it works with the above mentioned widget.

Definition at line 32 of file FWAdapterRowHeaderTableManager.h.


Constructor & Destructor Documentation

FWAdapterRowHeaderTableManager::FWAdapterRowHeaderTableManager ( FWTableManagerBase iTable)

Definition at line 31 of file FWAdapterRowHeaderTableManager.cc.

                                                                                         :
m_table(iTable)
 {
   iTable->Connect("dataChanged()","FWTableManagerBase",static_cast<FWTableManagerBase*>(this),"dataChanged()");
   iTable->Connect("visualPropertiesChanged()","FWTableManagerBase",static_cast<FWTableManagerBase*>(this),"visualPropertiesChanged()");
}
FWAdapterRowHeaderTableManager::~FWAdapterRowHeaderTableManager ( ) [virtual]

Definition at line 43 of file FWAdapterRowHeaderTableManager.cc.

{
}
FWAdapterRowHeaderTableManager::FWAdapterRowHeaderTableManager ( const FWAdapterRowHeaderTableManager ) [private]

Member Function Documentation

FWTableCellRendererBase * FWAdapterRowHeaderTableManager::cellRenderer ( int  iSortedRowNumber,
int  iCol 
) const [virtual]

Returns the particular renderer used to handle the requested cell. Arguments: iSortedRowNumber: the row number from the present sort (i.e. the cell number of the view) iCol: the column number of the cell. The returned value must be used immediately and not held onto since the same Renderer can be used for subsequent calls

Implements FWTableManagerBase.

Definition at line 90 of file FWAdapterRowHeaderTableManager.cc.

References m_table, and FWTableManagerBase::rowHeader().

{
   return m_table->rowHeader(iRow);
}
std::vector< std::string > FWAdapterRowHeaderTableManager::getTitles ( ) const [virtual]

returns the title names for each column

Implements FWTableManagerBase.

Definition at line 84 of file FWAdapterRowHeaderTableManager.cc.

References h::names.

                                                {
   std::vector<std::string> names(1,std::string("labels"));
   return names;
}
void FWAdapterRowHeaderTableManager::implSort ( int  iCol,
bool  iSortOrder 
) [virtual]

Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.

Implements FWTableManagerBase.

Definition at line 63 of file FWAdapterRowHeaderTableManager.cc.

{ 
}
int FWAdapterRowHeaderTableManager::numberOfColumns ( ) const [virtual]

Number of columns in the table.

Implements FWTableManagerBase.

Definition at line 74 of file FWAdapterRowHeaderTableManager.cc.

{ return 1;}
int FWAdapterRowHeaderTableManager::numberOfRows ( ) const [virtual]

Number of rows in the table.

Implements FWTableManagerBase.

Definition at line 71 of file FWAdapterRowHeaderTableManager.cc.

References m_table, and FWTableManagerBase::numberOfRows().

{ return m_table->numberOfRows();}
const FWAdapterRowHeaderTableManager& FWAdapterRowHeaderTableManager::operator= ( const FWAdapterRowHeaderTableManager ) [private]
int FWAdapterRowHeaderTableManager::unsortedRowNumber ( int  iSortedRowNumber) const [virtual]

when passed the index to the sorted order of the rows it returns the original row number from the underlying data

Implements FWTableManagerBase.

Definition at line 77 of file FWAdapterRowHeaderTableManager.cc.

References m_table, and FWTableManagerBase::unsortedRowNumber().

{
   return m_table->unsortedRowNumber(iRow);
}

Member Data Documentation

Definition at line 57 of file FWAdapterRowHeaderTableManager.h.

Referenced by cellRenderer(), numberOfRows(), and unsortedRowNumber().