13 QWidget, QDialog, QDialogButtonBox, QTreeWidgetItem, QHeaderView, |
13 QWidget, QDialog, QDialogButtonBox, QTreeWidgetItem, QHeaderView, |
14 QVBoxLayout |
14 QVBoxLayout |
15 ) |
15 ) |
16 |
16 |
17 from EricWidgets.EricPathPicker import EricPathPickerModes |
17 from EricWidgets.EricPathPicker import EricPathPickerModes |
|
18 from EricWidgets.EricMainWindow import EricMainWindow |
18 |
19 |
19 from .Ui_VirtualenvManagerWidget import Ui_VirtualenvManagerWidget |
20 from .Ui_VirtualenvManagerWidget import Ui_VirtualenvManagerWidget |
20 |
21 |
21 import Utilities |
22 import Utilities |
22 import UI.PixmapCache |
23 import UI.PixmapCache |
349 self.setWindowTitle(self.tr("Manage Virtual Environments")) |
350 self.setWindowTitle(self.tr("Manage Virtual Environments")) |
350 |
351 |
351 self.buttonBox.accepted.connect(self.accept) |
352 self.buttonBox.accepted.connect(self.accept) |
352 self.buttonBox.rejected.connect(self.reject) |
353 self.buttonBox.rejected.connect(self.reject) |
353 |
354 |
354 # TODO: add a VirtualenvManagerWindow class and am associated script |
355 |
|
356 class VirtualenvManagerWindow(EricMainWindow): |
|
357 """ |
|
358 Main window class for the standalone virtual environments manager. |
|
359 """ |
|
360 def __init__(self, parent=None): |
|
361 """ |
|
362 Constructor |
|
363 |
|
364 @param parent reference to the parent widget (QWidget) |
|
365 """ |
|
366 super().__init__(parent) |
|
367 |
|
368 from VirtualEnv.VirtualenvManager import VirtualenvManager |
|
369 self.__virtualenvManager = VirtualenvManager(self) |
|
370 |
|
371 self.__centralWidget = QWidget(self) |
|
372 self.__layout = QVBoxLayout(self.__centralWidget) |
|
373 self.__centralWidget.setLayout(self.__layout) |
|
374 |
|
375 self.__virtualenvManagerWidget = VirtualenvManagerWidget( |
|
376 self.__virtualenvManager, self.__centralWidget) |
|
377 self.__layout.addWidget(self.__virtualenvManagerWidget) |
|
378 |
|
379 self.__buttonBox = QDialogButtonBox( |
|
380 QDialogButtonBox.StandardButton.Close, |
|
381 Qt.Orientation.Horizontal, |
|
382 self) |
|
383 self.__layout.addWidget(self.__buttonBox) |
|
384 |
|
385 self.setCentralWidget(self.__centralWidget) |
|
386 self.resize(700, 500) |
|
387 self.setWindowTitle(self.tr("Manage Virtual Environments")) |
|
388 |
|
389 self.__buttonBox.accepted.connect(self.close) |
|
390 self.__buttonBox.rejected.connect(self.close) |