本文整理汇总了Python中Analyzer.Analyzer.exportAllImages方法的典型用法代码示例。如果您正苦于以下问题:Python Analyzer.exportAllImages方法的具体用法?Python Analyzer.exportAllImages怎么用?Python Analyzer.exportAllImages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analyzer.Analyzer
的用法示例。
在下文中一共展示了Analyzer.exportAllImages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from Analyzer import Analyzer [as 别名]
# 或者: from Analyzer.Analyzer import exportAllImages [as 别名]
class MainWindow(QMainWindow):
__PREF_GEOM__ = "UI/Geometry"
__PREF_STATE__ = "UI/State"
__PREF_DIR__ = "Config/Directories"
__PREF_SAVE__ = "Config/SaveDirectory"
__PREF_SAVE_ALL__ = "Config/SaveAllDirectory"
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.analyzer = Analyzer()
self.currentSolution = None
self._buildUI()
self._loadSettings()
QTimer.singleShot(0, self._loadInitialData)
def _buildUI(self):
self.setWindowTitle("MOOI: Multi-Objective Optimization Interface")
self.resize(840, 480)
self.statusBar().setSizeGripEnabled(False)
self.statusBar().showMessage("Loading initial data...")
# Plot widget
self.plot = PlotWidget()
self.plot.setMinimumSize(320, 480)
self.plot.setAlignment(Qt.AlignCenter)
self.plot.setContextMenuPolicy(Qt.ActionsContextMenu)
self.setCentralWidget(self.plot)
# Function widget
self.functionWidget = QListWidget()
self.functionWidget.itemSelectionChanged.connect(self.solutionSelected)
rightDock = QDockWidget("Functions", self)
rightDock.setObjectName("Functions")
rightDock.setWidget(self.functionWidget)
rightDock.setFeatures(QDockWidget.DockWidgetFloatable | QDockWidget.DockWidgetMovable)
self.addDockWidget(Qt.RightDockWidgetArea, rightDock)
# Control widget
self.showSolutionsRadio = QRadioButton("Functions")
self.showSolutionsRadio.setChecked(True)
self.showSolutionsRadio.toggled.connect(self._showSolution)
self.showVariablesRadio = QRadioButton("Variables")
radioWidget = QWidget()
radioLayout = QHBoxLayout()
radioLayout.addWidget(self.showSolutionsRadio)
radioLayout.addWidget(self.showVariablesRadio)
radioWidget.setLayout(radioLayout)
self.generationLabel = QLabel("Run: 1")
self.generationSlider = QSlider(Qt.Horizontal)
self.generationSlider.setTickPosition(QSlider.TicksBothSides)
self.generationSlider.setTracking(True)
self.generationSlider.setMinimum(1)
self.generationSlider.setMaximum(1)
self.generationSlider.setTickInterval(1)
self.generationSlider.valueChanged.connect(self._showSolution)
self.solutionSelector = QWidget()
self.solutionSelector.setLayout(QVBoxLayout())
addSolutionButton = QPushButton("Add")
addSolutionButton.clicked.connect(self.addImplementation)
removeSolutionButton = QPushButton("Remove unselected")
removeSolutionButton.clicked.connect(self.removeResult)
solutionSelectorButtons = QWidget()
solutionSelectorButtons.setLayout(QHBoxLayout())
solutionSelectorButtons.layout().addWidget(addSolutionButton)
solutionSelectorButtons.layout().addWidget(removeSolutionButton)
self.solutionSelectorWidget = QWidget()
self.solutionSelectorWidget.setLayout(QVBoxLayout())
self.solutionSelectorWidget.layout().addWidget(solutionSelectorButtons)
self.solutionSelectorWidget.layout().addWidget(self.solutionSelector)
exportButton = QPushButton("Export image")
exportButton.clicked.connect(self.exportImage)
exportAllButton = QPushButton("Export all images")
exportAllButton.clicked.connect(self.exportAllImages)
computeMetricsButton = QPushButton("Compute metrics")
computeMetricsButton.clicked.connect(self.computeMetricsAsync)
refreshButton = QPushButton("Refresh")
refreshButton.clicked.connect(self.updateUI)
controlLayout = QVBoxLayout()
controlLayout.addWidget(radioWidget)
controlLayout.addWidget(self.generationLabel)
controlLayout.addWidget(self.generationSlider)
controlLayout.addWidget(self.solutionSelectorWidget)
controlLayout.addStretch()
controlLayout.addWidget(computeMetricsButton)
controlLayout.addWidget(refreshButton)
controlLayout.addWidget(exportButton)
controlLayout.addWidget(exportAllButton)
controlWidget = QWidget()
controlWidget.setLayout(controlLayout)
#.........这里部分代码省略.........