1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 07:23:03 +08:00

chore(*): 更改一些界面类方法,局部变量和信号的命名:

(ALConfigWidget):
def initlizeDefaultConfigPaths() 中 script_path 和 script_dir 分别改为 executable_path 和 executable_dir
def fillUserTree() 更改为 def setUsersToTreeWidget()
def collectUserFromUserInfoWidget() 更改为 def collectUserFromWidget()
def collectUserConfigFromUserTreeWidget 更改为 def collectUsersFromTreeWidget()
交换了一些方法的位置

(ALSeatMapSelectDialog):
信号 seatMapSelectDialogClosed 改为 seatMapSelectDialogIsClosed

(ALTimerTaskManageWidget):
信号 timerTaskManageWidgetClosed 改为 timerTaskManageWidgetIsClosed

(ALMainWindow):
def __init__() 中 script_path 和 script_dir 分别改为 executable_path 和 executable_dir
更改 ALSeatMapSelectDialog 和 ALTimerTaskManageWidget 中相关的信号命名
This commit is contained in:
2026-02-21 14:26:54 +08:00
parent 155b3fe3ca
commit 5ca4a14a14
4 changed files with 60 additions and 60 deletions
+7 -6
View File
@@ -34,6 +34,7 @@ from gui.resources import ALResource
class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
# signal : timer task
timerTaskIsRunning = Signal(dict)
timerTaskIsExecuted = Signal(dict)
timerTaskIsError = Signal(dict)
@@ -45,12 +46,12 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
MsgBase.__init__(self, queue.Queue(), queue.Queue())
QMainWindow.__init__(self)
self.__timer_task_queue = queue.Queue()
script_path = sys.executable
script_dir = QFileInfo(script_path).absoluteDir()
executable_path = sys.executable
exectuable_dir = QFileInfo(executable_path).absoluteDir()
self.__config_paths = {
"run": QDir.toNativeSeparators(script_dir.absoluteFilePath("run.json")),
"user": QDir.toNativeSeparators(script_dir.absoluteFilePath("user.json")),
"timer_task": QDir.toNativeSeparators(script_dir.absoluteFilePath("timer_task.json")),
"run": QDir.toNativeSeparators(exectuable_dir.absoluteFilePath("run.json")),
"user": QDir.toNativeSeparators(exectuable_dir.absoluteFilePath("user.json")),
"timer_task": QDir.toNativeSeparators(exectuable_dir.absoluteFilePath("timer_task.json")),
}
self.__alTimerTaskWidget = None
self.__alConfigWidget = None
@@ -82,7 +83,7 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
self.timerTaskIsExecuted.connect(self.__alTimerTaskWidget.onTimerTaskIsExecuted)
self.timerTaskIsError.connect(self.__alTimerTaskWidget.onTimerTaskIsError)
self.__alTimerTaskWidget.timerTaskIsReady.connect(self.onTimerTaskIsReady)
self.__alTimerTaskWidget.timerTaskManageWidgetClosed.connect(self.onTimerTaskWidgetClosed)
self.__alTimerTaskWidget.timerTaskManageWidgetIsClosed.connect(self.onTimerTaskWidgetClosed)
self.__alTimerTaskWidget.setWindowFlags(Qt.WindowType.Window|Qt.WindowType.WindowCloseButtonHint)