MCPcopy Create free account
hub / github.com/KDE/labplot / positionChanged

Method positionChanged

src/frontend/widgets/BackgroundWidget.cpp:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void BackgroundWidget::positionChanged(int index) {
165 if (!m_background || !m_background->positionAvailable())
166 return;
167
168 const auto position{Background::Position(index)};
169 bool b = (position != Background::Position::No);
170 setEnabled(b); // call this to enable/disable the properties widget depending on the position value
171 ui.cbPosition->setEnabled(true); // and enable position only
172
173 CONDITIONAL_LOCK_RETURN;
174 for (auto* background : m_backgrounds)
175 background->setPosition(position);
176}
177
178void BackgroundWidget::typeChanged(int index) {
179 if (index == -1)

Callers

nothing calls this directly

Calls 3

PositionEnum · 0.50
setEnabledMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected