Files
haha/gui_constants.py
27942 c601e6054a gui
第一版完整版
2026-01-31 10:42:28 +08:00

57 lines
1.5 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
"""GUI 常量与配置:路径、表头、列映射、视频扩展名等。"""
import os
# 默认资料文件夹名(相对桌面)
DEFAULT_FOLDER_NAME = "多多自动化发文"
# 表格列与配置键的映射Model 列索引 -> config 键)
COLUMN_KEY_MAPPING = {
0: "多多id",
1: "序号",
2: "话题",
3: "定时发布",
4: "间隔时间",
5: "达人链接",
6: "执行人",
7: "情况",
8: "文件路径",
9: "",
10: "",
}
# 表格列与配置键的映射(仅可编辑列,用于 setData
COLUMN_KEY_MAPPING_EDIT = {
0: "多多id",
1: "序号",
2: "话题",
3: "定时发布",
4: "间隔时间",
5: "达人链接",
6: "执行人",
7: "情况",
8: "文件路径",
}
# 配置表格表头12 列:勾选 + 9 数据 + 进度 + 操作)
TABLE_HEADERS = [
'', '多多ID', '序号', '话题', '定时发布', '间隔时间', '达人链接',
'执行人', '情况', '文件路径', '进度', '操作'
]
# Model/View 模式表头11 列:无勾选列)
MODEL_VIEW_HEADERS = [
'多多ID', '序号', '话题', '定时发布', '间隔时间', '达人链接',
'执行人', '情况', '文件路径', '进度', '操作'
]
# 视频文件扩展名
VIDEO_EXTENSIONS = ['.mp4', '.avi', '.mov', '.mkv', '.flv', '.wmv', '.webm']
def get_default_folder_path():
"""获取默认文件夹路径(桌面/多多自动化发文)"""
desktop = os.path.join(os.path.expanduser("~"), "Desktop")
return os.path.join(desktop, DEFAULT_FOLDER_NAME)