(self)
Setup ui
Setup ui
Setup ui
def setup(self):
        """ Setup ui
        """
        h_box = QHBoxLayout()
        h_box.setContentsMargins(0, 0, 0, 0)
        self.update_label = QLabel('Waiting for Device')
        self.update_label.setFixedWidth(self.parent.width())
        self.update_label.setOpenExternalLinks(True)
        self.update_label.setTextFormat(Qt.RichText)
        self.update_label.setFixedHeight(35)
        self.update_label.setTextInteractionFlags(Qt.TextBrowserInteraction)
        self._install_btn = QPushButton('Install Frida', self.update_label)
        self._install_btn.setStyleSheet('padding: 0; border-color: white;')
        self._install_btn.setGeometry(self.update_label.width() - 110, 5, 100, 25)
        self._install_btn.clicked.connect(self._on_install_btn)
        self._install_btn.setVisible(False)
        self._start_btn = QPushButton('Start Frida', self.update_label)
        self._start_btn.setStyleSheet('padding: 0; border-color: white;')
        self._start_btn.setGeometry(self.update_label.width() - 110, 5, 100, 25)
        self._start_btn.clicked.connect(self._on_start_btn)
        self._start_btn.setVisible(False)
        self._update_btn = QPushButton('Update Frida', self.update_label)
        self._update_btn.setStyleSheet('padding: 0; border-color: white;')
        self._update_btn.setGeometry(self.update_label.width() - 110, 5, 100, 25)
        self._update_btn.clicked.connect(self._on_install_btn)
        self._update_btn.setVisible(False)
        self._restart_btn = QPushButton('Restart Frida', self.update_label)
        self._restart_btn.setStyleSheet('padding: 0; border-color: white;')
        self._restart_btn.setGeometry(self.update_label.width() - 110, 5, 100, 25)
        self._restart_btn.clicked.connect(self._on_restart_btn)
        self._restart_btn.setVisible(False)
        self._devices_combobox = QComboBox(self.update_label)
        self._devices_combobox.setStyleSheet('padding: 2px 5px; border-color: white;')
        self._devices_combobox.setGeometry(self.update_label.width() - 320, 5, 200, 25)
        self._devices_combobox.currentIndexChanged.connect(self._on_device_changed)
        self._devices_combobox.setVisible(False)
        h_box.addWidget(self.update_label)
        self.setLayout(h_box)
def setup ( self ) : h_box = QHBoxLayout ( ) h_box . setContentsMargins ( 0 , 0 , 0 , 0 ) self . update_label = QLabel ( 'Waiting for Device' ) self . update_label . setFixedWidth ( self . parent . width ( ) ) self . update_label . setOpenExternalLinks ( True ) self . update_label . setTextFormat ( Qt . RichText ) self . update_label . setFixedHeight ( 35 ) self . update_label . setTextInteractionFlags ( Qt . TextBrowserInteraction ) self . _install_btn = QPushButton ( 'Install Frida' , self . update_label ) self . _install_btn . setStyleSheet ( 'padding: 0; border-color: white;' ) self . _install_btn . setGeometry ( self . update_label . width ( ) - 110 , 5 , 100 , 25 ) self . _install_btn . clicked . connect ( self . _on_install_btn ) self . _install_btn . setVisible ( False ) self . _start_btn = QPushButton ( 'Start Frida' , self . update_label ) self . _start_btn . setStyleSheet ( 'padding: 0; border-color: white;' ) self . _start_btn . setGeometry ( self . update_label . width ( ) - 110 , 5 , 100 , 25 ) self . _start_btn . clicked . connect ( self . _on_start_btn ) self . _start_btn . setVisible ( False ) self . _update_btn = QPushButton ( 'Update Frida' , self . update_label ) self . _update_btn . setStyleSheet ( 'padding: 0; border-color: white;' ) self . _update_btn . setGeometry ( self . update_label . width ( ) - 110 , 5 , 100 , 25 ) self . _update_btn . clicked . connect ( self . _on_install_btn ) self . _update_btn . setVisible ( False ) self . _restart_btn = QPushButton ( 'Restart Frida' , self . update_label ) self . _restart_btn . setStyleSheet ( 'padding: 0; border-color: white;' ) self . _restart_btn . setGeometry ( self . update_label . width ( ) - 110 , 5 , 100 , 25 ) self . _restart_btn . clicked . connect ( self . _on_restart_btn ) self . _restart_btn . setVisible ( False ) self . _devices_combobox = QComboBox ( self . update_label ) self . _devices_combobox . setStyleSheet ( 'padding: 2px 5px; border-color: white;' ) self . _devices_combobox . setGeometry ( self . update_label . width ( ) - 320 , 5 , 200 , 25 ) self . _devices_combobox . currentIndexChanged . connect ( self . _on_device_changed ) self . _devices_combobox . setVisible ( False ) h_box . addWidget ( self . update_label ) self . setLayout ( h_box )