Ejemplo n.º 1
0
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		self.btext = '' # button text
		self.type = 'control'
		self.code = ''
		NodeParam.__init__ ( self, xml_param, isRibParam )

		if DEBUG_MODE : print ( '>> ControlParam ( %s ).__init__ btext = "%s"' % ( self.label, self.btext ) )
Ejemplo n.º 2
0
    def __init__(self, xml_param=None, isRibParam=False):
        #
        self.btext = ''  # button text
        self.type = 'control'
        self.code = ''
        NodeParam.__init__(self, xml_param, isRibParam)

        if DEBUG_MODE:
            print('>> ControlParam ( %s ).__init__ btext = "%s"' %
                  (self.label, self.btext))
Ejemplo n.º 3
0
	def parseFromXML ( self, xml_param ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).parseFromXML' % self.label )
		NodeParam.parseFromXML ( self, xml_param )

		control_code_tag = xml_param.namedItem ( 'code' )
		if not control_code_tag.isNull () :
			self.code = str ( control_code_tag.toElement ().text () )
		else :
			# for temp. backward compatibility check 'control_code' also
			control_code_tag = xml_param.namedItem ( 'control_code' )
			if not control_code_tag.isNull () :
				code_str = str ( control_code_tag.toElement ().text () ).lstrip ()
				if code_str == '' : code_str = None
				self.code = code_str
			
		self.btext = str ( xml_param.attributes ().namedItem ( 'btext' ).nodeValue () )
Ejemplo n.º 4
0
    def parseFromXML(self, xml_param):
        #
        if DEBUG_MODE:
            print('>> ControlParam ( %s ).parseFromXML' % self.label)
        NodeParam.parseFromXML(self, xml_param)

        control_code_tag = xml_param.namedItem('code')
        if not control_code_tag.isNull():
            self.code = str(control_code_tag.toElement().text())
        else:
            # for temp. backward compatibility check 'control_code' also
            control_code_tag = xml_param.namedItem('control_code')
            if not control_code_tag.isNull():
                code_str = str(control_code_tag.toElement().text()).lstrip()
                if code_str == '': code_str = None
                self.code = code_str

        self.btext = str(xml_param.attributes().namedItem('btext').nodeValue())
Ejemplo n.º 5
0
	def parseToXML ( self, dom ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).parseToXML' % self.label )
		xmlnode = NodeParam.parseToXML ( self, dom )

		if self.code is not None :
			code_tag = dom.createElement ( 'code' )
			code_text = dom.createTextNode ( self.code )
			code_tag.appendChild ( code_text )
			xmlnode.appendChild ( code_tag )
		
		if self.btext != '' : xmlnode.setAttribute ( 'btext', self.btext )

		return xmlnode
Ejemplo n.º 6
0
    def parseToXML(self, dom):
        #
        if DEBUG_MODE: print('>> ControlParam ( %s ).parseToXML' % self.label)
        xmlnode = NodeParam.parseToXML(self, dom)

        if self.code is not None:
            code_tag = dom.createElement('code')
            code_text = dom.createTextNode(self.code)
            code_tag.appendChild(code_text)
            xmlnode.appendChild(code_tag)

        if self.btext != '': xmlnode.setAttribute('btext', self.btext)

        return xmlnode
Ejemplo n.º 7
0
	def copySetup ( self, newParam ) :
		#
		if DEBUG_MODE : print ( '>> ControlParam ( %s ).copySetup' % self.label )
		NodeParam.copySetup ( self, newParam )
		newParam.code = self.code
		newParam.btext = self.btext
Ejemplo n.º 8
0
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'volume'
Ejemplo n.º 9
0
 def __init__ ( self, xml_param = None, isRibParam = False ) :
   NodeParam.__init__ ( self, xml_param, isRibParam )
   self.type = 'matrix'
Ejemplo n.º 10
0
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     #super ( FloatNodeParam, self ).__init__ ( xml_param, isRibParam )
     self.type = 'float'
Ejemplo n.º 11
0
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		#super ( FloatNodeParam, self ).__init__ ( xml_param, isRibParam )
		self.type = 'float'
Ejemplo n.º 12
0
	def __init__ ( self, xml_param = None, isRibParam = False ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'displacement'
Ejemplo n.º 13
0
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'displacement'
Ejemplo n.º 14
0
 def copySetup(self, newParam):
     #
     if DEBUG_MODE: print('>> ControlParam ( %s ).copySetup' % self.label)
     NodeParam.copySetup(self, newParam)
     newParam.code = self.code
     newParam.btext = self.btext
Ejemplo n.º 15
0
	def __init__ ( self, xml_param = None, isRibParam = True ) :
		#
		NodeParam.__init__ ( self, xml_param, isRibParam )
		self.type = 'transform'
Ejemplo n.º 16
0
 def __init__(self, xml_param=None, isRibParam=False):
     #
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'vector'
Ejemplo n.º 17
0
 def __init__(self, xml_param=None, isRibParam=False):
     NodeParam.__init__(self, xml_param, isRibParam)
     self.type = 'matrix'