Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-12388

Move Design Studio Shape based components to Qt Quick

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None
    • Move Design Studio Shape based components to Qt Quick

    Description

      Move Design Studio Shape-based components to Qt Quick.

      Qt Design Studio provides a couple of Shape-based components. See: https://codereview.qt-project.org/gitweb?p=qt-labs/qtquickdesigner-components.git;a=tree;f=src/imports/components;h=676b3604c35ef0b414c73f43fe374153642de5e7;hb=HEAD

      All those items are currently purely QML and based on QtQuick.Shapes. They provide simple parameters to create e.g. Arcs for gauges, Pies for diagrams and ellipses, polygons, and triangles for various use cases. They all support the more complex gradients from the Shapes module. There are also two more versatile Rectangles:
      RectangleItem and BorderItem.

      • ArcItem.qml Arc for Gauges. The arc can be just a pen or a filled arc with an outline.
      • BorderItem.qml Rectangle with just borders, allows to turn on/off individual edges.
      • EllipseItem.qml Ellipse/Circle
      • PieItem.qml Pie
      • RectangleItem.qml Rectangle with shape gradients and advanced features for border and radius.
      • RegularPolygonItem.qml N-Gon
      • SvgPathItem.qml A very simple way to visualize SVG paths.
      • TriangleItem.qml Triangle

      For RectangleItem and BorderItem the border can be rendered within the rectangle's boundaries, outside of them, or on top of them.
      The radius is adjusted accordingly to keep compatibility with design tools.

      Those items make sense in the border context of QtQuick and could be moved into the Shapes module as ShapeRectange, ShapeArc...
      They are also 'done' in the context of Qt Design Studio. We do not expect big changes to the behavior in the future.

      Documentation for the Studio Components can be found here: https://doc-snapshots.qt.io/qtquickstudiocomponents-dev/qtquick-studio-components-qmlmodule.html

      Update 18.10.2024

      Qt 6.8 already has a PathRectangle. https://doc.qt.io/qt-6/qml-qtquick-pathrectangle.html
      RectangleItem should be based on PathRectangle but advanced design specific features like borderMode (See: https://doc-snapshots.qt.io/qtquickstudiocomponents-dev/qml-qtquick-studio-components-rectangleitem.html#borderMode-prop) should be only implemented in the RectangleItem.

      PathRectangle should get bevel options for each corner/radius. (See: https://doc-snapshots.qt.io/qtquickstudiocomponents-dev/qml-qtquick-studio-components-rectangleitem.html#bevel-prop) https://bugreports.qt.io/browse/QDS-13865

      BorderItem will keep its own implementation (based on line segements and arcs). Since the feature of turning on/off single edges makes no sense in the context of PathRectangle.

      How to go forward with the other items will be decided once RectangleItem and BorderItem are implemented.

      Naming convention:

      The current proposal is:

      RectangleShape (intead of RectangleItem)
      BorderShape (instead of BorderItem)
      inside
      QtQuick.Shapes.DesignHelpers

      We will decide on this next week (QDS-13860).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mitch_curtis Mitch Curtis
              thohartm Thomas Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes