|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Manages activity badges on QTabWidget tabs. More...
#include <TabBadgeManager.hpp>


Public Member Functions | |
| TabBadgeManager (QTabWidget *tabWidget) | |
| ~TabBadgeManager ()=default | |
| void | SetBadge (int tabIndex) |
| Show a badge on a tab indicating new/updated data. | |
| void | ClearBadge (int tabIndex) |
| Hide the badge on a tab. | |
| bool | HasBadge (int tabIndex) const |
| Check if a tab has an active badge. | |
Private Slots | |
| void | OnTabChanged (int index) |
Private Member Functions | |
| void | UpdateTabText (int index) |
Private Attributes | |
| QTabWidget * | m_tabWidget |
| std::map< int, QString > | m_originalTabText |
| std::map< int, bool > | m_badges |
Manages activity badges on QTabWidget tabs.
Shows a red dot (●) on tabs when they contain updated data. Auto-clears when user switches to that tab.
Usage: auto badgeManager = std::make_unique<TabBadgeManager>(tabWidget); badgeManager->SetBadge(0, "new"); // Show badge on tab 0 badgeManager->ClearBadge(0); // Hide badge on tab 0
|
explicit |

|
default |
| void ui::qt::TabBadgeManager::ClearBadge | ( | int | tabIndex | ) |
Hide the badge on a tab.
| tabIndex | Index of the tab |


| bool ui::qt::TabBadgeManager::HasBadge | ( | int | tabIndex | ) | const |
Check if a tab has an active badge.
| tabIndex | Index of the tab |

|
privateslot |


| void ui::qt::TabBadgeManager::SetBadge | ( | int | tabIndex | ) |
Show a badge on a tab indicating new/updated data.
| tabIndex | Index of the tab to badge |

|
private |

|
private |
|
private |
|
private |