|
@@ -243,6 +243,7 @@ public:
|
|
|
partSetting.twoColorDoorLightValid = root["two_color_door_light_valid"].asInt();
|
|
|
partSetting.qrUrl = root["qr_url"].asString();
|
|
|
partSetting.screenLight = root["screen_light"].asInt();
|
|
|
+ partSetting.roomCallBed = root["room_call_bed"].asInt();
|
|
|
|
|
|
StoragePreferences::putString(STORE_DAY_START, partSetting.dayStart);
|
|
|
StoragePreferences::putInt(STORE_DAY_LIGHT,partSetting.dayLight);
|
|
@@ -264,13 +265,40 @@ public:
|
|
|
StoragePreferences::putString(STORE_NURSING_COLOR_RGB, partSetting.nursingColorRgb);
|
|
|
StoragePreferences::putBool(STORE_AUDO_ANSWER, partSetting.autoAccept==1);
|
|
|
StoragePreferences::putInt(STORE_SCREEN_LIGHT, partSetting.screenLight);
|
|
|
+ StoragePreferences::putInt(STORE_ROOM_CALL_BED, partSetting.roomCallBed);
|
|
|
|
|
|
setRightTitle(root);
|
|
|
+ callBedButtonSetVisible();
|
|
|
|
|
|
dataInit = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ static void callBedButtonSetVisible() {
|
|
|
+ int roomCallBed = StoragePreferences::getInt(STORE_ROOM_CALL_BED, 1);
|
|
|
+ if (!roomCallBed) {
|
|
|
+ // 如果roomCallBed是0的话,那就隐藏
|
|
|
+ mCallBedButtonPtr->setVisible(roomCallBed);
|
|
|
+
|
|
|
+ mCallNurseButtonPtr->setPosition(LayoutPosition(869, 125, 140, 55));
|
|
|
+ mCallCencelButtonPtr->setPosition(LayoutPosition(869, 209, 140, 55));
|
|
|
+ mHelpButtonPtr->setPosition(LayoutPosition(869, 293, 140, 55));
|
|
|
+ mNursingButtonPtr->setPosition(LayoutPosition(869, 377, 140, 55));
|
|
|
+ mMoreButtonPtr->setPosition(LayoutPosition(869, 461, 140, 55));
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // 如果roomCallBed是1的话,那就显示
|
|
|
+ mCallBedButtonPtr->setVisible(roomCallBed);
|
|
|
+
|
|
|
+ mCallNurseButtonPtr->setPosition(LayoutPosition(869, 198, 140, 55));
|
|
|
+ mCallCencelButtonPtr->setPosition(LayoutPosition(869, 271, 140, 55));
|
|
|
+ mHelpButtonPtr->setPosition(LayoutPosition(869, 344, 140, 55));
|
|
|
+ mNursingButtonPtr->setPosition(LayoutPosition(869, 417, 140, 55));
|
|
|
+ mMoreButtonPtr->setPosition(LayoutPosition(869, 490, 140, 55));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 将医生和护士别称缓存起来
|
|
|
static void setRightTitle(Json::Value partSetting) {
|
|
|
rightTitleInfo["doctor_title"] = partSetting["doctor_title"].asString();
|