diff --git a/config.py b/config.py index 2e28300..f2e0da1 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,7 @@ import configparser from pathlib import Path import sys +from typing import Any miniQMTPath = r'D:\\Programs\\DTQMT\\userdata_mini' # miniQMT软件的安装路径 # miniQMTPath = '' @@ -8,6 +9,8 @@ account_no:str = '99082560' console_log = True log_level = "INFO" +config : Any + def get_config_path() -> Path: """获取配置文件的正确路径(兼容开发环境和打包后的可执行文件)""" if getattr(sys, 'frozen', False): @@ -21,6 +24,9 @@ def get_config_path() -> Path: return base_path / 'config.ini' +def get_config(section:str, key:str): + pass + def save_config(miniQmtPath:str, account_no:str): """创建默认配置文件""" config = configparser.ConfigParser() diff --git a/core/main_entry.py b/core/main_entry.py index 3422ee3..9e92315 100644 --- a/core/main_entry.py +++ b/core/main_entry.py @@ -33,7 +33,7 @@ class MainEntry: qmt_label = "QMT (已开启)" if self.qmt_enabled else "QMT (已关闭)" return [ { - "label": "交易大师", + "label": "-- 交易大师 --", "items": [ {"label": "交易复盘", "action": "handler", "enabled": True}, {"label": "市场数据", "action": "handler", "enabled": True}, @@ -41,7 +41,7 @@ class MainEntry: ], }, { - "label": "策略交易", + "label": "-- 策略交易 --", "items": [ {"label": "交易看板", "action": "handler", "enabled": True}, {"label": "策略中心", "action": None, "enabled": False}, @@ -49,13 +49,13 @@ class MainEntry: ], }, { - "label": "实时数据", + "label": "-- 实时数据 --", "items": [ {"label": qmt_label, "action": "marketDataSwitch", "enabled": True}, ], }, { - "label": "系统", + "label": "-- 系统 --", "items": [ {"label": "控制台", "action": "show_window", "enabled": True, "default": True}, {"label": "设置", "action": "marketDataSwitch", "enabled": True},