MCPcopy Create free account
hub / github.com/LabPy/lantz / start_test_app

Function start_test_app

lantz/ui/app.py:253–276  ·  view source on GitHub ↗

Start a single window test application with a form automatically generated for the driver. :param target: a driver object or a collection of drivers. :param width: to be used as minimum width of the window. :param qapp_or_args: arguments to be passed to QApplication.

(target, width=500, qapp_or_args=None)

Source from the content-addressed store, hash-verified

251
252
253def start_test_app(target, width=500, qapp_or_args=None):
254 """Start a single window test application with a form automatically
255 generated for the driver.
256
257 :param target: a driver object or a collection of drivers.
258 :param width: to be used as minimum width of the window.
259 :param qapp_or_args: arguments to be passed to QApplication.
260 """
261
262 if isinstance(qapp_or_args, QtGui.QApplication):
263 qapp = qapp_or_args
264 else:
265 qapp = QtGui.QApplication(qapp_or_args or [''])
266
267 if isinstance(target, Driver):
268 main = DriverTestWidget(None, target)
269 else:
270 main = SetupTestWidget(None, target)
271 main.setMinimumWidth(width)
272 main.setWindowTitle('Lantz Driver Test Panel')
273 main.show()
274 if sys.platform.startswith('darwin'):
275 main.raise_()
276 qapp.exec_()
277
278
279def start_gui(ui_filename, drivers, qapp_or_args=None):

Callers 15

minilasevo.pyFile · 0.90
sensicam.pyFile · 0.90
aotf.pyFile · 0.90
minilasevo.pyFile · 0.90
sensicam.pyFile · 0.90
aotf.pyFile · 0.90
lambda103.pyFile · 0.90
a2023a.pyFile · 0.90
nanoscanz.pyFile · 0.90
hri.pyFile · 0.90
innova.pyFile · 0.90
lambda103.pyFile · 0.90

Calls 2

DriverTestWidgetClass · 0.85
SetupTestWidgetClass · 0.85

Tested by

no test coverage detected