Explorar o código

Add string property to CLI .xslt to retrieve Qt text field

Matt Clarkson %!s(int64=12) %!d(string=hai) anos
pai
achega
07f9efe13d

+ 2 - 0
Libs/CommandLineModules/Frontend/QtGui/Resources/ctkCmdLineModuleXmlToQtUi.xsl

@@ -47,6 +47,7 @@
   <xsl:param name="booleanValueProperty">checked</xsl:param>
   <xsl:param name="integerValueProperty">value</xsl:param>
   <xsl:param name="floatValueProperty">value</xsl:param>
+  <xsl:param name="stringValueProperty">text</xsl:param>
   <xsl:param name="pointValueProperty">coordinates</xsl:param>
   <xsl:param name="regionValueProperty">coordinates</xsl:param>
   <xsl:param name="imageInputValueProperty">currentPath</xsl:param>
@@ -97,6 +98,7 @@
       <xsl:when test="$cliType='integer'"><xsl:value-of select="$integerValueProperty"/></xsl:when>
       <xsl:when test="$cliType='float'"><xsl:value-of select="$floatValueProperty"/></xsl:when>
       <xsl:when test="$cliType='double'"><xsl:value-of select="$floatValueProperty"/></xsl:when>
+      <xsl:when test="$cliType='string'"><xsl:value-of select="$stringValueProperty"/></xsl:when>
       <xsl:when test="$cliType='point'"><xsl:value-of select="$pointValueProperty"/></xsl:when>
       <xsl:when test="$cliType='region'"><xsl:value-of select="$regionValueProperty"/></xsl:when>
       <xsl:when test="$cliType='image' and $cliChannel='input'"><xsl:value-of select="$imageInputValueProperty"/></xsl:when>