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

Method data

src/frontend/PlotTemplateDialog.cpp:317–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317QVariant TemplateListModel::data(const QModelIndex& index, int role) const {
318 const int row = index.row();
319 if (!index.isValid() || row > mFiles.count() || row < 0)
320 return QVariant();
321
322 switch (role) {
323 case FilenameRole: // fall through
324 case Qt::ItemDataRole::DisplayRole:
325 return mFiles.at(row).fileName;
326 case FilePathRole:
327 return mFiles.at(row).path;
328 }
329
330 return QVariant();
331}

Callers 10

~MainWinMethod · 0.45
initGUIMethod · 0.45
saveMethod · 0.45
newNotebookMethod · 0.45
setDockVisibilityMethod · 0.45
eventFilterMethod · 0.45
templatePathMethod · 0.45
updateTextPositionMethod · 0.45
loadMenuSelectedMethod · 0.45
saveMenuSelectedMethod · 0.45

Calls 3

rowMethod · 0.45
isValidMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected