199 self.refreshButton.setIcon(EricPixmapCache.getIcon("reload")) |
199 self.refreshButton.setIcon(EricPixmapCache.getIcon("reload")) |
200 self.upgradeButton.setIcon(EricPixmapCache.getIcon("1uparrow")) |
200 self.upgradeButton.setIcon(EricPixmapCache.getIcon("1uparrow")) |
201 self.upgradeAllButton.setIcon(EricPixmapCache.getIcon("2uparrow")) |
201 self.upgradeAllButton.setIcon(EricPixmapCache.getIcon("2uparrow")) |
202 self.uninstallButton.setIcon(EricPixmapCache.getIcon("minus")) |
202 self.uninstallButton.setIcon(EricPixmapCache.getIcon("minus")) |
203 self.showPackageDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
203 self.showPackageDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
204 self.searchToggleButton.setIcon(EricPixmapCache.getIcon("find")) |
204 self.searchToggleButton_1.setIcon(EricPixmapCache.getIcon("find")) |
|
205 self.searchToggleButton_2.setIcon(EricPixmapCache.getIcon("find")) |
205 self.searchButton.setIcon(EricPixmapCache.getIcon("findNext")) |
206 self.searchButton.setIcon(EricPixmapCache.getIcon("findNext")) |
206 self.searchMoreButton.setIcon(EricPixmapCache.getIcon("plus")) |
207 self.searchMoreButton.setIcon(EricPixmapCache.getIcon("plus")) |
207 self.installButton.setIcon(EricPixmapCache.getIcon("plus")) |
208 self.installButton.setIcon(EricPixmapCache.getIcon("plus")) |
208 self.installUserSiteButton.setIcon(EricPixmapCache.getIcon("addUser")) |
209 self.installUserSiteButton.setIcon(EricPixmapCache.getIcon("addUser")) |
209 self.showDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
210 self.showDetailsButton.setIcon(EricPixmapCache.getIcon("info")) |
804 self.searchMoreButton.setEnabled( |
805 self.searchMoreButton.setEnabled( |
805 enable and bool(self.searchEditName.text()) and self.__isPipAvailable() |
806 enable and bool(self.searchEditName.text()) and self.__isPipAvailable() |
806 ) |
807 ) |
807 |
808 |
808 @pyqtSlot(bool) |
809 @pyqtSlot(bool) |
809 def on_searchToggleButton_toggled(self, checked): |
810 def on_searchToggleButton_1_toggled(self, checked): |
810 """ |
811 """ |
811 Private slot to togle the search widget. |
812 Private slot to togle the search widget. |
812 |
813 |
813 @param checked state of the search widget button |
814 @param checked state of the search widget button |
814 @type bool |
815 @type bool |
815 """ |
816 """ |
816 self.searchWidget.setVisible(checked) |
817 self.searchWidget.setVisible(checked) |
|
818 self.searchToggleButton_2.setChecked(checked) |
817 |
819 |
818 if checked: |
820 if checked: |
819 self.searchEditName.setFocus(Qt.FocusReason.OtherFocusReason) |
821 self.searchEditName.setFocus(Qt.FocusReason.OtherFocusReason) |
820 self.searchEditName.selectAll() |
822 self.searchEditName.selectAll() |
821 |
823 |
822 self.__updateSearchActionButtons() |
824 self.__updateSearchActionButtons() |
823 self.__updateSearchButton() |
825 self.__updateSearchButton() |
824 self.__updateSearchMoreButton(False) |
826 self.__updateSearchMoreButton(False) |
|
827 |
|
828 @pyqtSlot(bool) |
|
829 def on_searchToggleButton_2_toggled(self, checked): |
|
830 """ |
|
831 Private slot to togle the search widget. |
|
832 |
|
833 @param checked state of the search widget button |
|
834 @type bool |
|
835 """ |
|
836 self.searchToggleButton_1.setChecked(checked) |
825 |
837 |
826 @pyqtSlot(str) |
838 @pyqtSlot(str) |
827 def on_searchEditName_textChanged(self, txt): |
839 def on_searchEditName_textChanged(self, txt): |
828 """ |
840 """ |
829 Private slot handling a change of the search term. |
841 Private slot handling a change of the search term. |
1235 self.__showLicensesDialogAct = self.__pipMenu.addAction( |
1247 self.__showLicensesDialogAct = self.__pipMenu.addAction( |
1236 self.tr("Show Licenses..."), self.__showLicensesDialog |
1248 self.tr("Show Licenses..."), self.__showLicensesDialog |
1237 ) |
1249 ) |
1238 self.__pipMenu.addSeparator() |
1250 self.__pipMenu.addSeparator() |
1239 self.__checkVulnerabilityAct = self.__pipMenu.addAction( |
1251 self.__checkVulnerabilityAct = self.__pipMenu.addAction( |
1240 self.tr("Check Vulnerabilities"), self.__updateVulnerabilityData |
1252 self.tr("Check Vulnerabilities"), self.__checkVulnerability |
1241 ) |
1253 ) |
1242 # updateVulnerabilityDbAct |
1254 # updateVulnerabilityDbAct |
1243 self.__pipMenu.addAction( |
1255 self.__pipMenu.addAction( |
1244 self.tr("Update Vulnerability Database"), self.__updateVulnerabilityDbCache |
1256 self.tr("Update Vulnerability Database"), self.__updateVulnerabilityDbCache |
1245 ) |
1257 ) |
1545 self.__updateVulnerabilityData(clearFirst=True) |
1557 self.__updateVulnerabilityData(clearFirst=True) |
1546 |
1558 |
1547 self.packagesList.header().setSectionHidden( |
1559 self.packagesList.header().setSectionHidden( |
1548 PipPackagesWidget.VulnerabilityColumn, not checked |
1560 PipPackagesWidget.VulnerabilityColumn, not checked |
1549 ) |
1561 ) |
|
1562 |
|
1563 @pyqtSlot() |
|
1564 def __checkVulnerability(self): |
|
1565 """ |
|
1566 Private slot to update and show the vulnerability data (called from the menu). |
|
1567 """ |
|
1568 self.vulnerabilityCheckBox.setChecked(True) |
|
1569 self.on_vulnerabilityCheckBox_clicked(True) |
1550 |
1570 |
1551 @pyqtSlot() |
1571 @pyqtSlot() |
1552 def __clearVulnerabilityInfo(self): |
1572 def __clearVulnerabilityInfo(self): |
1553 """ |
1573 """ |
1554 Private slot to clear the vulnerability info. |
1574 Private slot to clear the vulnerability info. |