feat(ui): 修改版本号到v4.4
- 进一步适配三月七相关配置项
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA组件
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
@@ -577,7 +577,7 @@ class PathSettingCard(PushSettingCard):
|
||||
self,
|
||||
icon: Union[str, QIcon, FluentIconBase],
|
||||
title: str,
|
||||
mode: str,
|
||||
mode: Union[str, OptionsConfigItem],
|
||||
text: str,
|
||||
qconfig: QConfig,
|
||||
configItem: ConfigItem,
|
||||
@@ -590,6 +590,18 @@ class PathSettingCard(PushSettingCard):
|
||||
self.qconfig = qconfig
|
||||
self.configItem = configItem
|
||||
|
||||
if isinstance(mode, OptionsConfigItem):
|
||||
|
||||
self.ComboBox = ComboBox(self)
|
||||
self.hBoxLayout.insertWidget(5, self.ComboBox, 0, Qt.AlignRight)
|
||||
|
||||
for option in mode.options:
|
||||
self.ComboBox.addItem(option, userData=option)
|
||||
|
||||
self.ComboBox.setCurrentText(self.qconfig.get(mode))
|
||||
self.ComboBox.currentIndexChanged.connect(self._onCurrentIndexChanged)
|
||||
mode.valueChanged.connect(self.setValue)
|
||||
|
||||
self.setContent(self.qconfig.get(self.configItem))
|
||||
|
||||
self.clicked.connect(self.ChoosePath)
|
||||
@@ -602,7 +614,7 @@ class PathSettingCard(PushSettingCard):
|
||||
|
||||
old_path = Path(self.qconfig.get(self.configItem))
|
||||
|
||||
if self.mode == "文件夹":
|
||||
if self.get_mode() == "文件夹":
|
||||
|
||||
folder = QFileDialog.getExistingDirectory(
|
||||
self, "选择文件夹", self.qconfig.get(self.configItem)
|
||||
@@ -614,7 +626,7 @@ class PathSettingCard(PushSettingCard):
|
||||
else:
|
||||
|
||||
file_path, _ = QFileDialog.getOpenFileName(
|
||||
self, "打开文件", self.qconfig.get(self.configItem), self.mode
|
||||
self, "打开文件", self.qconfig.get(self.configItem), self.get_mode()
|
||||
)
|
||||
if file_path:
|
||||
file_path = self.analysis_lnk(file_path)
|
||||
@@ -635,6 +647,21 @@ class PathSettingCard(PushSettingCard):
|
||||
else:
|
||||
return lnk_path
|
||||
|
||||
def get_mode(self) -> str:
|
||||
"""获取当前模式"""
|
||||
if isinstance(self.mode, OptionsConfigItem):
|
||||
return self.qconfig.get(self.mode)
|
||||
return self.mode
|
||||
|
||||
def _onCurrentIndexChanged(self, index: int):
|
||||
|
||||
self.qconfig.set(self.mode, self.ComboBox.itemData(index))
|
||||
|
||||
def setValue(self, value):
|
||||
|
||||
self.ComboBox.setCurrentText(value)
|
||||
self.qconfig.set(self.mode, value)
|
||||
|
||||
|
||||
class PushAndSwitchButtonSettingCard(SettingCard):
|
||||
"""Setting card with push & switch button"""
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA图形化界面包
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA调度中枢界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA更新器
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA历史记录界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA主界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA主界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA脚本管理界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
@@ -2312,27 +2312,36 @@ class MemberManager(QWidget):
|
||||
)
|
||||
self.card_ConfigPath = PathSettingCard(
|
||||
icon=FluentIcon.FOLDER,
|
||||
title="脚本配置文件目录 - [必填]",
|
||||
mode="文件夹",
|
||||
text="选择文件夹",
|
||||
title="脚本配置文件路径 - [必填]",
|
||||
mode=self.config.Script_ConfigPathMode,
|
||||
text="选择路径",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Script_ConfigPath,
|
||||
parent=self,
|
||||
)
|
||||
self.card_LogPath = PathSettingCard(
|
||||
icon=FluentIcon.FOLDER,
|
||||
title="脚本日志文件目录 - [必填]",
|
||||
title="脚本日志文件路径 - [必填]",
|
||||
mode="所有文件 (*)",
|
||||
text="选择文件",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Script_LogPath,
|
||||
parent=self,
|
||||
)
|
||||
self.card_LogPathFormat = LineEditSettingCard(
|
||||
icon=FluentIcon.PAGE_RIGHT,
|
||||
title="脚本日志文件名格式",
|
||||
content="若脚本日志文件名中随时间变化,请填入时间格式,留空则不启用",
|
||||
text="请输入脚本日志文件名格式",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Script_LogPathFormat,
|
||||
parent=self,
|
||||
)
|
||||
self.card_LogTimeStart = SpinBoxSettingCard(
|
||||
icon=FluentIcon.PAGE_RIGHT,
|
||||
title="脚本日志时间起始位置 - [必填]",
|
||||
content="脚本日志中时间的起始位置,单位为字符",
|
||||
range=(0, 1024),
|
||||
range=(1, 1024),
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Script_LogTimeStart,
|
||||
parent=self,
|
||||
@@ -2341,7 +2350,7 @@ class MemberManager(QWidget):
|
||||
icon=FluentIcon.PAGE_RIGHT,
|
||||
title="脚本日志时间结束位置 - [必填]",
|
||||
content="脚本日志中时间的结束位置,单位为字符",
|
||||
range=(0, 1024),
|
||||
range=(1, 1024),
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Script_LogTimeEnd,
|
||||
parent=self,
|
||||
@@ -2402,6 +2411,7 @@ class MemberManager(QWidget):
|
||||
Layout.addWidget(self.card_Arguments)
|
||||
Layout.addWidget(self.card_ConfigPath)
|
||||
Layout.addWidget(self.card_LogPath)
|
||||
Layout.addWidget(self.card_LogPathFormat)
|
||||
Layout.addLayout(h_layout)
|
||||
Layout.addWidget(self.card_LogTimeFormat)
|
||||
Layout.addWidget(self.card_SuccessLog)
|
||||
@@ -3066,7 +3076,7 @@ class MemberManager(QWidget):
|
||||
self.card_ScriptBeforeTask = PathSettingCard(
|
||||
icon=FluentIcon.FOLDER,
|
||||
title="脚本前置任务",
|
||||
mode="脚本文件 (*.py *.bat *.exe)",
|
||||
mode="脚本文件 (*.py *.bat *.cmd *.exe)",
|
||||
text="选择脚本文件",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Info_ScriptBeforeTask,
|
||||
@@ -3081,7 +3091,7 @@ class MemberManager(QWidget):
|
||||
self.card_ScriptAfterTask = PathSettingCard(
|
||||
icon=FluentIcon.FOLDER,
|
||||
title="脚本后置任务",
|
||||
mode="脚本文件 (*.py *.bat *.exe)",
|
||||
mode="脚本文件 (*.py *.bat *.cmd *.exe)",
|
||||
text="选择脚本文件",
|
||||
qconfig=self.config,
|
||||
configItem=self.config.Info_ScriptAfterTask,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA计划管理界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA调度队列界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA设置界面
|
||||
v4.3
|
||||
v4.4
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user