(self, text)
| 687 | #################################################### |
| 688 | class Notify(QMainWindow): |
| 689 | def __init__(self, text): |
| 690 | QMainWindow.__init__(self) |
| 691 | self.ui = SpectrumSecurityNotify() |
| 692 | self.ui.setupUi(self) |
| 693 | |
| 694 | ## ==> MAIN SETTINGS |
| 695 | ############################################################## |
| 696 | self.setWindowFlags(Qt.ToolTip) |
| 697 | self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.CustomizeWindowHint | Qt.WindowStaysOnTopHint) |
| 698 | self.setWindowFlag(QtCore.Qt.FramelessWindowHint) |
| 699 | self.setAttribute(QtCore.Qt.WA_TranslucentBackground, True) |
| 700 | |
| 701 | self.ui.notify_text.setText(text) |
| 702 | |
| 703 | ## ==> WINDOW BTNS |
| 704 | ############################################################## |
| 705 | self.ui.close_btn.clicked.connect(lambda: self.close_notify()) |
| 706 | |
| 707 | ## ==> MOVE TO BOTTOM RIGHT |
| 708 | ############################################################## |
| 709 | self.desktop = QGuiApplication.primaryScreen().availableGeometry() |
| 710 | self.start_animation() |
| 711 | |
| 712 | self.notify = QSound('data/notifications/notification.wav', self) |
| 713 | self.notify.play() |
| 714 | |
| 715 | self.show() |
| 716 | |
| 717 | def start_animation(self): |
| 718 | self.start_animation = QPropertyAnimation(self, b"geometry") |
no test coverage detected