From f7634fc73836e368cfa14379eeda26ee761b16b7 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Tue, 8 Sep 2020 22:37:28 +0200 Subject: Doc: Add Qt Bridge import documentation Change-Id: Iab73c53c4f128f54ebd4938ad24d0febb8705784 Reviewed-by: Leena Miettinen --- .../images/qt-bridge-import-warning.png | Bin 0 -> 35447 bytes doc/qtdesignstudio/images/qt-bridge-import.png | Bin 0 -> 25057 bytes .../src/qtbridge/qtbridge-ps-using.qdoc | 40 +++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 doc/qtdesignstudio/images/qt-bridge-import-warning.png create mode 100644 doc/qtdesignstudio/images/qt-bridge-import.png diff --git a/doc/qtdesignstudio/images/qt-bridge-import-warning.png b/doc/qtdesignstudio/images/qt-bridge-import-warning.png new file mode 100644 index 0000000000..8f037ca263 Binary files /dev/null and b/doc/qtdesignstudio/images/qt-bridge-import-warning.png differ diff --git a/doc/qtdesignstudio/images/qt-bridge-import.png b/doc/qtdesignstudio/images/qt-bridge-import.png new file mode 100644 index 0000000000..f438beb3c2 Binary files /dev/null and b/doc/qtdesignstudio/images/qt-bridge-import.png differ diff --git a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-using.qdoc b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-using.qdoc index ff12226ab4..86282ffd28 100644 --- a/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-using.qdoc +++ b/doc/qtdesignstudio/src/qtbridge/qtbridge-ps-using.qdoc @@ -251,4 +251,44 @@ \li \l{https://www.youtube.com/watch?v=ZzbucmQPU44} {From Photoshop to Prototype with Qt Design Studio} \endlist + + \section1 Importing Metadata & Assets + + \QBPS can import metadata generated from other tools and generate a Photoshop document. A + conventional workflow would be to generate metadata and assets by \l {Exporting QML} {exporting} + a QML project from \QDS and use \QBPS to generate a Photoshop document. + + Imported text and the assets are organized into Artboards, layers, and groups. + + Select the \uicontrol Import button to launch the \uicontrol Import panel. Alternatively, \QB + import can be launched from \uicontrol Window > \uicontrol Extensions. + + \image qt-bridge-import.png + + Create a new PSD document and launch the \uicontrol Import dialog. Open the metadata file to + import and select \uicontrol Import. + + \note The import process removes all the existing layers in the selected PSD document. + + \image qt-bridge-import-warning.png + + The following guidelines are followed to generate the Photoshop document: + \list + \li An Artboard is created for each QML component exported and defined in the metadata file. + \li An image layer is created for an item with an asset. + \li A solid fill layer is created for an item without an asset. + \li A paragraph text layer is created for Text items. + \endlist + + All QML metadata specified in the metadata file is assigned to the generated layers. + + An important concept of \e {Virtual parent} is applied to translate the QML DOM to Photoshop + DOM. A QML \l Item can have children but a layer in a Photoshop document cannot have child + layers. To mitigate this variance, a Group layer is created and child items are added to this + Group layer. The Group layer acts as a virtual parent and the correct parent is assigned when + the Photoshop document is exported and re-imported in \QDS. + + \note The parent-child relationship may be lost if the virtual parent Group layer is moved or + deleted. + */ -- cgit v1.2.3