aboutsummaryrefslogtreecommitdiffstats
path: root/src/ivicore/doc/src/ivigenerator/filter-reference.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ivicore/doc/src/ivigenerator/filter-reference.qdoc')
-rw-r--r--src/ivicore/doc/src/ivigenerator/filter-reference.qdoc196
1 files changed, 196 insertions, 0 deletions
diff --git a/src/ivicore/doc/src/ivigenerator/filter-reference.qdoc b/src/ivicore/doc/src/ivigenerator/filter-reference.qdoc
new file mode 100644
index 0000000..c330fff
--- /dev/null
+++ b/src/ivicore/doc/src/ivigenerator/filter-reference.qdoc
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the QtIvi module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page filter-reference.html
+\title Filter Reference
+\previouspage Autogenerator Usage
+\nextpage Qmake Integration
+
+In addition to the built-in Jinja filters listed \l
+{http://jinja.pocoo.org/docs/2.9/templates/#list-of-builtin-filters} {here}, the following
+additional features are implemented in the ivigenerator.
+
+\target return_type(symbol)
+\target return_type()
+\section1 return_type(symbol)
+
+Returns the C++ type for the passed symbol.
+
+E.g. QString for a symbol of type "string".
+
+\target parameter_type(symbol)
+\section1 parameter_type(symbol)
+
+Return the C++ type for the passed symbol. This returns the same type as return_type(), but already
+prepared to be used as a parameter for methods.
+
+E.g. "const QString &<name>" for a symbol of type "string"
+
+\target getter_name(symbol)
+\section1 getter_name(symbol)
+
+Returns the getter name of the property, if defined by the \c @getter_name annotation. Otherwise
+retuns the passed symbol.
+
+\target setter_name(symbol)
+\section1 setter_name(symbol)
+
+Returns the setter name of the property, if defined by the \c @setter_name annotation. Otherwise
+retuns the passed symbol.
+
+\target default_type_value(symbol)
+\section1 default_type_value(symbol)
+
+Returns the default value for the passed symbol. Models are initialized as \c nullptr
+
+\target default_value(symbol, zone="=")
+\section1 default_value(symbol, zone="=")
+
+Returns the default value for the passed symbol set by the \c @default annotation. If not set uses
+\c default_type_value instead.
+
+The zone parameter is used to identify different default values per zone.
+
+\target model_type(symbol)
+\section1 model_type(symbol)
+
+Returns the C++ class name for this model.
+
+\target flag_type(symbol)
+\section1 flag_type(symbol)
+
+Returns the name defined by the \c @type annotation for the passed flag. If this is not set, tries to
+pluralize the passed name by adding an 's' at the end.
+
+\target parse_doc(string)
+\section1 parse_doc(string)
+
+Parses the passed comment string and adds every javadoc command into its own group. Sentences
+without tag are put into the 'description' group.
+
+\badcode
+{% with doc = comments|parse_doc -%}
+{% if doc.brief %} \brief {{doc.brief}}
+{% endif %}
+
+{% if doc.description %}
+ {{doc.description}}
+{% endif %}
+{% endwith %}
+\endcode
+
+\target lowerfirst(string)
+\section1 lowerfirst(string)
+
+Only lowers the first character of the given string.
+
+\target range_low(property)
+\section1 range_low(property)
+
+Returns the minimum value for the passed property using the \c @range or \c @minimum annotations.
+
+\target range_high(property)
+\section1 range_high(property)
+
+Returns the maximum value for the passed property using the \c @range or \c @maximum annotations.
+
+\target strip_QT(string)
+\section1 strip_QT(string)
+
+Removes the 'QT' at the beginning, if the string starts with it.
+
+\target domain_values(symbol)
+\section1 domain_values(symbol)
+
+Returns the domain values for the passed property using the \c @domain annotation.
+
+\target enum_value(value, module_name)
+\section1 enum_value(value, module_name)
+
+Returns the fully qualified C++ name of the given value. The passed module_name is used as C++ class
+name containing the enum.
+
+Also supports passing '|' connected values.
+
+\target tag_by_path(symbol, path, default_value=False)
+\section1 tag_by_path(symbol, path, default_value=False)
+
+Find the tag given by its full path in the object hierarchy, like
+\c property.config_sim.zones.right. If some parts of the path are missing, return \c None.
+
+\target conf_sim_tag(symbol, path, default_value=False)
+\section1 conf_sim_tag(symbol, path, default_value=False)
+
+Find the tag, given by its path, located under the "config_simulator" sub-object. Returns \c None,
+if parts of the path are missing.
+
+\target jsonify(obj)
+\section1 jsonify(obj)
+
+Returns a JSON representation of the given obj.
+
+\target has_domains(properties)
+\section1 has_domains(properties)
+
+Returns \c true if any of the given properties has \c @range or \c @domain annotations.
+
+\target json_domain(properties)
+\section1 json_domain(properties)
+
+Returns the property domains for the given properties formated in JSON.
+
+\target qml_type(interface)
+\section1 qml_type(interface)
+
+Returns the name of the interface for use in QML. This name is defined by the \c @qml_type
+annotation. This annotation is optional: if not provided, the interface name is used.
+
+\target qml_control(symbol, backend_obj)
+\section1 qml_control(symbol, backend_obj)
+
+Returns the QML code for the control (or group of controls) to represent the editing UI for the
+passed symbol.
+
+\target qml_binding_property(symbol)
+\section1 qml_binding_property(symbol)
+
+Returns the name of the property of the QML control to be bound with.
+
+E.g. "value" for a Slider and "checked" for a CheckBox.
+
+\target qml_control_signal_parameters(symbol)
+\section1 qml_control_signal_parameters(symbol)
+
+Returns the parameters for calling the signal using the values from the UI controls.
+
+\target struct_includes(symbol)
+\section1 struct_includes(symbol)
+
+Returns the includes for the structs that the interface or a struct depends on. The returned
+strings are complete and in format #include "struct.h".
+*/
+