QVariant PlotDataSimpleTableModel::getCellAt(int row, int column) const {
    if (!pData_ || pData_->getRowsCount() == 0)
        return QVariant();
    std::vector<PlotRowValue>::const_iterator it = pData_->getRowsBegin();
    it += row;

    PlotCellValue cell = it->getCellAt(column);
    return (cell.isValue() ? QVariant(cell.getValue()) : QVariant(QString::fromStdString(cell.getTag())));
}
Exemplo n.º 2
0
bool PlotCellValue::operator<(const PlotCellValue& rhs) const {
    if (isValue()) {
        return rhs.isTag()
            || getValue() < rhs.getValue()
            || (getValue() == rhs.getValue() && isHighlighted() < rhs.isHighlighted());
    }
    else {
        return rhs.isTag()
            && (getTag() < rhs.getTag() || (getTag() == rhs.getTag() && isHighlighted() < rhs.isHighlighted()));
    }
}