1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-08-02 14:19:35 +08:00

style: 统一代码格式与导入优化

This commit is contained in:
2026-06-26 09:16:23 +08:00
parent 05ad9ba0b3
commit 92c5fa0dfb
7 changed files with 36 additions and 42 deletions
+3 -7
View File
@@ -77,11 +77,9 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
self.connectSignals()
self.startMsgPolling()
self.startTimerTaskPolling()
self.__bulletin_poller.start()
if bulletinInstance().autoFetch():
QTimer.singleShot(1000, self.__bulletin_poller.fetchNow)
self._showLog("主窗口初始化完成")
def modifyUi(
@@ -182,9 +180,7 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
self.StopButton.clicked.connect(self.onStopButtonClicked)
self.SendButton.clicked.connect(self.onSendButtonClicked)
self.MessageEdit.returnPressed.connect(self.onSendButtonClicked)
self.__bulletin_poller.newBulletinsDetected.connect(
self._onBulletinPollerNewBulletins
)
self.__bulletin_poller.newBulletinsDetected.connect(self.onBulletinPollerNewBulletins)
def closeEvent(
self,
@@ -365,12 +361,12 @@ class ALMainWindow(MsgBase, QMainWindow, Ui_ALMainWindow):
self.__bulletin_poller.setDialogOpen(False)
@Slot(int)
def _onBulletinPollerNewBulletins(
def onBulletinPollerNewBulletins(
self,
count: int
):
if not hasattr(self, 'TrayIcon'):
if not hasattr(self, "TrayIcon"):
return
self.TrayIcon.showMessage(
"公告栏 - AutoLibrary",