Files
Kivy_APP/kv/app.kv
2025-07-31 10:17:36 +08:00

1711 lines
62 KiB
Plaintext

ScreenManager: # 屏幕管理器,用于管理应用中所有的屏幕及其切换
MainScreen: # 主屏幕
name: 'main' # 屏幕名称,用于导航切换
HomeScreen: # 首页屏幕
name: 'home' # 首页,显示应用主要内容和功能入口
LoginScreen: # 登录屏幕
name: 'login' # 用户认证界面
ProfileScreen: # 个人资料屏幕
name: "profile" # 显示用户个人信息的界面
HistoryScreen: # 历史记录屏幕
name: 'history' # 显示用户操作历史
ModifyCurrentParamScreen: # 修改参数屏幕
name: 'modify_current_param' # 用于修改系统参数的界面
ModifyVoltageParamScreen: # 修改电压参数屏幕
name: 'modify_voltage_param' # 用于修改电压参数的界面
ModifyLeakageParamScreen: # 修改漏电参数屏幕
name: 'modify_leakage_param' # 用于修改漏电参数的
ModifySystemParamScreen: # 修改系统参数屏幕
name: 'modify_system_param' # 用于修改系统设置的界面
ModifyProtectionParamScreen: # 修改保护参数屏幕
name: 'modify_protection_param' # 用于修改保护参数的界面
RealTimeCurveScreen: # 实时曲线屏幕
name: 'real_time_curve' # 显示实时数据曲线的界面
ControlCommandScreen: # 控制命令屏幕
name: 'control_command' # 用于发送控制命令的界面
AboutScreen: # 关于屏幕
name: 'about' # 显示应用信息和开发者信息的界
<MainScreen>:
MDFloatLayout:
# Image:
# source: 'assets/logo.png'
# size_hint: None, 0.9
# width: dp(150)
# pos_hint: {'center_x': 0.1, 'center_y': 0.95}
Image:
source: 'assets/img.png'
size_hint: 1, 1
allow_stretch: True
keep_ratio: False
width: dp(360)
height: dp(720)
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
MDLabel:
text: "欢 迎 使 用!"
font_name: "BPoppins"
font_size: "23sp"
pos_hint: {'center_y': 0.53}
halign: "center"
# color: rgba(0, 0, 59, 255)
color: get_color_from_hex("#0c5edaff")
MDLabel:
text: "矿用上位机测试软件---Jfen"
font_name: "MPoppins"
font_size: "13sp"
size_hint_x: 0.85
pos_hint: {'center_x': 0.5,'center_y': 0.45}
halign: "center"
color: rgba(127, 127, 127, 255)
Button:
text: "进 入 使 用"
size_hint: None, None
font_name: "BPoppins"
width: dp(350)
height: dp(59)
pos_hint: {'center_x': 0.5, 'center_y': 0.23}
background_color: 0,0,0,0
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
root.manager.current = "login"
canvas.before:
Color:
rgb: rgba(52, 0, 231, 255)
RoundedRectangle:
size: self.size
pos: self.pos
radius: [5]
# Button:
# text: "注 册"
# size_hint: None, None
# font_name: "BPoppins"
# width: dp(350)
# height: dp(59)
# pos_hint: {'center_x': 0.5, 'center_y': 0.19}
# background_color: 0,0,0,0
# color: rgba(52, 0, 231, 255)
# on_touch_down: app.change_cursor(True)
# on_touch_up: app.change_cursor(False)
# on_release:
# root.manager.transition.direction = "left"
# root.manager.current = "signup"
# canvas.before:
# Color:
# rgb: rgba(52, 0, 231, 255)
# Line:
# width: 1.2
# rounded_rectangle: self.x, self.y, self.width, self.height, 5,5,5,5,100
<DrawerClickableItem@MDNavigationDrawerItem>
<HomeScreen>:
MDFloatLayout:
md_bg_color: 1, 1, 1, 1
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: "54dp"
pos_hint: {"top": 1}
MDTopAppBar:
title: "测试软件"
title_font_style: "H5"
halign: 'center'
elevation: 10
left_action_items: [["menu", lambda x: nav_drawer.set_state('toggle')]]
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
# app.book_history()
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.895}
MDList:
id : image_label_grid
padding: "20dp", "40dp", "12dp", "17dp"
spacing: "50dp"
MDCard:
size_hint: None, None
width: self.parent.width - dp(50) # Set the size of the box
height: "225dp"
pos_hint: {"center_x": 0.5, "center_y": 0.3} # Center the box
elevation: 5 # Add shadow (elevation)
padding: "20dp","5dp","5dp","10dp"
spacing: "10dp"
orientation: 'vertical'
MDLabel:
text: "测试程序"
font_name: "MPoppins"
font_size: "13sp"
size_hint_x: 1
pos_hint: {'center_x': 0.5,'center_y': 0.3}
color: rgba(127, 127, 127, 255)
MDRaisedButton:
text: "know more..."
size_hint: None, None
size: "100dp", "25dp"
pos_hint: {"center_x": 0.5}
on_release: root.manager.current= "home"
MDLabel:
text: "测试"
font_name: "BPoppins"
font_size: "24sp"
pos_hint: {'center_x': 0.45}
halign: 'center'
bold: True
color: rgba(0, 0, 0, 255)
MDCard:
size_hint: None, None
width: self.parent.width-dp(50) # Set the size of the box
height: "225dp"
pos_hint: {"center_x": 0.5, "center_y": 0.3} # Center the box
elevation: 5 # Add shadow (elevation)
padding: "20dp","10dp","5dp","10dp"
spacing: "10dp"
orientation: 'vertical'
MDTextField:
id: book_pos_name
text: "测试"
hint_text: "text"
font_name: "MPoppins"
font_size: "15sp"
helper_text_mode: "on_focus"
icon_right: "alphabetical"
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.475, "center_y": 0.8}
size_hint_x: None
width: 335
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: 0.5
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDRaisedButton:
text: "测试2"
size_hint: None, None
size: "150dp", "25dp"
pos_hint: {"center_x": 0.5}
on_release: app.where_is_book()
MDLabel:
id : book_pos
text: "测试3"
halign: 'center'
bold: True
font_name: "BPoppins"
font_size: "13sp"
size_hint_x: 1
color: rgba(127, 127, 127, 255)
Widget:
MDNavigationDrawer:
id: nav_drawer
size_hint: None, 1
width:Window.size[1]-425
radius: [0,0]
MDNavigationDrawerMenu:
MDNavigationDrawerHeader:
id : user
title: "欢迎使用"
text: "功能总览"
title_font_style: "H5" # 使用自定义标题字体
text_font_style: "Caption" # 使用自定义正文字体
text_color: "#6c7272"
text_font_size: '13sp'
title_color: "#00f0ff"
title_font_size: '25sp'
spacing: '4dp'
padding: "12dp", 0, 0, "5dp"
MDNavigationDrawerDivider:
MDNavigationDrawerLabel:
text: "Profile"
TwoLineIconListItem:
id : user
text: ""
secondary_text:"View profile"
divider:None
spacing: '4dp'
bold: True
padding: "1dp",0,0,"1dp"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "profile"
IconLeftWidget:
MDFloatingActionButton:
icon: "account"
size_hint: 1.5, 1.5
MDNavigationDrawerDivider:
# MDNavigationDrawerLabel:
# text: "菜单"
MDLabel:
text: "菜单"
font_style: "H6"
theme_text_color: "Custom"
text_color: "#000000ff"
size_hint_y: None
height: "40dp"
padding: "12dp", "12dp"
DrawerClickableItem:
icon: "home-outline"
text: "主页"
font_style: "H6"
theme_text_color: "Custom"
text_color: "#000000ff"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: "current-dc"
# right_text: '+99'
# text_right_color: "#4a4930"
text: "电流设置"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: 'meter-electric-outline'
text: "电压设置"
font_style: "H6"
theme_text_color: "Custom"
text_color: "#000000ff"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: 'resistor'
text: "漏电设置"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: 'shield-lock-outline'
text: "保护设置"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
app.clear_text()
root.manager.current = "home"
DrawerClickableItem:
icon: 'cog-outline'
text: "系统设置"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: 'alert-circle-outline'
right_text: '+99'
text_right_color: "#4a4930"
text: "故障记录"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
MDNavigationDrawerDivider:
MDLabel:
text: "功能"
font_style: "H6"
theme_text_color: "Custom"
text_color: "#000000ff"
size_hint_y: None
height: "40dp"
padding: "12dp", "12dp"
DrawerClickableItem:
icon: 'chart-bell-curve-cumulative'
text: "实时曲线"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
# nav_drawer.set_state('close')
root.manager.current = "history"
DrawerClickableItem:
icon: 'tools'
text: "控制命令"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "profile_edit"
MDNavigationDrawerDivider:
MDNavigationDrawerLabel:
text: "Help"
DrawerClickableItem:
icon: 'information-outline'
text: "预留"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
DrawerClickableItem:
icon: 'message-alert-outline'
text: "预留"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "left"
nav_drawer.set_state('close')
root.manager.current = "home"
MDNavigationDrawerDivider:
DrawerClickableItem:
icon: 'logout'
text: "退出"
font_style: "H6"
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "down"
nav_drawer.set_state('close')
root.manager.current = "main"
app.clear_text()
<LoginScreen>:
Image:
source: "assets/bg_img.jpg" # Path to your gradient
size: self.size
allow_stretch: True
keep_ratio: False
MDFloatLayout:
mg_bd_color: 1,1,1,1
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
user_font_size: "30sp"
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "main"
app.on_press_back_arrow()
MDLabel:
text: "欢迎使用等待认证中..."
font_name: "BPoppins"
font_size: "26sp"
size_hint_x: None
width: dp(350)
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(0, 0, 59, 255)
MDLabel:
id : wifi_status_text
text: app.wifi_status_text
font_name: "MPoppins"
size_hint_x: None
width: dp(350)
font_size: "18sp"
pos_hint: {'center_x': 0.5,'center_y': 0.70}
color: rgba(135, 133, 193, 255)
Button:
text: "wifi认证登录"
font_name: "BPoppins"
size_hint: None, None
width: dp(300)
height: dp(59)
pos_hint: {'center_x': 0.5, 'center_y': 0.37}
background_color: 0,0,0,0
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "up"
app.on_start()
app.verify(False)
canvas.before:
Color:
rgb: rgba(52, 0, 231, 255)
RoundedRectangle:
size: self.size
pos: self.pos
radius: [5]
<ProfileScreen>:
MDFloatLayout:
md_bg_color: 1,1,1,1
spacing: '5dp'
BoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: "My Profile"
font_style: 'H5'
specific_text_color: [0, 0, 0, 1]
halign: 'center'
elevation: 0
md_bg_color: [1,1,1,1]
spacing: "2dp"
MDLabel:
id: profile_user_name
text: ""
halign: 'center'
Widget:
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
user_font_size: "30sp"
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = 'right'
root.manager.current = "home"
app.on_press_back_arrow()
AnchorLayout:
anchor_y: 'top'
BoxLayout:
orientation: 'vertical'
padding: "12dp", "12dp", "12dp", "12dp"
spacing: "0dp"
Widget: # Add a spacer to push the MDLabel down a bit
size_hint_y: None
height: "70dp"
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
height: '30dp'
MDLabel:
text: "Your Details"
font_name: "BPoppins"
font_size: "14sp"
color: [0,0,0,1]
size_hint_y: None
height: self.texture_size[1]+50
padding: "15dp"
pos_hint: {'center_y': 0.85}
MDFloatingActionButton:
icon: 'account-edit'
padding: "12dp"
pos_hint: {'center_y': 0.85, 'center_x': 0.9}
size_hint: 0.2,1
on_release:
root.manager.current = 'profile_edit'
ScrollView:
MDList:
spacing: "0dp"
OneLineIconListItem:
text: profile_user_name.text
IconLeftWidget:
icon: "account-outline"
OneLineIconListItem:
id : profile_user_pass
text: ""
IconLeftWidget:
icon: "email-outline"
OneLineIconListItem:
id : profile_modbus_ip
text: ""
IconLeftWidget:
icon: "dialpad"
OneLineIconListItem:
id : profile_wifi_ssid
text: ""
IconLeftWidget:
icon: "phone-outline"
MDLabel:
text: "Other Details"
font_name: "BPoppins"
font_size: "14sp"
size_hint_y: None
height: self.texture_size[1]
padding: "12dp"
pos_hint: {'center_y': 0.9}
ScrollView:
MDList:
spacing: "0dp"
OneLineAvatarListItem:
id : profile_branch
text: ""
ImageLeftWidget:
source:'assets/branch.png'
size_hint: 2, .68
pos: self.pos
OneLineAvatarListItem:
id : profile_semester
text: ""
ImageLeftWidget:
source:'assets/semister.png'
size_hint: 2, .68
pos: self.pos
<HistoryScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press: root.manager.current = 'real_time_curve'
# app.book_history()
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "测试历史"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "故障历史"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ProfileEditScreen>:
MDFloatLayout:
md_bg_color: 1,1,1,1
spacing: '5dp'
BoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Edit your Details"
font_style: 'H5'
specific_text_color: [0, 0, 0, 1]
halign: 'center'
elevation: 0
md_bg_color: [1,1,1,1]
spacing: "2dp"
Widget:
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'borrow_book'
MDActionBottomAppBarButton:
icon: "thumb-up-outline"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'recommend'
MDActionBottomAppBarButton:
icon: "history"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'history'
# app.book_history()
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
user_font_size: "30sp"
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "profile"
app.on_press_back_arrow()
app.secure_profile()
MDLabel:
text: "User"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.90}
size_hint_x: None
width: dp(335)
MDLabel:
text: "User_pass"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.78}
size_hint_x: None
width: dp(335)
MDLabel:
text: "Wifi_SSID"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.66}
size_hint_x: None
width: dp(335)
MDLabel:
text: "Modbus_IP"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.54}
size_hint_x: None
width: dp(335)
MDLabel:
text: "Modbus_Port"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.42}
size_hint_x: None
width: dp(335)
MDLabel:
text: "Reserve"
color: rgba(0, 0, 0, 255)
font_name: "BPoppins"
font_size: '15sp'
pos_hint: {'center_x': 0.5, 'center_y': 0.30}
size_hint_x: None
width: dp(335)
MDTextField:
id: edit_name
text: ""
hint_text: "Enter Name*"
font_name: "MPoppins"
font_size: "15sp"
helper_text: "Provide your fullname"
helper_text_mode: "on_focus"
icon_right: "alphabetical"
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.8425}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField:
id: edit_prn
text: ""
hint_text: "Provide your PRN*"
font_name: "MPoppins"
font_size: "15sp"
helper_text: "unable to change prn directly"
helper_text_mode: "on_focus"
readonly: True
icon_right: "dialpad"
input_filter: 'int'
max_text_length: 8
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.7225}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField:
id: edit_email
text: ""
hint_text: "Provide Email-id*"
font_name: "MPoppins"
font_size: "15sp"
readonly: True
helper_text: "unable to change email directly"
helper_text_mode: "on_focus"
icon_right: "email-arrow-left"
min_text_length: 11
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.6025}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: 0.5
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField:
id:edit_no
text: ""
hint_text: "Enter WhatsApp Number*"
font_name: "MPoppins"
font_size: "15sp"
readonly: True
helper_text: "unable to change number directly"
helper_text_mode: "on_focus"
icon_right: "whatsapp"
icon_color: app.theme_cls.primary_color
input_filter: 'int'
max_text_length: 10
pos_hint: {"center_x": 0.5, "center_y": 0.4825}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField:
id: edit_branch
text: ""
hint_text: "Branch*"
font_name: "MPoppins"
font_size: "15sp"
helper_text: "Provide your Branch"
helper_text_mode: "on_focus"
icon_right: "source-branch"
min_text_length: 11
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.3625}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: 0.5
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
MDTextField:
id: edit_sem
text: ""
hint_text: "Semester*"
font_name: "MPoppins"
font_size: "15sp"
helper_text: "Provide your semester like I,II,III only*"
helper_text_mode: "on_focus"
icon_right: "roman-numeral-2"
min_text_length: 11
icon_color: app.theme_cls.primary_color
pos_hint: {"center_x": 0.5, "center_y": 0.2425}
size_hint_x: None
width: dp(335)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
canvas.before:
Color:
rgb: rgba(127, 127, 127, 255)
Line:
width: dp(0.5)
rounded_rectangle: self.x-5, self.y+20, self.width+10, self.height-25, 10,10,10,10,100
Button:
text: "Save Profile & Continue"
font_name: "BPoppins"
size_hint: 0.66, 0.065
pos_hint: {'center_x': 0.5, 'center_y': 0.17}
background_color: 0,0,0,0
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction = "up"
app.edit_profile()
app.secure_profile()
canvas.before:
Color:
rgb: rgba(52, 0, 231, 255)
RoundedRectangle:
size: self.size
pos: self.pos
radius: [25]
MDTextButton:
id : edit_private_credential_butn
text: "Do you want edit prn/email/No."
pos_hint: {'center_x': 0.5, 'center_y': 0.12}
color: rgba(68,78,132,255)
font_name: "BPoppins"
font_size: '13sp'
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= "down"
app.send_otp(edit_no.text)
app.otp_button_fun("1")
root.manager.current="otp"
<RealTimeCurveScreen>:
MDFloatLayout: # 使用浮动布局,可以自由控制子组件的位置
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center' # 水平居中锚点
anchor_y: 'center' # 垂直居中锚点
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: "54dp"
pos_hint: {"top": 1}
MDTopAppBar:
title: "实时曲线"
title_font_style: "H5"
halign: 'center'
elevation: 10
MDBottomAppBar: # 底部导航栏
height: "62dp"
elevation: 10 # 阴影高度
MDActionBottomAppBarButton: # 首页按钮
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton: # 控制按钮
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton: # 历史报警按钮
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton: # 实时曲线按钮
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton: # 返回按钮(箭头)
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True) # 按下时改变光标
on_touch_up: app.change_cursor(False) # 释放时恢复光标
on_release:
root.manager.transition.direction = 'right' # 页面切换方向
root.manager.current = "home" # 返回首页
app.on_press_back_arrow() # 执行返回操作
ScrollView: # 可滚动区域
id: real_time_scroll_view
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.895}
MDList:
id: real_time_md_list
padding: "20dp", "40dp", "12dp", "17dp"
spacing: "50dp"
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 0:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_0
comm_address: 0
unit: "倍数"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
MDLabel:
text: "倍数"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "right"
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 1:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_1
comm_address: 1
unit: "A"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 2:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_2
comm_address: 2
unit: "A"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 3:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_3
comm_address: 3
unit: "A"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 4:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_4
comm_address: 4
unit: "A"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 5:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_5
comm_address: 5
unit: "A"
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
BoxLayout:
orientation: 'horizontal'
spacing: dp(10)
size_hint_y: None
height: dp(60)
MDLabel:
text: "寄存器 6:"
font_name: "MPoppins"
font_size: "18sp"
color: (135/255, 133/255, 193/255, 1)
size_hint_x: 0.4
halign: "left"
MDTextField:
id: register_value_field_6
comm_address: 6
text: ""
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: 0.6
input_filter: "int"
on_text_validate: app.modify_register(self, self.text)
# CurveWidget:
# size_hint_y: None
# height: dp(300)
<ModifyCurrentParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "测试"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "测试"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ModifyVoltageParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "Reading Chronicle"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "Reflecting on Read and Returned"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ModifyLeakageParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "测试"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "测试"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ModifySystemParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "Reading Chronicle"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "Reflecting on Read and Returned"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ModifyProtectionParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "Reading Chronicle"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "Reflecting on Read and Returned"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ModifyLeakageParamScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()
MDLabel:
text: "Reading Chronicle"
font_name: "BPoppins"
font_size: "24sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.9}
color: rgba(0, 0, 59, 255)
MDLabel:
text: "Reflecting on Read and Returned"
font_name: "MPoppins"
font_size: "18sp"
size_hint_x: None
width: dp(400)
padding:"12dp"
pos_hint: {'center_x': 0.5,'center_y': 0.85}
color: rgba(135, 133, 193, 255)
ScrollView:
size_hint: 1, None
height: self.parent.height - dp(150)
pos_hint: {'top':0.81}
MDList:
id : history_grid
padding: "1dp", "50dp", "12dp", "30dp"
spacing: "50dp"
<ControlCommandScreen>:
MDFloatLayout:
orientation: 'vertical'
md_bd_color: 1,1,1,1
anchor_x: 'center'
anchor_y: 'center'
MDBottomAppBar:
height: "62dp"
elevation: 10
MDActionBottomAppBarButton:
icon: "home"
pos_hint:{'center_x':0.15, 'center_y': 0.5}
on_press: root.manager.current = 'home'
MDActionBottomAppBarButton:
icon: "tools"
pos_hint:{'center_x':0.38, 'center_y': 0.5}
on_press: root.manager.current = 'control_command'
MDActionBottomAppBarButton:
icon: "alert"
pos_hint:{'center_x':0.61, 'center_y': 0.5}
on_press: root.manager.current = 'history'
MDActionBottomAppBarButton:
icon: "chart-bell-curve-cumulative"
pos_hint:{'center_x':0.85, 'center_y': 0.5}
on_press:
root.manager.current = 'real_time_curve'
MDIconButton:
icon: "arrow-left"
pos_hint: {'center_y': 0.95}
theme_text_color: "Custom"
text_color: rgba(26,24,58,255)
size_hint_x: None
width: dp(500)
on_touch_down: app.change_cursor(True)
on_touch_up: app.change_cursor(False)
on_release:
root.manager.transition.direction= 'right'
root.manager.current= "home"
app.on_press_back_arrow()