FluxNewUI/Export/screens/ui_ScreenSingleBPM.c

203 lines
10 KiB
C
Raw Permalink Normal View History

2025-11-28 23:28:03 +08:00
// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.4
// LVGL version: 8.3.11
// Project name: SquareLine_Project
#include "../ui.h"
lv_obj_t * ui_ScreenSingleBPM = NULL;
lv_obj_t * ui_ButtonUseInstr2 = NULL;
lv_obj_t * ui_Label6 = NULL;
lv_obj_t * ui_ButtonStartSingleTest = NULL;
lv_obj_t * ui_LabelOnbuttonSingle = NULL;
lv_obj_t * ui_BarSingle = NULL;
lv_obj_t * ui_DropdownBPMSingle = NULL;
lv_obj_t * ui_Label10 = NULL;
lv_obj_t * ui_Label11 = NULL;
lv_obj_t * ui_DropdownTimesSingle = NULL;
lv_obj_t * ui_Label12 = NULL;
lv_obj_t * ui_Label13 = NULL;
lv_obj_t * ui_LabelResultSingle = NULL;
// event funtions
void ui_event_ButtonUseInstr2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_ScreenMain, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 300, 0, &ui_ScreenMain_screen_init);
}
}
void ui_event_ButtonStartSingleTest(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
event_single_start(e);
}
}
// build funtions
void ui_ScreenSingleBPM_screen_init(void)
{
ui_ScreenSingleBPM = lv_obj_create(NULL);
lv_obj_clear_flag(ui_ScreenSingleBPM, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_ScreenSingleBPM, lv_color_hex(0xB3D5F7), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_ScreenSingleBPM, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_ButtonUseInstr2 = lv_btn_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_ButtonUseInstr2, 248);
lv_obj_set_height(ui_ButtonUseInstr2, 50);
lv_obj_set_x(ui_ButtonUseInstr2, 0);
lv_obj_set_y(ui_ButtonUseInstr2, 188);
lv_obj_set_align(ui_ButtonUseInstr2, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_ButtonUseInstr2, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_ButtonUseInstr2, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_ButtonUseInstr2, lv_color_hex(0x398EDA), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_ButtonUseInstr2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui_ButtonUseInstr2, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_ButtonUseInstr2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_ButtonUseInstr2, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label6 = lv_label_create(ui_ButtonUseInstr2);
lv_obj_set_width(ui_Label6, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label6, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_Label6, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label6, "回主页");
lv_obj_set_style_text_color(ui_Label6, lv_color_hex(0xFCF8F8), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label6, &ui_font_Mi25Medium, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_ButtonStartSingleTest = lv_btn_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_ButtonStartSingleTest, 248);
lv_obj_set_height(ui_ButtonStartSingleTest, 50);
lv_obj_set_x(ui_ButtonStartSingleTest, 0);
lv_obj_set_y(ui_ButtonStartSingleTest, 129);
lv_obj_set_align(ui_ButtonStartSingleTest, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_ButtonStartSingleTest, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_clear_flag(ui_ButtonStartSingleTest, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_bg_color(ui_ButtonStartSingleTest, lv_color_hex(0x398EDA), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_ButtonStartSingleTest, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_color(ui_ButtonStartSingleTest, lv_color_hex(0x808080), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_ButtonStartSingleTest, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_ButtonStartSingleTest, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_LabelOnbuttonSingle = lv_label_create(ui_ButtonStartSingleTest);
lv_obj_set_width(ui_LabelOnbuttonSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_LabelOnbuttonSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_LabelOnbuttonSingle, LV_ALIGN_CENTER);
lv_label_set_text(ui_LabelOnbuttonSingle, "开始测试");
lv_obj_set_style_text_color(ui_LabelOnbuttonSingle, lv_color_hex(0xFCF8F8), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_LabelOnbuttonSingle, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelOnbuttonSingle, &ui_font_Mi25Medium, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_BarSingle = lv_bar_create(ui_ScreenSingleBPM);
lv_bar_set_value(ui_BarSingle, 25, LV_ANIM_OFF);
lv_bar_set_start_value(ui_BarSingle, 0, LV_ANIM_OFF);
lv_obj_set_width(ui_BarSingle, 186);
lv_obj_set_height(ui_BarSingle, 20);
lv_obj_set_x(ui_BarSingle, 50);
lv_obj_set_y(ui_BarSingle, -86);
lv_obj_set_align(ui_BarSingle, LV_ALIGN_CENTER);
ui_DropdownBPMSingle = lv_dropdown_create(ui_ScreenSingleBPM);
lv_dropdown_set_options(ui_DropdownBPMSingle, "15BPM\n20BPM\n25BPM\n30BPM\n35BPM\n40BPM");
lv_obj_set_width(ui_DropdownBPMSingle, 194);
lv_obj_set_height(ui_DropdownBPMSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_DropdownBPMSingle, 49);
lv_obj_set_y(ui_DropdownBPMSingle, -199);
lv_obj_set_align(ui_DropdownBPMSingle, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_DropdownBPMSingle, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_set_style_text_font(ui_DropdownBPMSingle, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label10 = lv_label_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_Label10, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label10, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label10, -100);
lv_obj_set_y(ui_Label10, -197);
lv_obj_set_align(ui_Label10, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label10, "测试频率");
lv_obj_set_style_text_color(ui_Label10, lv_color_hex(0x050000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label10, &ui_font_Mi22Normal, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label11 = lv_label_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_Label11, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label11, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label11, -98);
lv_obj_set_y(ui_Label11, -140);
lv_obj_set_align(ui_Label11, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label11, "出气次数");
lv_obj_set_style_text_color(ui_Label11, lv_color_hex(0x050000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label11, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label11, &ui_font_Mi22Normal, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_DropdownTimesSingle = lv_dropdown_create(ui_ScreenSingleBPM);
lv_dropdown_set_options(ui_DropdownTimesSingle, "10Times\n20Times\n30Times");
lv_obj_set_width(ui_DropdownTimesSingle, 194);
lv_obj_set_height(ui_DropdownTimesSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_DropdownTimesSingle, 49);
lv_obj_set_y(ui_DropdownTimesSingle, -142);
lv_obj_set_align(ui_DropdownTimesSingle, LV_ALIGN_CENTER);
lv_obj_add_flag(ui_DropdownTimesSingle, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags
lv_obj_set_style_text_font(ui_DropdownTimesSingle, &lv_font_montserrat_22, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label12 = lv_label_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_Label12, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label12, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label12, -107);
lv_obj_set_y(ui_Label12, -86);
lv_obj_set_align(ui_Label12, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label12, "进度条");
lv_obj_set_style_text_color(ui_Label12, lv_color_hex(0x050000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label12, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label12, &ui_font_Mi22Normal, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_Label13 = lv_label_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_Label13, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_Label13, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_Label13, -81);
lv_obj_set_y(ui_Label13, -38);
lv_obj_set_align(ui_Label13, LV_ALIGN_CENTER);
lv_label_set_text(ui_Label13, "体积流量ml:");
lv_obj_set_style_text_color(ui_Label13, lv_color_hex(0x050000), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_Label13, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_Label13, &ui_font_Mi22Normal, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_LabelResultSingle = lv_label_create(ui_ScreenSingleBPM);
lv_obj_set_width(ui_LabelResultSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_LabelResultSingle, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_LabelResultSingle, 0);
lv_obj_set_y(ui_LabelResultSingle, 39);
lv_obj_set_align(ui_LabelResultSingle, LV_ALIGN_CENTER);
lv_label_set_text(ui_LabelResultSingle, "0.0");
lv_obj_set_style_text_decor(ui_LabelResultSingle, LV_TEXT_DECOR_UNDERLINE, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelResultSingle, &lv_font_montserrat_48, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_event_cb(ui_ButtonUseInstr2, ui_event_ButtonUseInstr2, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_ButtonStartSingleTest, ui_event_ButtonStartSingleTest, LV_EVENT_ALL, NULL);
}
void ui_ScreenSingleBPM_screen_destroy(void)
{
if(ui_ScreenSingleBPM) lv_obj_del(ui_ScreenSingleBPM);
// NULL screen variables
ui_ScreenSingleBPM = NULL;
ui_ButtonUseInstr2 = NULL;
ui_Label6 = NULL;
ui_ButtonStartSingleTest = NULL;
ui_LabelOnbuttonSingle = NULL;
ui_BarSingle = NULL;
ui_DropdownBPMSingle = NULL;
ui_Label10 = NULL;
ui_Label11 = NULL;
ui_DropdownTimesSingle = NULL;
ui_Label12 = NULL;
ui_Label13 = NULL;
ui_LabelResultSingle = NULL;
}