|
| 1 | +import QtQuick |
| 2 | + |
| 3 | +///! MouseArea wrapper item. |
| 4 | +/// This component is useful for wrapping a single component in |
| 5 | +/// a mouse area. It works the same as @@WrapperItem, but with a @@QtQuick.MouseArea. |
| 6 | +/// |
| 7 | +/// > [!NOTE] WrapperMouseArea is a @@MarginWrapperManager based component. |
| 8 | +/// > See its documentation for information on how margins and sizes are calculated. |
| 9 | +/// |
| 10 | +/// > [!NOTE] The child item can be specified by writing it inline in the wrapper, |
| 11 | +/// > as in the example above, or by using the @@child property. See |
| 12 | +/// > @@WrapperManager.child for details. |
| 13 | +/// |
| 14 | +/// > [!WARNING] You should not set @@Item.x, @@Item.y, @@Item.width, |
| 15 | +/// > @@Item.height or @@Item.anchors on the child item, as they are used |
| 16 | +/// > by WrapperItem to position it. Instead set @@Item.implicitWidth and |
| 17 | +/// > @@Item.implicitHeight. |
| 18 | +/// |
| 19 | +/// [QtQuick.Layouts]: https://doc.qt.io/qt-6/qtquicklayouts-index.html |
| 20 | +MouseArea { |
| 21 | + /// The default for @@topMargin, @@bottomMargin, @@leftMargin and @@rightMargin. |
| 22 | + /// Defaults to 0. |
| 23 | + property /*real*/alias margin: manager.margin |
| 24 | + /// An extra margin applied in addition to @@topMargin, @@bottomMargin, |
| 25 | + /// @@leftMargin, and @@rightMargin. Defaults to 0. |
| 26 | + property /*real*/alias extraMargin: manager.extraMargin |
| 27 | + /// The requested top margin of the content item, not counting @@extraMargin. |
| 28 | + /// |
| 29 | + /// Defaults to @@margin, and may be reset by assigning `undefined`. |
| 30 | + property /*real*/alias topMargin: manager.topMargin |
| 31 | + /// The requested bottom margin of the content item, not counting @@extraMargin. |
| 32 | + /// |
| 33 | + /// Defaults to @@margin, and may be reset by assigning `undefined`. |
| 34 | + property /*real*/alias bottomMargin: manager.bottomMargin |
| 35 | + /// The requested left margin of the content item, not counting @@extraMargin. |
| 36 | + /// |
| 37 | + /// Defaults to @@margin, and may be reset by assigning `undefined`. |
| 38 | + property /*real*/alias leftMargin: manager.leftMargin |
| 39 | + /// The requested right margin of the content item, not counting @@extraMargin. |
| 40 | + /// |
| 41 | + /// Defaults to @@margin, and may be reset by assigning `undefined`. |
| 42 | + property /*real*/alias rightMargin: manager.rightMargin |
| 43 | + /// Determines if child item should be resized larger than its implicit size if |
| 44 | + /// the parent is resized larger than its implicit size. Defaults to false. |
| 45 | + property /*bool*/alias resizeChild: manager.resizeChild |
| 46 | + /// See @@WrapperManager.child for details. |
| 47 | + property /*Item*/alias child: manager.child |
| 48 | + |
| 49 | + MarginWrapperManager { id: manager } |
| 50 | +} |
0 commit comments