void Group::notify(std::string modeId) { if (m_modes[modeId]->active()) { for (const auto& m : m_modes) { if (m.first != modeId) m.second->setActive(false); } } if (m_onChange) m_onChange(modeId, m_modes[modeId]->active()); }
/*! * Retrieve value from it's string representation. * * @param str string to retrieve value from. */ virtual void retrieve(const std::string & str) { T old = data; data = Translator::fromStr(str); if (m_onChange) m_onChange(old, data); }