#include <Fireworks/TableWidget/interface/FWTableManagerBase.h>
Public Member Functions | |
virtual void | buttonPressedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY) |
Called if mouse button pressed in Row Header, defaults is to do nothing. More... | |
virtual void | buttonReleasedInRowHeader (Int_t row, Event_t *event, Int_t relX, Int_t relY) |
virtual bool | cellDataIsSortable () const |
virtual unsigned int | cellHeight () const |
require all cells to be the same height More... | |
virtual FWTableCellRendererBase * | cellRenderer (int iSortedRowNumber, int iCol) const =0 |
ClassDef (FWTableManagerBase, 0) | |
void | dataChanged () |
Classes which inherit from FWTableManagerBase must call this when their underlying data changes. More... | |
FWTableManagerBase () | |
virtual std::vector< std::string > | getTitles () const =0 |
returns the title names for each column More... | |
virtual bool | hasLabelHeaders () const |
virtual bool | hasRowHeaders () const |
Returns 'true' if this table has row headers. Defaults return value is false. More... | |
virtual std::vector< unsigned int > | maxWidthForColumns () const |
for each column in the table this returns the present maximum width for that column More... | |
virtual int | numberOfColumns () const =0 |
Number of columns in the table. More... | |
virtual int | numberOfRows () const =0 |
Number of rows in the table. More... | |
virtual FWTableCellRendererBase * | rowHeader (int iSortedRowNumber) const |
Returns the renderer for the row header for the sorted row number iSortedRowNumber. More... | |
void | sort (int iCol, bool iSortOrder) |
Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder is 'true'. More... | |
int | sortColumn (void) |
The current sort column. More... | |
bool | sortOrder (void) |
The current sort order for the table. More... | |
virtual int | unsortedRowNumber (int iSortedRowNumber) const =0 |
when passed the index to the sorted order of the rows it returns the original row number from the underlying data More... | |
void | visualPropertiesChanged () |
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e.g. color) changes. More... | |
virtual | ~FWTableManagerBase () |
Protected Member Functions | |
virtual void | implSort (int iCol, bool iSortOrder)=0 |
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'. More... | |
Private Attributes | |
int | m_sortColumn |
bool | m_sortOrder |
Description: Base class for classes that work as interfaces that translate underlying data into a table form
Usage: Classes which inherit from FWTableManagerBase are used as adapters to allow external data to be shown in tabular form via the FWTableWidget. The table is made of three parts 1) The column headers: Each column is described by a 'title' and the title is drawn in the column header 2) The body: the actual data of the table laid out in rows and columns 3) the row headers: optional identifier for a row. If given, the row header will always be visible on the screen if any part of the row is visible
The FWTableWidget actually draws the cells in the table by asking the FWTableManagerBase for a FWTableCellRendererBase for a particular cell. The renderer will then be asked to draw the cell into the appropriate part of the graphics window. Therfore it is the FWTableManagerBase's responsibility to create FWTableCellRendererBases which are appropriate for the data to be shown in each cell of the table. See the documentation of FWTableCellRendererBase for further information.
FWTableManagerBase must also be able to sort the rows of data based on the values in a specified column.
Definition at line 45 of file FWTableManagerBase.h.
FWTableManagerBase::FWTableManagerBase | ( | ) |
Definition at line 32 of file FWTableManagerBase.cc.
|
virtual |
Definition at line 43 of file FWTableManagerBase.cc.
|
virtual |
Called if mouse button pressed in Row Header, defaults is to do nothing.
Definition at line 138 of file FWTableManagerBase.cc.
|
virtual |
Reimplemented in FWCollectionSummaryTableManager.
Definition at line 142 of file FWTableManagerBase.cc.
Referenced by FWTableWidget::buttonPressedInRowHeader(), and FWTableWidget::buttonReleasedInRowHeader().
|
inlinevirtual |
Reimplemented in FWGeometryTableManagerBase, and FWPSetTableManager.
Definition at line 84 of file FWTableManagerBase.h.
References funct::true.
Referenced by FWTableWidget::FWTableWidget().
|
virtual |
require all cells to be the same height
Definition at line 89 of file FWTableManagerBase.cc.
References cellRenderer(), hasRowHeaders(), FWTableCellRendererBase::height(), and rowHeader().
Referenced by FWTabularWidget::dataChanged(), FWTabularWidget::FWTabularWidget(), FWPSetTableManager::maxWidthForColumns(), and FWPSetTableManager::setSelection().
|
pure 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
Implemented in DataAdderTableManager, FWPSetTableManager, FWGeometryTableManager, FWOverlapTableManager, FWTableViewTableManager, FWCollectionSummaryTableManager, FWTriggerTableViewTableManager, FWAdapterHeaderTableManager, and FWAdapterRowHeaderTableManager.
Referenced by cellHeight(), FWTabularWidget::DoRedraw(), FWTabularWidget::HandleButton(), and maxWidthForColumns().
FWTableManagerBase::ClassDef | ( | FWTableManagerBase | , |
0 | |||
) |
void FWTableManagerBase::dataChanged | ( | void | ) |
Classes which inherit from FWTableManagerBase must call this when their underlying data changes.
Definition at line 73 of file FWTableManagerBase.cc.
References implSort(), m_sortColumn, and m_sortOrder.
Referenced by FWTriggerTableViewTableManager::dataChanged(), FWCollectionSummaryTableManager::dataChanged(), FWTableViewTableManager::dataChanged(), FWGeometryTableManagerBase::firstColumnClicked(), FWCollectionSummaryTableManager::FWCollectionSummaryTableManager(), FWPathsPopup::postProcessEvent(), FWGeoTopNode::ProcessSelection(), FWGeometryTableManagerBase::redrawTable(), DataAdderTableManager::reset(), FWPSetTableManager::setExpanded(), DataAdderTableManager::sortWithFilter(), FWPSetTableManager::updateFilter(), and FWGUIEventDataAdder::updateFilterString().
|
pure virtual |
returns the title names for each column
Implemented in FWGeometryTableManagerBase, DataAdderTableManager, FWPSetTableManager, FWOverlapTableManager, FWTableViewTableManager, FWCollectionSummaryTableManager, FWAdapterHeaderTableManager, FWTriggerTableViewTableManager, and FWAdapterRowHeaderTableManager.
Referenced by FWAdapterHeaderTableManager::getTitles().
|
virtual |
Definition at line 123 of file FWTableManagerBase.cc.
|
virtual |
Returns 'true' if this table has row headers. Defaults return value is false.
Reimplemented in FWTableViewTableManager, and FWCollectionSummaryTableManager.
Definition at line 128 of file FWTableManagerBase.cc.
Referenced by cellHeight().
|
protectedpure virtual |
Called by 'sort' method to actually handle the sorting of the rows. Arguments are the same as 'sort'.
Implemented in FWGeometryTableManagerBase, FWPSetTableManager, DataAdderTableManager, FWTableViewTableManager, FWCollectionSummaryTableManager, FWTriggerTableViewTableManager, FWAdapterHeaderTableManager, and FWAdapterRowHeaderTableManager.
Referenced by dataChanged(), and sort().
|
virtual |
for each column in the table this returns the present maximum width for that column
Reimplemented in FWPSetTableManager.
Definition at line 104 of file FWTableManagerBase.cc.
References cellRenderer(), cuy::col, max(), numberOfColumns(), numberOfRows(), FWTableCellRendererBase::width(), and create_public_lumi_plots::width.
Referenced by FWTabularWidget::dataChanged(), FWTabularWidget::FWTabularWidget(), and FWPSetTableManager::maxWidthForColumns().
|
pure virtual |
Number of columns in the table.
Implemented in FWPSetTableManager, DataAdderTableManager, FWGeometryTableManager, FWOverlapTableManager, FWCollectionSummaryTableManager, FWTableViewTableManager, FWAdapterHeaderTableManager, FWTriggerTableViewTableManager, and FWAdapterRowHeaderTableManager.
Referenced by FWGeometryTableManagerBase::getTitles(), maxWidthForColumns(), FWAdapterHeaderTableManager::numberOfColumns(), FWTabularWidget::setWidthOfTextInColumns(), and sort().
|
pure virtual |
Number of rows in the table.
Implemented in FWGeometryTableManagerBase, FWPSetTableManager, DataAdderTableManager, FWCollectionSummaryTableManager, FWTableViewTableManager, FWAdapterHeaderTableManager, FWTriggerTableViewTableManager, and FWAdapterRowHeaderTableManager.
Referenced by FWTabularWidget::DoRedraw(), FWTabularWidget::GetDefaultSize(), maxWidthForColumns(), FWAdapterRowHeaderTableManager::numberOfRows(), and FWTabularWidget::translateToRowColumn().
|
virtual |
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
Reimplemented in FWTableViewTableManager, and FWCollectionSummaryTableManager.
Definition at line 132 of file FWTableManagerBase.cc.
Referenced by cellHeight(), and FWAdapterRowHeaderTableManager::cellRenderer().
void FWTableManagerBase::sort | ( | int | iCol, |
bool | iSortOrder | ||
) |
Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder is 'true'.
Definition at line 63 of file FWTableManagerBase.cc.
References cuy::col, implSort(), m_sortColumn, m_sortOrder, numberOfColumns(), sortOrder(), and visualPropertiesChanged().
Referenced by FWGUIEventDataAdder::metadataUpdatedSlot(), FWTableWidget::sort(), and DataAdderTableManager::sortWithFilter().
|
inline |
The current sort column.
Definition at line 109 of file FWTableManagerBase.h.
References m_sortColumn.
|
inline |
The current sort order for the table.
Definition at line 106 of file FWTableManagerBase.h.
References m_sortOrder.
Referenced by FWAdapterHeaderTableManager::implSort(), DataAdderTableManager::implSort(), sort(), and DataAdderTableManager::sortWithFilter().
|
pure virtual |
when passed the index to the sorted order of the rows it returns the original row number from the underlying data
Implemented in FWGeometryTableManagerBase, DataAdderTableManager, FWPSetTableManager, FWTableViewTableManager, FWCollectionSummaryTableManager, FWAdapterHeaderTableManager, FWAdapterRowHeaderTableManager, and FWTriggerTableViewTableManager.
Referenced by FWTableWidget::buttonReleasedInBody(), and FWAdapterRowHeaderTableManager::unsortedRowNumber().
void FWTableManagerBase::visualPropertiesChanged | ( | ) |
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e.g. color) changes.
Definition at line 81 of file FWTableManagerBase.cc.
Referenced by DataAdderTableManager::changeSelection(), FWGeometryTableManagerBase::firstColumnClicked(), FWPSetTableManager::FWPSetTableManager(), FWGeometryTableManagerBase::redrawTable(), FWPSetTableManager::setExpanded(), FWPSetTableManager::setSelection(), and sort().
|
private |
Definition at line 121 of file FWTableManagerBase.h.
Referenced by dataChanged(), sort(), and sortColumn().
|
private |
Definition at line 122 of file FWTableManagerBase.h.
Referenced by dataChanged(), sort(), and sortOrder().