代码拉取完成,页面将自动刷新
同步操作将从 apud/pyqt5-360ui 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
作者:消逝
QQ交流群:540681925
"""
import sys
from frmmain_ui import Ui_frmMain
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class frmMain(QMainWindow):
def __init__(self, parent=None):
super(frmMain, self).__init__(parent)
self.ui = Ui_frmMain()
self.ui.setupUi(self)
self.setWindowFlags(Qt.FramelessWindowHint)
self.ui.closeToolButton.clicked.connect(self.on_closeToolButton_clicked)
self.ui.minToolButton.clicked.connect(self.on_minToolButton_clicked)
self.ui.killToolButton.clicked.connect(self.on_killToolButton_clicked)
self.ui.checkToolButton_2.clicked.connect(self.on_checkToolButton_2_clicked)
self.ui.fixToolButton.clicked.connect(self.on_fixToolButton_clicked)
self.ui.rabToolButton.clicked.connect(self.on_rabToolButton_clicked)
self.ui.opToolButton.clicked.connect(self.on_opToolButton_clicked)
self.ui.exToolButton.clicked.connect(self.on_exToolButton_clicked)
self.ui.mzToolButton.clicked.connect(self.on_mzToolButton_clicked)
self.ui.gjToolButton.clicked.connect(self.on_gjToolButton_clicked)
def mousePressEvent(self,event):
if ( event.button() == Qt.LeftButton ):
self.startPos = event.globalPos() - self.frameGeometry().topLeft()
elif ( event.button() == Qt.MiddleButton):
self.closeWindow()
elif( event.button() == Qt.RightButton ):
self.shakeWindow()
def mouseMoveEvent(self,event):
if ( event.buttons() == Qt.LeftButton ):
self.endPos = event.globalPos() - self.startPos
self.move(self.endPos)
def on_closeToolButton_clicked(self):
self.closeWindow()
def on_minToolButton_clicked(self):
self.showMinimized()
def shakeWindow(self):
animation = QPropertyAnimation(self,"geometry")
animation.setDuration(500)
animation.setKeyValueAt(0,QRect(QPoint(self.frameGeometry().x()-3,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.1,QRect(QPoint(self.frameGeometry().x()+6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.2,QRect(QPoint(self.frameGeometry().x()-6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.3,QRect(QPoint(self.frameGeometry().x()+6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.4,QRect(QPoint(self.frameGeometry().x()-6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.5,QRect(QPoint(self.frameGeometry().x()+6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.6,QRect(QPoint(self.frameGeometry().x()-6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.7,QRect(QPoint(self.frameGeometry().x()+6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.8,QRect(QPoint(self.frameGeometry().x()-6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(0.9,QRect(QPoint(self.frameGeometry().x()+6,self.frameGeometry().y()),self.size()))
animation.setKeyValueAt(1,QRect(QPoint(self.frameGeometry().x()-3,self.frameGeometry().y()),self.size()))
animation.start()
def setStackCurrentPage(self,index):
widget =QWidget()
widget = self.ui.stackedWidget.widget(index)
self.ui.stackedWidget.setCurrentWidget(widget)
def closeWindow(self):
sys.exit(app.exec_())
def on_killToolButton_clicked(self):
self.setStackCurrentPage(1)
def on_checkToolButton_2_clicked(self):
self.setStackCurrentPage(0)
def on_fixToolButton_clicked(self):
self.setStackCurrentPage(2)
def on_rabToolButton_clicked(self):
self.setStackCurrentPage(3)
def on_opToolButton_clicked(self):
self.setStackCurrentPage(4)
def on_exToolButton_clicked(self):
self.setStackCurrentPage(5)
def on_mzToolButton_clicked(self):
self.setStackCurrentPage(6)
def on_gjToolButton_clicked(self):
self.setStackCurrentPage(7)
if __name__ == "__main__":
app = QApplication(sys.argv[1:])
window = frmMain()
window.show()
sys.exit(app.exec_())
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。