Utils QML Type
Helper functions. More...
Import Statement: | import CSDataQuick.Components 1.0 |
Methods
- double calculate(expression, input)
- string convert(TextFormat format, real value, int precision)
- copyToClipboard(text)
- Window createComponentByFile(display, filePath, macro)
- Window createDisplay(qml, display, filePath)
- Window createDisplayByFile(display, filePath, macro)
- string currentDateTime()
- bool execute(program)
- string format(format, number)
- string formatString(data, format, precision)
- var getProperty(object, name)
- url isDisplayFile(fileName)
- point mapToGlobal(item, point)
- string openUrl(url)
- Window parentWindow(item)
- double parse(int format, QString textValue)
- list<object> parseExecList()
- object parseX11Geometry(geometry)
- int qtVersion()
- resizeChildItems(parent, rw, rh)
- url searchDisplayFile(fileName, filePath)
- vectorGet(vector, array, index, count)
- vectorSet(vector, value, index)
Detailed Description
This is a group of helper functions, which are called by QML components.
Method Documentation
Evalute an expression based on given input variables. This calls postfix
and calcPerform
functions from EPICS base.
string convert(TextFormat format, real value, int precision) |
Convert a number value with given format. This routine calls cvsFast functions from EPICS base and also functions from MEDM for certain special formats.
Window createComponentByFile(display, filePath, macro) |
Create a qml component from a file with given filePath with macro expansion.
It calls parser library to create the qml source, and then call QQmlComponent to create an instance. The QQmlEngine used is which display was created in.
Window createDisplay(qml, display, filePath) |
Create a top level window based on qml source, represented by filePath. The QQmlEngine used is which display was created in.
Window createDisplayByFile(display, filePath, macro) |
Create a top level window from a file with given filePath with macro expansion. The file can be either ADL or QML.
It calls parser library to create the qml source, and then calls Utils::createDisplay to actually create the display window. The QQmlEngine used is which display was created in.
Execute a program. If program ends with "&", the new process will be detached. Otherwise it will wait for the new process to finish and return the exit code.
See also QProcess::startDetached() and QProcess::execute().
Format a number with given format,
See also QString::asprintf().
Convert control system data according to format and precision.
var getProperty(object, name) |
Returns the value of the object's name property.
url isDisplayFile(fileName) |
Check wether fileName is a supported display file.
Maps the given point in this item's coordinate system to the equivalent point within global screen coordinate system, and returns the mapped coordinate.
This is an equivalent implementation of QQuickItem::mapToGlobal that first appeared in Qt 5.7.
Open the given url,
See also QDesktopServices::openUrl().
Window parentWindow(item) |
Return the parent window for item.
Parse a numeric value in format from textValue. This is the opposite of Utils::convert.
Return the command list defined by MEDM_EXEC_LIST environment variable. Each command object contains the following property,
- label - menu text
- command - system command
Parse a token of a X11 geometry specification, e.g. "200x100+10-20". The returned map contains the following fields,
- xOffset - x offset
- yOffset - y offset
- corner - the corner from where the offset counts, see Qt::Corner.
- width - window width
- height - window height
Return the QT_VERSION macro.
Resize all child items from parent by rw horizontally and rh vertically, and move their top left position as well.
url searchDisplayFile(fileName, filePath) |
Search a display file with given fileName from the current directory, the filePath and environment variables specific to the display file type
- EPICS_DISPLAY_PATH (.adl)
- EDMDATAFILES (.edl)
- CAQTDM_DISPLAY_PATH (.ui)
- QML_DISPLAY_PATH (.qml)
Get the subarray from a vector variant into array, starting at position index (default 0). If count is -1 (the default), all elements after index are included.
See also QVector::mid.
Set the index element from vector variant to value and return the modified copy.