12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- def customSlider():
- limitSlider = QSlider(Qt.Horizontal)
- limitSlider.setMinimum(-3)
- limitSlider.setMaximum(3)
- limitSlider.setValue(1)
- limitSlider.setTickPosition(QSlider.TicksBothSides)
- limitSlider.setTickInterval(1)
- limitSlider.valueChanged.connect(lambda: valueChange(workspace))
- limitSlider.setStatusTip("Change axes limit")
- return limitSlider
- workspace.xLimitSlider = customSlider()
- workspace.yLimitSlider = customSlider()
- workspace.zLimitSlider = customSlider()
- workspace.meshDensityValue = QLabel(
- "Mesh Layers: " + str(workspace.axisRange[3]))
- workspace.meshDensityValue.setStatusTip("Increment for a denser mesh in 3D plot")
- workspace.meshDensity = QSpinBox()
- workspace.meshDensity.setFixedSize(200, 30)
- workspace.meshDensity.setRange(10, 75)
- workspace.meshDensity.setValue(30)
- workspace.meshDensity.valueChanged.connect(lambda: valueChange(workspace))
- workspace.meshDensity.setStatusTip("Incrementing mesh density may affect performance")
- refreshPlotterText = QLabel("Apply plotter settings")
- refreshPlotter = QPushButton('Apply')
- refreshPlotter.setFixedSize(200, 30)
- refreshPlotter.clicked.connect(lambda: refreshPlot(workspace))
- refreshPlotter.setStatusTip("Apply modified settings to plotter.")
- axisPref = QSplitter(Qt.Vertical)
- axisPref.addWidget(workspace.xLimitValue)
- axisPref.addWidget(workspace.xLimitSlider)
- axisPref.addWidget(workspace.yLimitValue)
- axisPref.addWidget(workspace.yLimitSlider)
- axisPref.addWidget(workspace.zLimitValue)
- axisPref.addWidget(workspace.zLimitSlider)
- plotSetPref = QSplitter(Qt.Vertical)
- plotSetPref.addWidget(workspace.meshDensityValue)
- plotSetPref.addWidget(workspace.meshDensity)
- plotSetPref.addWidget(refreshPlotterText)
- plotSetPref.addWidget(refreshPlotter)
- prefLayout.addWidget(plotSetPref)
- prefLayout.addWidget(axisPref)
- prefLayout.setFixedWidth(400)
- return prefLayout
|