MCPcopy Create free account
hub / github.com/KDE/labplot / index

Method index

src/backend/spreadsheet/SpreadsheetModel.cpp:105–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105QModelIndex SpreadsheetModel::index(const QString& text) const {
106 const int colCount = m_spreadsheet->columnCount();
107 const int rowCount = m_spreadsheet->rowCount();
108 for (int col = 0; col < colCount; ++col) {
109 auto* column = m_spreadsheet->column(col)->asStringColumn();
110 for (int row = 0; row < rowCount; ++row) {
111 if (column->textAt(row).indexOf(text) != -1)
112 return createIndex(row, col);
113 }
114 }
115
116 return createIndex(-1, -1);
117}
118
119Spreadsheet* SpreadsheetModel::spreadsheet() {
120 return m_spreadsheet;

Callers

nothing calls this directly

Calls 6

asStringColumnMethod · 0.80
columnCountMethod · 0.45
rowCountMethod · 0.45
columnMethod · 0.45
indexOfMethod · 0.45
textAtMethod · 0.45

Tested by

no test coverage detected