MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / selectedText

Method selectedText

app/src/DataModel/ProjectEditor.cpp:802–809  ·  view source on GitHub ↗

* @brief Returns the display text of the currently selected tree item. */

Source from the content-addressed store, hash-verified

800 * @brief Returns the display text of the currently selected tree item.
801 */
802QString DataModel::ProjectEditor::selectedText() const
803{
804 if (!m_selectionModel || !m_treeModel)
805 return "";
806
807 const auto index = m_selectionModel->currentIndex();
808 return m_treeModel->data(index, TreeViewText).toString();
809}
810
811/**
812 * @brief Returns the icon path of the currently selected tree item.

Callers 4

onSelectionChangedMethod · 0.80
handleSelectionQueryMethod · 0.80
wordUnderCursorMethod · 0.80
frameMethod · 0.80

Calls 2

currentIndexMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected