A helper class defining the look and feel of a few GUI widgets. Contains a skin and methods for generating styled views.
See GUICVOverview for practical usage.
Access the GUICV skin with...
and overwrite entries like this...
GUICV's skin expects the following entries...
- background
- a Color.
- buttonHeight
- an Integer.
- fontColor
- a Color.
- fontSpecs
- an Array with fontName String and fontSize Integer e.g.
["Menlo", 10]
. - fontSmallSpecs
- an Array with fontName String and fontSize Integer e.g.
["Menlo", 8]
. - foreground
- a Color.
- highlight
- a Color.
- knobWidth
- an Integer. Also used knob height and for horizontal sliders (
knobWidth*2
). - margin
- an Integer.
- sliderHeight
- an Integer. For vertical sliders. Horizontal sliders use
buttonHeight
. - sliderWidth
- an Integer. For vertical sliders. Horizontal sliders use
knobWidth*2
. - spacing
- an Integer.
- palette
- a QPalette.
The methods for generating views are used like this...
GUICV.button(parent, bounds)
GUICV.knob(parent, bounds)
GUICV.numberBox(parent, bounds)
GUICV.popUpMenu(parent, bounds)
GUICV.slider(parent, bounds)
GUICV.staticText(parent, bounds)
GUICV.textField(parent, bounds)
GUICV.adapt(view)
Make a view green by setting the palette, font and various colours. The settings are from GUICV.skins.guiCV
.
Arguments:
Returns:
GUICV.fixDec(val, numDecimals: 2)
Float to String conversion with fixed number of decimals.
Arguments:
val |
A Float. |
numDecimals |
Number of decimals in string. |
Returns: