Navigation Controls
Navigation Controls
Navigation controls help users move between views and modes.
Common Types
- Sidebar navigation.
- Tab-like segmented controls.
- Breadcrumb-style labels.
- Header toolbar actions.
- Page switch buttons.
Class Diagram
QWidget
├─ UIGQTabWidget + IUIGQWidgetBase
├─ QMenu
│ └─ UIGQMenu + IUIGQWidgetBase
├─ QMenuBar
│ └─ UIGQMenuBar + IUIGQWidgetBase
├─ UIGQRibbonBar + IUIGQWidgetBase
│ ├─ UIGQRibbonArea
│ ├─ UIGQRibbonPage
│ ├─ UIGQRibbonGroup
│ └─ UIGQRibbonPanel
├─ QPushButton
│ └─ UIGQPushButton + IUIGQWidgetBase
│ └─ UIGQRibbonPushButton
└─ QScrollBar
└─ UIGQScrollBar + IUIGQWidgetBase
Notes
Navigation controls should have clear selected, hover, and disabled states. Keep destructive actions visually separate from navigation.
Common APIs
| Method | Description | Parameters | Return |
|---|---|---|---|
addTab(const QString& itemName, const QString& icon, const QString& iconSelected) |
Adds a navigation tab item. | itemName: tab text; icon: normal icon; iconSelected: selected icon. |
void |
setSelectedIndex(int selectedIdx) |
Sets the selected tab index. | selectedIdx: target tab index. |
void |
getSelectedIndex() |
Reads the selected tab index. | None. | int |
setIsHor(bool isHorizontal) |
Sets horizontal or vertical tab layout. | isHorizontal: true for horizontal, false for vertical. |
void |
setShowText(bool show) |
Shows or hides tab text. | show: whether text is visible. |
void |
setShowIcon(bool show) |
Shows or hides tab icons. | show: whether icons are visible. |
void |
currentChanged(int index) |
Signal emitted when the selected tab changes. | index: selected tab index. |
void |