# coding: gb2312 from PyQt5.QtWidgets import * from BaseFrontend.based_widget import BasedWidget class BandPageWidgetDefine(BasedWidget): def __init__(self): super().__init__() # 定义控件(按Ctrl+点击快速跳转编辑) """**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区""" # 关闭所有手环电源按钮 self.close_all_band_button = self._init_close_all_band_button_widget() # 关闭指定手环警报按钮 self.stop_band_alarm_button = self._init_stop_band_alarm_button_widget() # 关闭所有手环警报按钮 self.stop_all_band_alarm_button = self._init_stop_all_band_alarm_button_widget() # 初始化空白控件 @staticmethod def init_empty_widget(): empty_widget = QFrame() # empty_widget.setStyleSheet("border: 1px solid red") return empty_widget @staticmethod def _init_close_all_band_button_widget(): close_all_band_button = QPushButton("关闭所有手环电源") close_all_band_button.setStyleSheet( "font: 600 60px \"Microsoft YaHei UI\";" "color: #ffffff;" "letter-spacing: 6px;" "border-radius: 4px;" "border: none;" "height: 140%;" "margin-left: 250px;" "margin-right: 100px;" "background-color: #34b1f7;" ) return close_all_band_button @staticmethod def _init_stop_band_alarm_button_widget(): stop_band_alarm_button = QPushButton("关闭指定手环警报") stop_band_alarm_button.setStyleSheet( "font: 600 60px \"Microsoft YaHei UI\";" "color: #ffffff;" "letter-spacing: 6px;" "border-radius: 4px;" "border: none;" "height: 140%;" "margin-left: 250px;" "margin-right: 100px;" "background-color: #34b1f7;" ) return stop_band_alarm_button @staticmethod def _init_stop_all_band_alarm_button_widget(): stop_all_band_alarm_button = QPushButton("关闭所有手环警报") stop_all_band_alarm_button.setStyleSheet( "font: 600 60px \"Microsoft YaHei UI\";" "color: #ffffff;" "letter-spacing: 6px;" "border-radius: 4px;" "border: none;" "height: 140%;" "margin-left: 250px;" "margin-right: 100px;" "background-color: #34b1f7;" ) return stop_all_band_alarm_button