コード例 #1
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/dns/gui/cmdlets/slit_scan.ui'))
     for box in self.slits + ['open_at_begin']:
         getattr(self, 'cB_' + box).stateChanged.connect(self.changed)
     for rb in ['RB_sample', 'RB_polarizer']:
         getattr(self, rb).toggled.connect(self._slitTypeChanged)
     for dsb in self.slits:
         for field in ['from', 'stepsize', 'number_of_steps']:
             dsb_obj = getattr(self, 'dSB_{}_{}'.format(dsb, field))
             dsb_obj.valueChanged.connect(self._calcEnd)
     self._slitTypeChanged()
コード例 #2
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/maria/gui/kscan.ui'))
     self.device.addItems(self._getDeviceList('hasattr(d, "speed")'))
     self.on_device_change(self.device.currentText())
     self.device.currentIndexChanged[str].connect(self.on_device_change)
     self.start.setValidator(DoubleValidator(self))
     self.step.setValidator(DoubleValidator(self))
     self.speed.setValidator(DoubleValidator(self))
     self.start.textChanged.connect(self.on_range_change)
     self.step.textChanged.connect(self.on_range_change)
     self.speed.textChanged.connect(self.on_range_change)
     self.numpoints.valueChanged.connect(self.on_range_change)
コード例 #3
0
ファイル: cmdlets.py プロジェクト: ess-dmsc/nicos
 def __init__(self, parent, client):
     uipath = findResource('nicos_ess/loki/gui/ui_files/table.ui')
     Cmdlet.__init__(self, parent, client, uipath)
     self.measdef = self.meas_def_class()
     self.updateTable()
     for loop in LOOPS:
         self.outerLoop.addItem(loop)
     self.outerLoop.setCurrentIndex(0)
     client.experiment.connect(self.on_client_experiment)
     self.expandBtn = QToolButton()
     self.expandBtn.setIcon(QIcon(':/down'))
     self.expandBtn.setAutoRaise(True)
     self.expandBtn.clicked.connect(self.on_expandBtn_clicked)
     self.table.setCornerWidget(self.expandBtn)
コード例 #4
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/maria/gui/sscan.ui'))
     self.device.addItems(self._getDeviceList())
     self.on_device_change(self.device.currentText())
     self.device.currentIndexChanged[str].connect(self.on_device_change)
     self.start.setValidator(DoubleValidator(self))
     self.stop.setValidator(DoubleValidator(self))
     self.step.setValidator(DoubleValidator(self))
     self.delta.setValidator(DoubleValidator(self))
     self.start.textChanged.connect(self.on_range_change)
     self.stop.textChanged.connect(self.on_range_change)
     self.step.textChanged.connect(self.on_range_change)
     self.delta.textChanged.connect(self.on_range_change)
コード例 #5
0
    def __init__(self, parent, client):
        Cmdlet.__init__(self, parent, client, self.uiName)
        for spin in [
                self.bankpositions, self.lowest_2theta, self.MonpMin, self.SF,
                self.NSF
        ]:
            spin.valueChanged.connect(self.changed)
        for box in [
                self.RB_time, self.RB_monitor, self.RB_min_per_mon,
                self.open_before, self.close_after
        ]:
            box.toggled.connect(self.changed)

        self.off.stateChanged.connect(self.disablexyz)
        self.RB_min_per_mon.toggled.connect(self.disable_mpm)
        self.XYZ.clicked.connect(self.checkXYZ)
        self.deselect.clicked.connect(self.uncheckfields)
        self._allfields = [
            self.XSF,
            self.XNSF,
            self.YSF,
            self.YNSF,
            self.ZSF,
            self.ZNSF,
            self.Zero_SF,
            self.Zero_SF,
            self.off,
        ]
        for field in self._allfields:
            field.stateChanged.connect(self.check_which_times)
        self.MonpMin.setDisabled(True)
        self.SF.setDisabled(True)
        lowest_2theta = self.client.getDeviceValue('det_rot')
        omega_start = self.client.getDeviceValue('sample_rot')
        if lowest_2theta is not None:  # just if you are not connected
            self.lowest_2theta.setValue(lowest_2theta)
        else:
            self.lowest_2theta.setValue(-5)
        if omega_start is not None:
            self.omega_start.setValue(omega_start)
        else:
            self.omega_start.setValue(100)
        # this should probably be read somehow from the configuration of
        # abslimits but I have no idea how to get them directly
        self.lowest_2theta.setMinimum(-20)
        self.lowest_2theta.setMaximum(-4)
        self.omega_start.setMinimum(2.5)
        self.omega_start.setMaximum(352)
コード例 #6
0
ファイル: cmdlets.py プロジェクト: umithardal/nicos
 def __init__(self, parent, client):
     uipath = findResource('nicos_mlz/kws1/gui/table.ui')
     Cmdlet.__init__(self, parent, client, uipath)
     self.measdef = self.meas_def_class(rtmode=False)
     self.rt_settings = RtConfigDialog.DEFAULT_SETTINGS.copy()
     self.rtConfBtn.setEnabled(False)
     self.updateTable()
     for loop in LOOPS:
         self.outerLoop.addItem(loop)
     self.outerLoop.setCurrentIndex(0)
     client.experiment.connect(self.on_client_experiment)
     self.expandBtn = QToolButton()
     self.expandBtn.setIcon(QIcon(':/down'))
     self.expandBtn.setAutoRaise(True)
     self.expandBtn.clicked.connect(self.on_expandBtn_clicked)
     self.table.setCornerWidget(self.expandBtn)
コード例 #7
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/poli/gui/lube.ui'))
     self.start.textChanged.connect(self.changed)
     self.end.textChanged.connect(self.changed)
コード例 #8
0
 def __init__(self, parent, client):
     Cmdlet.__init__(
         self, parent, client,
         findResource('nicos_mlz/dns/gui/cmdlets/temperature.ui'))
     self.temperature.valueChanged.connect(self.changed)
     self.waitfor.toggled.connect(self.changed)
コード例 #9
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/dns/gui/cmdlets/shutter.ui'))
     self.shutter.currentIndexChanged.connect(self.changed)
コード例 #10
0
 def __init__(self, parent, client):
     Cmdlet.__init__(self, parent, client,
                     findResource('nicos_mlz/kws3/gui/restore.ui'))
     for devname in self._getDeviceList():
         item = QListWidgetItem(devname, self.devList)
         item.setCheckState(Qt.Unchecked)