18 : m_model(model), m_emptyCellStyle(
std::move(emptyCellStyle)) {}
23 if (
index.isValid()) {
32 return newIndex.sibling(newIndex.row(),
index.column());
36 std::vector<Cell>
const &cells) {
38 return newIndex.sibling(newIndex.row(),
index.column());
46 std::vector<Cell>
const &cells) {
54 std::vector<Cell>
const &cells) {
75 std::vector<Cell>
const &cells) {
78 auto *item = modelItemFromIndex(m_model, cellIndex);
79 applyCellPropertiesToItem(cells[i], *item);
85 for (
auto &&cell : cells) {
86 auto *item =
new QStandardItem();
88 rowCells.append(item);
94 auto cells = std::vector<Cell>();
95 cells.reserve(
m_model.columnCount());
98 cells.emplace_back(cellFromCellIndex(cellIndex));
109 if (
index.isValid()) {
110 auto *item = model.itemFromIndex(
index.untyped());
111 assertOrThrow(item !=
nullptr,
"modelItemFromIndex: Index must point to a valid item.");
114 return model.invisibleRootItem();
118 if (
index.isValid()) {
119 auto *item = model.itemFromIndex(
index.untyped());
120 assertOrThrow(item !=
nullptr,
"modelItemFromIndex: Index must point to a valid item.");
123 return model.invisibleRootItem();
void assertOrThrow(bool condition, std::string const &message)
See the developer documentation for Batch Widget at developer.mantidproject.org/BatchWidget/index....
std::map< DeltaEMode::Type, std::string > index