from func.utils.ConfigParams import Params


class Constants:

    # 公共
    TIPS_TYPE_INFO: str = "Info"
    TIPS_TYPE_WARNING: str = "Warning"
    TIPS_TYPE_ERROR: str = "Error"
    MSGBOX_TYPE_INFO: str = "Info"
    MSGBOX_TYPE_WARNING: str = "Warning"
    MSGBOX_TYPE_ERROR: str = "Error"
    MSGBOX_TYPE_QUESTION: str = "Question"

    MAINWINDOW_ROOT_PATH_NOT_EXIST: str = "根目录路径输入错误"
    MAINWINDOW_SAMPID_EMPTY: str = "样本ID为空"
    MAINWINDOW_MSGBOX_TITLE: str = "消息"
    MAINWINDOW_GET_DARKMODE_FAILURE: str = "获取深浅色状态失败，不影响标注工作，可忽略"
    MAINWINDOW_DARKMODE_FAILURE: str = "切换深浅色模式失败，不影响标注工作，可忽略"

    INPUTTING_DATA: str = "正在导入数据"
    INPUT_FINISHED: str = "导入完成"
    INPUT_FAILURE: str = "导入失败"

    PREPROCESSING_DATA: str = "正在预处理数据"
    PREPROCESS_FINISHED: str = "预处理完成"
    PREPROCESS_FAILURE: str = "预处理失败"
    PREPROCESS_NO_NEED: str = "不需要预处理"

    RESAMPLING_DATA: str = "正在数据重采样"
    RESAMPLE_FINISHED: str = "重采样完成"
    RESAMPLE_FAILURE: str = "重采样失败"
    RESAMPLE_NO_NEED: str = "无需进行重采样"

    LOADING_ARCHIVE: str = "正在获取历史存档"
    ARCHIVE_EXIST: str = "找到历史存档，成功读取"
    ARCHIVE_NOT_EXIST: str = "未找到历史存档，创建新存档"
    ARCHIVE_EMPTY: str = "历史存档为空，创建新存档"

    DRAWING_DATA: str = "正在绘制图形"
    DRAW_FINISHED: str = "绘制完成"
    DRAW_FAILURE: str = "绘制失败"

    UPDATING_TABLEWIDGET_AND_INFO: str = "正在更新表格和信息"
    UPDATING_TABLEWIDGET: str = "正在更新表格"
    UPDATING_INFO: str = "正在更新信息"
    UPDATE_FINISHED: str = "更新完成"
    UPDATE_FAILURE: str = "更新失败"

    SAVING_DATA: str = "正在保存数据"
    SAVE_FINISHED: str = "保存完成"
    SAVE_FAILURE: str = "保存失败"

    CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE: str = "经粗对齐计算BCG({},{})对应的ECG约区间为({},{})"

    OPERATION_FINISHED: str = "操作完成"
    OPERATION_FAILURE: str = "操作失败"
    OPERATION_CANCELED: str = "操作取消"

    UNKNOWN_ERROR: str = "未知错误"
    SHUTTING_DOWN: str = "正在释放内存资源"

    QUESTION_TITLE: str = "警告：确认操作"
    QUESTION_CONTENT: str = "你确定要保存结果到"
    PLOT_UPPER_RIGHT: str = "upper right"
    STRING_IS_EMPTY: str = ""
    STRING_IS_NAN: str = "nan"

    PLOT_COLOR_RED: str = "r"
    PLOT_COLOR_GREEN: str = "g"
    PLOT_COLOR_BLUE: str = "b"
    PLOT_COLOR_ORANGE: str = "orange"
    PLOT_COLOR_WHITE: str = "white"
    PLOT_COLOR_BLACK: str = "black"
    PLOT_COLOR_PINK: str = "#ff00ff"
    PLOT_COLOR_PURPLE: str = "m"
    PLOT_COLOR_GRAY: str = "gray"

    PROGRESSBAR_STYLE: str = """
            QProgressBar {
                border: 1px solid #020066;
                border-radius: 6px;
                font-size: 16px;
                color: black;
                text-align: center;
                height: 20px;
                background: rgba(245, 245, 220, 128);
            }
            QProgressBar::chunk {
                background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #9AFF99, stop:1 #9A9AFE);
                border-radius: 6px;
            }
        """

    LABELBTN_STYLE_NORMAL: str = """
                QPushButton:hover {
                    background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
                }"""

    CHECKBOX_STYLE_NORMAL: str = '''
        QCheckBox {
            border: 2px solid rgb(128, 128, 128);
            border-radius: 11px;
        }
        QCheckBox::indicator{
            width: 20px;
            height: 20px;
            border-radius: 10px;
           }
           
        QCheckBox::indicator:checked {
            background-color: rgba(0, 255, 0, 192);
            image: url(./image/correct.svg);
        }
        
        QCheckBox::indicator:unchecked {
            background-color: rgba(255, 0, 0, 128);
        }
        
        QCheckBox::indicator:disabled {
            background-color: rgba(119, 136, 153, 128);
        }'''

    FAILURE_REASON: dict = {
        "Path_Not_Exist": "（路径不存在）",
        "File_Not_Exist": "（数据文件不存在）",
        "File_More_Than_One": "（数据文件超过一个）",
        "Data_Frequency_Not_In_Filename": "（无法找到文件名中的数据频率信息）",
        "Suffix_Not_Correct": "（文件扩展名不正确）",
        "Frequency_Not_In_Filename": "（数据频率不在文件名中）",
        "Data_Not_Exist": "（数据不存在）",
        "Model_Path_Not_Exist": "（模型文件不存在）",
        "Cut_Data_Length_not_Correct": "（切割数据时长度不正确）",
        "Align_Label_SALabel_Format_not_Correct": "（映射标签时SA Label中的文件格式不正确）",
        "Filename_Format_not_Correct": "（文件名格式不正确）",
        "Method_Not_Exist": "（检测方法不存在）",
        "Data_Length_not_Correct": "（OrgBCG和BCG长度不匹配）",
        "Artifact_Format_Not_Correct": "（体动长度或格式不正确）",
        "Data_Length_Not_Correct": "（信号长度不正确）",
        "Filter_Args_Not_Correct": "（滤波器参数输入不正确，上下截止频率都要大于0，且上截止频率应大于下截止频率）",
        "Interval_Args_Not_Correct": "（间期参数输入不正确，上间期阈值应大于下间期阈值）",
        "Save_Permission_Denied": "（所保存的文件正在被其他进程使用）",
        "Save_File_Not_Found": "（保存路径不存在）",
        "OrgBCG_Cut_Length_Not_Correct": "（OrgBCG的切割长度不正确，Pre+Post长度大于信号长度）",
        "PSG_Cut_Length_Not_Correct": "（PSG的切割长度不正确，Pre+Post长度大于信号长度）",
        "Get_Freq_Not_Correct": "（无法获取数据采样率，将填入配置文件中的采样率。可能是因为文件不存在或文件命名格式不正确导致，请检查数据）",
        "orgBcg_Machine_Start_Time_Not_Exist": "（OrgBCG的设备启动时间不存在）",

        "Open_Data_Exception": "（打开数据异常）",
        "Process_Exception": "（处理异常）",
        "Preprocess_Exception": "（预处理异常）",
        "Save_Exception": "（保存异常）",
        "Only_Resample_Exception": "（仅重采样异常）",
        "Resp_Get_Exception": "（呼吸提取异常）",
        "Pre_Resample_Exception": "（预重采样异常）",
        "Delete_Base_Exception": "（去基线异常）",
        "Standardize_Exception": "（标准化异常）",
        "Resample_Exception": "（重采样异常）",
        "Calculate_Correlation1_Exception": "（计算互相关1/2异常）",
        "Calculate_Correlation2_Exception": "（计算互相关2/2异常）",
        "Calculate_Maxvalue_Pos_Exception": "（计算最大值位置异常）",
        "Invalid_Side_Parameter": "（无效的方向参数）",
        "Get_Epoch_Exception": "（获取epoch异常）",
        "Get_Corr_By_Epoch_Exception": "（通过epoch获取相关性异常）",
        "Predict_Exception": "（预测异常，请检查模型文件存放是否正确或检测方法是否正确，或是尝试勾选上“强制使用CPU”运行）",
        "Read_Model_Exception": "（读取模型异常）",
        "Calculate_Correlation_Value_Equal": "（计算相关性参数相同）",
        "Get_Corresponding_Interval_Exception": "（获取对应区间异常）",
        "Calculate_Correlation_JJIVRange_too_Large": "（计算相关性JJIV范围大于RRIV范围）",
        "Calculate_Correlation_Exception": "（计算相关性异常）",
        "Correlation_Align_Exception": "（处理相关对齐异常）",
        "PostProcess_Align_Exception": "（数据后处理异常）",
        "Cut_Data_Exception": "（切割数据异常）",
        "Align_Label_Exception": "（映射标签异常）",
        "Get_File_and_Freq_Excepetion": "（检查文件是否存在并获取其数据采样率异常）",
        "Update_tableWidget_Exception": "（更新表格异常）",
        "Update_Info_Exception": "（更新信息异常）",
        "Get_Artifact_Format_Exception": "（获取体动长度或格式异常）",
        "Label_Format_Exception": "（获取标签格式异常）",
        "Calculate_Peak_Exception": "（计算峰值异常）",

        "res_orgBcg_Not_Exist": "（切割后OrgBCG不存在）",
        "res_BCG_Not_Exist": "（切割后BCG不存在）",
        "cut_ECG_Not_Exist": "（切割后ECG不存在）",
        "cut_Jpeak_Not_Exist": "（切割后J峰不存在）",
        "cut_Rpeak_Not_Exist": "（切割后R峰不存在）",
        "Get_Approximately_Align_Info_Exception": "（获取粗对齐信息异常）",
        "Calculate_Approximately_Align_Info_Exception": "（计算粗对齐信息异常）",
        "Delete_Rough_Cut_File_Exception": "（删除历史粗对齐文件异常）",
        "Resample_BCG_Exception": "（粗对齐重采样BCG异常）",
    }

    # 数据粗同步
    APPROXIMATELY_ONLY_ALIGN_RESAMPLING: str = "正在仅重采样"
    APPROXIMATELY_ONLY_ALIGN_RESAMPLE_FINISHED: str = "仅重采样完成"
    APPROXIMATELY_ONLY_ALIGN_RESAMPLE_FAILURE: str = "仅重采样失败"

    APPROXIMATELY_RESP_GETTING: str = "正在呼吸提取"
    APPROXIMATELY_RESP_GET_FINISHED: str = "呼吸提取完成"
    APPROXIMATELY_RESP_GET_FAILURE: str = "呼吸提取失败"

    APPROXIMATELY_PRE_ALIGN_RESAMPLING: str = "正在预重采样"
    APPROXIMATELY_PRE_ALIGN_RESAMPLE_FINISHED: str = "预重采样完成"
    APPROXIMATELY_PRE_ALIGN_RESAMPLE_FAILURE: str = "预重采样失败"

    APPROXIMATELY_DELETING_BASE: str = "正在去基线"
    APPROXIMATELY_DELETE_BASE_FINISHED: str = "去基线完成"
    APPROXIMATELY_DELETE_BASE_FAILURE: str = "去基线失败"

    APPROXIMATELY_STANDARDIZING: str = "正在标准化"
    APPROXIMATELY_STANDARDIZE_FINISHED: str = "标准化完成"
    APPROXIMATELY_STANDARDIZE_FAILURE: str = "标准化失败"

    APPROXIMATELY_ALIGN_RESAMPLING: str = "正在重采样"
    APPROXIMATELY_ALIGN_RESAMPLE_FINISHED: str = "重采样完成"
    APPROXIMATELY_ALIGN_RESAMPLE_FAILURE: str = "重采样失败"

    APPROXIMATELY_CORRELATION_CALCULATING1: str = "正在计算互相关1/2"
    APPROXIMATELY_CORRELATION_CALCULATE1_FINISHED: str = "计算互相关1/2完成"
    APPROXIMATELY_CORRELATION_CALCULATE1_FAILURE: str = "计算互相关1/2失败"

    APPROXIMATELY_CORRELATION_CALCULATING2: str = "正在计算互相关2/2"
    APPROXIMATELY_CORRELATION_CALCULATE2_FINISHED: str = "计算互相关2/2完成"
    APPROXIMATELY_CORRELATION_CALCULATE2_FAILURE: str = "计算互相关2/2失败"

    APPROXIMATELY_MAXVALUE_POS_CALCULATING: str = "正在计算最大值位置"
    APPROXIMATELY_MAXVALUE_POS_CALCULATE_FINISHED: str = "计算最大值位置完成"
    APPROXIMATELY_MAXVALUE_POS_CALCULATE_FAILURE: str = "计算最大值位置失败"

    APPROXIMATELY_EPOCH_GETTING: str = "正在获取epoch"
    APPROXIMATELY_EPOCH_GET_FINISHED: str = "获取epoch完成"
    APPROXIMATELY_EPOCH_GET_FAILURE: str = "获取epoch失败"

    APPROXIMATELY_ESTIMATE_FREQUENCY_CALCULATING: str = "正在估计采样率"
    APPROXIMATELY_ESTIMATE_FREQUENCY_FINISHED: str = "估计采样率完成"
    APPROXIMATELY_ESTIMATE_FREQUENCY_FAILURE: str = "估计采样率失败"

    # 预处理
    PREPROCESS_PLOT_LABEL_ORIGINAL_DATA: str = "Original_Data"
    PREPROCESS_PLOT_LABEL_PROCESSED_DATA: str = "Processed_Data"
    PREPROCESS_OUTPUT_INPUT_AMP_OFFSET: int = 1850

    # BCG的J峰算法定位
    DETECT_JPEAK_LOADING_MODEL: str = "正在读取模型"
    DETECT_JPEAK_LOAD_FINISHED: str = "读取完成"
    DETECT_JPEAK_LOAD_FAILURE: str = "读取失败"

    DETECT_JPEAK_PREDICTING_PEAK: str = "正在预测峰值"
    DETECT_JPEAK_PREDICT_FINISHED: str = "预测完成"
    DETECT_JPEAK_PREDICT_FAILURE: str = "预测失败"

    DETECT_JPEAK_DATA_LENGTH_POINTS: str = "数据长度（点数）："
    DETECT_JPEAK_DURATION_MIN: str = "数据时长（分钟）："
    DETECT_JPEAK_PEAK_AMOUNT: str = "J峰个数："
    DETECT_JPEAK_PLOT_LABEL_BCG: str = "BCG_Processed"
    DETECT_JPEAK_PLOT_LABEL_J_PEAKS: str = "J_Peaks"
    DETECT_JPEAK_PLOT_LABEL_INTERVAL: str = "Interval"

    # ECG的R峰算法定位
    DETECT_RPEAK_LOADING_METHOD: str = "正在读取方法"
    DETECT_RPEAK_LOAD_FINISHED: str = "读取完成"
    DETECT_RPEAK_LOAD_FAILURE: str = "读取失败"

    DETECT_RPEAK_PREDICTING_PEAK: str = "正在预测峰值"
    DETECT_RPEAK_PREDICT_FINISHED: str = "预测完成"
    DETECT_RPEAK_PREDICT_FAILURE: str = "预测失败"

    DETECT_RPEAK_DATA_LENGTH_POINTS: str = "数据长度（点数）："
    DETECT_RPEAK_DURATION_MIN: str = "数据时长（分钟）："
    DETECT_RPEAK_PEAK_AMOUNT: str = "R峰个数："
    DETECT_RPEAK_PLOT_LABEL_RRIV: str = "RRIV"
    DETECT_RPEAK_PLOT_LABEL_ECG: str = "ECG_Processed"
    DETECT_RPEAK_PLOT_LABEL_R_PEAKS: str = "R_Peaks"
    DETECT_RPEAK_PLOT_LABEL_INTERVAL: str = "Interval"

    # 人工纠正
    LABEL_CHECK_PLOT_LABEL_SIGNAL: str = "Data_Processed"
    LABEL_CHECK_PLOT_LABEL_PEAK_ORIGINAL: str = "Peaks_Original"
    LABEL_CHECK_PLOT_LABEL_PEAK_CORRECTED: str = "Peaks_Corrected"
    LABEL_CHECK_PREV_MOVE: str = "向前移动"
    LABEL_CHECK_NEXT_MOVE: str = "向后移动"
    LABEL_CHECK_PAUSE: str = "暂停移动"
    LABEL_CHECK_SWITCH_PRESET_1: str = "变更为预设1"
    LABEL_CHECK_SWITCH_PRESET_2: str = "变更为预设2"
    LABEL_CHECK_SWITCH_PRESET_3: str = "变更为预设3"
    LABEL_CHECK_SWITCH_CUSTOM: str = "变更为自定义，请注意，自定义的参数未经校验，过大或过小的参数可能导致程序异常"
    LABEL_CHECK_JUMP_X_INDEX: str = "跳转到x坐标: "
    LABEL_CHECK_RECOVER_SCALE: str = "尺度恢复"
    LABEL_CHECK_ADD_POINTS_SUCCESSFULLY: str = "成功新增点，横坐标："
    LABEL_CHECK_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点，横坐标："
    LABEL_CHECK_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点"
    LABEL_CHECK_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({Params.LABEL_CHECK_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})"

    # 数据精同步
    PRECISELY_ALIGN_PROCESSING_DATA: str = "正在处理数据"
    PRECISELY_ALIGN_PROCESS_FINISHED: str = "处理完成"
    PRECISELY_ALIGN_PROCESS_FAILURE: str = "处理失败"

    #
    PRECISELY_ALIGN_GET_RRIV_FROM_ECG_POINT_FAILURE: str = "从ECG点获取RRIV失败"
    PRECISELY_ALIGN_GET_RRIV_FROM_ECG_POINT_FINISHED: str = "从ECG点获取RRIV完成"


    PRECISELY_ALIGN_CALCULATING_CORRELATION_FRONT: str = "正在计算前段相关性"
    PRECISELY_ALIGN_CALCULATE_FINISHED_FRONT: str = "计算前段相关性完成"
    PRECISELY_ALIGN_CALCULATE_FAILURE_FRONT: str = "计算前段相关性失败"
    PRECISELY_ALIGN_CALCULATING_CORRELATION_BACK: str = "正在计算后段相关性"
    PRECISELY_ALIGN_CALCULATE_FINISHED_BACK: str = "计算后段相关性完成"
    PRECISELY_ALIGN_CALCULATE_FAILURE_BACK: str = "计算后段相关性失败"

    PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL : str = "正在获取对应区间"
    PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL_FAILURE : str = "获取对应区间失败"
    PRECISELY_ALIGN_GET_CORRESPONDING_INTERVAL_FINISHED : str = "获取对应区间完成"

    PRECISELY_ALIGN_ALIGNING_CORRELATION: str = "正在处理相关对齐"
    PRECISELY_ALIGN_ALIGN_CORRELATION_FINISHED: str = "处理相关对齐完成"
    PRECISELY_ALIGN_ALIGN_CORRELATION_FAILURE: str = "处理相关对齐失败"

    PRECISELY_ALIGN_POSTPROCESSING_VIEW: str = "正在数据后处理"
    PRECISELY_ALIGN_POSTPROCESS_VIEW_FINISHED: str = "数据后处理完成"
    PRECISELY_ALIGN_POSTPROCESS_VIEW_FAILURE: str = "数据后处理失败"

    PRECISELY_ALIGN_SAVING_ALIGNINFO: str = "正在保存对齐信息"
    PRECISELY_ALIGN_SAVING_ALIGNINFO_FINISHED: str = "保存对齐信息完成"
    PRECISELY_ALIGN_SAVING_ALIGNINFO_FAILURE: str = "保存对齐信息失败"

    PRECISELY_ALIGN_SAVING_RES_ORGBCG: str = "正在保存切割后OrgBCG"
    PRECISELY_ALIGN_SAVING_RES_ORGBCG_FINISHED: str = "保存切割后OrgBCG完成"
    PRECISELY_ALIGN_SAVING_RES_ORGBCG_FAILURE: str = "保存切割后OrgBCG失败"

    PRECISELY_ALIGN_SAVING_RES_BCG: str = "正在保存切割后BCG"
    PRECISELY_ALIGN_SAVING_RES_BCG_FINISHED: str = "保存切割后BCG完成"
    PRECISELY_ALIGN_SAVING_RES_BCG_FAILURE: str = "保存切割后BCG失败"

    PRECISELY_ALIGN_SAVING_CUT_ECG: str = "正在保存切割后ECG"
    PRECISELY_ALIGN_SAVING_CUT_ECG_FINISHED: str = "保存切割后ECG完成"
    PRECISELY_ALIGN_SAVING_CUT_ECG_FAILURE: str = "保存切割后ECG失败"

    PRECISELY_ALIGN_SAVING_CUT_JPEAK: str = "正在保存切割后J峰"
    PRECISELY_ALIGN_SAVING_CUT_JPEAK_FINISHED: str = "保存切割后J峰完成"
    PRECISELY_ALIGN_SAVING_CUT_JPEAK_FAILURE: str = "保存切割后J峰失败"

    PRECISELY_ALIGN_SAVING_CUT_RPEAK: str = "正在保存切割后R峰"
    PRECISELY_ALIGN_SAVING_CUT_RPEAK_FINISHED: str = "保存切割后R峰完成"
    PRECISELY_ALIGN_SAVING_CUT_RPEAK_FAILURE: str = "保存切割后R峰失败"

    PRECISELY_ALIGN_PLOT_LABEL_JJIV: str = "JJIV"
    PRECISELY_ALIGN_PLOT_LABEL_RRIV: str = "RRIV"
    PRECISELY_ALIGN_PLOT_LABEL_CORRE_RRIV_JJIV: str = "corre(RRIV, JJIV)"
    PRECISELY_ALIGN_PLOT_LABEL_ECG: str = "ECG"
    PRECISELY_ALIGN_PLOT_LABEL_BCG: str = "BCG"
    PRECISELY_ALIGN_PLOT_LABEL_RPEAK: str = "peak_ECG"
    PRECISELY_ALIGN_PLOT_LABEL_JPEAK: str = "peak_BCG"
    PRECISELY_ALIGN_PLOT_LABEL_SELECTED_POINT: str = "Selected Point"
    PRECISELY_ALIGN_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无有效点"
    PRECISELY_ALIGN_RECOVER_SCALE: str = "尺度恢复"
    PRECISELY_ALIGN_ACTION_GET_RANGE_NAME: str = f"设置范围({Params.PRECISELY_ALIGN_ACTION_GET_RANGE_SHORTCUT_KEY})"

    # 冗余数据切割和标签映射
    CUT_PAIR_FILE_GETTING_FILE_AND_FREQ: str = "正在获取文件及其采样率"
    CUT_PAIR_FILE_GET_FILE_AND_FREQ_FINISHED: str = "获取文件及其采样率完成"
    CUT_PAIR_FILE_GET_FILE_AND_FREQ_FAILURE: str = "获取文件及其采样率失败"

    CUT_PAIR_FILE_CUTTING_DATA: str = "正在切割数据"
    CUT_PAIR_FILE_CUT_DATA_FINISHED: str = "切割数据完成"
    CUT_PAIR_FILE_CUT_DATA_FAILURE: str = "切割数据失败"

    CUT_PAIR_FILE_ALIGNING_LABEL: str = "正在映射标签"
    CUT_PAIR_FILE_ALIGN_LABEL_FINISHED: str = "映射标签完成"
    CUT_PAIR_FILE_ALIGN_LABEL_FAILURE: str = "映射标签失败"

    CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO: str = "正在获取粗对齐信息"
    CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FAILURE: str = "获取粗对齐信息失败"
    CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_FINISHED: str = "获取粗对齐信息完成"
    CUT_PAIR_FILE_GETTING_APPROXIMATE_ALIGN_INFO_CALC_FINISHED: str = "计算粗对齐信息完成"

    CUT_PAIR_FILE_DELETING_ROUGH_CUT_FILE: str = "正在删除历史粗对齐文件"
    CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FINISHED: str = "删除历史粗对齐文件完成"
    CUT_PAIR_FILE_DELETE_ROUGH_CUT_FILE_FAILURE: str = "删除历史粗对齐文件失败"

    CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG: str = "正在粗对齐重采样BCG"
    CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FINISHED: str = "粗对齐重采样BCG完成"
    CUT_PAIR_FILE_ROUGH_RESAMPLE_BCG_FAILURE: str = "粗对齐重采样BCG失败"


    # 体动标注
    ARTIFACT_LABEL_PLOT_LABEL_ORGBCG_SYNC: str = "OrgBCG_Sync"
    ARTIFACT_LABEL_PLOT_LABEL_BCG_SYNC: str = "BCG_Sync"
    ARTIFACT_LABEL_PREV_MOVE: str = "向前移动"
    ARTIFACT_LABEL_NEXT_MOVE: str = "向后移动"
    ARTIFACT_LABEL_PAUSE: str = "暂停移动"
    ARTIFACT_LABEL_SWITCH_PRESET_1: str = "变更为预设1"
    ARTIFACT_LABEL_SWITCH_PRESET_2: str = "变更为预设2"
    ARTIFACT_LABEL_SWITCH_PRESET_3: str = "变更为预设3"
    ARTIFACT_LABEL_SWITCH_CUSTOM: str = "变更为自定义，请注意，自定义的参数未经校验，过大或过小的参数可能导致程序异常"
    ARTIFACT_LABEL_JUMP_ARTIFACT: str = "跳转到体动"
    ARTIFACT_LABEL_RECOVER_SCALE: str = "尺度恢复"
    ARTIFACT_LABEL_MISS_ARGS: str = "打标参数未填写"
    ARTIFACT_LABEL_FRONT_TWO_SECONDS_MERGE: str = "所选区域前2秒内有体动，将根据规则执行合并"
    ARTIFACT_LABEL_BACK_TWO_SECONDS_MERGE: str = "所选区域后2秒内有体动，将根据规则执行合并"
    ARTIFACT_LABEL_FRONT_AND_BACK_TWO_SECONDS_MERGE: str = "所选区域前后2秒内都有体动，将根据规则执行合并"
    ARTIFACT_LABEL_FRONT_TWO_SECONDS_WARNING: str = "所选区域前2秒内有体动，仅进行提示"
    ARTIFACT_LABEL_BACK_TWO_SECONDS_WARNING: str = "所选区域后2秒内有体动，仅进行提示"
    ARTIFACT_LABEL_FRONT_AND_BACK_TWO_SECONDS_WARNING: str = "所选区域前后2秒内都有体动，仅进行提示"
    ARTIFACT_LABEL_DELETE_ARTIFACT_SUCCESSFULLY: str = "体动被删除"
    ARTIFACT_LABEL_DELETE_ARTIFACT_FAILURE: str = "需要被删除的体动不存在"
    ARTIFACT_LABEL_ACTION_LABEL: str = f"标注体动({Params.ARTIFACT_LABEL_ACTION_LABEL_ARTIFACT_SHORTCUT_KEY})"

    # 橙色orange
    ARTIFACT_LABEL_LABELBTN_STYLE_1: str = """
        QPushButton {
            background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
            padding: 10px; /* 设置内边距 */
            border: 2px solid darkblue; /* 设置边框 */
            border-radius: 10px; /* 设置圆角 */
        }
        QPushButton:hover {
            background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
        }"""
    # 黄色yellow
    ARTIFACT_LABEL_LABELBTN_STYLE_2: str = """
            QPushButton {
                background-color: rgba(255, 255, 0, 128); /* 设置背景颜色 */
                padding: 10px; /* 设置内边距 */
                border: 2px solid darkblue; /* 设置边框 */
                border-radius: 10px; /* 设置圆角 */
            }
            QPushButton:hover {
                background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
            }"""
    # 草绿色limegreen
    ARTIFACT_LABEL_LABELBTN_STYLE_3: str = """
            QPushButton {
                background-color: rgba(50, 205, 50, 128); /* 设置背景颜色 */
                padding: 10px; /* 设置内边距 */
                border: 2px solid darkblue; /* 设置边框 */
                border-radius: 10px; /* 设置圆角 */
            }
            QPushButton:hover {
                background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
            }"""
    # 青色cyan
    ARTIFACT_LABEL_LABELBTN_STYLE_4: str = """
            QPushButton {
                background-color: rgba(0, 255, 255, 128); /* 设置背景颜色 */
                padding: 10px; /* 设置内边距 */
                border: 2px solid darkblue; /* 设置边框 */
                border-radius: 10px; /* 设置圆角 */
            }
            QPushButton:hover {
                background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
            }"""
    # 品红色magenta
    ARTIFACT_LABEL_LABELBTN_STYLE_5: str = """
            QPushButton {
                background-color: rgba(255, 0, 255, 128); /* 设置背景颜色 */
                padding: 10px; /* 设置内边距 */
                border: 2px solid darkblue; /* 设置边框 */
                border-radius: 10px; /* 设置圆角 */
            }
            QPushButton:hover {
                background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
            }"""

    # BCG的质量标注
    BCG_QUALITY_LABEL_COLUMN_LABEL: str = "label"
    BCG_QUALITY_LABEL_COLUMN_REMARK: str = "remark"
    BCG_QUALITY_LABEL_PLOT_LABEL_SIGNAL: str = "BCG"
    BCG_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact"
    BCG_QUALITY_LABEL_PLOT_LABEL_LONGEST_CONTINUOUS: str = "Longest_Continuous"
    BCG_QUALITY_LABEL_10S_A: str = "a1"
    BCG_QUALITY_LABEL_10S_B: str = "b1"
    BCG_QUALITY_LABEL_10S_C: str = "c1"
    BCG_QUALITY_LABEL_30S_A1: str = "a1"
    BCG_QUALITY_LABEL_30S_A2: str = "a2"
    BCG_QUALITY_LABEL_30S_B1: str = "b1"
    BCG_QUALITY_LABEL_30S_B2: str = "b2"
    BCG_QUALITY_LABEL_30S_C: str = "c1"
    BCG_QUALITY_LABEL_TOBELABELED: str = "f1"
    BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号"
    BCG_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号"
    BCG_QUALITY_LABEL_VIEWING_THE_FIRST_PART_UNLABELED: str = "前面的片段都被打标，将跳转至第1段信号"
    BCG_QUALITY_LABEL_VIEWING_THE_LAST_PART_UNLABELED: str = "后面的片段都被打标，将跳转至最后1段信号"
    BCG_QUALITY_LABEL_LABELED_FINISHED: str = "该份数据打标已全部完成"
    BCG_QUALITY_LABEL_VIEWING_PART: str = "正在查看信号段"
    BCG_QUALITY_LABEL_JUMP_PART: str = "跳转到片段"
    BCG_QUALITY_LABEL_LABEL_ALL_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有片段标记为类型C"
    BCG_QUALITY_LABEL_LABEL_ARTIFACT_TO_TYPE_C_QUESTION_CONTENT: str = "你确定要将所有带有体动的片段标记为类型C"
    BCG_QUALITY_LABEL_LABELBTN_STYLE: str = """
    QPushButton {
        background-color: rgba(255, 165, 0, 128); /* 设置背景颜色 */
        padding: 10px; /* 设置内边距 */
        border: 2px solid darkblue; /* 设置边框 */
        border-radius: 10px; /* 设置圆角 */
    }
    QPushButton:hover {
        background-color: rgba(255, 0, 0, 128); /* 鼠标悬停时的背景颜色 */
    }"""


    # 呼吸可用性及间期标注
    RESP_QUALITY_LABEL_CALCULATING_PEAK: str = "正在计算峰值"
    RESP_QUALITY_LABEL_CALCULATE_FINISHED: str = "计算完成"
    RESP_QUALITY_LABEL_CALCULATE_FAILURE: str = "计算失败"

    RESP_QUALITY_LABEL_PLOT_LABEL_ORGBCG: str = "BDR_Sync by filter OrgBCG_Sync"
    RESP_QUALITY_LABEL_PLOT_LABEL_THO: str = "THO_Sync after preprocess"
    RESP_QUALITY_LABEL_PLOT_LABEL_THO_PEAKS: str = "Tho_peak"
    RESP_QUALITY_LABEL_PLOT_LABEL_ARTIFACT: str = "Artifact"
    RESP_QUALITY_LABEL_SPECTRUM_BDR_TITLE: str = "Spectrum of BDR_sync by filter OrgBCG_Sync"
    RESP_QUALITY_LABEL_SPECTRUM_THO_TITLE: str = "Spectrum of THO_sync after preprocess"
    RESP_QUALITY_LABEL_SPECTRUM_ORGBCG_LABEL: str = "OrgBCG"
    RESP_QUALITY_LABEL_SPECTRUM_BDR_LABEL: str = "BDR"
    RESP_QUALITY_LABEL_SPECTRUM_THO_LABEL: str = "Tho"
    RESP_QUALITY_LABEL_VIEWING_THE_FIRST_PART: str = "你正在查看第1段信号"
    RESP_QUALITY_LABEL_VIEWING_THE_LAST_PART: str = "你正在查看最后1段信号"
    RESP_QUALITY_LABEL_PREV_PART: str = "上一个片段，index "
    RESP_QUALITY_LABEL_NEXT_PART: str = "下一个片段，index "
    RESP_QUALITY_LABEL_JUMP: str = "跳转到片段，index "
    RESP_QUALITY_LABEL_LABEL_SUCCESSFULLY: str = "片段标注成功"
    RESP_QUALITY_LABEL_LABEL_TYPE: str = "标注类型为："
    RESP_QUALITY_LABEL_ADD_POINTS_SUCCESSFULLY: str = "成功新增点，横坐标："
    RESP_QUALITY_LABEL_REMOVE_POINTS_SUCCESSFULLY: str = "成功删除点，横坐标："
    RESP_QUALITY_LABEL_NO_POINT_IN_THE_INTERVAL: str = "所选区间内无新增或删除点"
    RESP_QUALITY_LABEL_CUSTOM_FILTER_ARGS_ERROR: str = "OrgBCG带通滤波频率设置范围应为数字，范围是0~1，且上截止频率应大于下截止频率"
    RESP_QUALITY_LABEL_AUTOLABEL_ARGS_ERROR: str = "人工标注阈值设置范围应为数字，范围是0~1，且[1]应大于[0]"
    RESP_QUALITY_LABEL_CHECK_ARGS_QUESTION_CONTENT: str = "你确定要执行此操作吗，请确保参数输入正确"
    RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_NAME: str = f"批量更改标签({Params.RESP_QUALITY_LABEL_ACTION_LABEL_MULTIPLE_SHORTCUT_KEY})"
    RESP_QUALITY_LABEL_A_QUALITY: int = 1
    RESP_QUALITY_LABEL_B_QUALITY: int = 0
    RESP_QUALITY_LABEL_C_QUALITY: int = -1
    RESP_QUALITY_LABEL_KEY_VALUE = {
        1: "Good",
        0: "Bad",
        -1: "None"
    }
    RESP_QUALITY_LABEL_FIGTOOLBAR_SPECTRUM_STYLESHEET: str = """
            QToolBar {
                border: 1px;
                spacing: 2px; /* 设置工具栏按钮之间的间距 */
            }
            QToolButton {
                height: 20px; /* 设置工具栏按钮的高度 */
                width: 20px; /* 设置工具栏按钮的宽度 */
                font-size: 8px; /* 设置按钮文字大小 */
            }
            QToolButton::menu-button {
                width: 0px; /* 隐藏下拉菜单按钮 */
            }
        """

    # 睡眠呼吸暂停事件标注
    SA_LABEL_JUMP: str = "跳转到事件"
    SA_LABEL_VIEWING_FIRST: str = "你正在查看第1个事件"
    SA_LABEL_VIEWING_LAST: str = "你正在查看最后1个事件"
    SA_LABEL_PREV_EVENT: str = "上一个事件，index "
    SA_LABEL_NEXT_EVENT: str = "下一个事件，index "
    SA_LABEL_ALL_LABELED: str = "该份数据打标已全部完成"
    SA_LABEL_MOVE_PREV10S: str = "向前10秒"
    SA_LABEL_MOVE_PREV30S: str = "向前30秒"
    SA_LABEL_MOVE_PREV_HALF: str = "向前半窗口"
    SA_LABEL_MOVE_NEXT10S: str = "向后10秒"
    SA_LABEL_MOVE_NEXT30S: str = "向后30秒"
    SA_LABEL_MOVE_NEXT_HALF: str = "向后半窗口"
    SA_LABEL_LENGTH_TOO_LONG: str = "起始时间或终止时间超出信号长度范围，请输入正确的参数"
    SA_LABEL_LENGTH_LESS_THEN_10S: str = "当前标注的事件的持续时间小于10秒"
    SA_LABEL_WRONG_ARGS: str = "起始时间和终止时间输入错误"

    # 禁止实例化
    def __new__(cls):
        raise TypeError("Constants class cannot be instantiated")

    # 禁止修改常量
    @classmethod
    def __setattr__(cls, key, value):
        raise AttributeError("Cannot modify constants")