Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rc43d24c50f4344348d36d8ae9273797f4557356a --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision c43d24c50f4344348d36d8ae9273797f4557356a) @@ -37,9 +37,12 @@ { static bool init = false; if ( init ) return; - PROPERTY_POST_CONNECTION(VSettings, servicePass ); - PROPERTY_POST_CONNECTION(VSettings, alarmVolume ); - PROPERTY_POST_CONNECTION(VSettings, roWaterMode ); + PROPERTY_POST_CONNECTION(VSettings, servicePass ); + PROPERTY_POST_CONNECTION(VSettings, alarmVolume ); + PROPERTY_POST_CONNECTION(VSettings, roWaterMode ); + PROPERTY_POST_CONNECTION(VSettings, userMode ); + PROPERTY_POST_CONNECTION(VSettings, integratedBPCuff ); + PROPERTY_POST_CONNECTION(VSettings, heparinSyringePump ); init = true; } @@ -60,6 +63,30 @@ } } +void VSettings::userMode_post(const bool &vuserMode_post) { + //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. + if ( Storage::Settings::save(userModeGroup(), userModeKey(), QString::number(vuserMode_post)) != 0 ) { + userMode(false); + // FIXME: Notify UI with a message + } +} + +void VSettings::integratedBPCuff_post(const bool &vintegratedBPCuff_post) { + //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. + if ( Storage::Settings::save(integratedBPCuffGroup(), integratedBPCuffKey(), QString::number(vintegratedBPCuff_post)) != 0 ) { + integratedBPCuff(false); + // FIXME: Notify UI with a message + } +} + +void VSettings::heparinSyringePump_post(const bool &vheparinSyringePump_post) { + //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. + if ( Storage::Settings::save(heparinSyringePumpGroup(), heparinSyringePumpKey(), QString::number(vheparinSyringePump_post)) != 0 ) { + heparinSyringePump(false); + // FIXME: Notify UI with a message + } +} + void VSettings::alarmVolume_post(const quint8 &valarmVolume) { //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. Storage::Settings::save(alarmVolumeGroup(), alarmVolumeKey(), QString::number(valarmVolume)); @@ -96,6 +123,24 @@ keyValue[key] = mRoWaterMode ; roWaterMode ( mRoWaterMode); } + else if ( isuserMode (category, group, key) ) { + bool mUserMode; + mUserMode = _Settings.value(category, group, key).toBool (); + keyValue[key] = mUserMode ; + userMode ( mUserMode); + } + else if ( isintegratedBPCuff (category, group, key) ) { + bool mIntegratedBPCuff; + mIntegratedBPCuff = _Settings.value(category, group, key).toBool (); + keyValue[key] = mIntegratedBPCuff ; + integratedBPCuff ( mIntegratedBPCuff ); + } + else if ( isheparinSyringePump (category, group, key) ) { + bool mHeparinSyringePump; + mHeparinSyringePump = _Settings.value(category, group, key).toBool (); + keyValue[key] = mHeparinSyringePump ; + heparinSyringePump ( mHeparinSyringePump ); + } else if ( isalarmVolume (category, group, key) ) { quint8 mAlarmVolume; mAlarmVolume = _Settings.value(category, group, key).toInt (); // returns 0 if fails, so no error checking needed.