Added a bunch of documentation
This commit is contained in:
parent
3c5b923c6d
commit
fb645182e4
|
@ -0,0 +1,157 @@
|
||||||
|
[[tags: egg]]
|
||||||
|
[[toc:]]
|
||||||
|
== qml
|
||||||
|
A Chicken wrapper for DOtherSide
|
||||||
|
|
||||||
|
=== Module: (qml core)
|
||||||
|
A library to simplify usage of QML user interfaces from Chicken.
|
||||||
|
|
||||||
|
== Enums
|
||||||
|
|
||||||
|
=== Usage
|
||||||
|
|
||||||
|
When a method requires an enum value, it can be handed to it using the enum's procedure plus the enum value keyword. Example:
|
||||||
|
|
||||||
|
<enscript>
|
||||||
|
(qt-connection-type auto:)
|
||||||
|
</enscript>
|
||||||
|
|
||||||
|
<procedure>(qevent-loop-process-event-flag val)</procedure>
|
||||||
|
QEventLoopProcessEventFlag flags. Available values: process-all-events:, exclude-user-input-events:, process-exclude-socket-notifiers:, and process-all-events-wait-for-more-events:.
|
||||||
|
|
||||||
|
<procedure>(qt-connection-type val)</procedure>
|
||||||
|
QConnectionType flags. Available values: auto:, direct:, queued:, blocking:, and unique:.
|
||||||
|
|
||||||
|
<procedure>(qquick-view-resize-mode val)</procedure>
|
||||||
|
QQuickViewResizeMode flags. Available values: side-view-to-root-object:, and size-root-object-to-view:.
|
||||||
|
|
||||||
|
<procedure>(qitem-data-role val)</procedure>
|
||||||
|
QItemDataRole flags. Available values: display:, decoration:, edit:, tool-tip:, status-tip:, whats-this:, font:, text-alignment:, background:, foreground:, check-state:, accessible-text:, accessible-description:, size-hint:, and initial-sort-order:.
|
||||||
|
|
||||||
|
<procedure>(qt-orientation val)</procedure>
|
||||||
|
QOrientation flags. Available values: horizontal:, and vertical:.
|
||||||
|
|
||||||
|
== Helpers
|
||||||
|
|
||||||
|
<procedure>(application-dir-path) → the application dir path</procedure>
|
||||||
|
<procedure>(process-events (flag <QEventLoopProcessEventFlag>))</procedure>
|
||||||
|
Runs the QML event processing once until all queued events are processed.
|
||||||
|
|
||||||
|
<procedure>(process-events-timed (flag <QEventLoopProcessEventFlag>) (timed <integer>))</procedure>
|
||||||
|
Runs the QML event processing until all queued events are processed or the timeout has run out.
|
||||||
|
|
||||||
|
<procedure>(gui-application-create)</procedure>
|
||||||
|
Initializes the QGuiApplication.
|
||||||
|
|
||||||
|
<procedure>(gui-application-exec)</procedure>
|
||||||
|
Executes the QGuiApplication. WARNING: This will block the Chicken process!
|
||||||
|
|
||||||
|
<procedure>(gui-application-quit)</procedure>
|
||||||
|
Quits the QGuiApplication.
|
||||||
|
|
||||||
|
<procedure>(gui-application-delete)</procedure>
|
||||||
|
Deletes the QGuiApplication.
|
||||||
|
|
||||||
|
<procedure>(qapplication-create)</procedure>
|
||||||
|
Initializes the QApplication.
|
||||||
|
|
||||||
|
<procedure>(qapplication-exec)</procedure>
|
||||||
|
Executes the QApplication. WARNING: This will block the Chicken process!
|
||||||
|
|
||||||
|
<procedure>(qapplication-quit)</procedure>
|
||||||
|
Quits the QApplication.
|
||||||
|
|
||||||
|
<procedure>(qapplication-delete)</procedure>
|
||||||
|
Deletes the QApplication.
|
||||||
|
|
||||||
|
<procedure>(qquickstyle-set-style style)</procedure>
|
||||||
|
Sets the QQuickStyle, see https://doc.qt.io/qt-5/qquickstyle.html#setStyle for details.
|
||||||
|
|
||||||
|
<procedure>(qquickstyle-set-fallback-style style)</procedure>
|
||||||
|
Sets the fallback style with QQuickStyle, see https://doc.qt.io/qt-5/qquickstyle.html#setFallbackStyle for details.
|
||||||
|
|
||||||
|
== Classes
|
||||||
|
|
||||||
|
=== <QMLBase>
|
||||||
|
|
||||||
|
A base class you can't directly use yourself, but it provides facilities like a refcounter to delete the companion pointer once it is not needed anymore.
|
||||||
|
|
||||||
|
=== <QVariant>
|
||||||
|
|
||||||
|
This class is used to pass and return value types to and from Qt, and offers a decent range of possible types.
|
||||||
|
|
||||||
|
<procedure>(new-QVariant) → <QVariant></procedure>
|
||||||
|
Creates a blank QVariant with no content.
|
||||||
|
|
||||||
|
<procedure>(qvariant (val <integer>)) → <QVariant></procedure>
|
||||||
|
Creates a QVariant with an integer.
|
||||||
|
|
||||||
|
; val : The integer to store
|
||||||
|
|
||||||
|
<procedure>(qvariant (val <boolean>)) → <QVariant></procedure>
|
||||||
|
Creates a QVariant with a boolean.
|
||||||
|
|
||||||
|
; val : The boolean to store
|
||||||
|
|
||||||
|
<procedure>(qvariant (val <string>)) → <QVariant></procedure>
|
||||||
|
Creates a QVariant with a string.
|
||||||
|
|
||||||
|
; val : The string to store
|
||||||
|
|
||||||
|
<procedure>(qvariant (val <QObject>)) → <QVariant></procedure>
|
||||||
|
Creates a QVariant with a QObject.
|
||||||
|
|
||||||
|
; val : The QObject to store
|
||||||
|
|
||||||
|
<procedure>(qvariant (val <flonum>)) → <QVariant></procedure>
|
||||||
|
Creates a QVariant with a float.
|
||||||
|
|
||||||
|
; val : The float to store
|
||||||
|
|
||||||
|
<procedure>(set (qv <QVariant>) (val <integer>)) → void</procedure>
|
||||||
|
Sets the QVariant value to the specified integer.
|
||||||
|
|
||||||
|
; qv : The QVariant to modify
|
||||||
|
; val : The integer to store
|
||||||
|
|
||||||
|
<procedure>(set (qv <QVariant>) (val <boolean>)) → void</procedure>
|
||||||
|
Sets the QVariant value to the specified boolean.
|
||||||
|
|
||||||
|
; qv : The QVariant to modify
|
||||||
|
; val : The booleant o store
|
||||||
|
|
||||||
|
<procedure>(set (qv <QVariant>) (val <flonum>)) → void</procedure>
|
||||||
|
Sets the QVariant value to the specified float.
|
||||||
|
|
||||||
|
; qv : The QVariant to modify
|
||||||
|
; val : The float to store
|
||||||
|
|
||||||
|
<procedure>(set (qv <QVariant>) (val <string>)) → void</procedure>
|
||||||
|
Sets the QVariant value to the specified string.
|
||||||
|
|
||||||
|
; qv : The QVariant to modify
|
||||||
|
; val : The string to store
|
||||||
|
|
||||||
|
<procedure>(set (qv <QVariant>) (val <QObject>)) → void</procedure>
|
||||||
|
Sets the QVariant value to the specified QObject.
|
||||||
|
|
||||||
|
; qv : The QVariant to modify
|
||||||
|
; val : The QObject to store
|
||||||
|
|
||||||
|
<procedure>(to (qv <QVariant>) (target <keyword>)) → target format</procedure>
|
||||||
|
Extracts the QVariant's value.
|
||||||
|
|
||||||
|
; qv : The QVariant to read
|
||||||
|
; target : The target format; available are integer:, boolean:, string:, flonum:, and qobject:
|
||||||
|
|
||||||
|
<procedure>(is-null? (qv <QVariant>)) → boolean</procedure>
|
||||||
|
Checks if the QVariant's value is null.
|
||||||
|
|
||||||
|
; qv : The QVariant to check
|
||||||
|
|
||||||
|
=== Author
|
||||||
|
Daniel Ziltener
|
||||||
|
|
||||||
|
=== License
|
||||||
|
LGPLv3
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
chalk -m ./qml.core.scm > readme.wiki
|
chalk -m ./qml.core.scm > qml.wiki
|
||||||
|
|
Loading…
Reference in New Issue