example for enums

This commit is contained in:
Marco Martin 2013-09-11 17:51:56 +02:00
parent cdc778f417
commit 879b6adff3
2 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,18 @@
<label>This is another test</label>
<default>test2</default>
</entry>
<entry name="EnumTest" type="Enum">
<default>0</default>
<choices>
<choice name="PlasmaCore.Types.Floating"/>
<choice name="PlasmaCore.Types.Desktop"/>
<choice name="PlasmaCore.Types.FullScreen"/>
<choice name="PlasmaCore.Types.LeftEdge"/>
<choice name="PlasmaCore.Types.RightEdge"/>
<choice name="PlasmaCore.Types.TopEdge"/>
<choice name="PlasmaCore.Types.BottomEdge"/>
</choices>
</entry>
</group>
</kcfg>

View File

@ -51,6 +51,10 @@ Item {
text: plasmoid.configuration.OtherTest
onTextChanged: plasmoid.configuration.OtherTest = text
}
PlasmaComponents.TextField {
text: plasmoid.configuration.EnumTest
onTextChanged: plasmoid.configuration.EnumTest = text
}
}
}