UtilsJS QML Type
Javascript Utility Functions. More...
Import Statement: | import CSDataQuick.Components 1.0 |
Methods
- dumpCSData(data)
- formatString(value, format, type, precision, states)
- getBestFontSize(item_height, with_frame)
- popupDataLimitsDialog(parent)
- popupPromptDialog(parent, title, hint, input)
Detailed Description
Method Documentation
Format the value based on data type.
type | output |
---|---|
Enum | string at the value index from the states list. |
String | as it is. |
Char | string by joinning the char array with ending null character removed. |
Number | string determined by format and precision. |
See also Utils::convert.
Calculates the font size/family based on item height.
This function uses an imperically determined (item height, font size) table. Actually two sets of tables are defined. One for items without enclosing frame, e.g. CSText. One for items with a border frame, e.g. CSTextEntry. The reason for this manual tweak is to match MEDM displays.
The font family is either Dejavu Sans Mono for font size less than 20 or Helvetica otherwise.
This function popups up a dialog for user to configure the limits settings.
This function popups a dialog to obtains user's input.