MCPcopy Create free account
hub / github.com/DIMFLIX/Spectrum-Security / __init__

Method __init__

main.py:689–715  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

687####################################################
688class 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")

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 4

close_notifyMethod · 0.95
start_animationMethod · 0.95
connectMethod · 0.80
setupUiMethod · 0.45

Tested by

no test coverage detected