コード例 #1
0
ファイル: vu_ams.py プロジェクト: JdenHartog/vu_ams
	def init_edit_widget(self):

		"""
		Constructs the GUI controls. Usually, you can omit this function
		altogether, but if you want to implement more advanced functionality,
		such as controls that are grayed out under certain conditions, you need
		to implement this here.
		"""

		# First, call the parent constructor, which constructs the GUI controls
		# based on info.json.
		qtautoplugin.init_edit_widget(self)
		# If you specify a 'name' for a control in info.json, this control will
		# be available self.[name]. The type of the object depends on the
		# control. A checkbox will be a QCheckBox, a line_edit will be a
		# QLineEdit.
		
		# Connect "Send marker" line_edit to "Use number from title" checkbox:
		self.checkbox_widget.stateChanged.connect( \
			self.line_edit_widget2.setDisabled)
		
		# Connect all widgets to "Use without VU-AMS device" checkbox:
		self.checkbox_widget2.stateChanged.connect( \
			self.line_edit_widget.setDisabled)
		self.checkbox_widget2.stateChanged.connect( \
			self.line_edit_widget2.setDisabled)
		self.checkbox_widget2.stateChanged.connect( \
			self.checkbox_widget.setDisabled)
コード例 #2
0
    def init_edit_widget(self):

        """
        Constructs the GUI controls. Usually, you can omit this function
        altogether, but if you want to implement more advanced functionality,
        such as controls that are grayed out under certain conditions, you need
        to implement this here.
        """

        # First, call the parent constructor, which constructs the GUI controls
        # based on info.json.
        qtautoplugin.init_edit_widget(self)
        # If you specify a 'name' for a control in info.json, this control will
        # be available self.[name]. The type of the object depends on the
        # control. A checkbox will be a QCheckBox, a line_edit will be a
        # QLineEdit. Here we connect the stateChanged signal of the QCheckBox,
        # to the setEnabled() slot of the QLineEdit. This has the effect of
        # disabling the QLineEdit when the QCheckBox is uncheckhed. We also
        # explictly set the starting state.
        #self.line_edit_widget.setEnabled(self.checkbox_widget.isChecked())
        #self.checkbox_widget.stateChanged.connect(
        #    self.line_edit_widget.setEnabled)
        ELister = EvtExchanger()
        listofdevices = ELister.Attached()
        for i in listofdevices:
            self.VAS_ENCODERID_widget.addItem(i)
        self.VAS_TIMERNAME_widget.setEnabled(self.VAS_EXIT_METHOD_widget.currentText() == u'TIME')
        self.VAS_DURATION_widget.setEnabled(self.VAS_EXIT_METHOD_widget.currentText() == u'TIME')
        self.VAS_EXITKEY_widget.setEnabled(self.VAS_EXIT_METHOD_widget.currentText() == u'KEY')
        self.VAS_EXIT_METHOD_widget.currentTextChanged.connect(self.c)
コード例 #3
0
ファイル: ResponseBox.py プロジェクト: markspan/evtplugins
    def init_edit_widget(self):

        # Pass the word on to the parent
        qtautoplugin.init_edit_widget(self)

        EE = EvtExchanger()
        listofdevices = EE.Attached()
        for i in listofdevices:
            self.ProductName_widget.addItem(i)
コード例 #4
0
ファイル: Pulse_EVT2.py プロジェクト: Python3pkg/EVT2
    def init_edit_widget(self):
        """
        This function creates the controls for the edit
        widget.
        """
        #self.add_combobox_control('var','label','options', tooltip='tooltip')
        # Lock the widget until we're doing creating it

        # Pass the word on to the parent
        qtautoplugin.init_edit_widget(self)
コード例 #5
0
ファイル: VAS2.py プロジェクト: markspan/evtplugins
    def init_edit_widget(self):
        """
		Constructs the GUI controls. Usually, you can omit this function
		altogether, but if you want to implement more advanced functionality,
		such as controls that are grayed out under certain conditions, you need
		to implement this here.
		"""

        # First, call the parent constructor, which constructs the GUI controls
        # based on info.json.
        qtautoplugin.init_edit_widget(self)
コード例 #6
0
ファイル: mobile_menu.py プロジェクト: EoinTravers/OpenSesame
	def init_edit_widget(self):

		"""
		Constructs the GUI controls. Usually, you can omit this function
		altogether, but if you want to implement more advanced functionality,
		such as controls that are grayed out under certain conditions, you need
		to implement this here.
		"""

		# First, call the parent constructor, which constructs the GUI controls
		# based on info.json.
		qtautoplugin.init_edit_widget(self)
コード例 #7
0
    def init_edit_widget(self):

        qtautoplugin.init_edit_widget(self)
        self._combobox_sketchpad = item_combobox(
            self.main_window,
            filter_fnc=lambda item: item in self.experiment.items and
            isinstance(self.experiment.items[item], feedpad))
        self._combobox_sketchpad.activated.connect(self.apply_edit_changes)
        self.auto_combobox[u'linked_sketchpad'] = self._combobox_sketchpad
        self.add_control(label=_(u'Linked sketchpad'),
                         widget=self._combobox_sketchpad,
                         info=_('Elements define regions of interest'))
コード例 #8
0
	def init_edit_widget(self):
	# Pass the word on to the parent
		qtautoplugin.init_edit_widget(self)

		EE = EvtExchanger()
		listOfDevices = EE.Attached(u"SHOCKER")
		# if there is no shocker attached, the selected name defaults to 'Dummy' again.
		if listOfDevices:
			for i in listOfDevices:
				self.ProductName_widget.addItem(i)
		else:
			self.var._productName = u"DUMMY"
		
		self.duration_widget.setEnabled(False)
		
		self.value_widget.returnPressed.connect(self.perc_check)
		self.Calibrate_widget.currentTextChanged.connect(self.type_check)
		self.value_widget.setEnabled(self.Calibrate_widget.currentText() == u'Shock')
コード例 #9
0
ファイル: alt_logger.py プロジェクト: EoinTravers/OpenSesame
    def init_edit_widget(self):

        """
		Constructs the GUI controls. Usually, you can omit this function
		altogether, but if you want to implement more advanced functionality,
		such as controls that are grayed out under certain conditions, you need
		to implement this here.
		"""

        # First, call the parent constructor, which constructs the GUI controls
        # based on info.json.
        qtautoplugin.init_edit_widget(self)
        # If you specify a 'name' for a control in info.json, this control will
        # be available self.[name]. The type of the object depends on the
        # control. A checkbox will be a QCheckBox, a line_edit will be a
        # QLineEdit. Here we connect the stateChanged signal of the QCheckBox,
        # to the setEnabled() slot of the QLineEdit. This has the effect of
        # disabling the QLineEdit when the QCheckBox is uncheckhed.
        self.checkbox_log_all.stateChanged.connect(self.line_vars_string.setDisabled)
コード例 #10
0
ファイル: auto_example.py プロジェクト: nagyistge/OpenSesame
    def init_edit_widget(self):
        """
		Constructs the GUI controls. Usually, you can omit this function
		altogether, but if you want to implement more advanced functionality,
		such as controls that are grayed out under certain conditions, you need
		to implement this here.
		"""

        # First, call the parent constructor, which constructs the GUI controls
        # based on info.json.
        qtautoplugin.init_edit_widget(self)
        # If you specify a 'name' for a control in info.json, this control will
        # be available self.[name]. The type of the object depends on the
        # control. A checkbox will be a QCheckBox, a line_edit will be a
        # QLineEdit. Here we connect the stateChanged signal of the QCheckBox,
        # to the setEnabled() slot of the QLineEdit. This has the effect of
        # disabling the QLineEdit when the QCheckBox is uncheckhed.
        self.checkbox_widget.stateChanged.connect( \
         self.line_edit_widget.setEnabled)
コード例 #11
0
ファイル: pygaze_init.py プロジェクト: julian-tejada/PyGaze-1
    def init_edit_widget(self):

        qtautoplugin.init_edit_widget(self)
        self.custom_interactions()
        self.text_pygaze_version.setText(u'<small>PyGaze version %s</small>' %
                                         pygaze.version)
コード例 #12
0
    def init_edit_widget(self):

        qtautoplugin.init_edit_widget(self)
        self.custom_interactions()
    def init_edit_widget(self):
        """Initializes the controls."""

        # Pass the word on to the parent
        qtautoplugin.init_edit_widget(self)
コード例 #14
0
 def init_edit_widget(self):
     qtautoplugin.init_edit_widget(self)
コード例 #15
0
	def init_edit_widget(self):
		qtautoplugin.init_edit_widget(self)