步骤信息画面
This commit is contained in:
1 parent
a89359b423
commit
c424b4f626
15 files changed
+302
-74
No files matched your search
@@ -115,6 +115,7 @@ static void table_step_cb(lv_event_t *e)
|
||||
}
|
||||
//点击事件回调
|
||||
char value_W[32] = {0};
|
||||
int value_S=0;
|
||||
static void table_click_event_cb(lv_event_t *e) {
|
||||
lv_obj_t *table = lv_event_get_target(e);
|
||||
lv_indev_t *indev = lv_indev_get_act();
|
||||
@@ -182,7 +183,8 @@ static void table_click_event_cb(lv_event_t *e) {
|
||||
}
|
||||
else if(table == guider_ui.screen_pname_step_row){//工艺程序细节信息
|
||||
pname_step_row = row;// 写入行号
|
||||
if(value_W[0] == '\0') return;
|
||||
value_S = lv_table_get_cell_value(guider_ui.screen_pname_step_row, row, 0);
|
||||
UI_pname_step_inf(value_W,value_S);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -341,13 +341,50 @@ static void screen_sys_save_event_handler (lv_event_t *e)
|
||||
}
|
||||
}
|
||||
|
||||
static void screen_stepinf_event_handler (lv_event_t *e)
|
||||
static void screen_stepinf_s1_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf, LV_OBJ_FLAG_HIDDEN);
|
||||
//uint16_t id = lv_dropdown_get_selected(guider_ui.screen_stepinf_s1);
|
||||
lv_obj_clear_flag(guider_ui.screen_stepinf_s1b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s2b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s3b, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void screen_stepinf_s2_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
//uint16_t id = lv_dropdown_get_selected(guider_ui.screen_stepinf_s2);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s1b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_clear_flag(guider_ui.screen_stepinf_s2b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s3b, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void screen_stepinf_s3_event_handler (lv_event_t *e)
|
||||
{
|
||||
lv_event_code_t code = lv_event_get_code(e);
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
//uint16_t id = lv_dropdown_get_selected(guider_ui.screen_stepinf_s3);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s1b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf_s2b, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_clear_flag(guider_ui.screen_stepinf_s1b, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -361,6 +398,7 @@ static void screen_btn_1_event_handler (lv_event_t *e)
|
||||
switch (code) {
|
||||
case LV_EVENT_CLICKED:
|
||||
{
|
||||
lv_obj_add_flag(guider_ui.screen_stepinf, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -392,7 +430,9 @@ void events_init_screen (lv_ui *ui)
|
||||
lv_obj_add_event_cb(ui->screen_set_Delete, screen_set_Delete_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_set_Save, screen_set_Save_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_sys_save, screen_sys_save_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_stepinf, screen_stepinf_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_stepinf_s1, screen_stepinf_s1_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_stepinf_s2, screen_stepinf_s2_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_stepinf_s3, screen_stepinf_s3_event_handler, LV_EVENT_ALL, ui);
|
||||
lv_obj_add_event_cb(ui->screen_btn_1, screen_btn_1_event_handler, LV_EVENT_ALL, ui);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,6 +447,9 @@ typedef struct
|
||||
lv_obj_t *screen_sys_save;
|
||||
lv_obj_t *screen_sys_save_label;
|
||||
lv_obj_t *screen_stepinf;
|
||||
lv_obj_t *screen_stepinf_s1b;
|
||||
lv_obj_t *screen_stepinf_s2b;
|
||||
lv_obj_t *screen_stepinf_s3b;
|
||||
lv_obj_t *screen_stepinf_s1;
|
||||
lv_obj_t *screen_stepinf_s2;
|
||||
lv_obj_t *screen_stepinf_s3;
|
||||
|
||||
@@ -7335,6 +7335,84 @@ void setup_scr_screen(lv_ui *ui)
|
||||
lv_obj_set_style_pad_right(ui->screen_stepinf, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->screen_stepinf, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes screen_stepinf_s1b
|
||||
ui->screen_stepinf_s1b = lv_label_create(ui->screen_stepinf);
|
||||
lv_label_set_text(ui->screen_stepinf_s1b, "");
|
||||
lv_label_set_long_mode(ui->screen_stepinf_s1b, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->screen_stepinf_s1b, 0, 50);
|
||||
lv_obj_set_size(ui->screen_stepinf_s1b, 300, 55);
|
||||
lv_obj_add_flag(ui->screen_stepinf_s1b, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
//Write style for screen_stepinf_s1b, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->screen_stepinf_s1b, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->screen_stepinf_s1b, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->screen_stepinf_s1b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->screen_stepinf_s1b, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->screen_stepinf_s1b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->screen_stepinf_s1b, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->screen_stepinf_s1b, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->screen_stepinf_s1b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes screen_stepinf_s2b
|
||||
ui->screen_stepinf_s2b = lv_label_create(ui->screen_stepinf);
|
||||
lv_label_set_text(ui->screen_stepinf_s2b, "");
|
||||
lv_label_set_long_mode(ui->screen_stepinf_s2b, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->screen_stepinf_s2b, 0, 106);
|
||||
lv_obj_set_size(ui->screen_stepinf_s2b, 300, 55);
|
||||
lv_obj_add_flag(ui->screen_stepinf_s2b, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
//Write style for screen_stepinf_s2b, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->screen_stepinf_s2b, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->screen_stepinf_s2b, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->screen_stepinf_s2b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->screen_stepinf_s2b, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->screen_stepinf_s2b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->screen_stepinf_s2b, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->screen_stepinf_s2b, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->screen_stepinf_s2b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes screen_stepinf_s3b
|
||||
ui->screen_stepinf_s3b = lv_label_create(ui->screen_stepinf);
|
||||
lv_label_set_text(ui->screen_stepinf_s3b, "");
|
||||
lv_label_set_long_mode(ui->screen_stepinf_s3b, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->screen_stepinf_s3b, 0, 162);
|
||||
lv_obj_set_size(ui->screen_stepinf_s3b, 300, 55);
|
||||
lv_obj_add_flag(ui->screen_stepinf_s3b, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
//Write style for screen_stepinf_s3b, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
lv_obj_set_style_border_width(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_radius(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_color(ui->screen_stepinf_s3b, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_font(ui->screen_stepinf_s3b, &lv_font_simsun_16, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_opa(ui->screen_stepinf_s3b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_letter_space(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_line_space(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_text_align(ui->screen_stepinf_s3b, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_opa(ui->screen_stepinf_s3b, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_color(ui->screen_stepinf_s3b, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_bg_grad_dir(ui->screen_stepinf_s3b, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_top(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_right(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_bottom(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_pad_left(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
lv_obj_set_style_shadow_width(ui->screen_stepinf_s3b, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||
|
||||
//Write codes screen_stepinf_s1
|
||||
ui->screen_stepinf_s1 = lv_dropdown_create(ui->screen_stepinf);
|
||||
lv_dropdown_set_options(ui->screen_stepinf_s1, "温度控制001\n水位进水007\n流量进水008\n水位水洗013\n溢流水洗015\n排水020\n主泵排水022\n运转031\n入布035\n出布036\n呼叫操作员039\n取样040\n程序结束041\n等待049\n加压050\n减压051\n泵风机速度054\n泵启动055\n泵停止056\n备药064\n加药065\n呼叫输送066\n呼叫准备067\n快速加酸090\nph检测093\nph控制094\n");
|
||||
@@ -7468,7 +7546,7 @@ void setup_scr_screen(lv_ui *ui)
|
||||
//Write codes screen_stepinf_s3
|
||||
ui->screen_stepinf_s3 = lv_dropdown_create(ui->screen_stepinf);
|
||||
lv_dropdown_set_options(ui->screen_stepinf_s3, "降温水洗017\n加压050\n减压051\n备药064\n呼叫输送066\n快速加酸090\nph温度控制091\nph检测093\nph控制094\n");
|
||||
lv_obj_set_pos(ui->screen_stepinf_s3, 105, 173);
|
||||
lv_obj_set_pos(ui->screen_stepinf_s3, 105, 167);
|
||||
lv_obj_set_size(ui->screen_stepinf_s3, 180, 45);
|
||||
|
||||
//Write style for screen_stepinf_s3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
@@ -7954,7 +8032,7 @@ void setup_scr_screen(lv_ui *ui)
|
||||
ui->screen_label_49 = lv_label_create(ui->screen_stepinf);
|
||||
lv_label_set_text(ui->screen_label_49, "副功能2");
|
||||
lv_label_set_long_mode(ui->screen_label_49, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_pos(ui->screen_label_49, 10, 183);
|
||||
lv_obj_set_pos(ui->screen_label_49, 10, 178);
|
||||
lv_obj_set_size(ui->screen_label_49, 90, 25);
|
||||
|
||||
//Write style for screen_label_49, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||
|
||||
Reference in new issue
Block a user