{{ $modulename := .Get "module" }} {{ $typename := .Get "type" }} {{ $type := index .Site.Data.modules $modulename $typename }} {{- define "partials/qmltypeflag.html" -}} {{- if eq . "default" -}} {{ . }} {{- else if eq . "singleton" -}} {{ . }} {{- else if eq . "uncreatable" -}} {{ . }} {{- else if eq . "readonly" -}} {{ . }} {{- else if eq . "writeonly" -}} {{ . }} {{- else -}} {{ . }} {{- end -}} {{- end -}} {{- define "partials/qmltypeflags.html" -}} {{- $first := true -}} [ {{- range $flag := . }} {{- if not $first -}}, {{ end -}} {{- $first = false -}} {{ partial "qmltypeflag.html" $flag }} {{- end -}} ] {{- end -}}

{{ $typename -}} {{- if eq $type.type "class" -}} : {{ partial "qmltype.html" $type.super }} {{ if $type.flags -}} {{ partial "qmltypeflags.html" $type.flags }} {{- end -}} {{- else if eq $type.type "enum" -}} [enum] {{- end -}}

import {{ $modulename }} {{- if $type.description -}}

{{- $type.description | $.Page.RenderString (dict "display" "inline") }} {{ if $type.details -}} More {{- end -}} {{- end -}} {{- if $type.variants -}}

Variants

{{- end -}} {{- if $type.properties -}}

Properties

{{- end -}} {{- if $type.functions -}}

Functions

{{- end -}} {{- if $type.signals -}}

Signals

{{- end -}} {{- if $type.details -}}

Detailed Description

{{- $type.details | $.Page.RenderString (dict "display" "block") -}} {{- end -}} {{- if $type.variants -}}

Variant Details

{{ range $name, $variant := $type.variants }}

{{ $name -}}

{{- if $variant.details -}} {{- $variant.details | $.Page.RenderString (dict "display" "block") -}} {{- else -}}

No details provided.

{{- end -}}
{{- end -}} {{- end -}} {{- if $type.properties -}}

Property Details

{{ range $propname, $prop := $type.properties }}
{{- if $prop.flags -}} {{ partial "qmltypeflags.html" $prop.flags }} {{- end -}} {{- if $prop.type.gadget -}} {{- range $gadgetname, $gadgettype := $prop.type.gadget -}}

{{ $propname }}.{{ $gadgetname -}} : {{ partial "qmltype.html" $gadgettype -}}

{{- end -}} {{- else -}}

{{ $propname -}} : {{ partial "qmltype.html" $prop.type -}}

{{- end -}}
{{- if $prop.details -}} {{- $prop.details | $.Page.RenderString (dict "display" "block") -}} {{- else -}}

No details provided.

{{- end -}}
{{- end -}} {{- end -}} {{- if $type.functions -}}

Function Details

{{ range $func := $type.functions }}
{{- if $func.flags -}} {{ partial "qmltypeflags.html" $func.flags }} {{- end -}}

{{ partial "qmltype.html" $func.ret -}} {{ $func.name -}} ( {{- partial "qmlparams.html" $func.params -}} )

{{- if $func.details -}} {{- $func.details | $.Page.RenderString (dict "display" "block") -}} {{- else -}}

No details provided.

{{- end -}}
{{- end -}} {{- end -}} {{- if $type.signals -}}

Signal Details

{{ range $signame, $sig := $type.signals }}
{{- if $sig.flags -}} {{ partial "qmltypeflags.html" $sig.flags }} {{- end -}}

{{ $signame -}} ( {{- partial "qmlparams.html" $sig.params -}} )

{{- if $sig.details -}} {{- $sig.details | $.Page.RenderString (dict "display" "block") -}} {{- else -}}

No details provided.

{{- end -}}
{{- end -}} {{- end -}}