MCPcopy Create free account
hub / github.com/alpha-liu-01/SpeedyNote / ThreeStateButton

Method ThreeStateButton

source/ui/ToolbarButtons.cpp:133–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131// ============================================================================
132
133ThreeStateButton::ThreeStateButton(QWidget *parent)
134 : ToolbarButton(parent)
135{
136 // Not using Qt's checkable - we manage state ourselves
137 setCheckable(false);
138
139 // Set object name for QSS styling
140 setObjectName("ThreeStateButton");
141
142 // Handle click signal to cycle states
143 // (mousePressEvent is not called by QPushButton::click())
144 connect(this, &QPushButton::clicked, this, [this]() {
145 setState((m_state + 1) % 3);
146 });
147}
148
149void ThreeStateButton::setState(int state)
150{

Callers

nothing calls this directly

Calls 1

connectFunction · 0.85

Tested by

no test coverage detected