MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / MapSettingToCheckBox

Method MapSettingToCheckBox

src/dialogs/PreferencesDialog.cpp:159–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157
158template<typename Func1, typename Func2, typename Func3>
159void PreferencesDialog::MapSettingToCheckBox(QCheckBox *checkBox, Func1 getter, Func2 setter, Func3 notifier) const
160{
161 // Get the value and set the checkbox state
162 checkBox->setChecked(std::bind(getter, settings)());
163
164 // Set up two way connection
165 connect(settings, notifier, checkBox, &QCheckBox::setChecked);
166 connect(checkBox, &QCheckBox::toggled, settings, setter);
167}
168
169template<typename Func1, typename Func2, typename Func3>
170void PreferencesDialog::MapSettingToGroupBox(QGroupBox *groupBox, Func1 getter, Func2 setter, Func3 notifier) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected