cf::ui::gallery::ThemeSwitch¶
Theme toggle switch widget. More...
#include <MaterialColorSchemeMainWindow.h>
Inherits from QWidget, QWidget
Public Signals¶
| Name | |
|---|---|
| void | themeChanged(bool isDark) |
| void | knobPositionChanged() |
| void | themeChanged(bool isDark) |
| void | knobPositionChanged() |
Public Functions¶
| Name | |
|---|---|
| ThemeSwitch(QWidget * parent =nullptr) | |
| bool | isDark() const |
| void | setDark(bool dark) |
| float | knobPosition() const |
| void | setKnobPosition(float pos) |
| ThemeSwitch(QWidget * parent =nullptr) | |
| bool | isDark() const |
| void | setDark(bool dark) |
| float | knobPosition() const |
| void | setKnobPosition(float pos) |
Protected Functions¶
| Name | |
|---|---|
| void | paintEvent(QPaintEvent * event) override |
| void | mousePressEvent(QMouseEvent * event) override |
| void | paintEvent(QPaintEvent * event) override |
| void | mousePressEvent(QMouseEvent * event) override |
Public Properties¶
| Name | |
|---|---|
| float | knobPosition |
Detailed Description¶
Theme toggle switch widget.
Theme toggle switch widget (header).
A mobile-style toggle switch for switching between light and dark themes.
Public Signals Documentation¶
signal themeChanged¶
signal knobPositionChanged¶
signal themeChanged¶
signal knobPositionChanged¶
Public Functions Documentation¶
function ThemeSwitch¶
function isDark¶
function setDark¶
function knobPosition¶
function setKnobPosition¶
function ThemeSwitch¶
function isDark¶
function setDark¶
function knobPosition¶
function setKnobPosition¶
Protected Functions Documentation¶
function paintEvent¶
function mousePressEvent¶
function paintEvent¶
function mousePressEvent¶
Public Property Documentation¶
property knobPosition¶
Updated on 2026-03-09 at 10:14:00 +0000