.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\itom\ui\demo_cameraWindow.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_11_demos_itom_ui_demo_cameraWindow.py: Camera widget ================ .. GENERATED FROM PYTHON SOURCE LINES 5-63 .. code-block:: Python from itom import dataIO from itom import ui from itom import dataObject cam = dataIO("DummyGrabber") win = ui("cameraWindow.ui", ui.TYPEWINDOW, childOfMainWindow=True) def integrationTime_changed(): if win.radioInt1["checked"]: cam.setParam("integration_time", 0.005) elif win.radioInt2["checked"]: cam.setParam("integration_time", 0.010) else: cam.setParam("integration_time", 0.060) def autoGrabbing_changed(checked): if checked: cam.enableAutoGrabbing() else: cam.disableAutoGrabbing() def snap(): d = dataObject() cam.startDevice() autoGrabbingStatus = cam.getAutoGrabbing() cam.disableAutoGrabbing() cam.acquire() cam.getVal(d) win.plot["source"] = d if autoGrabbingStatus: cam.enableAutoGrabbing() cam.stopDevice() def live(): win.plot["camera"] = cam # initialize all signal/slots win.radioInt1.connect("clicked()", integrationTime_changed) win.radioInt2.connect("clicked()", integrationTime_changed) win.radioInt3.connect("clicked()", integrationTime_changed) win.btnSnap.connect("clicked()", snap) win.btnLive.connect("clicked()", live) win.checkAutoGrabbing.connect("clicked(bool)", autoGrabbing_changed) # initialize gui elements win.checkAutoGrabbing["checked"] = cam.getAutoGrabbing() win.radioInt1["checked"] = True win.show(0) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.126 seconds) .. _sphx_glr_download_11_demos_itom_ui_demo_cameraWindow.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_cameraWindow.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_cameraWindow.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: demo_cameraWindow.zip `