Due to the variety of platforms which QML runs on, by default there are very few QML components available. Reach has provided a number of components to make development easier.
To include these components in a project, download the Reach QML Components file, extract the contents, then copy the components, images, and js folders to your QML project’s folder, overwriting the same-name folders already there.
QML Components for the G2C1 and G2H2 display module.
A text box with label in a horizontal layout, which accepts keyboard input when the input box has focus. | |
A text box with label in a vertical layout, that accepts keyboard input when the input box has focus. | |
An animated switch that has two states: on and off. | |
A bar chart indicator. | |
A check box list in a horizoltal layout, which can be styled by font and image sources. | |
A check box list in a vertical layout, which can be styled by font and image sources. | |
A text box with label in a horizontal layout, which accepts date input when the input box has focus. | |
A text box with label in a vertical layout, which accepts date input when the input box has focus. | |
An indicator that allows you to display data in a doughnut chart. | |
A canvas area where a user can use a mouse or touch to draw. | |
A two-dimensional heat map chart indicator. | |
A push button with a text label. | |
A knob that has a rotating selection indicator. | |
An indicator that has two states: on and off. | |
A horizontal level indicator. | |
A vertical level indicator. | |
An indicator that displays (plots) data points on a line. | |
A text box with label in a horizontal layout, which accepts list input when the input box has focus. | |
A text box with label in a vertical layout, which accepts list input when the input box has focus. | |
A text box with label arranged in a horizontal layout that accepts numeric keyboard input when the input box has focus. | |
A text box with label in a vertical layout, which accepts numeric keyboard input when the input box has focus. | |
A two push button component with a text label. Allows a user to push 2 buttons to select a number. | |
An indicator that displays text within an image. | |
An indicator that displays data in a pie chart. | |
A radio button list in a horizontal layout, which can be styled by font and image sources. | |
A radio button list in a vertical layout, which can be styled by font and image sources. | |
Scatter Chart is a type of mathematical diagram using Cartesian coordinates to display values for two variables for a set of data. | |
An indicator that displays one or more plots of evenly sampled measurements in a left to right direction. | |
A text box that allows text to dynamicaly scroll. | |
A horizontal slider. | |
A vertical slider. | |
An indicator that has a rotating needle on a marked background. | |
A spinner control to select an item through a finger swipe or mouse swipe. | |
An indicator that displays one or more plots of evenly sampled measurements in a right to left direction. | |
A switch button with a text label. | |
A group of switch buttons in a horizontal layout. | |
A group of switch buttons in a vertical layout. | |
A text box with label in a horizontal layout, which accepts time input when the input box has focus. | |
A text box with label in a vertical layout, which accepts time input when the input box has focus. | |
An indicator that has a rotating needle on a marked background. |
A text box with label in a horizontal layout, which accepts keyboard input when the input box has focus. More...
The AlphaField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a keyboard will slide out to allow a user to input text.
Here is a simple AlphaField:
import QtQuick 1.1 import "components" AlphaField { id: alphabetic_field1 fieldSpacing: 4 keyTextColor: "#ffffff" keyTextBold: false keyTextFontSize: 14 keyboardAnimationSpeed: 100 inputText: "" inputColor: "#ffffff" inputFontFamily: "DejaVu Sans" inputFontPixelSize: 14 labelText: "Label" labelColor: "#000000" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 onInputTextChanged: { console.debug(inputText); } }
The font pixel size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font point size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font pixel size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
The font point size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
A text box with label in a vertical layout, that accepts keyboard input when the input box has focus. More...
The VerticalAlphaField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a keyboard will slide out to allow a user to input text.
Here is a simple VerticalAlphaField:
import QtQuick 1.1 import "components" VerticalAlphaField { id: alphabetic_field__vertical1 fieldSpacing: 4 inputText: "" keyTextColor: "#ffffff" inputColor: "#ffffff" labelColor: "#000000" inputFontPixelSize: 14 keyboardAnimationSpeed: 100 inputFontFamily: "DejaVu Sans" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 labelText: "Label" onInputTextChanged: { console.debug(inputText); } }
The font pixel size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font point size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font pixel size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
The font point size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
An animated switch that has two states: on and off. More...
The animated switch type provides a switch button with image animation. The control can be created using 2 or 3 images.
Here is a simple animated switch using 2 images:
import QtQuick 1.1 import "components" AnimatedSwitch { id: animatedswitch1 width: 130 height: 56 on: false imageOn: "" textOffX: 78 sliderImage: "images/knob.svg" textOnX: 18 imageOff: "images/background.svg" sliderImageY: 2 imageOffHeight: 56 imageOffWidth: 130 textColor: "#ffffff" font.family: "DejaVu Sans" font.bold: false sliderImageOffX: 78 textOn: "On" sliderImageOnX: 1 font.pixelSize: 22 textOff: "Off" onOnChanged: { console.debug(on); } }
Here is a simple animated switch using 3 images:
import QtQuick 1.1 import "components" AnimatedSwitch{ id: animatedswitch2 width: 100; height: 27; on: true imageOff: "images/off.png" imageOffWidth: 100 imageOffHeight: 27 sliderImage: "images/slider.png" imageOn: "images/on.png" imageOnWidth: 100 imageOnHeight: 27 sliderImageOnX: 0 sliderImageY: 0 sliderImageOffX: 62 textOnX: 18 textOffX: 54 textColor: "#000000" onOnChanged: { console.debug(on); } }
The horizontal x position of the slider image when the switch is in the off state.
The vertical y position of the slider image in relation to the imageOff source.
The horizontal position where we will position the text when the switch is in the off state.
The horizontal position where we will position the text when the switch is in the on state.
A bar chart indicator. More...
A bar chart is a way of showing data as bars. It is sometimes used to show trend data, and the comparison of multiple data sets side by side. The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data. Again, colors are in CSS format. There is an array of labels for display.
import QtQuick 1.1 import "components" // Here is a simple barchart: BarChart { id: bar_chart1 width: 440 height: 180 showLegend: true scaleShowGridLines: true scaleLineWidth: 1 scaleFontStyle: "normal" barStrokeWidth: 2 scaleOverlay: true scaleLabel: "<%=value%>" barDatasetSpacing: 1 scaleLineColor: "rgba(0,0,0,0.1)" barShowStroke: true scaleFontFamily: "DejaVu Sans" scaleShowLabels: true scaleFontColor: "#666" barValueSpacing: 5 scaleGridLineColor: "rgba(0,0,0,0.05)" scaleFontSize: 10 scaleGridLineWidth: 1 data:[{ labels : ["Jan","Feb","March","April","May","June","July"], datasets : [ { text: "Data 1", fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", data : [65,59,90,81,56,55,40] }, { text: "Data 2", fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,1)", data : [28,48,40,19,96,27,100] }, { text: "Data 3", fillColor : "rgba(255,0,0,0.7)", strokeColor : "rgba(255,0,0,1)", data : [18,38,30,100,96,37,100] } ] }] }
The data structure consistes of labels array and an array of datasets. The datasets consists of colors and an array of data. Here is an example:
var data = { labels : ["January","February","March","April","May","June","July"], datasets : [ { fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", data : [65,59,90,81,56,55,40] }, { fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,1)", data : [28,48,40,19,96,27,100] } ] }
Use if you want to add symbols or text to the labels of the scale. Example: "<%=value%> C". If you wanted to add the Celcius label to the Y values of the chart.
Required if scaleOverride is set to true. The scale staring value.
Required if scaleOverride is set to true. The value jump in the hard coded scale.
Required if scaleOverride is set to true. The number of steps in the hard coded scale.
A check box list in a horizontal layout, which can be styled by font and image sources. More...
The HorizontalCheckBoxList type provides a multi-selection check box group that is arranged in a horizontal layout.
Here is a simple HorizontalCheckListBox:
import QtQuick 1.1 import "components" HorizontalCheckBoxList { id: checkbox_list1 textColor: "#000000" font.family: "DejaVu Sans" font.bold: false font.pixelSize: 16 imageHeight: 28 imageWidth: 28 spacing: 4 itemSpacing: 8 model: ListModel { ListElement { item_value: "1" item_text: "check 1" item_checked: true } ListElement { item_value: "2" item_text: "check 2" item_checked: false } } imageUnChecked: "images/checkbox.bmp" imageChecked: "images/checkbox_click.bmp" onValuesChanged: { for (var i=0; i < values.count; i++) { console.debug(values.get(i).value); } } }
The data model used for the check list box items.
It must be in this format: ListModel { ListElement { item_value: "1" item_text: "check 1" item_checked: true }
ListElement { item_value: "2" item_text: "check 2" item_checked: false } }
values : model |
The data model used to store the selected values of the control.
A check box list in a vertical layout, which can be styled by font and image sources. More...
The VerticalCheckBoxList type provides a multi-selection check box group that is arranged in a vertical layout.
Here is a simple VerticalCheckListBox:
import QtQuick 1.1 import "components" VerticalCheckBoxList { id: checkbox_list1 textColor: "#000000" font.family: "DejaVu Sans" font.bold: false font.pixelSize: 16 imageHeight: 28 imageWidth: 28 spacing: 4 itemSpacing: 8 model: ListModel { ListElement { item_value: "1" item_text: "check 1" item_checked: true } ListElement { item_value: "2" item_text: "check 2" item_checked: false } } imageUnChecked: "images/checkbox.bmp" imageChecked: "images/checkbox_click.bmp" onValuesChanged: { for (var i=0; i < values.count; i++) { console.debug(values.get(i).value); } } }
The data model used for the check list box items.
It must be in this format: ListModel { ListElement { item_value: "1" item_text: "check 1" item_checked: true }
ListElement { item_value: "2" item_text: "check 2" item_checked: false } }
A text box with label in a horizontal layout, which accepts date input when the input box has focus. More...
The DateField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a date picker will slide out to allow a user to input a date.
Here is a simple DateField:
import QtQuick 1.1 import "components" DateField { width: 160 height: 36 year: 2015 minYear: 2000 maxYear: 2030 month: 1 day: 1 dateMask: "mon dd yyyy" labelText: "Date" labelFontPixelSize: 15 labelFontBold: false labelFontFamily: "DejaVu Sans" inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 fieldSpacing: 8 borderColor: "#ffffff" borderWidth: 2 borderRadius: 4 backgroundColor: "#424242" caption: "System Date" captionFont.bold: true captionFont.family: "DejaVu Sans" captionFontColor: "#ffffff" captionFont.pixelSize: 20 dateFontColor: "#000000" dateFont.family: "DejaVu Sans" dateFont.pixelSize: 18 dateFont.bold: true spacing: 10 buttonBackgroundColor: "#bbb7bb" buttonFont.bold: false buttonFontColor: "#000000" buttonFont.family: "DejaVu Sans" buttonFont.pixelSize: 15 }
The font family that will be used for the caption text of the date picker.
A text box with label in a vertical layout, which accepts date input when the input box has focus. More...
The VerticalDateField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a date picker will slide out to allow a user to input a date.
Here is a simple VerticalDateField:
import QtQuick 1.1 import "components" VerticalDateField { year: 2015 minYear: 2000 maxYear: 2030 month: 1 day: 1 dateMask: "mon dd yyyy" labelText: "Date" labelFontPixelSize: 15 labelFontBold: false labelFontFamily: "DejaVu Sans" inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 fieldSpacing: 8 borderColor: "#ffffff" borderWidth: 2 borderRadius: 4 backgroundColor: "#424242" caption: "System Date" captionFont.bold: true captionFont.family: "DejaVu Sans" captionFontColor: "#ffffff" captionFont.pixelSize: 20 dateFontColor: "#000000" dateFont.family: "DejaVu Sans" dateFont.pixelSize: 18 dateFont.bold: true spacing: 10 buttonBackgroundColor: "#bbb7bb" buttonFont.bold: false buttonFontColor: "#000000" buttonFont.family: "DejaVu Sans" buttonFont.pixelSize: 15 }
The font family that will be used for the caption text of the date picker.
An indicator that allows you to display data in a doughnut chart. More...
The DoughnutChart type provides a visual chart divided into segments, the arc of each segment shows a the proportional value of each piece of data.
import QtQuick 1.1 import "components" // Here is a simple doughnut chart: DoughnutChart { id: doughnut_chart1 width: 200 height: 200 legendFontColor: "#000" percentageInnerCutout: 50 segmentStrokeColor: "#ffffff" legendFontSize: 10 legendFontFamily: "DejaVu Sans" segmentStrokeWidth: 2 legendFontStyle: "normal" segmentShowStroke: true showLegend: true innerCutoutColor: "#ffffff" data : [ { text: "Series 1", value: 30, color:"#F7464A" }, { text: "Series 2", value : 50, color : "#E2EAE9" }, { text: "Series 3", value : 100, color : "#D4CCC5" }, { text: "Series 4", value : 40, color : "#949FB1" }, { text: "Series 5", value : 120, color : "#4D5360" } ] }
For a pie chart, you must pass in an array of objects with text, a value and a color property. The value attribute should be a number, we will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL. The text will be used for the legend labels.
The legend label font weight style. The correct values are "normal" and "bold".
The size of the doughnut hole in relation to the height and width of the chart.
A canvas area where a user can use a mouse or touch to draw. More...
The DrawArea type provides a way to capture drawings with the mouse or touch.
import QtQuick 1.1 import "components" // Here is a simple draw area: DrawArea { id: draw_area1 width: 400 height: 200 color: "#ffffff" penWidth: 2 borderColor: "#000000" penColor: "#000000" borderWidth: 4 }
A two-dimensional heat map chart indicator. More...
A heat map is a graphical representation of data where the values taken by a variable in a two-dimensional map are represented as colors.
import QtQuick 1.1 import "components" // Here is a simple heat map: HeatMap { id: heatmap width: 400 height: 200 radius: 20 max: 20 min: 0 calculateIntensity: true intensity: 0 } // The data model is as follows: // x and y are the coordinates in relation to the center of the heat map. // count is the data that is to be used if the intensity is to be calculated. ListModel { id: data ListElement { x: 10 y: 20 count: 18 } ListElement { x: 25 y: 50 count: 14 } ListElement { x: -50 y: -10 count: 10 } ListElement { x: 12 y: 22 count: 16 } ListElement { x: 1 y: 2 count: 4 } } // This is an example function to populate the data model of the heatmap. function populateHeatMap() { heatmap.model.clear(); var xMin = -heatmap.width/2; var xMax = heatmap.width/2; var yMin = -heatmap.height/2; var yMax = heatmap.height/2; for (var i=0; i < 200; i++) { var data = {"x": getRandomInt(xMin, xMax), "y": getRandomInt(yMin, yMax), "count": getRandomInt(heatmap.min, heatmap.max)}; heatmap.model.append(data); } } function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
Determines if we calculate the intensity. If false then a single image is used for each data point depending on the value of the intensity property.
A number between 0.1 and 1 that will be used to select an image for each data point in the model.
A knob that has a rotating selection indicator. More...
The Knob type provides a visual dial that is styled using images.
Here is a simple Knob:
import QtQuick 1.1 import "components" Knob { id: knob1 width: 180 height: 180 hintBorderColor: "#000000" imageNeedleHeight: 108 imageBase: "images/dialbase.png" showHint: true hintBorderWidth: 2 hintFontFamily: "DejaVu Sans" imageNeedle: "images/dialneedle.png" hintBackgroundColor: "#ffffff" hintFontColor: "#000000" hintFontPixelSize: 16 remove: false initialIndex: 0 mouseAreaWidth: 77 mouseAreaHeight: 77 textColor: "#ffffff" imageNeedleWidth: 108 font.family: "Arial" imageBaseHeight: 108 font.bold: false hintRadius: 9 imageBaseWidth: 108 hintWidth: 40 add: false hintHeight: 40 font.pixelSize: 16 model: ListModel{ id: data ListElement{ index: 0 value: 0 } ListElement{ index: 1 value: 1 } ListElement{ index: 2 value: 2 } ListElement{ index: 3 value: 3 } ListElement{ index: 4 value: 4 } ListElement{ index: 5 value: 5 } } onKnobValueChanged: console.debug(knobValue); }
The initial index for the knob. This will be where the needle will point at initialization.
Sets the knobValue without user intervention.
An indicator that has two states: on and off. More...
The LEDLight type provides a visual on and off state. The control has an on and off state that is styled with two images and text.
import QtQuick 1.1 import "components" // Here is a simple led light using 2 images: LEDLight { id: led_light1 x: 291 y: 148 width: 60 height: 60 on: false font.pixelSize: 12 textColor: "#000000" textPosition: "bottom" label: "Label" fieldSpacing: 6 font.bold: false font.family: "DejaVu Sans" imageOff: "images/ledoff.png" imageOn: "images/ledon.png" onOnChanged: { console.debug(on); } }
textPosition : font |
The text position of the label in relation to the image. The options are bottom, top, left and right.
A horizontal level indicator. More...
The HorizontalLevelIndicator type provides a horizontal component that can be styled with a background image and an overlay image. The component is used to show a single data point value between a min and a max value.
Here is a simple HorizontalLevelIndicator:
import QtQuick 1.1 import "components" HorizontalLevelIndicator { id: level_indicator___horizontal1 width: 200 height: 20 minValue: 0 maxValue: 50 value: 0 increment: 4 startPosition: "left" imageBase: "images/tank.png" imageOverlay: "images/tank_overlay.png" showHint: true hintFontFamily: "DejaVu Sans" hintFontPixelSize: 14 hintFontColor: "#000000" onValueChanged: { console.debug(value); } }
The source for the components overlay image. This image will be transposed over the base image in increments.
The increment in pixels the overlay image is to cover the base image is determined by the value and the min and max values. In the above example, the base image is 190 pixels in width. The min value is 0 and the max value is 10. That will provide an increment of 19 pixels per unit of value.
A vertical level indicator. More...
The VerticalLevelIndicator type provides a vertical component that can be styled with a background image and an overlay image. The component is used to show a single data point value between a min and a max value.
Here is a simple VerticalLevelIndicator:
import QtQuick 1.1 import "components" VerticalLevelIndicator { id: level_indicator___vertical1 width: 28 height: 160 value: 0 minValue: 0 maxValue: 18 increment: 9 imageBase: "images/level.png" imageOverlay: "images/level_overlay.png" startPosition: "bottom" showHint: true hintFontFamily: "DejaVu Sans" hintFontPixelSize: 14 hintFontColor: "#000000" onValueChanged: { console.debug(value); } }
The source for the components overlay image. This image will be transposed over the base image in increments.
The increment in pixels the overlay image is to cover the base image is determined by the value and the min and max values. In the above example, the base image is 160 pixels in width. The min value is 0 and the max value is 18. That will provide an increment of 9 pixels per unit of value.
Determines if the animation is to start from the 'top' or the 'bottom' of the control.
An indicator that displays (plots) data points on a line. More...
The line chart has the a very similar data structure to the bar chart, and has an array of datasets, each with colours and an array of data. Again, colors are in CSS format. There is an array of labels for display.
import QtQuick 1.1 import "components" // Here is a simple linechart: LineChart { id: line_chart1 x: 18 y: 84 width: 440 height: 180 showLegend: true scaleShowGridLines: true datasetStroke: true datasetStrokeWidth: 2 datasetFill: true scaleLineWidth: 1 scaleFontStyle: "normal" pointDotStrokeWidth: 2 scaleOverlay: true scaleLabel: "<%=value%>" pointDot: true scaleLineColor: "rgba(0,0,0,0.1)" pointDotRadius: 4 scaleFontFamily: "DejaVu Sans" scaleShowLabels: true scaleFontColor: "#666" bezierCurve: true scaleGridLineColor: "rgba(0,0,0,0.05)" scaleFontSize: 10 scaleGridLineWidth: 1 data: [{ labels : ["Jan","Feb","March","April","May","June","July"], datasets : [ { text: "Data 1", fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : [65,59,90,81,56,55,40] }, { text: "Data 2", fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,1)", pointColor : "rgba(151,187,205,1)", pointStrokeColor : "#fff", data : [28,48,40,19,96,27,100] } ] }] }
The data structure consistes of labels array and an array of datasets. The datasets consists of colors and an array of data. Here is an example:
var lineData = { labels : ["Jan","Feb","March","April","May","June","July"], datasets : [ { text: "Data 1", fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : [65,59,90,81,56,55,40] }, { text: "Data 2", fillColor : "rgba(151,187,205,0.5)", strokeColor : "rgba(151,187,205,1)", pointColor : "rgba(151,187,205,1)", pointStrokeColor : "#fff", data : [28,48,40,19,96,27,100] } ]
}
Required if scaleOverride is set to true. The scale staring value.
Required if scaleOverride is set to true. The value jump in the hard coded scale.
A text box with label in a horizontal layout, which accepts list input when the input box has focus. More...
The ListField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a list picker will slide out to allow a user to choose an item.
Here is a simple ListField:
import QtQuick 1.1 import "components" ListField { width: 160 height: 36 value: 1 labelText: "Label" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 15 labelFontBold: false inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 fieldSpacing: 8 backgroundColor: "#424242" borderWidth: 2 borderRadius: 4 borderColor: "#ffffff" spacing: 10 listItemHeight: 32 scrollBarWidth: 10 caption: "Set List" captionFontColor: "#ffffff" captionFont.family: "DejaVu Sans" captionFont.pixelSize: 20 captionFont.bold: true listFontColor: "#000000" listFont.family: "DejaVu Sans" listFont.bold: true listFont.pixelSize: 18 model: ListModel { ListElement { text: "Choice 1" value: 1 } ListElement { text: "Choice 2" value: 2 } ListElement { text: "Choice 3" value: 3 } ListElement { text: "Choice 4" value: 4 } ListElement { text: "Choice 5" value: 5 } ListElement { text: "Choice 6" value: 6 } ListElement { text: "Choice 7" value: 7 } ListElement { text: "Choice 8" value: 8 } ListElement { text: "Choice 9" value: 9 } ListElement { text: "Choice 10" value: 10 } } }
The font family that will be used for the caption text of the list picker.
The data model used for the list items.
It must be in this format: ListModel { ListElement { text: "Item 1" value: "1" }
ListElement { text: "Item 2" value: "2" }
The width of the scroll bar that is visble when a user scrolls through the list.
A text box with label in a vertical layout, which accepts list input when the input box has focus. More...
The VerticalListField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a list picker will slide out to allow a user to choose an item.
Here is a simple VerticalListField:
import QtQuick 1.1 import "components" VerticalListField { value: 1 labelText: "Label" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 15 labelFontBold: false inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 fieldSpacing: 8 backgroundColor: "#424242" borderWidth: 2 borderRadius: 4 borderColor: "#ffffff" spacing: 10 listItemHeight: 32 scrollBarWidth: 10 caption: "Set List" captionFontColor: "#ffffff" captionFont.family: "DejaVu Sans" captionFont.pixelSize: 20 captionFont.bold: true listFontColor: "#000000" listFont.family: "DejaVu Sans" listFont.bold: true listFont.pixelSize: 18 model: ListModel { ListElement { text: "Choice 1" value: 1 } ListElement { text: "Choice 2" value: 2 } ListElement { text: "Choice 3" value: 3 } ListElement { text: "Choice 4" value: 4 } ListElement { text: "Choice 5" value: 5 } ListElement { text: "Choice 6" value: 6 } ListElement { text: "Choice 7" value: 7 } ListElement { text: "Choice 8" value: 8 } ListElement { text: "Choice 9" value: 9 } ListElement { text: "Choice 10" value: 10 } } }
The font family that will be used for the caption text of the list picker.
The data model used for the list items.
It must be in this format: ListModel { ListElement { text: "Item 1" value: "1" }
ListElement { text: "Item 2" value: "2" }
The width of the scroll bar that is visble when a user scrolls through the list.
A text box with label arranged in a horizontal layout that accepts numeric keyboard input when the input box has focus. More...
The NumericField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a keyboard will slide out to allow a user to input numeric text.
Here is a simple NumericField:
import QtQuick 1.1 import "components" // Simple numeric field that allows an integer with a min of 0 and a max of 100 NumericField { id: numeric_field1 max: 100 min: 0 fieldSpacing: 4 inputText: "" keyTextColor: "#ffffff" keyTextBold: false keyTextFontSize: 14 inputColor: "#ffffff" labelColor: "#000000" inputFontPixelSize: 14 keyboardAnimationSpeed: 100 inputFontFamily: "DejaVu Sans" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 labelText: "Label" onValueChanged: { console.debug(value); } } // A masked numeric field example for a telephone number // Note: The min and max properties have been removed so no check is made. NumericField { id: numeric_field2 width: 180 fieldSpacing: 4 inputText: "" keyTextColor: "#ffffff" inputColor: "#ffffff" labelColor: "#000000" inputFontPixelSize: 14 keyboardAnimationSpeed: 100 inputFontFamily: "DejaVu Sans" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 labelText: "Label" maskedInput: "(999) 999-9999;_" }
The font pixel size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font point size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font pixel size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
The font point size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
Allows you to set an input mask on the numeric field, restricting the allowable numeric inputs.
Charcter Meaning
# ASCII digit or plus/minus sign permitted but not required. 9 ASCII digit required. 0-9.
Examples:
Mask Notes
"999-99-9999;_" A US social security number number requiring 9 digits. "(999) -999-9999;_" A phone number requiring 10 digits. "#9.99;_" A floating point number that can be negative or positive. "9999;_" An integer that cannot exceed more than 4 digits.
A text box with label in a vertical layout, which accepts numeric keyboard input when the input box has focus. More...
The VerticalNumericField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a keyboard will slide out to allow a user to input numeric text.
Here is a simple VerticalNumericField:
import QtQuick 1.1 import "components" // Simple numeric field that allows an integer with a min of 0 and a max of 100 VerticalNumericField { id: numeric_field1 max: 100 min: 0 fieldSpacing: 4 inputText: "" keyTextColor: "#ffffff" keyTextBold: false keyTextFontSize: 14 inputColor: "#ffffff" labelColor: "#000000" inputFontPixelSize: 14 keyboardAnimationSpeed: 100 inputFontFamily: "DejaVu Sans" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 labelText: "Label" onValueChanged: { console.debug(value); } } // A masked numeric field example for a telephone number // Note: The min and max properties have been removed so no check is made. VerticalNumericField { id: numeric_field2 width: 180 fieldSpacing: 4 inputText: "" keyTextColor: "#ffffff" inputColor: "#ffffff" labelColor: "#000000" inputFontPixelSize: 14 keyboardAnimationSpeed: 100 inputFontFamily: "DejaVu Sans" labelFontFamily: "DejaVu Sans" labelFontPixelSize: 14 labelText: "Label" maskedInput: "(999) 999-9999;_" }
The font pixel size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font point size that will be used for the input box. Use either inputFontPixelSize or inputFontPointSize.
The font pixel size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
The font point size that will be used for the label. Use either labelFontPixelSize or labelFontPointSize.
Allows you to set an input mask on the numeric field, restricting the allowable numeric inputs.
Charcter Meaning
# ASCII digit or minus sign permitted but not required. 9 ASCII digit required. 0-9.
Examples:
Mask Notes
"999-99-9999;_" A US social security number number requiring 9 digits. "(999) -999-9999;_" A phone number requiring 10 digits. "#9.99;_" A floating point number that can be negative or positive. "9999;_" An integer that cannot exceed more than 4 digits.
A two push button component with a text label. Allows a user to push 2 buttons to select a number. More...
The NumericSelector type can be styled using images and text. It is composed of two ImageButtons.
Here is a simple NumericSelector:
import QtQuick 1.1 import "components" NumericSelector { id: numeric_selector1 width: 110 height: 30 rightImageDown: "images/right_arrow_spin_off.png" autoRepeatInterval: 100 textFontFamily: "DejaVu Sans" increment: 1 displayText: "<sup>o</sup>" rightImageUp: "images/right_arrow_spin.png" min: 0 autoRepeat: true textColor: "#000000" max: 100 leftImageDown: "images/left_arrow_spin_off.png" precision: 0 source: "images/bg_numericedit.png" leftImageUp: "images/left_arrow_spin.png" textFontPixelSize: 14 onValueChanged: console.debug(value); }
If autoRepeat is enabled, then the buttonPress(), buttonRelease(), and buttonClick() signals are emitted at regular intervals when the button is down. autoRepeat is off by default. The initial delay and the repetition interval are defined in milliseconds by autoRepeatInterval.
An indicator that displays text within an image. More...
The PanelReadOut type provides a visual text and image read out. The control is styled with an image and text.
import QtQuick 1.1 import "components" // Here is a simple panel readout an image and text: PanelReadOut { id: panel_read_out1 width: 211 height: 99 text: "10000" font.pixelSize: 22 textColor: "#50dd0e" imagePanel: "images/bezel.bmp" font.bold: false font.family: "DejaVu Sans" onTextChanged: { console.debug(text); } }
An indicator that displays data in a pie chart. More...
The PieChart type provides a visual chart divided into segments, the arc of each segment shows a the proportional value of each piece of data.
import QtQuick 1.1 import "components" // Here is a simple pie chart: PieChart { id: pie_chart1 width: 200 height: 200 segmentShowStroke: true segmentStrokeColor: "#ffffff" segmentStrokeWidth: 2 showLegend: true legendFontColor: "#000" legendFontSize: 10 legendFontFamily: "DejaVu Sans" legendFontStyle: "normal" data : [ { text: "Apples", value: 30, color:"#F38630" }, { text: "Oranges", value : 50, color : "#E0E4CC" }, { text: "Pears", value : 25, color : "#69D2E7" }, { text: "Grapes", value : 100, color : "#ff0000" } ]; }
For a pie chart, you must pass in an array of objects with text, a value and a color property. The value attribute should be a number, we will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL. The text will be used for the legend labels.
The legend label font weight style. The correct values are "normal" and "bold".
Scatter Chart is a type of mathematical diagram using Cartesian coordinates to display values for two variables for a set of data. More...
The data is displayed as a collection of points, each having the value of one variable determining the position on the horizontal axis and the value of the other variable determining the position on the vertical axis.
import QtQuick 1.1 import "components" // Here is a simple scatterchart: ScatterChart { id: scatter width: 400 height: 214 scaleShowGridLines: true scaleShowLabels: true datasetStrokeWidth: 2 bgColor: "#EEEEEE" scaleLineWidth: 1 scaleBgColor: "#000000" scaleFontStyle: "normal" scaleLabel: "<%=value%>" scaleLineColor: "rgba(0,0,0,1.0)" scaleFontFamily: "DejaVu Sans" scaleFontColor: "#666" scaleGridLineColor: "rgba(50,205,50,0.8)" scaleFontSize: 12 scaleGridLineWidth: 1 minY: -10 minX: 0 maxY: 10 line1PenColor: "#FFFFFF" maxX: 50 drawLines: true drawPoints: true pointRadius: 2 bezierCurve: true }
Determines if draw smooth lines between plot points. If this property is set to false straight lines will be drawn.
The point radius in pixels to be drawn if drawPoints is set to true.
Use if you want to add symbols or text to the labels of the scale. Example: "<%=value%> C". If you wanted to add the Celcius label to the Y values of the chart.
Required if scaleOverride is set to true. The scale staring value.
Required if scaleOverride is set to true. The value jump in the hard coded scale.
Required if scaleOverride is set to true. The number of steps in the hard coded scale.
An indicator that displays one or more plots of evenly sampled measurements in a left to right direction. More...
The scope chart is a special kind of XY plot meant to convey recent history of a waveform. The chart can handle up to 4 plots simultaneously. This chart has a retracing display similar to an oscilloscope. As it receives each new value, it plots the value to the right of the last value. The plot is not erased when the plot hits the right border. Instead, it erases a certain distance in front of the plot.
import QtQuick 1.1 import "components" // Here is a simple scopechart: ScopeChart { id: scope_chart1 width: 400 height: 200 scaleShowGridLines: true datasetStrokeWidth: 2 bgColor: "#EEEEEE" scaleLineWidth: 1 scaleBgColor: "#0000000" scaleFontStyle: "normal" scaleLabel: "<%=value%>" maxTime: 100 scaleLineColor: "rgba(0,0,0,1.0)" maxYValue: 10 scaleFontFamily: "DejaVu Sans" scaleShowLabels: true xPixels: 20 scaleFontColor: "#666" minTime: 0 minYValue: -10 scaleGridLineColor: "rgba(50,205,50,0.5)" scaleFontSize: 12 scaleGridLineWidth: 1 line1PenColor: "#ffffff" bezierCurve: true }
Determines if draw smooth lines between plot points. If this property is set to false straight lines will be drawn.
Use if you want to add symbols or text to the labels of the scale. Example: "<%=value%> C". If you wanted to add the Celcius label to the Y values of the chart.
Required if scaleOverride is set to true. The scale staring value.
Required if scaleOverride is set to true. The value jump in the hard coded scale.
Required if scaleOverride is set to true. The number of steps in the hard coded scale.
A text box that allows text to dynamicaly scroll. More...
The ScrolingTextlBox type provides an text box that can be styled using colors and font properties. The text scrolls verticaly and will grow scroll bars when it's contents are too large to fit in the box.
Here is a simple ScrollingTextBox:
import QtQuick 1.1 import "components" ScrollingTextBox { id: sb width: 440 height: 218 initialText: "" maxChars: 2048 borderWidth: 2 borderColor: "#9a9a9a" textEditBackGroundColor: "#000000" gradientLightColor: "#9a9a9a" gradientDarkColor: "#4e4e4e" textMargins: 4 textEditColor: "#52D017" textEditFontFamily: "DejaVu Sans" textEditFontBold: false textEditFontSize: 12 headerText: "Terminal" headerTextColor: "#ffffff" headerHeight: 21 headerTextFontFamily: "DejaVu Sans" headerTextFontBold: true headerTextFontSize: 15 scrollBarBackGroundColor: "gray" scrollBarBorderColor: "#000000" scrollBarWidth: 12 scrollBarColor: "#545454" scrollBarHighLight: "#5454ac" scrollBarUpDownArrowColor: "#000000" scrollBarUpDownArrowHighLight: "blue" showScrollBarUpDownArrow: true }
The color of the up and down arrows of the scroll bar when the scroll bar is in use.
Determines if the up and down arrows of the scroll bar are visible.
A horizontal slider. More...
The HorizontalSlider type provides a slider component that can be styled with an image handle and an image track. The component is used for selecting a value in a given range.
Here is a simple HorizontalSlider:
import QtQuick 1.1 import "components" HorizontalSlider { id: slider___horizontal1 width: 184 height: 48 showHint: true minimum: 0 maximum: 10 value: 0 allowDrag: true xMin: 0 handleY: 2 imageTrack: "images/slider_htrack.png" imageHandle: "images/slider_handle.png" imageOverlay: "" hintWidth: 40 hintHeight: 40 hintRadius: 9 hintBorderColor: "#000000" hintBorderWidth: 2 hintBackgroundColor: "#ffffff" hintFontFamily: "DejaVu Sans" hintFontColor: "#000000" hintFontPixelSize: 16 onValueChanged: { console.debug(value); } }
A vertical slider. More...
The VerticalSlider type provides a slider component that can be styled with an image handle and an image track. The component is used for selecting a value in a given range.
Here is a simple VerticalSlider:
import QtQuick 1.1 import "components" VerticalSlider { id: slider___vertical1 width: 48 height: 184 hintBorderColor: "#000000" showHint: true maximum: 10 hintBorderWidth: 2 hintFontFamily: "Arial" hintBackgroundColor: "#ffffff" hintFontColor: "#000000" hintFontPixelSize: 16 imageTrack: "images/slider_track.bmp" minimum: 0 value: 0 handleX: 0 imageOverlay: "" hintRadius: 9 yMin: 2 hintWidth: 40 imageHandle: "images/slider_handle.png" allowDrag: true hintHeight: 40 onValueChanged: console.debug(value); }
An indicator that has a rotating needle on a marked background. More...
The Spedometer type provides a visual meter that is styled using images.
Here is a simple Speedometer:
import QtQuick 1.1 import "components" Speedometer { id: speedometer1 width: 210 height: 210 needleImage: "images/needle.png" overlayImageHeight: 105 min: 0 needleImageHeight: 63 overlayImage: "images/overlay.png" value: 20 needleImageWidth: 8 max: 120 needleRotationY: 65 needleRotationX: 5 maxAngle: 133 overlayY: 18 overlayImageWidth: 148 overlayX: 21 needleY: 33 needleX: 98 backgroundImage: "images/meterbackground.png" onValueChanged: console.debug(value); }
A spinner control to select an item through a finger swipe or mouse swipe. More...
The Spinner type can be styled using images and font properties.
Here is a simple Spinner:
import QtQuick 1.1 import "components" Spinner { id: spinner2 width: 90 height: 201 color: "#ffffff" radius: 2 initialIndex: 0 textColor: "#000000" font.pixelSize: 24 border.color: "#000000" border.width: 3 backGroundImage: "images/spinner-bg.png" highlightImage: "images/spinner-select.png" font.bold: false font.family: "DejaVu Sans" itemHeight: 31 model: ListModel { ListElement { text: "1" value: 1 } ListElement { text: "2" value: 2 } ListElement { text: "3" value: 3 } ListElement { text: "4" value: 4 } ListElement { text: "5" value: 5 } ListElement { text: "6" value: 6 } ListElement { text: "7" value: 7 } ListElement { text: "8" value: 8 } ListElement { text: "9" value: 9 } ListElement { text: "10" value: 10 } } onValueChanged: console.debug(value); }
The model used to assign properties to the individual spinner items. The "text" property will be displayed to the user. The "value" property can be text or a number.
The model must be in this format:
model: ListModel { ListElement { text: "1" value: 1 } ListElement { text: "2" value: 2 } ListElement { text: "3" value: 3 } ListElement { text: "4" value: 4 } ListElement { text: "5" value: 5 } }
An other example model:
model: ListModel { ListElement { text: "A" value:"A" } ListElement { text: "B" value: "B" } ListElement { text: "C" value: "C" } ListElement { text: "4" value: "C" } ListElement { text: "D" value: "D" } }
An indicator that displays one or more plots of evenly sampled measurements in a right to left direction. More...
The strip chart is a special kind of XY plot meant to convey recent history of a waveform, such as voltage over time by dynamic updates with new data. The chart can handle up to 4 plots simultaneously. This chart has a scrolling display that is similar to a paper tape strip chart recorder. This chart first plots values from left to right. From here, it continues to plot new points at the rightmost point and shifts old values to the left.
import QtQuick 1.1 import "components" // Here is a simple stripchart: StripChart { id: strip_chart1 width: 400 height: 200 scaleShowGridLines: true datasetStrokeWidth: 2 bgColor: "#EEEEEE" scaleLineWidth: 1 scaleBgColor: "#0000000" scaleFontStyle: "normal" scaleLabel: "<%=value%>" maxTime: 100 scaleLineColor: "rgba(0,0,0,1.0)" maxYValue: 10 scaleFontFamily: "DejaVu Sans" scaleShowLabels: true scaleFontColor: "#666" minTime: 0 minYValue: -10 scaleGridLineColor: "rgba(50,205,50,0.5)" scaleFontSize: 12 scaleGridLineWidth: 1 line1PenColor: "#ffffff" }
Use if you want to add symbols or text to the labels of the scale. Example: "<%=value%> C". If you wanted to add the Celcius label to the Y values of the chart.
Required if scaleOverride is set to true. The scale staring value.
Required if scaleOverride is set to true. The value jump in the hard coded scale.
Required if scaleOverride is set to true. The number of steps in the hard coded scale.
A switch button with a text label. More...
The Switch type can be styled using images and text, and has an on and off state.
Here is a simple Switch:
import QtQuick 1.1 import "components" Switch { id: switch1 width: 60 height: 40 on: false textOff: "Off" textOn: "On" textOnBold: false textOnFontFamily: "DejaVu Sans" textOffFontFamily: "DejaVu Sans" textOnFontSize: 14 textOffFontSize: 14 imageOn: "images/internal_button_up.bmp" imageOff: "images/internal_button_dn.bmp" textOnColor: "#000000" textOffColor: "#000000" textOffBold: false onButtonClick: console.debug(on); onButtonPress: console.debug(on); onButtonRelease: console.debug(on); }
A group of switch buttons in a horizontal layout. More...
The HorizontalSwitchGroup type provides a group of image buttons with a text label that can be styled using images and text. Each button has an on and off state and a value that can be assigned to the HorizontalSwitchGroup type.
Here is a simple SwitchGroup:
import QtQuick 1.1 import "components" HorizontalSwitchGroup { id: switch_group2 textOnColor: "#000000" textOffColor: "#000000" font.family: "DejaVu Sans" font.pixelSize: 16 font.bold: false value: "0" spacing: 4 model: ListModel { ListElement { text_on: "On 1" image_off: "../images/internal_button_up.bmp" val: "1" text_off: "Off 1" image_on: "../images/internal_button_dn.bmp" } ListElement { text_on: "On 2" image_off: "../images/internal_button_up.bmp" val: "2" text_off: "Off 2" image_on: "../images/internal_button_dn.bmp" } } onValueChanged: { console.debug(value); } }
A group of switch buttons in a vertical layout. More...
The VerticalSwitchGroup type provides a group of image buttons with a text label that can be styled using images and text. Each button has an on and off state and a value that can be assigned to the VerticalSwitchGroup type.
Here is a simple VerticalSwitchGroup:
import QtQuick 1.1 import "components" VerticalSwitchGroup { id: switch_group textOnColor: "#000000" textOffColor: "#000000" font.family: "DejaVu Sans" font.pixelSize: 16 font.bold: false value: "0" spacing: 4 model: ListModel { ListElement { text_on: "On 1" image_off: "../images/internal_button_up.bmp" val: "1" text_off: "Off 1" image_on: "../images/internal_button_dn.bmp" } ListElement { text_on: "On 2" image_off: "../images/internal_button_up.bmp" val: "2" text_off: "Off 2" image_on: "../images/internal_button_dn.bmp" } } onValueChanged: { console.debug(value); } }
The model used to assign properties to the individual switch buttons.
The model must be in this format:
model: ListModel { ListElement { text_on: "On 1" image_off: "../images/internal_button_up.bmp" val: "1" text_off: "Off 1" image_on: "../images/internal_button_dn.bmp" }
ListElement { text_on: "On 2" image_off: "../images/internal_button_up.bmp" val: "2" text_off: "Off 2" image_on: "../images/internal_button_dn.bmp" } }
A text box with label in a horizontal layout, which accepts time input when the input box has focus. More...
The TimeField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a time picker will slide out to allow a user to input time.
Here is a simple TimeField:
import QtQuick 1.1 import "components" TimeField { width: 160 height: 36 hours: 12 minutes: 0 seconds: 0 period: "PM" showPeriod: true showSeconds: true labelText: "Time" labelColor: "#000000" labelFontBold: false labelFontFamily: "DejaVu Sans" labelFontPixelSize: 15 inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 inputColor: "#ffffff" fieldSpacing: 10 borderColor: "#ffffff" timeFontColor: "#000000" timeFont.pixelSize: 18 timeFont.bold: true timeFont.family: "DejaVu Sans" caption: "System Time" captionFontColor: "#ffffff" captionFont.family: "DejaVu Sans" captionFont.pixelSize: 20 captionFont.bold: true borderWidth: 2 borderRadius: 4 spacing: 10 backgroundColor: "#424242" buttonBackgroundColor: "#bbb7bb" buttonFontColor: "#000000" buttonFont.pixelSize: 15 buttonFont.bold: false buttonFont.family: "DejaVu Sans" }
The font family that will be used for the caption text of the time picker.
A text box with label in a vertical layout, which accepts time input when the input box has focus. More...
The VerticalTimeField type provides an input box with a text label that can be styled using field spacings and font properties. When the input box has focus a time picker will slide out to allow a user to input time.
Here is a simple VerticalTimeField:
import QtQuick 1.1 import "components" VerticalTimeField { hours: 12 minutes: 0 seconds: 0 period: "PM" showPeriod: true showSeconds: true labelText: "Time" labelColor: "#000000" labelFontBold: false labelFontFamily: "DejaVu Sans" labelFontPixelSize: 15 inputFontFamily: "DejaVu Sans" inputFontPixelSize: 15 inputColor: "#ffffff" fieldSpacing: 10 borderColor: "#ffffff" timeFontColor: "#000000" timeFont.pixelSize: 18 timeFont.bold: true timeFont.family: "DejaVu Sans" caption: "System Time" captionFontColor: "#ffffff" captionFont.family: "DejaVu Sans" captionFont.pixelSize: 20 captionFont.bold: true borderWidth: 2 borderRadius: 4 spacing: 10 backgroundColor: "#424242" buttonBackgroundColor: "#bbb7bb" buttonFontColor: "#000000" buttonFont.pixelSize: 15 buttonFont.bold: false buttonFont.family: "DejaVu Sans" }
The font family that will be used for the caption text of the time picker.
An indicator that has a rotating needle on a marked background. More...
The VUMeter type provides a visual meter that is styled using images.
Here is a simple VUMeter:
import QtQuick 1.1 import "components" VUMeter { id: vu_meter1 width: 377 height: 242 needleImage: "images/vu_needle.png" overlayImageHeight: 26 needleImageHeight: 139 overlayImage: "images/vu_overlay.png" value: -20 needleImageWidth: 8 needleRotationY: 139 needleRotationX: 4 overlayY: 191 overlayImageWidth: 39 overlayX: 168 needleY: 57 needleX: 181 backgroundImage: "images/vu_background.png" onValueChanged: console.debug(value); }