* @brief Returns the display text of the currently selected tree item. */
| 800 | * @brief Returns the display text of the currently selected tree item. |
| 801 | */ |
| 802 | QString 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. |
no test coverage detected