Index: sources/view/settings/VSettings.cpp =================================================================== diff -u -r8457901952a1d732c4688da471ae98e1d4f3024f -r0dfba44fb7172b9458d161b3ed5f54527f93b698 --- sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision 8457901952a1d732c4688da471ae98e1d4f3024f) +++ sources/view/settings/VSettings.cpp (.../VSettings.cpp) (revision 0dfba44fb7172b9458d161b3ed5f54527f93b698) @@ -37,11 +37,13 @@ { 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, integratedBPCuff ); + PROPERTY_POST_CONNECTION(VSettings, heparinSyringePump ); + PROPERTY_POST_CONNECTION(VSettings, chemicalDisinfection); PROPERTY_POST_CONNECTION(VSettings, advancedMode); - init = true; } @@ -63,12 +65,35 @@ void VSettings::advancedMode_post(const bool &vadvancedMode_post) { //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. + advancedMode(false); if ( Storage::Settings::save(advancedModeGroup(), advancedModeKey(), QString::number(vadvancedMode_post)) != 0 ) { advancedMode(false); + } +} +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::chemicalDisinfection_post(const bool &vchemicalDisinfection_post) { + //TODO The Settings shall be the Singleton SettingsController and modify the MSettings like the others. + if ( Storage::Settings::save(chemicalDisinfectionGroup(), chemicalDisinfectionKey(), QString::number(vchemicalDisinfection_post)) != 0 ) { + chemicalDisinfection(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)); @@ -126,6 +151,24 @@ keyValue[key] = mAdvancedMode ; advancedMode ( mAdvancedMode ); } + 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 ( ischemicalDisinfection (category, group, key) ) { + bool mChemicalDisinfection; + mChemicalDisinfection = _Settings.value(category, group, key).toBool (); + keyValue[key] = mChemicalDisinfection ; + chemicalDisinfection ( mChemicalDisinfection ); + } else if ( isalarmVolume (category, group, key) ) { quint8 mAlarmVolume; mAlarmVolume = _Settings.value(category, group, key).toInt (); // returns 0 if fails, so no error checking needed.