コード例 #1
0
 def get_qt_ui(self):
     """Return a user interface for the experiment"""
     gb = QuickControlBox("Irradiation Experiment")
     gb.add_doublespinbox("irradiation_time")
     gb.add_doublespinbox("wait_time")
     gb.add_button("start")
     gb.add_button("stop")
     gb.auto_connect_by_name(self)
     return gb
コード例 #2
0
    def __init__(self, camera, auto_connect=True):
        super(MyCameraControlWidget, self).__init__(camera, auto_connect=False)

        gb = QuickControlBox()
        gb.add_doublespinbox("gain")
        gb.add_doublespinbox("exposure")
        self.layout().insertWidget(1, gb) # put the extra settings in the middle
        self.quick_settings_groupbox = gb        
        
        self.auto_connect_by_name(controlled_object=self.camera, verbose=False)
コード例 #3
0
ファイル: Lucam.py プロジェクト: edemonpore/RTDAQ-32bit
        def __init__(self, camera, auto_connect=True):
            super(LumeneraCameraControlWidget, self).__init__(camera, auto_connect=False)
            gb = QuickControlBox()
            gb.add_doublespinbox("exposure")
            gb.add_doublespinbox("gain")
            gb.add_button("show_camera_properties_dialog", title="Camera Setup")
            gb.add_button("show_video_format_dialog", title="Video Format")
            self.layout().insertWidget(1, gb)  # put the extra settings in the middle
            self.quick_settings_groupbox = gb

            self.auto_connect_by_name(controlled_object=self.camera, verbose=False)
コード例 #4
0
    def __init__(self, camera, auto_connect=True):
        super(TimelapseCameraControlWidget, self).__init__(camera,
                                                           auto_connect=False)
        gb = QuickControlBox()
        gb.add_doublespinbox("exposure")
        gb.add_spinbox("timelapse_n")
        gb.add_doublespinbox("timelapse_dt")
        gb.add_button("take_timelapse", title="Acquire Timelapse")
        self.layout().insertWidget(1,
                                   gb)  # put the extra settings in the middle
        self.quick_settings_groupbox = gb

        self.auto_connect_by_name(controlled_object=self.camera, verbose=False)
コード例 #5
0
    def __init__(self, cwl):
        super(CameraWithLocationControlUI, self).__init__()
        self.cwl = cwl
        cc = QuickControlBox("Settings")
        cc.add_doublespinbox("calibration_distance")
        cc.add_button("calibrate_xy_gui", "Calibrate XY")
        cc.auto_connect_by_name(self)
        self.calibration_controls = cc

        fc = QuickControlBox("Autofocus")
        fc.add_doublespinbox("af_step_size")
        fc.add_spinbox("af_steps")
        fc.add_button("autofocus_gui", "Autofocus")
        fc.add_button("quick_autofocus_gui", "Quick Autofocus")
        fc.auto_connect_by_name(self.cwl)
        self.focus_controls = fc

#        sc = 

        l = QtWidgets.QHBoxLayout()
        l.addWidget(cc)
        l.addWidget(fc)
        self.setLayout(l)
コード例 #6
0
    def __init__(self, camera, auto_connect=True):
        super(MyCameraControlWidget, self).__init__(camera, auto_connect=False)

        #        gb = QtGui.QGroupBox()
        #        self.quick_settings_groupbox = gb
        #        gb.setTitle("Quick Settings")
        #        gb.setLayout(QtGui.QFormLayout())
        #
        #        self.gain_spinbox = QtGui.QDoubleSpinBox()
        #        self.gain_spinbox.setObjectName("gain_spinbox")
        #        print "gain spinbox is called " + self.gain_spinbox.objectName()
        #        gb.layout().addRow("Gain:",self.gain_spinbox)
        #        self.exposure_spinbox = QtGui.QDoubleSpinBox()
        #        self.exposure_spinbox.setObjectName("exposure_spinbox")
        #        gb.layout().addRow("Exposure:",self.exposure_spinbox)

        gb = QuickControlBox()
        gb.add_doublespinbox("gain")
        gb.add_doublespinbox("exposure")
        self.layout().insertWidget(1,
                                   gb)  # put the extra settings in the middle
        self.quick_settings_groupbox = gb

        self.auto_connect_by_name(controlled_object=self.camera, verbose=True)
コード例 #7
0
        #        gb.setLayout(QtGui.QFormLayout())
        #
        #        self.gain_spinbox = QtGui.QDoubleSpinBox()
        #        self.gain_spinbox.setObjectName("gain_spinbox")
        #        print "gain spinbox is called " + self.gain_spinbox.objectName()
        #        gb.layout().addRow("Gain:",self.gain_spinbox)
        #        self.exposure_spinbox = QtGui.QDoubleSpinBox()
        #        self.exposure_spinbox.setObjectName("exposure_spinbox")
        #        gb.layout().addRow("Exposure:",self.exposure_spinbox)

        gb = QuickControlBox()
        gb.add_doublespinbox("gain")
        gb.add_doublespinbox("exposure")
        self.layout().insertWidget(1,
                                   gb)  # put the extra settings in the middle
        self.quick_settings_groupbox = gb

        self.auto_connect_by_name(controlled_object=self.camera, verbose=True)


if __name__ == '__main__':
    cam = MyOpenCVCamera()
    cam.show_gui()

    gb = QuickControlBox()
    gb.add_doublespinbox("gain")
    gb.add_checkbox("live_view")
    gb.auto_connect_by_name(cam, verbose=True)
    gb.show()
    cam.show_gui()