diff options
Diffstat (limited to 'src/quickcontrols2/doc/src/includes')
15 files changed, 417 insertions, 0 deletions
diff --git a/src/quickcontrols2/doc/src/includes/customize-button-background.qdocinc b/src/quickcontrols2/doc/src/includes/customize-button-background.qdocinc new file mode 100644 index 0000000000..0acad02d38 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/customize-button-background.qdocinc @@ -0,0 +1,25 @@ +//! [file] +\qml +import QtQuick +import QtQuick.Controls + +ApplicationWindow { + width: 400 + height: 400 + visible: true + + Button { + id: button + text: "A Special Button" + background: Rectangle { + implicitWidth: 100 + implicitHeight: 40 + color: button.down ? "#d6d6d6" : "#f6f6f6" + border.color: "#26282a" + border.width: 1 + radius: 4 + } + } +} +\endqml +//! [file] diff --git a/src/quickcontrols2/doc/src/includes/inputmethodhints.qdocinc b/src/quickcontrols2/doc/src/includes/inputmethodhints.qdocinc new file mode 100644 index 0000000000..73710e1e15 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/inputmethodhints.qdocinc @@ -0,0 +1,38 @@ +//! [flags] +The value is a bit-wise combination of flags or \c Qt.ImhNone if no hints are set. + +Flags that alter behavior are: + +\list +\li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords. +\li Qt.ImhSensitiveData - Typed text should not be stored by the active input method + in any persistent storage like predictive user dictionary. +\li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case + when a sentence ends. +\li Qt.ImhPreferNumbers - Numbers are preferred (but not required). +\li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required). +\li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required). +\li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing. + +\li Qt.ImhDate - The text editor functions as a date field. +\li Qt.ImhTime - The text editor functions as a time field. +\endlist + +Flags that restrict input (exclusive flags) are: + +\list +\li Qt.ImhDigitsOnly - Only digits are allowed. +\li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign. +\li Qt.ImhUppercaseOnly - Only upper case letter input is allowed. +\li Qt.ImhLowercaseOnly - Only lower case letter input is allowed. +\li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed. +\li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed. +\li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed. +\endlist + +Masks: + +\list +\li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used. +\endlist +//! [flags] diff --git a/src/quickcontrols2/doc/src/includes/qquickcombobox.qdocinc b/src/quickcontrols2/doc/src/includes/qquickcombobox.qdocinc new file mode 100644 index 0000000000..5e19f5f1f4 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickcombobox.qdocinc @@ -0,0 +1,6 @@ +//! [functions-after-component-completion] + +\note This function can only be used after +\l {Component::completed()}{Component.completed()} is emitted for the ComboBox. + +//! [functions-after-component-completion] diff --git a/src/quickcontrols2/doc/src/includes/qquickcontrol-background.qdocinc b/src/quickcontrols2/doc/src/includes/qquickcontrol-background.qdocinc new file mode 100644 index 0000000000..02d92de07c --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickcontrol-background.qdocinc @@ -0,0 +1,13 @@ +//! [notes] + +\note If the background item has no explicit size specified, it automatically + follows the control's size. In most cases, there is no need to specify + width or height for a background item. + +\note Most controls use the implicit size of the background item to calculate +the implicit size of the control itself. If you replace the background item +with a custom one, you should also consider providing a sensible implicit +size for it (unless it is an item like \l Image which has its own implicit +size). + +//! [notes] diff --git a/src/quickcontrols2/doc/src/includes/qquickcontrol-focusreason.qdocinc b/src/quickcontrols2/doc/src/includes/qquickcontrol-focusreason.qdocinc new file mode 100644 index 0000000000..b69e9e60ec --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickcontrol-focusreason.qdocinc @@ -0,0 +1,15 @@ +This property holds the reason of the last focus change. + +\note This property does not indicate whether the control has \l {Item::activeFocus} + {active focus}, but the reason why the control either gained or lost focus. + +\value Qt.MouseFocusReason A mouse action occurred. +\value Qt.TabFocusReason The Tab key was pressed. +\value Qt.BacktabFocusReason A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab. +\value Qt.ActiveWindowFocusReason The window system made this window either active or inactive. +\value Qt.PopupFocusReason The application opened/closed a pop-up that grabbed/released the keyboard focus. +\value Qt.ShortcutFocusReason The user typed a label's buddy shortcut +\value Qt.MenuBarFocusReason The menu bar took focus. +\value Qt.OtherFocusReason Another reason, usually application-specific. + +\sa Item::activeFocus diff --git a/src/quickcontrols2/doc/src/includes/qquickdial.qdocinc b/src/quickcontrols2/doc/src/includes/qquickdial.qdocinc new file mode 100644 index 0000000000..3370b3d8f3 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickdial.qdocinc @@ -0,0 +1,13 @@ +//! [inputMode] +Dial supports three \l {inputMode}{input modes}: \c Dial.Circular, +\c Dial.Horizontal and \c Dial.Vertical. The circular input mode operates on an +absolute input system, where the position of the cursor within the dial +directly reflects its value. The horizontal and vertical input modes use a +relative input system, where changes in the cursor's position are "added" to +the value of the dial. + +The following image illustrates the directions in which the various input modes +track movement: + +\image qtquickcontrols2-dial-inputmode.png +//! [inputMode] diff --git a/src/quickcontrols2/doc/src/includes/qquickicon.qdocinc b/src/quickcontrols2/doc/src/includes/qquickicon.qdocinc new file mode 100644 index 0000000000..beef5624ff --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickicon.qdocinc @@ -0,0 +1,50 @@ +//! [grouped-properties] +\table +\header + \li Name + \li Description +\row + \li name + \li This property holds the name of the icon to use. + + The icon will be loaded from the platform theme. If the icon is found + in the theme, it will always be used; even if \l icon.source is also set. + If the icon is not found, \l icon.source will be used instead. + + For more information on theme icons, see \l {QIcon::fromTheme()}. +\row + \li source + \li This property holds the name of the icon to use. + + The icon will be loaded as a regular image. + + If \l icon.name is set and refers to a valid theme icon, it will always + be used instead of this property. +\row + \li width + \li This property holds the width of the icon. + + The icon's width will never exceed this value, though it will + shrink when necessary. +\row + \li height + \li This property holds the height of the icon. + + The icon's height will never exceed this value, though it will + shrink when necessary. +\row + \li color + \li This property holds the color of the icon. + + The icon is tinted with the specified color, unless the color is + set to \c "transparent". + +\row + \li cache + \li This property specifies whether the icon should be cached. + + The default value is true. + + This property was introduced in QtQuick.Controls 2.13. +\endtable +//! [grouped-properties] diff --git a/src/quickcontrols2/doc/src/includes/qquickimaginestyle.qdocinc b/src/quickcontrols2/doc/src/includes/qquickimaginestyle.qdocinc new file mode 100644 index 0000000000..f6fe5a970a --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickimaginestyle.qdocinc @@ -0,0 +1,57 @@ +//! [conf] +\table + \header + \li Variable + \li Description + \row + \li \c Path + \li Specifies the \l {imagine-path-attached-prop}{path} to the directory that contains + the Imagine style assets. If not specified, the built-in assets are used. + + For example, to specify a path to a directory stored in the + \l {The Qt Resource System}{resource system}: + + \badcode + [Imagine] + Path=:/imagine-assets + \endcode + + To specify a relative path to a local directory: + + \badcode + [Imagine] + Path=imagine-assets + \endcode + + \note Due to a technical limitation, the path should not be named + \e "imagine" if it is relative to the \c qtquickcontrols2.conf file. +\endtable +//! [conf] + +//! [env] +\table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_IMAGINE_PATH + \li Specifies the path to the directory that contains the Imagine style assets. + If not specified, the built-in assets are used. + + For example, to specify a path to a directory stored in the + \l {The Qt Resource System}{resource system}: + + \badcode + QT_QUICK_CONTROLS_IMAGINE_PATH=:/imagine-assets + \endcode + + To specify a relative path to a local directory: + + \badcode + QT_QUICK_CONTROLS_IMAGINE_PATH=imagine-assets + \endcode + + \note Due to a technical limitation, the path should not be named + \e "imagine" if it is relative to the \c qtquickcontrols2.conf file. +\endtable +//! [env] diff --git a/src/quickcontrols2/doc/src/includes/qquickmaterialstyle.qdocinc b/src/quickcontrols2/doc/src/includes/qquickmaterialstyle.qdocinc new file mode 100644 index 0000000000..72c97bb639 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickmaterialstyle.qdocinc @@ -0,0 +1,79 @@ +//! [conf] +\table + \header + \li Variable + \li Description + \row + \li \c Theme + \li Specifies the default \l {material-theme-attached-prop}{Material theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c Variant + \li Specifies the Material variant. The Material Design has two + variants: a normal variant designed for touch devices, and a dense + variant for desktop. The dense variant uses smaller sizes for + controls and their fonts. + + The value can be \c "Normal" or \c "Dense". + \row + \li \c Accent + \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "Teal". + \row + \li \c Primary + \li Specifies the default \l {material-primary-attached-prop}{Material primary color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "BlueGrey". + \row + \li \c Foreground + \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Brown". + \row + \li \c Background + \li Specifies the default \l {material-background-attached-prop}{Material background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Grey". +\endtable +//! [conf] + +//! [env] +\table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_THEME + \li Specifies the default \l {material-theme-attached-prop}{Material theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_VARIANT + \li Specifies the Material variant. The Material Design has two + variants: a normal variant designed for touch devices, and a dense + variant for desktop. The dense variant uses smaller sizes for + controls and their fonts. + + The value can be \c "Normal" or \c "Dense". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT + \li Specifies the default \l {material-accent-attached-prop}{Material accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "Teal". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_PRIMARY + \li Specifies the default \l {material-primary-attached-prop}{Material primary color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Material colors}, for example \c "BlueGrey". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_FOREGROUND + \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Brown". + \row + \li \c QT_QUICK_CONTROLS_MATERIAL_BACKGROUND + \li Specifies the default \l {material-background-attached-prop}{Material background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors}, + for example \c "Grey". +\endtable +//! [env] diff --git a/src/quickcontrols2/doc/src/includes/qquickoverlay-popup-parent.qdocinc b/src/quickcontrols2/doc/src/includes/qquickoverlay-popup-parent.qdocinc new file mode 100644 index 0000000000..5562f6a039 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickoverlay-popup-parent.qdocinc @@ -0,0 +1,20 @@ +The following example uses the attached \l {Overlay::overlay}{Overlay.overlay} +property to position a popup in the center of the window, despite the position +of the button that opens the popup: + +\code +Button { + onClicked: popup.open() + + Popup { + id: popup + + parent: Overlay.overlay + + x: Math.round((parent.width - width) / 2) + y: Math.round((parent.height - height) / 2) + width: 100 + height: 100 + } +} +\endcode diff --git a/src/quickcontrols2/doc/src/includes/qquickpopup-padding.qdocinc b/src/quickcontrols2/doc/src/includes/qquickpopup-padding.qdocinc new file mode 100644 index 0000000000..31f5d2db02 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickpopup-padding.qdocinc @@ -0,0 +1,10 @@ +//! [padding] + +The padding properties are used to control the geometry of the +\l {contentItem}{content item}. + +Popup uses the same approach to padding as \l {Control::padding}{Control}. +For a visual explanation of the padding system, see the \l {Control Layout} +section of the documentation. + +//! [padding] diff --git a/src/quickcontrols2/doc/src/includes/qquickstackview.qdocinc b/src/quickcontrols2/doc/src/includes/qquickstackview.qdocinc new file mode 100644 index 0000000000..20c9bdc369 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickstackview.qdocinc @@ -0,0 +1,5 @@ +//! [pop-ownership] +Only items that StackView created itself (from a \l Component or \l [QML] +url) will be destroyed when popped. See \l {Item Ownership} for more +information. +//! [pop-ownership] diff --git a/src/quickcontrols2/doc/src/includes/qquickswipedelegate-interaction.qdocinc b/src/quickcontrols2/doc/src/includes/qquickswipedelegate-interaction.qdocinc new file mode 100644 index 0000000000..05aeadb654 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickswipedelegate-interaction.qdocinc @@ -0,0 +1,5 @@ +Both interactive and non-interactive items can be used here. Normal +event handling rules apply; if an interactive control like \l Button +is used, interaction signals of SwipeDelegate such as +\l {AbstractButton::}{clicked()} will not get emitted if the button +is clicked. diff --git a/src/quickcontrols2/doc/src/includes/qquickswitch.qdocinc b/src/quickcontrols2/doc/src/includes/qquickswitch.qdocinc new file mode 100644 index 0000000000..985f85d979 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickswitch.qdocinc @@ -0,0 +1,28 @@ +//! [position] + +This property holds the logical position of the thumb indicator. + +The position is expressed as a fraction of the indicator's size, in the range +\c 0.0 - \c 1.0. The position can be used for example to determine whether +the thumb has been dragged past the halfway point. For visualizing a thumb +indicator, the right-to-left aware \l visualPosition should be used instead. + +\sa visualPosition + +//! [position] + + +//! [visualPosition] + +This property holds the visual position of the thumb indicator. + +The position is expressed as a fraction of the indicator's size, in the range +\c 0.0 - \c 1.0. When the control is \l {Control::mirrored}{mirrored}, the +value is equal to \c {1.0 - position}. This makes the value suitable for +visualizing the thumb indicator taking right-to-left support into account. +In order to for example determine whether the thumb has been dragged past +the halfway point, the logical \l position should be used instead. + +\sa position + +//! [visualPosition] diff --git a/src/quickcontrols2/doc/src/includes/qquickuniversalstyle.qdocinc b/src/quickcontrols2/doc/src/includes/qquickuniversalstyle.qdocinc new file mode 100644 index 0000000000..a7ecbaef09 --- /dev/null +++ b/src/quickcontrols2/doc/src/includes/qquickuniversalstyle.qdocinc @@ -0,0 +1,53 @@ +//! [conf] +\table + \header + \li Variable + \li Description + \row + \li \c Theme + \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c Accent + \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Universal colors}, for example \c "Violet". + \row + \li \c Foreground + \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Brown". + \row + \li \c Background + \li Specifies the default \l {universal-background-attached-prop}{Universal background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Steel". +\endtable +//! [conf] + +//! [env] +\table + \header + \li Variable + \li Description + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_THEME + \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}. + The value can be one of the available themes, for example \c "Dark". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_ACCENT + \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}. + The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use + one of the \l {pre-defined Universal colors}, for example \c "Violet". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND + \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Brown". + \row + \li \c QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND + \li Specifies the default \l {universal-background-attached-prop}{Universal background color}. + The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors}, + for example \c "Steel". +\endtable +//! [env] |