Public Member Functions | |
virtual FWTableCellRendererBase * | cellRenderer (int iSortedRowNumber, int iCol) const |
DataAdderTableManager (FWJobMetadataManager *manager) | |
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. | |
void | reset () |
virtual bool | rowIsSelected (int row) const |
int | selectedRow () const |
void | setSelection (int row, int mask) |
virtual void | sortWithFilter (const char *filter) |
virtual const std::string | title () const |
virtual int | unsortedRowNumber (int iSortedRowNumber) const |
when passed the index to the sorted order of the rows it returns the original row number from the underlying data | |
Public Attributes | |
sigc::signal< void, int > | indexSelected_ |
Private Member Functions | |
void | changeSelection (int iRow) |
Private Attributes | |
std::string | m_filter |
FWJobMetadataManager * | m_manager |
FWTextTableCellRenderer | m_renderer |
std::vector< int > | m_row_to_index |
int | m_selectedRow |
Definition at line 72 of file FWGUIEventDataAdder.cc.
DataAdderTableManager::DataAdderTableManager | ( | FWJobMetadataManager * | manager | ) | [inline] |
Definition at line 74 of file FWGUIEventDataAdder.cc.
References reset().
: m_manager(manager), m_selectedRow(-1), m_filter() { reset(); }
virtual FWTableCellRendererBase* DataAdderTableManager::cellRenderer | ( | int | iSortedRowNumber, |
int | iCol | ||
) | const [inline, 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 114 of file FWGUIEventDataAdder.cc.
References AlCaHLTBitMon_QueryRunRegistry::data, dataForColumn(), m_manager, m_renderer, m_row_to_index, m_selectedRow, FWTextTableCellRenderer::setData(), AlCaHLTBitMon_QueryRunRegistry::string, and FWJobMetadataManager::usableData().
{ if(static_cast<int>(m_row_to_index.size())>iSortedRowNumber) { int unsortedRow = m_row_to_index[iSortedRowNumber]; const FWJobMetadataManager::Data& data = (m_manager->usableData())[unsortedRow]; m_renderer.setData(dataForColumn(data,iCol),m_selectedRow==unsortedRow); } else { m_renderer.setData(std::string(),false); } return &m_renderer; }
void DataAdderTableManager::changeSelection | ( | int | iRow | ) | [inline, private] |
Definition at line 160 of file FWGUIEventDataAdder.cc.
References indexSelected_, m_selectedRow, and FWTableManagerBase::visualPropertiesChanged().
Referenced by reset(), and setSelection().
{ if(iRow != m_selectedRow) { m_selectedRow=iRow; if(-1 == iRow) { indexSelected_(-1); } else { indexSelected_(iRow); } visualPropertiesChanged(); } }
virtual std::vector<std::string> DataAdderTableManager::getTitles | ( | ) | const [inline, virtual] |
returns the title names for each column
Implements FWTableManagerBase.
Definition at line 103 of file FWGUIEventDataAdder.cc.
References kNColumns.
{ std::vector<std::string> returnValue; returnValue.reserve(kNColumns); returnValue.push_back("Purpose"); returnValue.push_back("Module Label"); returnValue.push_back("Product Instance Label"); returnValue.push_back("Process Name"); returnValue.push_back("C++ Class"); return returnValue; }
void DataAdderTableManager::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 339 of file FWGUIEventDataAdder.cc.
References m_filter, m_manager, m_row_to_index, FWTableManagerBase::sortOrder(), and FWJobMetadataManager::usableData().
{ doSort(column, m_filter.c_str(), sortOrder, m_manager->usableData(), m_row_to_index); }
virtual int DataAdderTableManager::numberOfColumns | ( | ) | const [inline, virtual] |
Number of columns in the table.
Implements FWTableManagerBase.
Definition at line 83 of file FWGUIEventDataAdder.cc.
References kNColumns.
{ return kNColumns; }
virtual int DataAdderTableManager::numberOfRows | ( | ) | const [inline, virtual] |
Number of rows in the table.
Implements FWTableManagerBase.
Definition at line 80 of file FWGUIEventDataAdder.cc.
References m_row_to_index.
{ return m_row_to_index.size(); }
void DataAdderTableManager::reset | ( | void | ) | [inline] |
Definition at line 149 of file FWGUIEventDataAdder.cc.
References changeSelection(), FWTableManagerBase::dataChanged(), i, m_manager, m_row_to_index, and FWJobMetadataManager::usableData().
Referenced by DataAdderTableManager(), and FWGUIEventDataAdder::metadataUpdatedSlot().
{ changeSelection(-1); m_row_to_index.clear(); m_row_to_index.reserve(m_manager->usableData().size()); for(unsigned int i =0; i < m_manager->usableData().size(); ++i) { m_row_to_index.push_back(i); } dataChanged(); }
virtual bool DataAdderTableManager::rowIsSelected | ( | int | row | ) | const [inline, virtual] |
Definition at line 145 of file FWGUIEventDataAdder.cc.
References m_selectedRow.
{ return m_selectedRow == row; }
int DataAdderTableManager::selectedRow | ( | ) | const [inline] |
Definition at line 141 of file FWGUIEventDataAdder.cc.
References m_selectedRow.
{ return m_selectedRow; }
void DataAdderTableManager::setSelection | ( | int | row, |
int | mask | ||
) | [inline] |
Definition at line 128 of file FWGUIEventDataAdder.cc.
References changeSelection(), and m_selectedRow.
Referenced by FWGUIEventDataAdder::rowClicked().
{ if(mask == 4) { if( row == m_selectedRow) { row = -1; } } changeSelection(row); }
virtual void DataAdderTableManager::sortWithFilter | ( | const char * | filter | ) | [inline, virtual] |
Updates the table using the passed filter. Notice that in this case we reset the sorting and show results by those best matching the filter.
Definition at line 91 of file FWGUIEventDataAdder.cc.
References FWTableManagerBase::dataChanged(), alcazmumu_cfi::filter, m_filter, FWTableManagerBase::sort(), and FWTableManagerBase::sortOrder().
Referenced by FWGUIEventDataAdder::updateFilterString().
{ m_filter = filter; sort(-1, sortOrder()); dataChanged(); }
virtual const std::string DataAdderTableManager::title | ( | ) | const [inline, virtual] |
Definition at line 137 of file FWGUIEventDataAdder.cc.
{ return "Viewable Collections"; }
virtual int DataAdderTableManager::unsortedRowNumber | ( | int | iSortedRowNumber | ) | const [inline, 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 98 of file FWGUIEventDataAdder.cc.
References m_row_to_index.
{ return m_row_to_index[iSortedRowNumber]; }
sigc::signal<void,int> DataAdderTableManager::indexSelected_ |
Definition at line 158 of file FWGUIEventDataAdder.cc.
Referenced by changeSelection(), and FWGUIEventDataAdder::createWindow().
std::string DataAdderTableManager::m_filter [private] |
Definition at line 174 of file FWGUIEventDataAdder.cc.
Referenced by implSort(), and sortWithFilter().
Definition at line 171 of file FWGUIEventDataAdder.cc.
Referenced by cellRenderer(), implSort(), and reset().
FWTextTableCellRenderer DataAdderTableManager::m_renderer [mutable, private] |
Definition at line 175 of file FWGUIEventDataAdder.cc.
Referenced by cellRenderer().
std::vector<int> DataAdderTableManager::m_row_to_index [private] |
Definition at line 172 of file FWGUIEventDataAdder.cc.
Referenced by cellRenderer(), implSort(), numberOfRows(), reset(), and unsortedRowNumber().
int DataAdderTableManager::m_selectedRow [private] |
Definition at line 173 of file FWGUIEventDataAdder.cc.
Referenced by cellRenderer(), changeSelection(), rowIsSelected(), selectedRow(), and setSelection().