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

Method setCurrentModelIndex

src/frontend/widgets/TreeViewComboBox.cpp:106–112  ·  view source on GitHub ↗

! Sets the current item to be the item at \a index and selects it. \sa currentIndex() */

Source from the content-addressed store, hash-verified

104 \sa currentIndex()
105*/
106void TreeViewComboBox::setCurrentModelIndex(const QModelIndex& index) {
107 m_treeView->setCurrentIndex(index);
108 if (index.isValid()) {
109 setToolTip(m_model->data(index, Qt::ToolTipRole).toString());
110 QComboBox::setItemText(0, index.data().toString());
111 }
112}
113
114/*!
115 Returns the model index of the current item.

Callers 15

setAxesMethod · 0.80
initTabsMethod · 0.80
initGeneralTabMethod · 0.80
addVariableMethod · 0.80
setPlotsMethod · 0.80
setPlotsMethod · 0.80
setPlotsMethod · 0.80
setPlotsMethod · 0.80
setCurvesMethod · 0.80
setCurrentFolderMethod · 0.80
newFolderMethod · 0.80

Calls 5

setToolTipFunction · 0.85
setCurrentIndexMethod · 0.45
isValidMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected