* @brief Selects a page by index and triggers content fetching. */
| 155 | * @brief Selects a page by index and triggers content fetching. |
| 156 | */ |
| 157 | void Misc::HelpCenter::setCurrentIndex(int index) |
| 158 | { |
| 159 | if (m_currentIndex == index) |
| 160 | return; |
| 161 | |
| 162 | m_currentIndex = index; |
| 163 | Q_EMIT currentIndexChanged(); |
| 164 | |
| 165 | m_pageContent.clear(); |
| 166 | Q_EMIT pageContentChanged(); |
| 167 | |
| 168 | if (index >= 0 && index < m_filteredPages.count()) |
| 169 | fetchPage(index); |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * @brief Sets the search filter and re-applies filtering to the pages list. |
no test coverage detected