JSON配置添加是否影响图像参数属性:affect-img

This commit is contained in:
gb 2023-03-23 14:16:12 +08:00
parent cbdcb5434b
commit bbe1d7fce8
5 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -6497,6 +6497,7 @@ void* ChgjsonDlg::create_json(int item, std::vector<DEFH>* def_h, std::wstring*
jsn->set_value(L"category", hg_items_[item].advanced ? L"advanced" : L"base");
jsn->set_value(L"readonly", hg_items_[item].readonly);
jsn->set_value(L"affect-img", hg_items_[item].affect_img_param);
jsn->set_value(L"hwonly", hg_items_[item].deviceonly);
jsn->set_value(L"visible", hg_items_[item].visible);
jsn->set_value(L"field", field_name(hg_items_[item].field));
@ -6699,6 +6700,7 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
{
item->set_value(L"category", hg_items_[ind].advanced ? L"advanced" : L"base");
item->set_value(L"readonly", hg_items_[ind].readonly);
item->set_value(L"affect-img", hg_items_[ind].affect_img_param);
item->set_value(L"hwonly", hg_items_[ind].deviceonly);
item->set_value(L"field", field_name(hg_items_[ind].field));
item->set_value(L"pos", hg_items_[ind].position);
@ -6804,6 +6806,8 @@ void ChgjsonDlg::add_item(void* jsn_root, void* jsn_obj, HTREEITEM parent, bool
item.advanced = true;
if (!jsn->get_value(L"readonly", item.readonly))
item.readonly = false;
if (!jsn->get_value(L"affect-img", item.affect_img_param))
item.affect_img_param = false;
if (!jsn->get_value(L"hwonly", item.deviceonly))
item.deviceonly = false;
if (!jsn->get_value(L"visible", item.visible))

View File

@ -65,6 +65,7 @@ public:
bool readonly;
bool deviceonly; // 只能在设备上操作的属性
bool visible;
bool affect_img_param;
int position;
int field;
int unit;
@ -83,7 +84,7 @@ public:
type = L"bool";
init_val = L"true";
bytes = 4;
advanced = readonly = deviceonly = false;
advanced = readonly = deviceonly = affect_img_param = false;
visible = depend_or = true;
position = field = unit = 0;
range.type = RANGE_TYPE_NONE;

Binary file not shown.

Binary file not shown.