cf::ui::gallery::ThemeSidebar¶
Left sidebar navigation widget with clickable tab items. More...
#include <ThemeSidebar.h>
Inherits from QWidget
Public Signals¶
| Name | |
|---|---|
| void | tabClicked(int index) Emitted when a tab is clicked. |
Public Functions¶
| Name | |
|---|---|
| ThemeSidebar(QWidget * parent =nullptr) | |
| ~ThemeSidebar() override =default | |
| void | setActiveIndex(int index) Set the active tab index. |
| int | activeIndex() const Get the current active tab index. |
| void | applyTheme(constcf::ui::core::ICFTheme & theme) Apply theme colors to the sidebar. |
Protected Functions¶
| Name | |
|---|---|
| void | paintEvent(QPaintEvent * event) override |
| void | mousePressEvent(QMouseEvent * event) override |
| void | enterEvent(QEnterEvent * event) override |
| void | leaveEvent(QEvent * event) override |
| void | mouseMoveEvent(QMouseEvent * event) override |
Detailed Description¶
Left sidebar navigation widget with clickable tab items.
Displays 4 tab items with emoji icons + text labels:
- 🎨 Color Scheme (色彩方案)
- ⚡ Motion Spec (动效规范)
- 🔲 Radius Scale (圆角规范)
- 🔤 Typography (字体规范)
Provides visual feedback for active/hover states.
Public Signals Documentation¶
signal tabClicked¶
Emitted when a tab is clicked.
Parameters:
- index The clicked tab index
Public Functions Documentation¶
function ThemeSidebar¶
function ~ThemeSidebar¶
function setActiveIndex¶
Set the active tab index.
Parameters:
- index Tab index (0-3)
function activeIndex¶
Get the current active tab index.
Return: Active tab index
function applyTheme¶
Apply theme colors to the sidebar.
Parameters:
- theme Theme to apply
Protected Functions Documentation¶
function paintEvent¶
function mousePressEvent¶
function enterEvent¶
function leaveEvent¶
function mouseMoveEvent¶
Updated on 2026-03-09 at 10:14:00 +0000