18 QTreeWidgetItem, |
18 QTreeWidgetItem, |
19 QHeaderView, |
19 QHeaderView, |
20 QVBoxLayout, |
20 QVBoxLayout, |
21 ) |
21 ) |
22 |
22 |
23 from EricWidgets.EricPathPicker import EricPathPickerModes |
23 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes |
24 from EricWidgets.EricMainWindow import EricMainWindow |
24 from eric7.EricWidgets.EricMainWindow import EricMainWindow |
25 |
25 |
26 from .Ui_VirtualenvManagerWidget import Ui_VirtualenvManagerWidget |
26 from .Ui_VirtualenvManagerWidget import Ui_VirtualenvManagerWidget |
27 |
27 |
28 import Utilities |
28 from eric7 import Utilities |
29 import UI.PixmapCache |
29 from eric7.EricGui import EricPixmapCache |
30 |
30 |
31 |
31 |
32 class VirtualenvManagerWidget(QWidget, Ui_VirtualenvManagerWidget): |
32 class VirtualenvManagerWidget(QWidget, Ui_VirtualenvManagerWidget): |
33 """ |
33 """ |
34 Class implementing a widget to manage the list of defined virtual |
34 Class implementing a widget to manage the list of defined virtual |
52 super().__init__(parent) |
52 super().__init__(parent) |
53 self.setupUi(self) |
53 self.setupUi(self) |
54 |
54 |
55 self.__manager = manager |
55 self.__manager = manager |
56 |
56 |
57 self.refreshButton.setIcon(UI.PixmapCache.getIcon("reload")) |
57 self.refreshButton.setIcon(EricPixmapCache.getIcon("reload")) |
58 self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) |
58 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) |
59 self.newButton.setIcon(UI.PixmapCache.getIcon("new")) |
59 self.newButton.setIcon(EricPixmapCache.getIcon("new")) |
60 self.editButton.setIcon(UI.PixmapCache.getIcon("edit")) |
60 self.editButton.setIcon(EricPixmapCache.getIcon("edit")) |
61 self.upgradeButton.setIcon(UI.PixmapCache.getIcon("upgrade")) |
61 self.upgradeButton.setIcon(EricPixmapCache.getIcon("upgrade")) |
62 self.removeButton.setIcon(UI.PixmapCache.getIcon("minus")) |
62 self.removeButton.setIcon(EricPixmapCache.getIcon("minus")) |
63 self.removeAllButton.setIcon(UI.PixmapCache.getIcon("minus_3")) |
63 self.removeAllButton.setIcon(EricPixmapCache.getIcon("minus_3")) |
64 self.deleteButton.setIcon(UI.PixmapCache.getIcon("fileDelete")) |
64 self.deleteButton.setIcon(EricPixmapCache.getIcon("fileDelete")) |
65 self.deleteAllButton.setIcon(UI.PixmapCache.getIcon("fileDeleteList")) |
65 self.deleteAllButton.setIcon(EricPixmapCache.getIcon("fileDeleteList")) |
66 self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSave")) |
66 self.saveButton.setIcon(EricPixmapCache.getIcon("fileSave")) |
67 |
67 |
68 baseDir = self.__manager.getVirtualEnvironmentsBaseDir() |
68 baseDir = self.__manager.getVirtualEnvironmentsBaseDir() |
69 if not baseDir: |
69 if not baseDir: |
70 baseDir = Utilities.getHomeDir() |
70 baseDir = Utilities.getHomeDir() |
71 |
71 |
443 |
443 |
444 @param parent reference to the parent widget (QWidget) |
444 @param parent reference to the parent widget (QWidget) |
445 """ |
445 """ |
446 super().__init__(parent) |
446 super().__init__(parent) |
447 |
447 |
448 from VirtualEnv.VirtualenvManager import VirtualenvManager |
448 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager |
449 |
449 |
450 self.__virtualenvManager = VirtualenvManager(self) |
450 self.__virtualenvManager = VirtualenvManager(self) |
451 |
451 |
452 self.__centralWidget = QWidget(self) |
452 self.__centralWidget = QWidget(self) |
453 self.__layout = QVBoxLayout(self.__centralWidget) |
453 self.__layout = QVBoxLayout(self.__centralWidget) |