21 m_graphicsContext(nullptr),
23 m_rowContext(nullptr),
24 m_rowRenderer(nullptr),
25 m_tableFormats(nullptr),
26 m_caughtExceptionInCellRender(
false) {
37 m_rowFillContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gc, kTRUE);
58 std::vector<std::string>
ret;
60 for (
unsigned int i = 0;
i <
n; ++
i) {
83 fwLog(
fwlog::kError) <<
"Error: caught exception in the cell renderer while evaluating an expression. Return " 84 "-999. Error is suppressed in future\n";
94 snprintf(
s,
sizeof(
s),
"%d",
int(rint(
ret)));
97 snprintf(
s,
sizeof(
s),
"0x%x",
int(rint(
ret)));
100 snprintf(
s,
sizeof(
s),
int(rint(
ret)) != 0 ?
"true" :
"false");
104 snprintf(
s,
sizeof(
s),
fs,
ret);
135 bool operator()(
const std::pair<bool, double> &
i1,
const std::pair<bool, double> &
i2)
const {
137 if (
i1.first and not
i2.first)
139 if (
i2.first and not
i1.first)
143 return i1.second >
i2.second;
147 bool operator()(
const std::pair<bool, double> &
i1,
const std::pair<bool, double> &
i2)
const {
149 if (
i1.first and not
i2.first)
151 if (
i2.first and not
i1.first)
155 return i1.second <
i2.second;
158 template <
typename S>
161 const std::vector<FWExpressionEvaluator> &evaluators,
162 std::multimap<std::pair<bool, double>,
int,
S> &iMap,
163 std::vector<int> &oNewSort) {
175 std::vector<int>::iterator itVec = oNewSort.begin();
176 for (
typename std::multimap<std::pair<bool, double>,
int,
S>::iterator it = iMap.begin(), itEnd = iMap.end();
185 static const bool sort_down =
true;
190 if (iSortOrder == sort_down) {
191 std::multimap<std::pair<bool, double>,
int, itemOrderGt>
s;
194 std::multimap<std::pair<bool, double>,
int, itemOrderLt>
s;
203 std::vector<int> visible;
205 std::vector<int> invisible;
211 visible.push_back(
i);
213 invisible.push_back(
i);
231 if (
nullptr ==
item) {
236 for (std::vector<FWTableViewManager::TableEntry>::const_iterator
i =
m_tableFormats->begin(),
267 std::ostringstream
s;
FWTableViewTableManager(const FWTableView *)
const void * modelData(int iIndex) const
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
FWTableViewManager * m_manager
void dataChanged()
Called if mouse button pressed in Row Header, defaults is to do nothing.
bool hasRowHeaders() const override
require all cells to be the same height
FWFramedTextTableCellRenderer * m_rowRenderer
std::vector< int > m_sortedToUnsortedIndices
ret
prodAgent to be discontinued
void setData(const std::string &)
FWColorManager & colorManager() const
std::vector< FWTableViewManager::TableEntry > * m_tableFormats
Color_t background() const
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
int unsortedRowNumber(int iSortedRowNumber) const override
const FWDisplayProperties & displayProperties() const
FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const override
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
~FWTableViewTableManager() override
std::vector< FWExpressionEvaluator > m_evaluators
void implSort(int iCol, bool iSortOrder) override
int numberOfRows() const override
Number of rows in the table.
FWTableWidget * m_tableWidget
void setGraphicsContext(const TGGC *iContext)
FWTextTableCellRenderer * m_renderer
std::vector< std::string > getTitles() const override
returns the title names for each column
const FWTableView * m_view
const Items & items() const
void setData(const std::string &, bool isSelected)
TGGC * m_highlightContext
const FWEventItem * item() const
int numberOfColumns() const override
Number of columns in the table.
ModelInfo modelInfo(int iIndex) const
bool m_caughtExceptionInCellRender