예제 #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
    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
    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
	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
    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
    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
    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)
	def init_edit_widget(self):
		qtautoplugin.init_edit_widget(self)