Merge remote-tracking branch 'origin/4.12'
Conflicts: src/tools/qml2puppet/CMakeLists.txt Change-Id: Id6243b0f725a68075d789bf35e771113b742645b
14
dist/changes-4.12.0.md
vendored
@@ -104,6 +104,7 @@ Projects
|
||||
|
||||
### Qbs
|
||||
|
||||
* Updated included Qbs version to 1.16.0
|
||||
* Changed to use separate Qbs executable instead of direcly linking to Qbs (QTCREATORBUG-20622)
|
||||
* Added option for default install root (QTCREATORBUG-12983)
|
||||
|
||||
@@ -139,6 +140,7 @@ Analyzer
|
||||
### Clang
|
||||
|
||||
* Improved filtering
|
||||
* Added `Analyze Current File` to `Tools` menu and editor context menu
|
||||
* Added context menu item that opens help on diagnostics
|
||||
|
||||
### CppCheck
|
||||
@@ -161,6 +163,7 @@ Qt Quick Designer
|
||||
* Added locking and pinning of animation curves (QDS-550, QDS-551)
|
||||
* Added support for annotations (QDS-39)
|
||||
* Fixed dragging of keyframes in curve editor (QDS-1405)
|
||||
* Fixed crash when selecting icon (QTCREATORBUG-23773)
|
||||
|
||||
Version Control Systems
|
||||
-----------------------
|
||||
@@ -181,6 +184,7 @@ Test Integration
|
||||
### Google Test
|
||||
|
||||
* Added support for internal logging (QTCREATORBUG-23354)
|
||||
* Added support for `GTEST_SKIP` (QTCREATORBUG-23736)
|
||||
|
||||
Platforms
|
||||
---------
|
||||
@@ -202,6 +206,8 @@ Platforms
|
||||
* Added option to automatically download and install required Android tools (QTCREATORBUG-23285)
|
||||
* Added option to register multiple NDKs (QTCREATORBUG-23286)
|
||||
* Added automatic selection of correct NDK for Qt version (QTCREATORBUG-23583)
|
||||
* Added option to download and use [OpenSSL for Android](https://github.com/KDAB/android_openssl)
|
||||
(QTBUG-80625)
|
||||
* Added support for Android 11 with API level 30
|
||||
* Improved examples browser to only show items tagged with `android` (QTBUG-80716)
|
||||
* Improved manifest editor (QTCREATORBUG-23283)
|
||||
@@ -222,6 +228,10 @@ Platforms
|
||||
* Added support for J-Link and EBlink GDB servers
|
||||
* Added support for KEIL uVision v5.x debugger
|
||||
|
||||
### MCU
|
||||
|
||||
* Added auto-registration of documentation (UL-1685)
|
||||
|
||||
Credits for these changes go to:
|
||||
--------------------------------
|
||||
Aleksei German
|
||||
@@ -243,6 +253,7 @@ Eike Ziller
|
||||
Fawzi Mohamed
|
||||
Federico Guerinoni
|
||||
Filippo Cucchetto
|
||||
Friedemann Kleint
|
||||
Halfdan Ingvarsson
|
||||
Hannes Domani
|
||||
Henning Gruendl
|
||||
@@ -266,6 +277,7 @@ Nikolai Kosjar
|
||||
Nikolay Panov
|
||||
Oliver Wolff
|
||||
Orgad Shaneh
|
||||
Richard Weickelt
|
||||
Robert Löhning
|
||||
Sergey Morozov
|
||||
Tasuku Suzuki
|
||||
@@ -276,6 +288,8 @@ Tim Jenssen
|
||||
Tobias Hunger
|
||||
Topi Reinio
|
||||
Ulf Hermann
|
||||
Unseon Ryu
|
||||
Venugopal Shivashankar
|
||||
Vikas Pachdha
|
||||
Ville Voutilainen
|
||||
Volodymyr Samokhatko
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 2.7 KiB |
27
doc/qtcreator/images/creator_advanceduse.svg
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.78,272H14.19C6.36,272,0,265.64,0,257.81V14.21C0,6.37,6.36,0.01,14.19,0.01h421.58
|
||||
c7.84,0,14.19,6.36,14.19,14.19v243.6C449.97,265.64,443.61,272,435.78,272z"/>
|
||||
<path fill="#878686" d="M0.44,19.66L0,14.19C0,6.36,6.35,0.01,14.18,0.01h421.61c7.83,0,14.18,6.35,14.18,14.18v6.84"/>
|
||||
<circle fill="#DD5958" cx="17.43" cy="10.66" r="5"/>
|
||||
<circle fill="#DBC558" cx="34.41" cy="10.66" r="5"/>
|
||||
<circle fill="#52B257" cx="51.4" cy="10.66" r="5"/>
|
||||
</g>
|
||||
<path fill="#FFFFFF" d="M310.9,130.29c-5.72-1.44-12.54-1.96-19.95-2.96c-1.52-5.95-3.87-11.55-6.92-16.72
|
||||
c4.57-6.01,9.08-11.24,12.13-16.37c0.86-1.44,1.03-3.56-0.1-4.69L282,75.49c-1.13-1.13-3.23-0.97-4.69-0.1
|
||||
c-5.11,3.05-10.33,7.56-16.35,12.11c-5.11-3.01-10.66-5.35-16.55-6.9c-1.03-7.53-1.54-14.47-3.01-20.28
|
||||
c-0.41-1.65-1.81-3.25-3.4-3.25h-19.89c-1.59,0-2.99,1.61-3.4,3.25c-1.46,5.76-1.96,12.66-2.99,20.13
|
||||
c-5.91,1.5-11.49,3.81-16.61,6.79c-6.05-4.59-11.3-9.14-16.45-12.21c-1.44-0.86-3.56-1.01-4.69,0.1L159.92,89.2
|
||||
c-1.13,1.13-0.97,3.25-0.1,4.69c3.03,5.11,7.51,10.29,12.04,16.26c-3.07,5.15-5.48,10.75-7.06,16.68
|
||||
c-7.43,1.01-14.31,1.52-20.05,2.99c-1.65,0.41-3.25,1.79-3.25,3.38v19.89c0,1.59,1.61,2.99,3.25,3.4
|
||||
c5.68,1.44,12.43,1.96,19.78,2.94c1.5,6.03,3.85,11.73,6.9,16.98c-4.51,5.91-8.93,11.08-11.96,16.12c-0.86,1.46-1.01,3.58,0.1,4.69
|
||||
l14.06,14.06c1.13,1.13,3.25,0.97,4.69,0.1c5-2.96,10.11-7.35,15.93-11.8c5.25,3.15,10.97,5.58,17.05,7.16
|
||||
c0.99,7.31,1.5,14.04,2.94,19.72c0.41,1.63,1.79,3.23,3.38,3.23c6.63,0,13.26,0,19.89,0c1.59,0,2.99-1.61,3.4-3.23
|
||||
c1.42-5.64,1.93-12.33,2.92-19.58c6.07-1.54,11.82-3.93,17.09-7.04c5.89,4.47,11.01,8.87,16.04,11.88c1.46,0.86,3.58,1.03,4.69-0.1
|
||||
l14.06-14.06c1.13-1.13,0.97-3.23,0.1-4.69c-2.99-5.02-7.39-10.15-11.86-16.02c3.09-5.23,5.48-10.91,7.02-16.92
|
||||
c7.39-1.01,14.21-1.52,19.93-2.96c1.63-0.41,3.23-1.81,3.23-3.4v-19.89C314.13,132.1,312.53,130.7,310.9,130.29z M227.41,175.67
|
||||
c-18.07,0-32.71-14.65-32.71-32.71s14.65-32.71,32.71-32.71s32.71,14.65,32.71,32.71S245.48,175.67,227.41,175.67z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.7 KiB |
39
doc/qtcreator/images/creator_buildingrunning.svg
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M377.11,224.13H33.89c-7.84,0-14.19-6.36-14.19-14.19V13.71c0-7.84,6.36-14.19,14.19-14.19h343.21
|
||||
c7.84,0,14.19,6.36,14.19,14.19v196.23C391.3,217.78,384.95,224.13,377.11,224.13z"/>
|
||||
<path fill="#878686" d="M20.06,15.74l-0.37-4.51c0-6.47,5.24-11.71,11.71-11.71h348.18c6.47,0,11.71,5.24,11.71,11.71v5.65"/>
|
||||
<circle fill="#DD5958" cx="34.09" cy="8.31" r="4.13"/>
|
||||
<circle fill="#DBC558" cx="48.12" cy="8.31" r="4.13"/>
|
||||
<circle fill="#52B257" cx="62.14" cy="8.31" r="4.13"/>
|
||||
</g>
|
||||
<rect x="63.92" y="25.97" fill="#949292" width="277.09" height="185.41"/>
|
||||
<g>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="7.8665" stroke-linecap="round" stroke-miterlimit="10" d="M153.93,111.58
|
||||
c0-26.07,21.13-47.2,47.2-47.2s47.2,21.13,47.2,47.2s-21.13,47.2-47.2,47.2"/>
|
||||
<circle fill="#FFFFFF" cx="200.14" cy="111.25" r="21.12"/>
|
||||
<text transform="matrix(1 0 0 1 123.5649 108.1074)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="26.1845px">1</text>
|
||||
<text transform="matrix(1 0 0 1 248.9873 71.7993)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="26.1845px">2</text>
|
||||
<text transform="matrix(1 0 0 1 202.1196 190.623)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="26.1845px">3</text>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M412.27,272h-73c-7.84,0-14.19-6.36-14.19-14.19V89.58c0-7.84,6.36-14.19,14.19-14.19h73
|
||||
c7.84,0,14.19,6.36,14.19,14.19v168.22C426.47,265.64,420.11,272,412.27,272z"/>
|
||||
<path fill="#878686" d="M325.4,89.59l-0.32-3.95c0-5.66,4.59-10.25,10.25-10.25h80.88c5.66,0,10.25,4.59,10.25,10.25v4.94"/>
|
||||
</g>
|
||||
|
||||
<rect x="302.37" y="133.85" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 551.7495 -200.3197)" fill="#949292" width="147.32" height="83.73"/>
|
||||
<g>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="3.7066" stroke-linecap="round" stroke-miterlimit="10" d="M355.31,172.15
|
||||
c0-12.28,9.96-22.24,22.24-22.24c12.28,0,22.24,9.96,22.24,22.24c0,12.28-9.96,22.24-22.24,22.24"/>
|
||||
<circle fill="#FFFFFF" cx="377.08" cy="171.99" r="9.95"/>
|
||||
<text transform="matrix(1 0 0 1 341 170.5078)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.338px">1</text>
|
||||
<text transform="matrix(1 0 0 1 400.0977 153.4004)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.338px">2</text>
|
||||
<text transform="matrix(1 0 0 1 378.0137 209.3896)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.338px">3</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 6.2 KiB |
37
doc/qtcreator/images/creator_coding.svg
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.81,271.62H14.41c-7.84,0-14.19-6.36-14.19-14.19V13.94c0-7.84,6.36-14.19,14.19-14.19h421.4
|
||||
c7.84,0,14.19,6.36,14.19,14.19v243.49C450,265.27,443.64,271.62,435.81,271.62z"/>
|
||||
<path fill="#878686" d="M0.66,19.38l-0.44-5.46c0-7.83,6.35-14.18,14.18-14.18h421.43c7.83,0,14.18,6.35,14.18,14.18v6.84"/>
|
||||
<circle fill="#DD5958" cx="17.63" cy="10.39" r="4.99"/>
|
||||
<circle fill="#DBC558" cx="34.61" cy="10.39" r="4.99"/>
|
||||
<circle fill="#52B257" cx="51.59" cy="10.39" r="4.99"/>
|
||||
</g>
|
||||
<rect x="66.15" y="30.54" fill="#444345" width="343.54" height="233.69"/>
|
||||
<rect x="40.18" y="30.54" fill="#333333" width="25.97" height="233.69"/>
|
||||
<text transform="matrix(1 0 0 1 51.6992 49.5161)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">1</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 67.8916)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">2</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 86.2676)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">3</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 104.6431)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">4</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 123.0186)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">5</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 141.3945)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">6</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 159.7695)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">7</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 178.1455)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">8</text>
|
||||
<text transform="matrix(1 0 0 1 51.6992 196.5215)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">9</text>
|
||||
<text transform="matrix(1 0 0 1 43.3105 214.8965)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">10</text>
|
||||
<text transform="matrix(1 0 0 1 43.3105 233.2725)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">11</text>
|
||||
<text transform="matrix(1 0 0 1 43.3105 251.6484)" fill="#FFFFFF" font-family="'IBMPlexMono'" font-size="13.9815px">12</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 49.5161)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">// main.cpp</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 67.8916)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">#include <QApplication></text>
|
||||
<text transform="matrix(1 0 0 1 78.064 86.2676)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">#include <QTableView></text>
|
||||
<text transform="matrix(1 0 0 1 78.064 104.6431)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">#include "mymodel.h"</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 141.3945)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">int main(int argc, char *argv[])</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 178.1455)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">{</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 196.5215)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px"> QApplication a(argc, argv);</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 214.8965)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px"> QTableView tableView;</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 233.2725)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px"> MyModel myModel;</text>
|
||||
<text transform="matrix(1 0 0 1 78.064 251.6484)" fill="#FFFFFF" font-family="'IBMPlexMono-Light'" font-size="13.9815px">}</text>
|
||||
</svg>
|
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.5 KiB |
45
doc/qtcreator/images/creator_designinguserinterface.svg
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.81,271.62H14.83c-7.84,0-14.19-6.36-14.19-14.19V14.19C0.63,6.36,6.99,0,14.83,0h420.98
|
||||
C443.64,0,450,6.36,450,14.19v243.23C450,265.27,443.64,271.62,435.81,271.62z"/>
|
||||
<path fill="#878686" d="M1.08,19.62l-0.44-5.45C0.63,6.34,6.97,0,14.8,0h421.04C443.66,0,450,6.34,450,14.16v6.83"/>
|
||||
<circle fill="#DD5958" cx="18.04" cy="10.64" r="4.99"/>
|
||||
<circle fill="#DBC558" cx="35" cy="10.64" r="4.99"/>
|
||||
<circle fill="#52B257" cx="51.96" cy="10.64" r="4.99"/>
|
||||
</g>
|
||||
<path fill="#949292" d="M98.62,245.03H18.8c-2.75,0-5-2.25-5-5V47.72c0-2.75,2.25-5,5-5h79.81c2.75,0,5,2.25,5,5v192.3
|
||||
C103.62,242.78,101.37,245.03,98.62,245.03z"/>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="11.8898" stroke-linecap="round" stroke-miterlimit="10" d="M177.01,125.88
|
||||
c0-39.4,31.94-71.34,71.34-71.34s71.34,31.94,71.34,71.34s-31.94,71.34-71.34,71.34"/>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="2.5935" stroke-linecap="round" stroke-miterlimit="10" d="M44.02,68.87
|
||||
c0-8.59,6.97-15.56,15.56-15.56s15.56,6.97,15.56,15.56s-6.97,15.56-15.56,15.56"/>
|
||||
<circle fill="#FFFFFF" cx="246.85" cy="125.38" r="31.93"/>
|
||||
<polygon fill="#878686" points="252.27,115.11 247.86,173.16 266.03,151.21 293.54,155.76 "/>
|
||||
<text transform="matrix(1 0 0 1 131.1162 120.6279)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="39.5765px">1</text>
|
||||
<text transform="matrix(1 0 0 1 320.6885 65.7515)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="39.5765px">2</text>
|
||||
<text transform="matrix(1 0 0 1 249.8477 245.3447)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="39.5765px">3</text>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M72.84,134.43H42.91c-2.75,0-5-2.25-5-5v-9.3c0-2.75,2.25-5,5-5h29.93c2.75,0,5,2.25,5,5v9.3
|
||||
C77.84,132.18,75.59,134.43,72.84,134.43z"/>
|
||||
<text transform="matrix(1 0 0 1 49.1719 128.6772)" fill="#C9C7C7" font-family="'TitilliumWeb-Bold'" font-size="11.9663px">ON</text>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M57.58,180.2h0.19c0.62,0,1.13-0.51,1.13-1.13v-10.95c0-0.62-0.51-1.13-1.13-1.13h-0.19
|
||||
c-0.62,0-1.13,0.51-1.13,1.13v10.95C56.45,179.69,56.96,180.2,57.58,180.2z"/>
|
||||
<path fill="#FFFFFF" d="M84.49,175.31H31.25c-0.95,0-1.72-0.77-1.72-1.72v0c0-0.95,0.77-1.72,1.72-1.72h53.23
|
||||
c0.95,0,1.72,0.77,1.72,1.72v0C86.21,174.54,85.43,175.31,84.49,175.31z"/>
|
||||
<path fill="#E0E1E0" d="M58.93,171.87h25.55c0.95,0,1.73,0.77,1.73,1.72v0c0,0.95-0.78,1.72-1.73,1.72H58.93V171.87z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="0.5769" stroke-miterlimit="10" d="M74.13,228.45H42.6
|
||||
c-6.13,0-11.15-5.02-11.15-11.15v0c0-6.13,5.02-11.15,11.15-11.15h31.54c6.13,0,11.15,5.02,11.15,11.15v0
|
||||
C85.29,223.43,80.27,228.45,74.13,228.45z"/>
|
||||
<circle fill="#FFFFFF" cx="43.65" cy="217.2" r="7.88"/>
|
||||
</g>
|
||||
<line fill="none" stroke="#C9C7C7" stroke-width="0.9977" stroke-miterlimit="10" x1="13.16" y1="98.25" x2="103.47" y2="98.25"/>
|
||||
<line fill="none" stroke="#C9C7C7" stroke-width="0.9977" stroke-miterlimit="10" x1="13.16" y1="150.11" x2="103.47" y2="150.11"/>
|
||||
<line fill="none" stroke="#C9C7C7" stroke-width="0.9977" stroke-miterlimit="10" x1="13.16" y1="195.79" x2="103.47" y2="195.79"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.3 KiB |
16
doc/qtcreator/images/creator_gettinghelp.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C8C6C6" d="M435.91,272.12H15.19C7.36,272.12,1,265.76,1,257.92V14.85C1,7.01,7.36,0.66,15.19,0.66h420.71
|
||||
c7.84,0,14.19,6.36,14.19,14.19v243.07C450.1,265.76,443.75,272.12,435.91,272.12z"/>
|
||||
<path fill="#868585" d="M1.44,20.26L1,14.81C1,6.99,7.34,0.66,15.15,0.66h420.79c7.82,0,14.15,6.34,14.15,14.15v6.83"/>
|
||||
<circle fill="#DC5958" cx="18.39" cy="11.29" r="4.99"/>
|
||||
<circle fill="#DAC457" cx="35.35" cy="11.29" r="4.99"/>
|
||||
<circle fill="#51B156" cx="52.3" cy="11.29" r="4.99"/>
|
||||
</g>
|
||||
<circle fill="#FFFFFF" cx="222.34" cy="144.43" r="64.54"/>
|
||||
<rect x="208.26" y="124.62" fill="none" width="314.12" height="137.75"/>
|
||||
<text transform="matrix(1 0 0 1 208.2568 170.8926)" fill="#C8C6C6" font-family="'TitilliumWeb-Bold'" font-size="71.7954px">?</text>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 2.3 KiB |
22
doc/qtcreator/images/creator_gettingstarted.svg
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.78,272H15.41c-7.84,0-14.19-6.36-14.19-14.19V14.94c0-7.84,6.36-14.19,14.19-14.19h420.37
|
||||
c7.84,0,14.19,6.36,14.19,14.19v242.86C449.97,265.64,443.61,272,435.78,272z"/>
|
||||
<path fill="#878686" d="M1.66,20.34l-0.44-5.45c0-7.81,6.33-14.14,14.14-14.14h420.47c7.81,0,14.14,6.33,14.14,14.14v6.82"/>
|
||||
<circle fill="#DD5958" cx="18.6" cy="11.37" r="4.98"/>
|
||||
<circle fill="#DBC558" cx="35.53" cy="11.37" r="4.98"/>
|
||||
<circle fill="#52B257" cx="52.47" cy="11.37" r="4.98"/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M303.47,70.58c-2.26,40.17-11.3,68.54-51.47,101.18c0,17.07-6.78,34.15-20.59,46.2l-22.85-25.61
|
||||
c-4.77,4.52-11.05,6.78-17.07,7.03c-8.03,0.25-15.82-2.76-21.59-9.04c-10.04-11.3-9.04-28.62,2.01-38.66l-22.85-25.61
|
||||
c13.81-12.3,31.38-17.32,48.46-15.32C234.17,74.35,263.3,68.32,303.47,70.58z M261.79,132.34c7.53-6.78,8.03-18.08,1.51-25.61
|
||||
c-3.77-4.02-8.79-6.28-14.31-6.03c-4.27,0.25-8.29,1.76-11.3,4.52c-7.53,6.78-8.03,18.08-1.51,25.61
|
||||
c3.77,4.02,8.79,6.28,14.31,6.03C254.51,136.61,258.53,135.11,261.79,132.34z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 3.0 KiB |
26
doc/qtcreator/images/creator_managingprojects.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M434.78,272H14.41c-7.84,0-14.19-6.36-14.19-14.19V14.94c0-7.84,6.36-14.19,14.19-14.19h420.37
|
||||
c7.84,0,14.19,6.36,14.19,14.19V257.8C448.97,265.64,442.61,272,434.78,272z"/>
|
||||
<path fill="#878686" d="M0.66,20.34l-0.44-5.45c0-7.81,6.33-14.14,14.14-14.14h420.47c7.81,0,14.14,6.33,14.14,14.14v6.82"/>
|
||||
<circle fill="#DD5958" cx="17.6" cy="11.37" r="4.98"/>
|
||||
<circle fill="#DBC558" cx="34.53" cy="11.37" r="4.98"/>
|
||||
<circle fill="#52B257" cx="51.47" cy="11.37" r="4.98"/>
|
||||
</g>
|
||||
<g transform="translate(0,-280.06666)">
|
||||
<path fill="#878686" d="M154.99,354.72c-3,0-5.44,2.44-5.44,5.44l0,0v27.15v97.8c0,3,2.44,5.44,5.44,5.44h141.27
|
||||
c3,0,5.44-2.44,5.44-5.44v-97.8c0-3-2.44-5.44-5.44-5.44H252.9l-17.39-24.85c-1.02-1.45-2.68-2.31-4.45-2.31h-76.07V354.72z"/>
|
||||
</g>
|
||||
<path fill="#878686" d="M107.69,205.06h-96.9V79.34h79.11c0.34,0,17.09,18.5,17.79,17.79C107.69,97.14,107.69,205.06,107.69,205.06z
|
||||
"/>
|
||||
<path fill="#878686" d="M440.85,206.15h-96.9V80.43h79.11c0.34,0,17.09,18.5,17.79,17.79L440.85,206.15L440.85,206.15z"/>
|
||||
<text transform="matrix(1 0 0 1 14.9414 160.6211)" fill="#F2F2F3" font-family="'TitilliumWeb-Regular'" font-size="52.0199px">C++</text>
|
||||
<text transform="matrix(1 0 0 1 349.8203 164.9639)" fill="#F2F2F3" font-family="'TitilliumWeb-Regular'" font-size="52.0199px">qml</text>
|
||||
<polygon fill="#F2F2F3" points="200.89,150.65 162.96,128.75 162.96,172.55 "/>
|
||||
<rect x="288.68" y="143.6" fill="#F2F2F3" width="55.28" height="16.26"/>
|
||||
<rect x="107.69" y="143.6" fill="#F2F2F3" width="55.28" height="16.26"/>
|
||||
<polygon fill="#F2F2F3" points="250.75,150.65 288.68,172.55 288.68,128.75 "/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.6 KiB |
40
doc/qtcreator/images/creator_publishing.svg
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.78,272H15.41c-7.84,0-14.19-6.36-14.19-14.19V14.94c0-7.84,6.36-14.19,14.19-14.19h420.37
|
||||
c7.84,0,14.19,6.36,14.19,14.19v242.86C449.97,265.64,443.61,272,435.78,272z"/>
|
||||
<path fill="#878686" d="M1.66,20.34l-0.44-5.45c0-7.81,6.33-14.14,14.14-14.14h420.47c7.81,0,14.14,6.33,14.14,14.14v6.82"/>
|
||||
<circle fill="#DD5958" cx="18.6" cy="11.37" r="4.98"/>
|
||||
<circle fill="#DBC558" cx="35.53" cy="11.37" r="4.98"/>
|
||||
<circle fill="#52B257" cx="52.47" cy="11.37" r="4.98"/>
|
||||
</g>
|
||||
<path fill="#EEEDEE" d="M409.72,257.05H52.05c-2.75,0-5-2.25-5-5V34.88c0-2.75,2.25-5,5-5h357.67c2.75,0,5,2.25,5,5v217.18
|
||||
C414.72,254.8,412.47,257.05,409.72,257.05z"/>
|
||||
<g>
|
||||
<polygon fill="#949292" points="207.47,103.17 251.2,103.17 289.47,168.77 341.4,168.77 363.27,122.31 385.13,122.31
|
||||
352.33,187.91 275.8,187.91 237.53,122.31 210.2,122.31 "/>
|
||||
<polygon fill="#949292" points="305.87,81.31 327.73,81.31 327.73,125.04 344.13,125.04 316.8,152.37 289.47,125.04 305.87,125.04
|
||||
"/>
|
||||
<circle fill="#949292" cx="289.47" cy="201.57" r="10.93"/>
|
||||
<circle fill="#949292" cx="338.67" cy="201.57" r="10.93"/>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M169.36,247.01h-76.9c-7.84,0-14.19-6.36-14.19-14.19V57.03c0-7.84,6.36-14.19,14.19-14.19h76.9
|
||||
c7.84,0,14.19,6.36,14.19,14.19v175.79C183.55,240.65,177.2,247.01,169.36,247.01z"/>
|
||||
<path fill="#878686" d="M78.6,57.58l-0.33-4.1c0-5.88,4.77-10.65,10.65-10.65h83.99c5.88,0,10.65,4.77,10.65,10.65v5.14"/>
|
||||
</g>
|
||||
|
||||
<rect x="54.69" y="103.54" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 278.2001 15.8358)" fill="#949292" width="152.99" height="86.95"/>
|
||||
<g>
|
||||
<path fill="none" stroke="#FFFFFF" stroke-width="3.8493" stroke-linecap="round" stroke-miterlimit="10" d="M109.66,143.31
|
||||
c0-12.76,10.34-23.1,23.1-23.1s23.1,10.34,23.1,23.1s-10.34,23.1-23.1,23.1"/>
|
||||
<circle fill="#FFFFFF" cx="132.27" cy="143.15" r="10.34"/>
|
||||
<text transform="matrix(1 0 0 1 94.7988 141.6104)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.8129px">1</text>
|
||||
<text transform="matrix(1 0 0 1 156.1709 123.8447)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.8129px">2</text>
|
||||
<text transform="matrix(1 0 0 1 133.2363 181.9883)" fill="#FFFFFF" font-family="'TitilliumWeb-Bold'" font-size="12.8129px">3</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 3.2 KiB |
34
doc/qtcreator/images/creator_testing.svg
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 450 272" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#C9C7C7" d="M435.78,272H15.41c-7.84,0-14.19-6.36-14.19-14.19V14.94c0-7.84,6.36-14.19,14.19-14.19h420.37
|
||||
c7.84,0,14.19,6.36,14.19,14.19v242.86C449.97,265.64,443.61,272,435.78,272z"/>
|
||||
<path fill="#878686" d="M1.66,20.34l-0.44-5.45c0-7.81,6.33-14.14,14.14-14.14h420.47c7.81,0,14.14,6.33,14.14,14.14v6.82"/>
|
||||
<circle fill="#DD5958" cx="18.6" cy="11.37" r="4.98"/>
|
||||
<circle fill="#DBC558" cx="35.53" cy="11.37" r="4.98"/>
|
||||
<circle fill="#52B257" cx="52.47" cy="11.37" r="4.98"/>
|
||||
</g>
|
||||
<path fill="#EEEDEE" d="M409.72,257.05H52.05c-2.75,0-5-2.25-5-5V34.88c0-2.75,2.25-5,5-5h357.67c2.75,0,5,2.25,5,5v217.18
|
||||
C414.72,254.8,412.47,257.05,409.72,257.05z"/>
|
||||
<polygon fill="#949292" points="330.22,140.56 167,46.32 167,234.8 "/>
|
||||
<g>
|
||||
<path fill="#EEEDEE" d="M225.27,119.2c0.11-0.35,0.23-0.69,0.36-1.02c0.49-1.19,1.22-2.31,2.15-3.25c2.33-2.35,5.63-3.33,9.06-2.98
|
||||
c0.07-2.23,0.54-4.36,1.35-6.15c1.14-2.5,2.95-4.45,5.2-5.36c1-0.39,2.13,0.09,2.52,1.08c0.41,0.98-0.07,2.11-1.06,2.5
|
||||
c-1.28,0.52-2.39,1.76-3.13,3.39c-0.7,1.56-1.08,3.44-1.01,5.42c2.29,0.85,4.5,2.24,6.43,4.15c1.91,1.89,3.32,4.09,4.19,6.37
|
||||
c1.98,0.05,3.86-0.34,5.41-1.06c1.63-0.76,2.85-1.87,3.36-3.16c0.4-0.98,1.51-1.48,2.49-1.09c1,0.38,1.48,1.51,1.11,2.51
|
||||
c-0.89,2.25-2.82,4.08-5.31,5.24c-1.78,0.83-3.89,1.34-6.13,1.41c0.38,3.43-0.56,6.74-2.89,9.09c-0.94,0.94-2.05,1.68-3.23,2.18
|
||||
c-0.33,0.14-0.67,0.25-1.02,0.37c0.06,0.44,0.12,0.88,0.16,1.34c0.22,2.97-0.11,5.82-0.92,8.45l10.51,3.39l7.86-5.01
|
||||
c0.9-0.6,2.09-0.34,2.67,0.58c0.58,0.88,0.32,2.07-0.58,2.67l-8.65,5.53c-0.5,0.31-1.09,0.37-1.63,0.22l-11.63-3.77
|
||||
c-1.24,2.48-2.88,4.75-4.84,6.74l-0.21,0.21l7.81,8.96c0.42,0.46,0.56,1.05,0.47,1.61l-1.07,8.56c-0.13,1.06-1.09,1.83-2.16,1.68
|
||||
c-1.06-0.13-1.79-1.09-1.68-2.16l0.96-7.8l-7.29-8.33c-1.66,1.26-3.46,2.34-5.36,3.21c-1.51,0.72-3.08,1.3-4.69,1.73l2.07,11.49
|
||||
c0.08,0.5-0.01,0.98-0.26,1.38l-3.58,5.81c-0.57,0.92-1.76,1.2-2.66,0.65c-0.92-0.57-1.2-1.76-0.65-2.66l3.22-5.22l-1.91-10.68
|
||||
c-0.48,0.06-0.96,0.12-1.44,0.14c-6.18,0.49-12.29-1.25-16.88-5.79c-4.61-4.57-6.4-10.66-5.97-16.84c0.02-0.48,0.07-0.96,0.13-1.44
|
||||
l-10.7-1.81l-5.19,3.27c-0.9,0.56-2.09,0.3-2.67-0.62c-0.56-0.9-0.3-2.09,0.62-2.67l5.78-3.63c0.4-0.25,0.88-0.35,1.38-0.28
|
||||
l11.5,1.96c0.41-1.61,0.98-3.19,1.69-4.71c0.85-1.9,1.92-3.71,3.16-5.39l-8.4-7.22l-7.79,1.03c-1.05,0.14-2.04-0.6-2.18-1.66
|
||||
c-0.14-1.05,0.6-2.04,1.66-2.18l8.55-1.15c0.56-0.1,1.15,0.03,1.61,0.45l9.06,7.75l0.21-0.21c1.97-1.99,4.2-3.67,6.67-4.92
|
||||
l-3.85-11.57c-0.18-0.56-0.12-1.15,0.18-1.65l5.45-8.7c0.59-0.9,1.78-1.18,2.66-0.61c0.92,0.57,1.2,1.76,0.61,2.66l-4.93,7.91
|
||||
l3.48,10.48c2.64-0.82,5.46-1.2,8.44-1C224.39,119.09,224.83,119.15,225.27,119.2z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
BIN
doc/qtcreator/images/qtcreator-gdb-extended-options.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
doc/qtcreator/images/qtcreator-gdb-options.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 33 KiB |
@@ -390,6 +390,93 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\section3 Specifying GDB Settings
|
||||
|
||||
To specify settings for managing the GDB process, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol Debugger > \uicontrol GDB.
|
||||
|
||||
\image qtcreator-gdb-options.png "GDB options"
|
||||
|
||||
To specify a timeout for terminating non-responsive GDB processes, set the
|
||||
number of seconds to wait in the \uicontrol {GDB timeout} field. The default
|
||||
value of 20 seconds should be sufficient for most applications, but if
|
||||
loading big libraries or listing source files takes much longer than
|
||||
that on slow machines, you should increase the value.
|
||||
|
||||
To compress several steps into one step for less noisy debugging when
|
||||
stepping into code, select the \uicontrol {Skip known frames when stepping}
|
||||
check box. For example, the atomic reference counting code is skipped, and
|
||||
a single \e {Step Into} for a signal emission ends up directly in the slot
|
||||
connected to it.
|
||||
|
||||
To display a message box as soon as your application receives a signal, such
|
||||
as SIGSEGV, during debugging, select the \uicontrol {Show a message box when
|
||||
receiving a signal} check box.
|
||||
|
||||
GDB allows setting breakpoints on source lines for which no code was
|
||||
generated. In such situations, the breakpoint is shifted to the next
|
||||
source code line for which the code was actually generated. To reflect
|
||||
such temporary changes by moving the breakpoint markers in the source
|
||||
code editor, select the \uicontrol {Adjust breakpoint locations} check box.
|
||||
|
||||
To specify whether the dynamic or the static type of objects will be
|
||||
displayed, select the \uicontrol {Use dynamic object type for display}
|
||||
check box. Keep in mind that choosing the dynamic type might be slower.
|
||||
|
||||
To allow reading the user's default .gdbinit file on debugger startup,
|
||||
select the \uicontrol {Load .gdbinit file on startup} check box.
|
||||
|
||||
To use the default GDB pretty printers installed in your system
|
||||
or linked to the libraries your application uses, select the
|
||||
\uicontrol {Load system GDB pretty printers} check box.
|
||||
|
||||
By default, GDB shows AT&T style disassembly. To switch to the Intel style,
|
||||
select the \uicontrol {Use Intel style disassembly} check box.
|
||||
|
||||
To execute GDB commands after GDB has been started, but before the debugged
|
||||
program is started or attached, and before the debugging helpers are
|
||||
initialized, enter them in the \uicontrol {Additional Startup Commands}
|
||||
field.
|
||||
|
||||
To execute GDB commands after GDB has successfully attached to remote
|
||||
targets, enter them in the \uicontrol {Additional Attach Commands} field.
|
||||
You can add commands to further set up the target here, such as
|
||||
\c {monitor reset} or \c {load}.
|
||||
|
||||
To execute simple Python commands, prefix them with \c python. To execute
|
||||
sequences of Python commands spanning multiple lines, prepend the block
|
||||
with \c python on a separate line, and append \c end on a separate line.
|
||||
To execute arbitrary Python scripts, use
|
||||
\c {python execfile('/path/to/script.py')}.
|
||||
|
||||
\section3 Specifying Extended GDB Settings
|
||||
|
||||
To specify extended settings for GBD, select \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol Debugger > \uicontrol {GDB Extended}.
|
||||
The settings give access to advanced or experimental functions of GDB.
|
||||
Enabling them may negatively impact your debugging experience, so use
|
||||
them with care.
|
||||
|
||||
\image qtcreator-gdb-extended-options.png "GDB Extended options"
|
||||
|
||||
To use asynchronous mode to control the inferior, select the
|
||||
respective check box.
|
||||
|
||||
To add common paths to locations of debug information, such as
|
||||
\c {/usr/src/debug}, when starting GDB, select the
|
||||
\uicontrol {Use common locations for debug information} check box.
|
||||
|
||||
To stop when \c qWarning, \c qFatal, or \c abort is called, select the
|
||||
respective check box.
|
||||
|
||||
To enable stepping backwards, select the \uicontrol {Enable reverse
|
||||
debugging} check box. This feature is very slow and unstable on the
|
||||
GDB side. It exhibits unpredictable behavior when going backwards over
|
||||
system calls and is very likely to destroy your debugging session.
|
||||
|
||||
To keep debugging all children after a fork, select the
|
||||
\uicontrol {Debug all child processes} check box.
|
||||
|
||||
\section3 Using CDB
|
||||
|
||||
In remote mode, the local CDB process talks to a CDB process that runs on
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
\table
|
||||
\row
|
||||
\li \inlineimage creator-gs-01.png
|
||||
\li \inlineimage creator-gs-02.png
|
||||
\li \inlineimage creator_gettingstarted.png
|
||||
\li \inlineimage creator_designinguserinterface.png
|
||||
\li \inlineimage creator_advanceduse.png
|
||||
\row
|
||||
\li \b {\l{IDE Overview}}
|
||||
@@ -60,8 +60,8 @@
|
||||
control systems. For an overview of the options you have, go to
|
||||
\l{Configuring Qt Creator}.
|
||||
\row
|
||||
\li \inlineimage creator-gs-03.png
|
||||
\li \inlineimage creator-gs-04.png
|
||||
\li \inlineimage creator_buildingrunning.png
|
||||
\li \inlineimage creator_gettinghelp.png
|
||||
\li
|
||||
\row
|
||||
\li \b {\l{Building and Running an Example}}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
\title Tutorials
|
||||
|
||||
\image creator-gs-04.png
|
||||
\image creator_gettinghelp.png
|
||||
|
||||
You can use \QC to create applications for several platforms by using
|
||||
several technologies. The tutorials in this manual explain how to create
|
||||
|
@@ -98,15 +98,9 @@
|
||||
|
||||
\list
|
||||
|
||||
\li Applications
|
||||
\li Application (Qt Quick)
|
||||
|
||||
\list
|
||||
|
||||
\li Qt Widgets Application
|
||||
|
||||
Use \QD forms to design a Qt widget based user interface for the
|
||||
desktop and C++ to implement the application logic
|
||||
|
||||
\li Qt Quick Application - Empty
|
||||
|
||||
Create an empty Qt Quick application that uses Qt Quick 2 types.
|
||||
@@ -121,10 +115,25 @@
|
||||
{Qt Quick Controls} to implement a scrollable list (requires
|
||||
Qt 5.9 or later) or a set of pages with a stack-based or
|
||||
swipe-based navigation model (requires Qt 5.7 or later).
|
||||
\endlist
|
||||
|
||||
\li Application (Qt)
|
||||
|
||||
\list
|
||||
|
||||
\li Qt Widgets Application
|
||||
|
||||
Use \QD forms to design a Qt widget based user interface for the
|
||||
desktop and C++ to implement the application logic
|
||||
|
||||
\li Qt Console Application
|
||||
|
||||
Use a single main.cpp file
|
||||
\endlist
|
||||
|
||||
\li Application (Qt for Python)
|
||||
|
||||
\list
|
||||
|
||||
\li Qt for Python Application - Empty, Window, Window (UI file), or
|
||||
Qt Quick Application (Empty)
|
||||
@@ -135,13 +144,17 @@
|
||||
a widget-based UI. Alternatively, you can create an empty
|
||||
Qt Quick Application.
|
||||
|
||||
\endlist
|
||||
|
||||
\li Application (Qt for MCU)
|
||||
|
||||
\list
|
||||
\li MCU Support Application
|
||||
|
||||
Creates an application that uses a subset of QML and
|
||||
Qt Quick Controls (as supported by Qt for MCUs) that
|
||||
you can deploy, run, and debug on MCU boards. For more
|
||||
information, see \l {Connecting MCUs}.
|
||||
|
||||
\endlist
|
||||
|
||||
\li Libraries
|
||||
|
@@ -54,7 +54,7 @@
|
||||
|
||||
\list
|
||||
\li Qt for WebAssembly 5.13.1, or later
|
||||
\li On Windows: \l{http://mingw.org/}{MinGW} 7.3.0, or later
|
||||
\li On Windows: \l{http://wiki.qt.io/MinGW}{MinGW} 7.3.0, or later
|
||||
\li \l{https://emscripten.org/docs/introducing_emscripten/index.html}
|
||||
{emscripten} tool chain for compiling to WebAssembly
|
||||
\li \c sed stream editor
|
||||
@@ -74,9 +74,13 @@
|
||||
Windows, \MinGW (found in \uicontrol {Developer and Designer Tools}).
|
||||
\li Check out \c emsdk and install and activate \c emscripten, as
|
||||
instructed in \l {Qt for WebAssembly}.
|
||||
\note Do not use the \c{--embedded} option for activating the
|
||||
\c emscripten version in the \c emsdk, because \QC
|
||||
expects to find the \c{.emscripten} file describing the toolchain in
|
||||
your home directory.
|
||||
\li On Windows, you have to download and install \c sed, as instructed
|
||||
in \l{http://gnuwin32.sourceforge.net/packages/sed.htm}
|
||||
{sed for Windows}, and add its location to the system PATH.
|
||||
{sed for Windows}.
|
||||
\li In \QC, select \uicontrol Help > \uicontrol {About Plugins} >
|
||||
\uicontrol {Device Support} > \uicontrol {WebAssembly} to enable
|
||||
the plugin.
|
||||
|
@@ -43,7 +43,8 @@ public:
|
||||
SelectionModeToggle,
|
||||
CameraToggle,
|
||||
OrientationToggle,
|
||||
EditLightToggle
|
||||
EditLightToggle,
|
||||
ShowGrid
|
||||
};
|
||||
|
||||
explicit View3DActionCommand(Type type, bool enable);
|
||||
|
@@ -24,7 +24,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick3D 1.15
|
||||
import QtQuick.Controls 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
@@ -40,11 +39,18 @@ Item {
|
||||
property View3D editView: null
|
||||
property string sceneId
|
||||
|
||||
property alias showEditLight: btnEditViewLight.toggled
|
||||
property alias usePerspective: btnPerspective.toggled
|
||||
property alias globalOrientation: btnLocalGlobal.toggled
|
||||
property bool showEditLight: false
|
||||
property bool showGrid: true
|
||||
property bool usePerspective: true
|
||||
property bool globalOrientation: false
|
||||
property alias contentItem: contentItem
|
||||
|
||||
enum SelectionMode { Item, Group }
|
||||
enum TransformMode { Move, Rotate, Scale }
|
||||
|
||||
property int selectionMode: EditView3D.SelectionMode.Item
|
||||
property int transformMode: EditView3D.TransformMode.Move
|
||||
|
||||
property Node selectedNode: null // This is non-null only in single selection case
|
||||
property var selectedNodes: [] // All selected nodes
|
||||
|
||||
@@ -53,16 +59,18 @@ Item {
|
||||
property var selectionBoxes: []
|
||||
property rect viewPortRect: Qt.rect(0, 0, 1000, 1000)
|
||||
|
||||
property bool showButtons: false
|
||||
|
||||
signal selectionChanged(var selectedNodes)
|
||||
signal commitObjectProperty(var object, var propName)
|
||||
signal changeObjectProperty(var object, var propName)
|
||||
signal notifyActiveSceneChange()
|
||||
|
||||
onUsePerspectiveChanged: _generalHelper.storeToolState(sceneId, "usePerspective", usePerspective)
|
||||
onShowEditLightChanged: _generalHelper.storeToolState(sceneId,"showEditLight", showEditLight)
|
||||
onShowEditLightChanged: _generalHelper.storeToolState(sceneId, "showEditLight", showEditLight)
|
||||
onGlobalOrientationChanged: _generalHelper.storeToolState(sceneId, "globalOrientation", globalOrientation)
|
||||
onShowGridChanged: _generalHelper.storeToolState(sceneId, "showGrid", showGrid);
|
||||
onSelectionModeChanged: _generalHelper.storeToolState(sceneId, "selectionMode", selectionMode);
|
||||
onTransformModeChanged: _generalHelper.storeToolState(sceneId, "transformMode", transformMode);
|
||||
|
||||
onActiveSceneChanged: updateActiveScene()
|
||||
|
||||
function createEditView()
|
||||
@@ -72,11 +80,13 @@ Item {
|
||||
editView = component.createObject(viewRect,
|
||||
{"usePerspective": usePerspective,
|
||||
"showSceneLight": showEditLight,
|
||||
"showGrid": showGrid,
|
||||
"importScene": activeScene,
|
||||
"cameraZoomFactor": cameraControl._zoomFactor,
|
||||
"z": 1});
|
||||
editView.usePerspective = Qt.binding(function() {return usePerspective;});
|
||||
editView.showSceneLight = Qt.binding(function() {return showEditLight;});
|
||||
editView.showGrid = Qt.binding(function() {return showGrid;});
|
||||
editView.cameraZoomFactor = Qt.binding(function() {return cameraControl._zoomFactor;});
|
||||
|
||||
selectionBoxes.length = 0;
|
||||
@@ -148,41 +158,31 @@ Item {
|
||||
showEditLight = toolStates.showEditLight;
|
||||
else if (resetToDefault)
|
||||
showEditLight = false;
|
||||
|
||||
if ("showGrid" in toolStates)
|
||||
showGrid = toolStates.showGrid;
|
||||
else if (resetToDefault)
|
||||
showGrid = true;
|
||||
|
||||
if ("usePerspective" in toolStates)
|
||||
usePerspective = toolStates.usePerspective;
|
||||
else if (resetToDefault)
|
||||
usePerspective = false;
|
||||
usePerspective = true;
|
||||
|
||||
if ("globalOrientation" in toolStates)
|
||||
globalOrientation = toolStates.globalOrientation;
|
||||
else if (resetToDefault)
|
||||
globalOrientation = false;
|
||||
|
||||
var groupIndex;
|
||||
var group;
|
||||
var i;
|
||||
if ("selectionMode" in toolStates)
|
||||
selectionMode = toolStates.selectionMode;
|
||||
else if (resetToDefault)
|
||||
selectionMode = EditView3D.SelectionMode.Item;
|
||||
|
||||
if ("groupSelect" in toolStates) {
|
||||
groupIndex = toolStates.groupSelect;
|
||||
group = toolbarButtons.buttonGroups["groupSelect"];
|
||||
for (i = 0; i < group.length; ++i)
|
||||
group[i].selected = (i === groupIndex);
|
||||
_generalHelper.storeToolState(sceneId, "groupSelect", groupIndex)
|
||||
} else if (resetToDefault) {
|
||||
btnSelectItem.selected = true;
|
||||
btnSelectGroup.selected = false;
|
||||
}
|
||||
|
||||
if ("groupTransform" in toolStates) {
|
||||
groupIndex = toolStates.groupTransform;
|
||||
group = toolbarButtons.buttonGroups["groupTransform"];
|
||||
for (i = 0; i < group.length; ++i)
|
||||
group[i].selected = (i === groupIndex);
|
||||
_generalHelper.storeToolState(sceneId, "groupTransform", groupIndex)
|
||||
} else if (resetToDefault) {
|
||||
btnRotate.selected = false;
|
||||
btnScale.selected = false;
|
||||
btnMove.selected = true;
|
||||
}
|
||||
if ("transformMode" in toolStates)
|
||||
transformMode = toolStates.transformMode;
|
||||
else if (resetToDefault)
|
||||
selectionMode = EditView3D.TransformMode.Move;
|
||||
|
||||
if ("editCamState" in toolStates)
|
||||
cameraControl.restoreCameraState(toolStates.editCamState);
|
||||
@@ -193,25 +193,11 @@ Item {
|
||||
function storeCurrentToolStates()
|
||||
{
|
||||
_generalHelper.storeToolState(sceneId, "showEditLight", showEditLight)
|
||||
_generalHelper.storeToolState(sceneId, "showGrid", showGrid)
|
||||
_generalHelper.storeToolState(sceneId, "usePerspective", usePerspective)
|
||||
_generalHelper.storeToolState(sceneId, "globalOrientation", globalOrientation)
|
||||
|
||||
var group = toolbarButtons.buttonGroups["groupSelect"];
|
||||
var i;
|
||||
for (i = 0; i < group.length; ++i) {
|
||||
if (group[i].selected) {
|
||||
_generalHelper.storeToolState(sceneId, "groupSelect", i)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
group = toolbarButtons.buttonGroups["groupTransform"];
|
||||
for (i = 0; i < group.length; ++i) {
|
||||
if (group[i].selected) {
|
||||
_generalHelper.storeToolState(sceneId, "groupTransform", i)
|
||||
break;
|
||||
}
|
||||
}
|
||||
_generalHelper.storeToolState(sceneId, "selectionMode", selectionMode);
|
||||
_generalHelper.storeToolState(sceneId, "transformMode", transformMode);
|
||||
|
||||
cameraControl.storeCameraState(0);
|
||||
}
|
||||
@@ -259,7 +245,7 @@ Item {
|
||||
function handleObjectClicked(object, multi)
|
||||
{
|
||||
var theObject = object;
|
||||
if (btnSelectGroup.selected) {
|
||||
if (selectionMode === EditView3D.SelectionMode.Group) {
|
||||
while (theObject && theObject !== activeScene && theObject.parent !== activeScene)
|
||||
theObject = theObject.parent;
|
||||
}
|
||||
@@ -434,7 +420,7 @@ Item {
|
||||
highlightOnHover: true
|
||||
targetNode: viewRoot.selectedNode
|
||||
globalOrientation: viewRoot.globalOrientation
|
||||
visible: viewRoot.selectedNode && btnMove.selected
|
||||
visible: viewRoot.selectedNode && transformMode === EditView3D.TransformMode.Move
|
||||
view3D: overlayView
|
||||
dragHelper: gizmoDragHelper
|
||||
|
||||
@@ -447,7 +433,7 @@ Item {
|
||||
scale: autoScale.getScale(Qt.vector3d(5, 5, 5))
|
||||
highlightOnHover: true
|
||||
targetNode: viewRoot.selectedNode
|
||||
visible: viewRoot.selectedNode && btnScale.selected
|
||||
visible: viewRoot.selectedNode && transformMode === EditView3D.TransformMode.Scale
|
||||
view3D: overlayView
|
||||
dragHelper: gizmoDragHelper
|
||||
|
||||
@@ -461,7 +447,7 @@ Item {
|
||||
highlightOnHover: true
|
||||
targetNode: viewRoot.selectedNode
|
||||
globalOrientation: viewRoot.globalOrientation
|
||||
visible: viewRoot.selectedNode && btnRotate.selected
|
||||
visible: viewRoot.selectedNode && transformMode === EditView3D.TransformMode.Rotate
|
||||
view3D: overlayView
|
||||
dragHelper: gizmoDragHelper
|
||||
|
||||
@@ -522,7 +508,6 @@ Item {
|
||||
Rectangle {
|
||||
id: viewRect
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 1.0; color: "#222222" }
|
||||
@@ -626,107 +611,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle { // toolbar
|
||||
id: toolbar
|
||||
color: "#9F000000"
|
||||
width: 35
|
||||
height: toolbarButtons.height
|
||||
visible: viewRoot.showButtons
|
||||
|
||||
Column {
|
||||
id: toolbarButtons
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 5
|
||||
padding: 5
|
||||
|
||||
// Button groups must be defined in parent object of buttons
|
||||
property var buttonGroups: {
|
||||
"groupSelect": [btnSelectGroup, btnSelectItem],
|
||||
"groupTransform": [btnMove, btnRotate, btnScale]
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnSelectItem
|
||||
selected: true
|
||||
tooltip: qsTr("Select Item")
|
||||
shortcut: "Q"
|
||||
currentShortcut: selected ? "" : shortcut
|
||||
tool: "item_selection"
|
||||
buttonGroup: "groupSelect"
|
||||
sceneId: viewRoot.sceneId
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnSelectGroup
|
||||
tooltip: qsTr("Select Group")
|
||||
shortcut: "Q"
|
||||
currentShortcut: btnSelectItem.currentShortcut === shortcut ? "" : shortcut
|
||||
tool: "group_selection"
|
||||
buttonGroup: "groupSelect"
|
||||
sceneId: viewRoot.sceneId
|
||||
}
|
||||
|
||||
Rectangle { // separator
|
||||
width: 25
|
||||
height: 1
|
||||
color: "#f1f1f1"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnMove
|
||||
selected: true
|
||||
tooltip: qsTr("Move current selection")
|
||||
shortcut: "W"
|
||||
currentShortcut: shortcut
|
||||
tool: "move"
|
||||
buttonGroup: "groupTransform"
|
||||
sceneId: viewRoot.sceneId
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnRotate
|
||||
tooltip: qsTr("Rotate current selection")
|
||||
shortcut: "E"
|
||||
currentShortcut: shortcut
|
||||
tool: "rotate"
|
||||
buttonGroup: "groupTransform"
|
||||
sceneId: viewRoot.sceneId
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnScale
|
||||
tooltip: qsTr("Scale current selection")
|
||||
shortcut: "R"
|
||||
currentShortcut: shortcut
|
||||
tool: "scale"
|
||||
buttonGroup: "groupTransform"
|
||||
sceneId: viewRoot.sceneId
|
||||
}
|
||||
|
||||
Rectangle { // separator
|
||||
width: 25
|
||||
height: 1
|
||||
color: "#f1f1f1"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
ToolBarButton {
|
||||
id: btnFit
|
||||
tooltip: qsTr("Fit camera to current selection")
|
||||
shortcut: "F"
|
||||
currentShortcut: shortcut
|
||||
tool: "fit"
|
||||
togglable: false
|
||||
|
||||
onSelectedChanged: {
|
||||
if (selected)
|
||||
viewRoot.fitToView();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AxisHelper {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
@@ -735,41 +619,5 @@ Item {
|
||||
editCameraCtrl: cameraControl
|
||||
selectedNode : viewRoot.selectedNodes.length ? selectionBoxes[0].model : null
|
||||
}
|
||||
|
||||
Rectangle { // top controls bar
|
||||
color: "#aa000000"
|
||||
width: 290
|
||||
height: btnPerspective.height + 10
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 100
|
||||
visible: viewRoot.showButtons
|
||||
|
||||
Row {
|
||||
padding: 5
|
||||
anchors.fill: parent
|
||||
ToggleButton {
|
||||
id: btnPerspective
|
||||
width: 105
|
||||
tooltip: qsTr("Toggle Perspective / Orthographic Projection")
|
||||
states: [{iconId: "ortho", text: qsTr("Orthographic")}, {iconId: "persp", text: qsTr("Perspective")}]
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
id: btnLocalGlobal
|
||||
width: 65
|
||||
tooltip: qsTr("Toggle Global / Local Orientation")
|
||||
states: [{iconId: "local", text: qsTr("Local")}, {iconId: "global", text: qsTr("Global")}]
|
||||
}
|
||||
|
||||
ToggleButton {
|
||||
id: btnEditViewLight
|
||||
width: 110
|
||||
toggleBackground: true
|
||||
tooltip: qsTr("Toggle Edit Light")
|
||||
states: [{iconId: "edit_light_off", text: qsTr("Edit Light Off")}, {iconId: "edit_light_on", text: qsTr("Edit Light On")}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
92
share/qtcreator/qml/qmlpuppet/mockfiles/IconRenderer3D.qml
Normal file
@@ -0,0 +1,92 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick3D 1.15
|
||||
|
||||
Item {
|
||||
id: viewRoot
|
||||
width: 1024
|
||||
height: 1024
|
||||
visible: true
|
||||
|
||||
property alias view3D: view3D
|
||||
property alias camPos: viewCamera.position
|
||||
|
||||
function setSceneToBox()
|
||||
{
|
||||
selectionBox.targetNode = view3D.importScene;
|
||||
}
|
||||
|
||||
function fitAndHideBox() : bool
|
||||
{
|
||||
cameraControl.focusObject(selectionBox.model, viewCamera.eulerRotation, true);
|
||||
if (cameraControl._zoomFactor < 0.1) {
|
||||
view3D.importScene.scale = view3D.importScene.scale.times(10);
|
||||
return false;
|
||||
}
|
||||
if (cameraControl._zoomFactor > 100) {
|
||||
view3D.importScene.scale = view3D.importScene.scale.times(0.1);
|
||||
return false;
|
||||
}
|
||||
|
||||
selectionBox.visible = false;
|
||||
return true
|
||||
}
|
||||
|
||||
View3D {
|
||||
id: view3D
|
||||
camera: viewCamera
|
||||
environment: sceneEnv
|
||||
|
||||
SceneEnvironment {
|
||||
id: sceneEnv
|
||||
antialiasingMode: SceneEnvironment.MSAA
|
||||
antialiasingQuality: SceneEnvironment.VeryHigh
|
||||
}
|
||||
|
||||
PerspectiveCamera {
|
||||
id: viewCamera
|
||||
position: Qt.vector3d(-200, 200, 200)
|
||||
eulerRotation: Qt.vector3d(-45, -45, 0)
|
||||
}
|
||||
|
||||
DirectionalLight {
|
||||
rotation: viewCamera.rotation
|
||||
}
|
||||
|
||||
SelectionBox {
|
||||
id: selectionBox
|
||||
view3D: view3D
|
||||
geometryName: "SB"
|
||||
}
|
||||
|
||||
EditCameraController {
|
||||
id: cameraControl
|
||||
camera: view3D.camera
|
||||
view3d: view3D
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,7 +23,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick3D 1.15
|
||||
|
||||
View3D {
|
||||
@@ -31,7 +30,8 @@ View3D {
|
||||
anchors.fill: parent
|
||||
|
||||
property bool usePerspective: false
|
||||
property bool showSceneLight: false
|
||||
property alias showSceneLight: sceneLight.visible
|
||||
property alias showGrid: helperGrid.visible
|
||||
property alias sceneHelpers: sceneHelpers
|
||||
property alias perspectiveCamera: scenePerspectiveCamera
|
||||
property alias orthoCamera: sceneOrthoCamera
|
||||
@@ -62,7 +62,6 @@ View3D {
|
||||
|
||||
PointLight {
|
||||
id: sceneLight
|
||||
visible: showSceneLight
|
||||
position: usePerspective ? scenePerspectiveCamera.position
|
||||
: sceneOrthoCamera.position
|
||||
quadraticFade: 0
|
||||
|
@@ -200,7 +200,7 @@ QVector4D GeneralHelper::focusObjectToCamera(QQuick3DCamera *camera, float defau
|
||||
|
||||
camera->setPosition(lookAt + newLookVector);
|
||||
|
||||
float newZoomFactor = updateZoom ? qBound(.01f, float(maxExtent / 700.), 100.f) : oldZoom;
|
||||
float newZoomFactor = updateZoom ? qBound(.01f, float(maxExtent / 900.), 100.f) : oldZoom;
|
||||
float cameraZoomFactor = zoomCamera(camera, 0, defaultLookAtDistance, lookAt, newZoomFactor, false);
|
||||
|
||||
return QVector4D(lookAt, cameraZoomFactor);
|
||||
|
@@ -0,0 +1,181 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "iconrenderer.h"
|
||||
#include "../editor3d/selectionboxgeometry.h"
|
||||
#include "../editor3d/generalhelper.h"
|
||||
|
||||
#include <QtQml/qqmlcomponent.h>
|
||||
#include <QtQml/qqmlengine.h>
|
||||
#include <QtQml/qqmlproperty.h>
|
||||
#include <QtQml/qqmlcontext.h>
|
||||
#include <QtQuick/qquickview.h>
|
||||
#include <QtQuick/qquickitem.h>
|
||||
#include <QtGui/qsurfaceformat.h>
|
||||
#include <QtGui/qimage.h>
|
||||
#include <QtGui/qguiapplication.h>
|
||||
#include <QtCore/qtimer.h>
|
||||
#include <QtCore/qfileinfo.h>
|
||||
#include <QtCore/qdir.h>
|
||||
|
||||
#ifdef QUICK3D_MODULE
|
||||
#include <QtQuick3D/private/qquick3dnode_p.h>
|
||||
#include <QtQuick3D/private/qquick3dviewport_p.h>
|
||||
#endif
|
||||
|
||||
#include <private/qquickdesignersupportitems_p.h>
|
||||
|
||||
IconRenderer::IconRenderer(int size, const QString &filePath, const QString &source)
|
||||
: QObject(nullptr)
|
||||
, m_size(size)
|
||||
, m_filePath(filePath)
|
||||
, m_source(source)
|
||||
{
|
||||
}
|
||||
|
||||
void IconRenderer::setupRender()
|
||||
{
|
||||
DesignerSupport::activateDesignerMode();
|
||||
DesignerSupport::activateDesignerWindowManager();
|
||||
|
||||
m_quickView = new QQuickView;
|
||||
|
||||
QSurfaceFormat surfaceFormat = m_quickView->requestedFormat();
|
||||
surfaceFormat.setVersion(4, 1);
|
||||
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
|
||||
m_quickView->setFormat(surfaceFormat);
|
||||
|
||||
DesignerSupport::createOpenGLContext(m_quickView);
|
||||
|
||||
QQmlComponent component(m_quickView->engine());
|
||||
component.loadUrl(QUrl::fromLocalFile(m_source));
|
||||
QObject *iconItem = component.create();
|
||||
|
||||
if (iconItem) {
|
||||
QQuickItem *containerItem = nullptr;
|
||||
bool is3D = false;
|
||||
#ifdef QUICK3D_MODULE
|
||||
if (auto scene = qobject_cast<QQuick3DNode *>(iconItem)) {
|
||||
qmlRegisterType<QmlDesigner::Internal::SelectionBoxGeometry>("SelectionBoxGeometry", 1, 0, "SelectionBoxGeometry");
|
||||
QQmlComponent component(m_quickView->engine());
|
||||
component.loadUrl(QUrl("qrc:/qtquickplugin/mockfiles/IconRenderer3D.qml"));
|
||||
containerItem = qobject_cast<QQuickItem *>(component.create());
|
||||
DesignerSupport::setRootItem(m_quickView, containerItem);
|
||||
|
||||
auto helper = new QmlDesigner::Internal::GeneralHelper();
|
||||
m_quickView->engine()->rootContext()->setContextProperty("_generalHelper", helper);
|
||||
|
||||
m_contentItem = QQmlProperty::read(containerItem, "view3D").value<QQuickItem *>();
|
||||
auto view3D = qobject_cast<QQuick3DViewport *>(m_contentItem);
|
||||
view3D->setImportScene(scene);
|
||||
is3D = true;
|
||||
} else
|
||||
#endif
|
||||
if (auto scene = qobject_cast<QQuickItem *>(iconItem)) {
|
||||
m_contentItem = scene;
|
||||
containerItem = new QQuickItem();
|
||||
containerItem->setSize(QSizeF(1024, 1024));
|
||||
DesignerSupport::setRootItem(m_quickView, containerItem);
|
||||
m_contentItem->setParentItem(containerItem);
|
||||
}
|
||||
|
||||
if (containerItem && m_contentItem) {
|
||||
m_contentItem->setSize(QSizeF(m_size, m_size));
|
||||
if (m_contentItem->width() > containerItem->width())
|
||||
containerItem->setWidth(m_contentItem->width());
|
||||
if (m_contentItem->height() > containerItem->height())
|
||||
containerItem->setHeight(m_contentItem->height());
|
||||
|
||||
QTimer::singleShot(0, this, [this, containerItem, is3D]() {
|
||||
m_designerSupport.refFromEffectItem(m_quickView->rootObject(), false);
|
||||
QQuickDesignerSupportItems::disableNativeTextRendering(m_quickView->rootObject());
|
||||
|
||||
#ifdef QUICK3D_MODULE
|
||||
if (is3D) {
|
||||
// Render once to make sure scene is up to date before we set up the selection box
|
||||
render({});
|
||||
QMetaObject::invokeMethod(containerItem, "setSceneToBox");
|
||||
bool success = false;
|
||||
int tries = 0;
|
||||
while (!success && tries < 10) {
|
||||
++tries;
|
||||
render({});
|
||||
QMetaObject::invokeMethod(containerItem, "fitAndHideBox",
|
||||
Q_RETURN_ARG(bool, success));
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(is3D)
|
||||
#endif
|
||||
QFileInfo fi(m_filePath);
|
||||
|
||||
// Render regular size image
|
||||
render(fi.absoluteFilePath());
|
||||
|
||||
// Render @2x image
|
||||
m_contentItem->setSize(QSizeF(m_size * 2, m_size * 2));
|
||||
|
||||
QString saveFile;
|
||||
saveFile = fi.absolutePath() + '/' + fi.completeBaseName() + "@2x";
|
||||
if (!fi.suffix().isEmpty())
|
||||
saveFile += '.' + fi.suffix();
|
||||
|
||||
fi.absoluteDir().mkpath(".");
|
||||
|
||||
render(saveFile);
|
||||
|
||||
// Allow little time for file operations to finish
|
||||
QTimer::singleShot(1000, qGuiApp, &QGuiApplication::quit);
|
||||
});
|
||||
} else {
|
||||
qGuiApp->quit();
|
||||
}
|
||||
} else {
|
||||
qGuiApp->quit();
|
||||
}
|
||||
}
|
||||
|
||||
void IconRenderer::render(const QString &fileName)
|
||||
{
|
||||
std::function<void (QQuickItem *)> updateNodesRecursive;
|
||||
updateNodesRecursive = [&updateNodesRecursive](QQuickItem *item) {
|
||||
const auto childItems = item->childItems();
|
||||
for (QQuickItem *childItem : childItems)
|
||||
updateNodesRecursive(childItem);
|
||||
DesignerSupport::updateDirtyNode(item);
|
||||
};
|
||||
updateNodesRecursive(m_quickView->rootObject());
|
||||
|
||||
QRect rect(QPoint(), m_contentItem->size().toSize());
|
||||
QImage renderImage = m_designerSupport.renderImageForItem(m_quickView->rootObject(),
|
||||
rect, rect.size());
|
||||
if (!fileName.isEmpty()) {
|
||||
QFileInfo fi(fileName);
|
||||
if (fi.suffix().isEmpty())
|
||||
renderImage.save(fileName, "PNG");
|
||||
else
|
||||
renderImage.save(fileName);
|
||||
}
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtCore/qstring.h>
|
||||
|
||||
#include <designersupportdelegate.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QQuickView;
|
||||
class QQuickItem;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class IconRenderer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IconRenderer(int size, const QString &filePath, const QString &source);
|
||||
|
||||
void setupRender();
|
||||
|
||||
private:
|
||||
void render(const QString &fileName);
|
||||
|
||||
int m_size = 16;
|
||||
QString m_filePath;
|
||||
QString m_source;
|
||||
QQuickView *m_quickView = nullptr;
|
||||
QQuickItem *m_contentItem = nullptr;
|
||||
DesignerSupport m_designerSupport;
|
||||
};
|
@@ -0,0 +1,3 @@
|
||||
HEADERS += $$PWD/iconrenderer.h
|
||||
|
||||
SOURCES += $$PWD/iconrenderer.cpp
|
@@ -653,7 +653,6 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
|
||||
|| typeName == "QtQuick.Controls/Drawer"
|
||||
|| typeName == "QtQuick.Controls/Dialog"
|
||||
|| typeName == "QtQuick.Controls/Menu"
|
||||
|| typeName == "QtQuick.Controls/Pane"
|
||||
|| typeName == "QtQuick.Controls/ToolTip")
|
||||
polishTypeName = "QtQuick/Item";
|
||||
|
||||
|
@@ -745,7 +745,7 @@ QObject *Qt5InformationNodeInstanceServer::find3DSceneRoot(const ServerNodeInsta
|
||||
view = qobject_cast<QQuick3DViewport *>(parentInstance.internalObject());
|
||||
int nodeCount = countChildNodes(view);
|
||||
if (nodeCount == 1)
|
||||
return checkInstance.internalObject();
|
||||
return childNode;
|
||||
else
|
||||
return view->scene();
|
||||
} else if (parentInstance.isSubclassOf("QQuick3DNode")) {
|
||||
@@ -1045,10 +1045,13 @@ void Qt5InformationNodeInstanceServer::changeSelection(const ChangeSelectionComm
|
||||
if (firstSceneRoot && sceneRoot == firstSceneRoot && instance.isSubclassOf("QQuick3DNode"))
|
||||
object = instance.internalObject();
|
||||
|
||||
auto instanceIsModelOrComponent = [&]() -> bool {
|
||||
bool retval = instance.isSubclassOf("QQuick3DModel");
|
||||
auto isSelectableAsRoot = [&]() -> bool {
|
||||
#ifdef QUICK3D_MODULE
|
||||
if (!retval) {
|
||||
if (qobject_cast<QQuick3DModel *>(object)
|
||||
|| qobject_cast<QQuick3DCamera *>(object)
|
||||
|| qobject_cast<QQuick3DAbstractLight *>(object)) {
|
||||
return true;
|
||||
}
|
||||
// Node is a component if it has node children that have no instances
|
||||
auto node = qobject_cast<QQuick3DNode *>(object);
|
||||
if (node) {
|
||||
@@ -1058,11 +1061,10 @@ void Qt5InformationNodeInstanceServer::changeSelection(const ChangeSelectionComm
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return retval;
|
||||
return false;
|
||||
};
|
||||
if (object && (firstSceneRoot != object || instanceIsModelOrComponent()))
|
||||
if (object && (firstSceneRoot != object || isSelectableAsRoot()))
|
||||
selectedObjs << objectToVariant(object);
|
||||
}
|
||||
}
|
||||
@@ -1162,19 +1164,19 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
|
||||
|
||||
switch (command.type()) {
|
||||
case View3DActionCommand::MoveTool:
|
||||
updatedState.insert("groupTransform", 0);
|
||||
updatedState.insert("transformMode", 0);
|
||||
break;
|
||||
case View3DActionCommand::RotateTool:
|
||||
updatedState.insert("groupTransform", 1);
|
||||
updatedState.insert("transformMode", 1);
|
||||
break;
|
||||
case View3DActionCommand::ScaleTool:
|
||||
updatedState.insert("groupTransform", 2);
|
||||
updatedState.insert("transformMode", 2);
|
||||
break;
|
||||
case View3DActionCommand::FitToView:
|
||||
QMetaObject::invokeMethod(m_editView3DRootItem, "fitToView");
|
||||
break;
|
||||
case View3DActionCommand::SelectionModeToggle:
|
||||
updatedState.insert("groupSelect", command.isEnabled() ? 0 : 1);
|
||||
updatedState.insert("selectionMode", command.isEnabled() ? 1 : 0);
|
||||
break;
|
||||
case View3DActionCommand::CameraToggle:
|
||||
updatedState.insert("usePerspective", command.isEnabled());
|
||||
@@ -1187,6 +1189,9 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
|
||||
case View3DActionCommand::EditLightToggle:
|
||||
updatedState.insert("showEditLight", command.isEnabled());
|
||||
break;
|
||||
case View3DActionCommand::ShowGrid:
|
||||
updatedState.insert("showGrid", command.isEnabled());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ include (../container/container.pri)
|
||||
include (../interfaces/interfaces.pri)
|
||||
include (../types/types.pri)
|
||||
include (../qmlprivategate/qmlprivategate.pri)
|
||||
include (iconrenderer/iconrenderer.pri)
|
||||
|
||||
SOURCES += $$PWD/qml2puppetmain.cpp
|
||||
RESOURCES += $$PWD/../qmlpuppet.qrc
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <qt5nodeinstanceclientproxy.h>
|
||||
#include "iconrenderer/iconrenderer.h"
|
||||
|
||||
#include <QQmlComponent>
|
||||
#include <QQmlEngine>
|
||||
@@ -52,11 +53,13 @@ int internalMain(QGuiApplication *application)
|
||||
QCoreApplication::setApplicationVersion("1.0.0");
|
||||
|
||||
if (application->arguments().count() < 2
|
||||
|| (application->arguments().at(1) == "--readcapturedstream" && application->arguments().count() < 3)) {
|
||||
|| (application->arguments().at(1) == "--readcapturedstream" && application->arguments().count() < 3)
|
||||
|| (application->arguments().at(1) == "--rendericon" && application->arguments().count() < 5)) {
|
||||
qDebug() << "Usage:\n";
|
||||
qDebug() << "--test";
|
||||
qDebug() << "--version";
|
||||
qDebug() << "--readcapturedstream <stream file> [control stream file]";
|
||||
qDebug() << "--rendericon <icon size> <icon file name> <icon source qml>";
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -108,7 +111,16 @@ int internalMain(QGuiApplication *application)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (application->arguments().at(1) == "--rendericon") {
|
||||
int size = application->arguments().at(2).toInt();
|
||||
QString iconFileName = application->arguments().at(3);
|
||||
QString iconSource = application->arguments().at(4);
|
||||
|
||||
IconRenderer *iconRenderer = new IconRenderer(size, iconFileName, iconSource);
|
||||
iconRenderer->setupRender();
|
||||
|
||||
return application->exec();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_QT_BREAKPAD
|
||||
const QString libexecPath = QCoreApplication::applicationDirPath() + '/' + RELATIVE_LIBEXEC_PATH;
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<file>mockfiles/SwipeView.qml</file>
|
||||
<file>mockfiles/GenericBackend.qml</file>
|
||||
<file>mockfiles/Dialog.qml</file>
|
||||
<file>mockfiles/IconRenderer3D.qml</file>
|
||||
<file>mockfiles/EditView3D.qml</file>
|
||||
<file>mockfiles/EditCameraController.qml</file>
|
||||
<file>mockfiles/Arrow.qml</file>
|
||||
|
@@ -40,7 +40,7 @@ Column {
|
||||
ColorEditor {
|
||||
caption: qsTr("Color")
|
||||
backendValue: backendValues.color
|
||||
supportGradient: true
|
||||
supportGradient: backendValues.gradient.isAvailable
|
||||
}
|
||||
|
||||
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <utils/qrcparser.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
|
||||
using namespace LanguageUtils;
|
||||
using namespace QmlJS::AST;
|
||||
@@ -385,8 +386,10 @@ Import LinkPrivate::importNonFile(const Document::Ptr &doc, const ImportInfo &im
|
||||
|
||||
if (!importFound) {
|
||||
for (const QString &dir : qAsConst(m_applicationDirectories)) {
|
||||
QDirIterator it(dir, QStringList { "*.qmltypes" }, QDir::Files);
|
||||
|
||||
// This adds the types to the C++ types, to be found below if applicable.
|
||||
if (QFile::exists(dir + "/app.qmltypes"))
|
||||
if (it.hasNext())
|
||||
importLibrary(doc, dir, &import);
|
||||
}
|
||||
}
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QMetaObject>
|
||||
@@ -781,13 +782,17 @@ static bool findNewQmlApplicationInPath(const QString &path,
|
||||
default: break;
|
||||
}
|
||||
|
||||
const QDir dir(path);
|
||||
const QLatin1String appQmltypes("app.qmltypes");
|
||||
QFile appQmltypesFile(dir.filePath(appQmltypes));
|
||||
if (!appQmltypesFile.exists())
|
||||
QString qmltypesFile;
|
||||
|
||||
QDir dir(path);
|
||||
QDirIterator it(path, QStringList { "*.qmltypes" }, QDir::Files);
|
||||
|
||||
if (!it.hasNext())
|
||||
return false;
|
||||
|
||||
LibraryInfo libraryInfo = LibraryInfo(QmlDirParser::TypeInfo(appQmltypes));
|
||||
qmltypesFile = it.next();
|
||||
|
||||
LibraryInfo libraryInfo = LibraryInfo(QmlDirParser::TypeInfo(qmltypesFile));
|
||||
const QString libraryPath = dir.absolutePath();
|
||||
newLibraries->insert(libraryPath);
|
||||
modelManager->updateLibraryInfo(path, libraryInfo);
|
||||
|
@@ -36,17 +36,12 @@
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QDirIterator>
|
||||
#include <QRegularExpression>
|
||||
|
||||
using namespace LanguageUtils;
|
||||
using namespace QmlJS;
|
||||
|
||||
static const QStringList qmltypesFileNames = {
|
||||
QLatin1String("plugins.qmltypes"),
|
||||
QLatin1String("app.qmltypes"),
|
||||
QLatin1String("lib.qmltypes")
|
||||
};
|
||||
|
||||
PluginDumper::PluginDumper(ModelManagerInterface *modelManager)
|
||||
: QObject(modelManager)
|
||||
, m_modelManager(modelManager)
|
||||
@@ -152,9 +147,12 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &
|
||||
plugin.importVersion = importVersion;
|
||||
|
||||
// add default qmltypes file if it exists
|
||||
for (const QString &qmltypesFileName : qmltypesFileNames) {
|
||||
const QString defaultQmltypesPath = makeAbsolute(qmltypesFileName, canonicalLibraryPath);
|
||||
if (!plugin.typeInfoPaths.contains(defaultQmltypesPath) && QFile::exists(defaultQmltypesPath))
|
||||
QDirIterator it(canonicalLibraryPath, QStringList { "*.qmltypes" }, QDir::Files);
|
||||
|
||||
while (it.hasNext()) {
|
||||
const QString defaultQmltypesPath = makeAbsolute(it.next(), canonicalLibraryPath);
|
||||
|
||||
if (!plugin.typeInfoPaths.contains(defaultQmltypesPath))
|
||||
plugin.typeInfoPaths += defaultQmltypesPath;
|
||||
}
|
||||
|
||||
@@ -405,11 +403,10 @@ QString PluginDumper::buildQmltypesPath(const QString &name) const
|
||||
if (path.isEmpty())
|
||||
return QString();
|
||||
|
||||
for (const QString &qmltypesFileName : qmltypesFileNames) {
|
||||
const QString filename = path + QLatin1Char('/') + qmltypesFileName;
|
||||
if (QFile::exists(filename))
|
||||
return filename;
|
||||
}
|
||||
QDirIterator it(path, QStringList { "*.qmltypes" }, QDir::Files);
|
||||
|
||||
if (it.hasNext())
|
||||
return it.next();
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
@@ -444,6 +444,9 @@ void AndroidSdkManagerWidget::switchView(AndroidSdkManagerWidget::View view)
|
||||
else
|
||||
emit updatingSdk();
|
||||
|
||||
if (m_currentView == LicenseWorkflow)
|
||||
emit licenseWorkflowStarted();
|
||||
|
||||
m_ui->operationProgress->setValue(0);
|
||||
m_ui->viewStack->setCurrentWidget(m_currentView == PackageListing ?
|
||||
m_ui->packagesStack : m_ui->outputStack);
|
||||
|
@@ -86,6 +86,7 @@ public:
|
||||
signals:
|
||||
void updatingSdk();
|
||||
void updatingSdkFinished();
|
||||
void licenseWorkflowStarted();
|
||||
|
||||
private:
|
||||
void onApplyButton();
|
||||
|
@@ -428,6 +428,9 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
||||
m_ui->SDKLocationPathChooser->setEnabled(true);
|
||||
m_ui->managerTabWidget->tabBar()->setEnabled(true);
|
||||
});
|
||||
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this]() {
|
||||
m_ui->scrollArea->ensureWidgetVisible(m_ui->managerTabWidget);
|
||||
});
|
||||
|
||||
QMap<int, QString> javaValidationPoints;
|
||||
javaValidationPoints[JavaPathExistsRow] = tr("JDK path exists.");
|
||||
@@ -1020,7 +1023,13 @@ AndroidSettingsPage::AndroidSettingsPage()
|
||||
setId(Constants::ANDROID_SETTINGS_ID);
|
||||
setDisplayName(AndroidSettingsWidget::tr("Android"));
|
||||
setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY);
|
||||
setWidgetCreator([] { return new AndroidSettingsWidget; });
|
||||
setWidgetCreator([] {
|
||||
auto widget = new AndroidSettingsWidget;
|
||||
QPalette pal = widget->palette();
|
||||
pal.setColor(QPalette::Window, Utils::creatorTheme()->color(Utils::Theme::BackgroundColorNormal));
|
||||
widget->setPalette(pal);
|
||||
return widget;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -26,6 +26,45 @@
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1123</width>
|
||||
<height>818</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="javaSettingsGroup">
|
||||
<property name="minimumSize">
|
||||
@@ -454,6 +493,10 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Utils::PathChooser</class>
|
||||
|
@@ -245,6 +245,7 @@ void AutoTestUnitTests::testCodeParserBoostTest()
|
||||
QSKIP("This test needs boost - set BOOST_INCLUDE_DIR (or have it installed)");
|
||||
|
||||
QFETCH(QString, projectFilePath);
|
||||
QFETCH(QString, extension);
|
||||
CppTools::Tests::ProjectOpenerAndCloser projectManager;
|
||||
CppTools::ProjectInfo projectInfo = projectManager.open(projectFilePath, true);
|
||||
QVERIFY(projectInfo.isValid());
|
||||
@@ -256,14 +257,23 @@ void AutoTestUnitTests::testCodeParserBoostTest()
|
||||
|
||||
QCOMPARE(m_model->boostTestNamesCount(), 5);
|
||||
|
||||
QMultiMap<QString, int> expectedSuitesAndTests;
|
||||
expectedSuitesAndTests.insert(QStringLiteral("Master Test Suite"), 2); // decorators w/o suite
|
||||
expectedSuitesAndTests.insert(QStringLiteral("Master Test Suite"), 2); // fixtures
|
||||
expectedSuitesAndTests.insert(QStringLiteral("Master Test Suite"), 3); // functions
|
||||
expectedSuitesAndTests.insert(QStringLiteral("Suite1"), 4);
|
||||
expectedSuitesAndTests.insert(QStringLiteral("SuiteOuter"), 5); // 2 sub suites + 3 tests
|
||||
QString basePath;
|
||||
if (auto project = projectInfo.project())
|
||||
basePath = project->projectFilePath().toFileInfo().absolutePath();
|
||||
QVERIFY(!basePath.isEmpty());
|
||||
|
||||
QMultiMap<QString, int> foundNamesAndSets = m_model->boostTestSuitesAndTests();
|
||||
QMap<QString, int> expectedSuitesAndTests;
|
||||
|
||||
auto pathConstructor = [basePath, extension](const QString &name, const QString &subPath) {
|
||||
return QString(name + '|' + basePath + subPath + extension);
|
||||
};
|
||||
expectedSuitesAndTests.insert(pathConstructor("Master Test Suite", "/tests/deco/deco"), 2); // decorators w/o suite
|
||||
expectedSuitesAndTests.insert(pathConstructor("Master Test Suite", "/tests/fix/fix"), 2); // fixtures
|
||||
expectedSuitesAndTests.insert(pathConstructor("Master Test Suite", "/tests/params/params"), 3); // functions
|
||||
expectedSuitesAndTests.insert(pathConstructor("Suite1", "/tests/deco/deco"), 4);
|
||||
expectedSuitesAndTests.insert(pathConstructor("SuiteOuter", "/tests/deco/deco"), 5); // 2 sub suites + 3 tests
|
||||
|
||||
QMap<QString, int> foundNamesAndSets = m_model->boostTestSuitesAndTests();
|
||||
QCOMPARE(expectedSuitesAndTests.size(), foundNamesAndSets.size());
|
||||
for (const QString &name : expectedSuitesAndTests.keys())
|
||||
QCOMPARE(expectedSuitesAndTests.values(name), foundNamesAndSets.values(name));
|
||||
@@ -279,10 +289,11 @@ void AutoTestUnitTests::testCodeParserBoostTest()
|
||||
void AutoTestUnitTests::testCodeParserBoostTest_data()
|
||||
{
|
||||
QTest::addColumn<QString>("projectFilePath");
|
||||
QTest::addColumn<QString>("extension");
|
||||
QTest::newRow("simpleBoostTest")
|
||||
<< QString(m_tmpDir->path() + "/simple_boost/simple_boost.pro");
|
||||
<< QString(m_tmpDir->path() + "/simple_boost/simple_boost.pro") << QString(".pro");
|
||||
QTest::newRow("simpleBoostTestQbs")
|
||||
<< QString(m_tmpDir->path() + "/simple_boost/simple_boost.qbs");
|
||||
<< QString(m_tmpDir->path() + "/simple_boost/simple_boost.qbs") << QString(".qbs");
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -611,13 +611,13 @@ int TestTreeModel::boostTestNamesCount() const
|
||||
return rootNode ? rootNode->childCount() : 0;
|
||||
}
|
||||
|
||||
QMultiMap<QString, int> TestTreeModel::boostTestSuitesAndTests() const
|
||||
QMap<QString, int> TestTreeModel::boostTestSuitesAndTests() const
|
||||
{
|
||||
QMultiMap<QString, int> result;
|
||||
QMap<QString, int> result;
|
||||
|
||||
if (TestTreeItem *rootNode = boostTestRootNode()) {
|
||||
rootNode->forFirstLevelChildren([&result](TestTreeItem *child) {
|
||||
result.insert(child->name(), child->childCount());
|
||||
result.insert(child->name() + '|' + child->proFile(), child->childCount());
|
||||
});
|
||||
}
|
||||
return result;
|
||||
|
@@ -76,7 +76,7 @@ public:
|
||||
int gtestNamesCount() const;
|
||||
QMultiMap<QString, int> gtestNamesAndSets() const;
|
||||
int boostTestNamesCount() const;
|
||||
QMultiMap<QString, int> boostTestSuitesAndTests() const;
|
||||
QMap<QString, int> boostTestSuitesAndTests() const;
|
||||
#endif
|
||||
|
||||
void markAllForRemoval();
|
||||
|
@@ -8,6 +8,7 @@ add_qtc_plugin(ClangTools
|
||||
CONDITION TARGET libclang AND TARGET yaml-cpp
|
||||
DEPENDS ClangSupport libclang yaml-cpp
|
||||
PLUGIN_DEPENDS Core Debugger CppTools ${TST_COMPONENT}
|
||||
PLUGIN_RECOMMENDS CppEditor
|
||||
INCLUDES ${CLANG_INCLUDE_DIRS}
|
||||
SOURCES
|
||||
clangfileinfo.h
|
||||
|
@@ -18,6 +18,10 @@ QtcPlugin {
|
||||
|
||||
Depends { name: "Qt.widgets" }
|
||||
|
||||
pluginRecommends: [
|
||||
"CppEditor"
|
||||
]
|
||||
|
||||
pluginTestDepends: [
|
||||
"QbsProjectManager",
|
||||
"QmakeProjectManager",
|
||||
|
@@ -9,6 +9,8 @@ isEmpty(EXTERNAL_YAML_CPP_FOUND): QTC_LIB_DEPENDS += yaml-cpp
|
||||
QTC_PLUGIN_DEPENDS += \
|
||||
debugger \
|
||||
cpptools
|
||||
QTC_PLUGIN_RECOMMENDS += \
|
||||
cppeditor
|
||||
QTC_TEST_DEPENDS += \
|
||||
qbsprojectmanager \
|
||||
qmakeprojectmanager
|
||||
|
@@ -48,6 +48,8 @@
|
||||
#include <cpptools/cpptoolsconstants.h>
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
|
||||
#include <cppeditor/cppeditorconstants.h>
|
||||
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectpanelfactory.h>
|
||||
#include <projectexplorer/target.h>
|
||||
@@ -95,8 +97,16 @@ bool ClangToolsPlugin::initialize(const QStringList &arguments, QString *errorSt
|
||||
d = new ClangToolsPluginPrivate;
|
||||
|
||||
ActionManager::registerAction(d->clangTool.startAction(), Constants::RUN_ON_PROJECT);
|
||||
ActionManager::registerAction(d->clangTool.startOnCurrentFileAction(),
|
||||
Command *cmd = ActionManager::registerAction(d->clangTool.startOnCurrentFileAction(),
|
||||
Constants::RUN_ON_CURRENT_FILE);
|
||||
ActionContainer *mtoolscpp = ActionManager::actionContainer(CppTools::Constants::M_TOOLS_CPP);
|
||||
if (mtoolscpp)
|
||||
mtoolscpp->addAction(cmd);
|
||||
|
||||
Core::ActionContainer *mcontext = Core::ActionManager::actionContainer(
|
||||
CppEditor::Constants::M_CONTEXT);
|
||||
if (mcontext)
|
||||
mcontext->addAction(cmd, CppEditor::Constants::G_CONTEXT_FIRST); // TODO
|
||||
|
||||
auto panelFactory = m_projectPanelFactoryInstance = new ProjectPanelFactory;
|
||||
panelFactory->setPriority(100);
|
||||
|
@@ -29,6 +29,7 @@ namespace CppEditor {
|
||||
namespace Constants {
|
||||
|
||||
const char M_CONTEXT[] = "CppEditor.ContextMenu";
|
||||
const char G_CONTEXT_FIRST[] = "CppEditor.GFirst";
|
||||
const char CPPEDITOR_ID[] = "CppEditor.C++Editor";
|
||||
const char CPPEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "C++ Editor");
|
||||
const char SWITCH_DECLARATION_DEFINITION[] = "CppEditor.SwitchDeclarationDefinition";
|
||||
|
@@ -174,6 +174,7 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
||||
Context context(Constants::CPPEDITOR_ID);
|
||||
|
||||
ActionContainer *contextMenu = ActionManager::createMenu(Constants::M_CONTEXT);
|
||||
contextMenu->insertGroup(Core::Constants::G_DEFAULT_ONE, Constants::G_CONTEXT_FIRST);
|
||||
|
||||
Command *cmd;
|
||||
ActionContainer *cppToolsMenu = ActionManager::actionContainer(CppTools::Constants::M_TOOLS_CPP);
|
||||
@@ -181,12 +182,12 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
||||
|
||||
cmd = ActionManager::command(CppTools::Constants::SWITCH_HEADER_SOURCE);
|
||||
cmd->setTouchBarText(tr("Header/Source", "text on macOS touch bar"));
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_NAVIGATION);
|
||||
|
||||
cmd = ActionManager::command(TextEditor::Constants::FOLLOW_SYMBOL_UNDER_CURSOR);
|
||||
cmd->setTouchBarText(tr("Follow", "text on macOS touch bar"));
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_NAVIGATION);
|
||||
|
||||
@@ -204,7 +205,7 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
||||
cmd->setTouchBarText(tr("Decl/Def", "text on macOS touch bar"));
|
||||
connect(switchDeclarationDefinition, &QAction::triggered,
|
||||
this, &CppEditorPlugin::switchDeclarationDefinition);
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
touchBar->addAction(cmd, Core::Constants::G_TOUCHBAR_NAVIGATION);
|
||||
|
||||
@@ -223,21 +224,21 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
||||
cppToolsMenu->addAction(cmd);
|
||||
|
||||
cmd = ActionManager::command(TextEditor::Constants::FIND_USAGES);
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
|
||||
d->m_openTypeHierarchyAction = new QAction(tr("Open Type Hierarchy"), this);
|
||||
cmd = ActionManager::registerAction(d->m_openTypeHierarchyAction, Constants::OPEN_TYPE_HIERARCHY, context);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+T") : tr("Ctrl+Shift+T")));
|
||||
connect(d->m_openTypeHierarchyAction, &QAction::triggered, this, &CppEditorPlugin::openTypeHierarchy);
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
|
||||
d->m_openIncludeHierarchyAction = new QAction(tr("Open Include Hierarchy"), this);
|
||||
cmd = ActionManager::registerAction(d->m_openIncludeHierarchyAction, Constants::OPEN_INCLUDE_HIERARCHY, context);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+I") : tr("Ctrl+Shift+I")));
|
||||
connect(d->m_openIncludeHierarchyAction, &QAction::triggered, this, &CppEditorPlugin::openIncludeHierarchy);
|
||||
contextMenu->addAction(cmd);
|
||||
contextMenu->addAction(cmd, Constants::G_CONTEXT_FIRST);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
|
||||
// Refactoring sub-menu
|
||||
@@ -256,19 +257,19 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
||||
cppToolsMenu->addAction(cmd);
|
||||
|
||||
// Update context in global context
|
||||
cppToolsMenu->addSeparator();
|
||||
cppToolsMenu->addSeparator(Core::Constants::G_DEFAULT_THREE);
|
||||
d->m_reparseExternallyChangedFiles = new QAction(tr("Reparse Externally Changed Files"), this);
|
||||
cmd = ActionManager::registerAction(d->m_reparseExternallyChangedFiles, Constants::UPDATE_CODEMODEL);
|
||||
CppTools::CppModelManager *cppModelManager = CppTools::CppModelManager::instance();
|
||||
connect(d->m_reparseExternallyChangedFiles, &QAction::triggered, cppModelManager, &CppTools::CppModelManager::updateModifiedSourceFiles);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
cppToolsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||
|
||||
cppToolsMenu->addSeparator();
|
||||
cppToolsMenu->addSeparator(Core::Constants::G_DEFAULT_THREE);
|
||||
QAction *inspectCppCodeModel = new QAction(tr("Inspect C++ Code Model..."), this);
|
||||
cmd = ActionManager::registerAction(inspectCppCodeModel, Constants::INSPECT_CPP_CODEMODEL);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? tr("Meta+Shift+F12") : tr("Ctrl+Shift+F12")));
|
||||
connect(inspectCppCodeModel, &QAction::triggered, d, &CppEditorPluginPrivate::inspectCppCodeModel);
|
||||
cppToolsMenu->addAction(cmd);
|
||||
cppToolsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||
|
||||
contextMenu->addSeparator(context);
|
||||
|
||||
|
@@ -352,7 +352,8 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
data.insert(QLatin1String(CPP_CXXCOMPILERNAME), cxxCompilerName);
|
||||
}
|
||||
|
||||
if (tcC && tcCxx && cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {
|
||||
if (tcC && tcCxx && !cCompilerPath.isEmpty() && !cxxCompilerPath.isEmpty()
|
||||
&& cFileInfo.absolutePath() != cxxFileInfo.absolutePath()) {
|
||||
Core::MessageManager::write(tr("C and C++ compiler paths differ. C compiler may not work."),
|
||||
Core::MessageManager::ModeSwitch);
|
||||
}
|
||||
|
@@ -8,6 +8,10 @@
|
||||
<file>images/edit_light_off@2x.png</file>
|
||||
<file>images/edit_light_on.png</file>
|
||||
<file>images/edit_light_on@2x.png</file>
|
||||
<file>images/grid_off.png</file>
|
||||
<file>images/grid_off@2x.png</file>
|
||||
<file>images/grid_on.png</file>
|
||||
<file>images/grid_on@2x.png</file>
|
||||
<file>images/fit_selected.png</file>
|
||||
<file>images/fit_selected@2x.png</file>
|
||||
<file>images/move_off.png</file>
|
||||
|
@@ -102,11 +102,12 @@ void Edit3DView::renderImage3DChanged(const QImage &img)
|
||||
void Edit3DView::updateActiveScene3D(const QVariantMap &sceneState)
|
||||
{
|
||||
const QString sceneKey = QStringLiteral("sceneInstanceId");
|
||||
const QString selectKey = QStringLiteral("groupSelect");
|
||||
const QString transformKey = QStringLiteral("groupTransform");
|
||||
const QString selectKey = QStringLiteral("selectionMode");
|
||||
const QString transformKey = QStringLiteral("transformMode");
|
||||
const QString perspectiveKey = QStringLiteral("usePerspective");
|
||||
const QString orientationKey = QStringLiteral("globalOrientation");
|
||||
const QString editLightKey = QStringLiteral("showEditLight");
|
||||
const QString gridKey = QStringLiteral("showGrid");
|
||||
|
||||
if (sceneState.contains(sceneKey)) {
|
||||
qint32 newActiveScene = sceneState[sceneKey].value<qint32>();
|
||||
@@ -115,7 +116,7 @@ void Edit3DView::updateActiveScene3D(const QVariantMap &sceneState)
|
||||
}
|
||||
|
||||
if (sceneState.contains(selectKey))
|
||||
m_selectionModeAction->action()->setChecked(sceneState[selectKey].toInt() == 0);
|
||||
m_selectionModeAction->action()->setChecked(sceneState[selectKey].toInt() == 1);
|
||||
else
|
||||
m_selectionModeAction->action()->setChecked(false);
|
||||
|
||||
@@ -135,14 +136,21 @@ void Edit3DView::updateActiveScene3D(const QVariantMap &sceneState)
|
||||
m_cameraModeAction->action()->setChecked(sceneState[perspectiveKey].toBool());
|
||||
else
|
||||
m_cameraModeAction->action()->setChecked(false);
|
||||
|
||||
if (sceneState.contains(orientationKey))
|
||||
m_orientationModeAction->action()->setChecked(sceneState[orientationKey].toBool());
|
||||
else
|
||||
m_orientationModeAction->action()->setChecked(false);
|
||||
|
||||
if (sceneState.contains(editLightKey))
|
||||
m_editLightAction->action()->setChecked(sceneState[editLightKey].toBool());
|
||||
else
|
||||
m_editLightAction->action()->setChecked(false);
|
||||
|
||||
if (sceneState.contains(gridKey))
|
||||
m_showGridAction->action()->setChecked(sceneState[gridKey].toBool());
|
||||
else
|
||||
m_showGridAction->action()->setChecked(false);
|
||||
}
|
||||
|
||||
void Edit3DView::modelAttached(Model *model)
|
||||
@@ -247,6 +255,12 @@ void Edit3DView::createEdit3DActions()
|
||||
QKeySequence(Qt::Key_U), true, false, Icons::EDIT3D_LIGHT_OFF.icon(),
|
||||
Icons::EDIT3D_LIGHT_ON.icon());
|
||||
|
||||
m_showGridAction = new Edit3DAction(
|
||||
QmlDesigner::Constants::EDIT3D_EDIT_SHOW_GRID, View3DActionCommand::ShowGrid,
|
||||
QCoreApplication::translate("ShowGridAction", "Toggle grid visibility"),
|
||||
QKeySequence(Qt::Key_G), true, true, Icons::EDIT3D_GRID_OFF.icon(),
|
||||
Icons::EDIT3D_GRID_ON.icon());
|
||||
|
||||
SelectionContextOperation resetTrigger = [this](const SelectionContext &) {
|
||||
setCurrentStateNode(rootModelNode());
|
||||
resetPuppet();
|
||||
@@ -270,6 +284,7 @@ void Edit3DView::createEdit3DActions()
|
||||
m_leftActions << m_cameraModeAction;
|
||||
m_leftActions << m_orientationModeAction;
|
||||
m_leftActions << m_editLightAction;
|
||||
m_leftActions << m_showGridAction;
|
||||
|
||||
m_rightActions << m_resetAction;
|
||||
}
|
||||
|
@@ -87,6 +87,7 @@ private:
|
||||
Edit3DAction *m_cameraModeAction = nullptr;
|
||||
Edit3DAction *m_orientationModeAction = nullptr;
|
||||
Edit3DAction *m_editLightAction = nullptr;
|
||||
Edit3DAction *m_showGridAction = nullptr;
|
||||
Edit3DAction *m_resetAction = nullptr;
|
||||
};
|
||||
|
||||
|
BIN
src/plugins/qmldesigner/components/edit3d/images/grid_off.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
src/plugins/qmldesigner/components/edit3d/images/grid_off@2x.png
Normal file
After Width: | Height: | Size: 116 B |
BIN
src/plugins/qmldesigner/components/edit3d/images/grid_on.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
src/plugins/qmldesigner/components/edit3d/images/grid_on@2x.png
Normal file
After Width: | Height: | Size: 116 B |
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "rewriterview.h"
|
||||
#include "model.h"
|
||||
#include "puppetcreator.h"
|
||||
|
||||
#include <QtCore/qdir.h>
|
||||
#include <QtCore/qdiriterator.h>
|
||||
@@ -84,44 +85,14 @@ void ItemLibraryAssetImporter::importQuick3D(const QStringList &inputFiles,
|
||||
parseFiles(inputFiles, options, extToImportOptionsMap);
|
||||
|
||||
if (!isCancelled()) {
|
||||
// Don't allow cancel anymore as existing asset overwrites are not trivially recoverable.
|
||||
// Also, on Windows at least you can't delete a subdirectory of a watched directory,
|
||||
// so complete rollback is no longer possible in any case.
|
||||
emit importNearlyFinished();
|
||||
|
||||
copyImportedFiles();
|
||||
|
||||
auto doc = QmlDesignerPlugin::instance()->currentDesignDocument();
|
||||
Model *model = doc ? doc->currentModel() : nullptr;
|
||||
if (model && !m_importFiles.isEmpty()) {
|
||||
const QString progressTitle = tr("Updating data model.");
|
||||
// Wait for icon generation processes to finish
|
||||
if (m_qmlPuppetProcesses.isEmpty()) {
|
||||
finalizeQuick3DImport();
|
||||
} else {
|
||||
m_qmlPuppetCount = m_qmlPuppetProcesses.size();
|
||||
const QString progressTitle = tr("Generating icons.");
|
||||
addInfo(progressTitle);
|
||||
notifyProgress(0, progressTitle);
|
||||
|
||||
// Trigger underlying qmljs snapshot update by making a non-change to the doc
|
||||
model->rewriterView()->textModifier()->replace(0, 0, {});
|
||||
|
||||
// There is a inbuilt delay before rewriter change actually updates the data model,
|
||||
// so we need to wait for a moment to allow the change to take effect.
|
||||
// Otherwise subsequent subcomponent manager update won't detect new imports properly.
|
||||
QTimer *timer = new QTimer(parent());
|
||||
static int counter;
|
||||
counter = 0;
|
||||
timer->callOnTimeout([this, timer, progressTitle, doc]() {
|
||||
if (!isCancelled()) {
|
||||
notifyProgress(++counter * 10, progressTitle);
|
||||
if (counter >= 10) {
|
||||
doc->updateSubcomponentManager();
|
||||
timer->stop();
|
||||
notifyFinished();
|
||||
}
|
||||
} else {
|
||||
timer->stop();
|
||||
}
|
||||
});
|
||||
timer->start(100);
|
||||
} else {
|
||||
notifyFinished();
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -208,6 +179,26 @@ QHash<QString, QStringList> ItemLibraryAssetImporter::supportedExtensions() cons
|
||||
#endif
|
||||
}
|
||||
|
||||
void ItemLibraryAssetImporter::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
Q_UNUSED(exitCode)
|
||||
Q_UNUSED(exitStatus)
|
||||
|
||||
auto process = qobject_cast<QProcess *>(sender());
|
||||
if (process) {
|
||||
m_qmlPuppetProcesses.remove(process);
|
||||
process->deleteLater();
|
||||
const QString progressTitle = tr("Generating icons.");
|
||||
if (m_qmlPuppetProcesses.isEmpty()) {
|
||||
notifyProgress(100, progressTitle);
|
||||
finalizeQuick3DImport();
|
||||
} else {
|
||||
notifyProgress(int(100. * (1. - double(m_qmlPuppetCount) / double(m_qmlPuppetProcesses.size()))),
|
||||
progressTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ItemLibraryAssetImporter::notifyFinished()
|
||||
{
|
||||
m_isImporting = false;
|
||||
@@ -224,6 +215,9 @@ void ItemLibraryAssetImporter::reset()
|
||||
m_tempDir = new QTemporaryDir;
|
||||
m_importFiles.clear();
|
||||
m_overwrittenImports.clear();
|
||||
qDeleteAll(m_qmlPuppetProcesses);
|
||||
m_qmlPuppetProcesses.clear();
|
||||
m_qmlPuppetCount = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -307,6 +301,14 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar
|
||||
return;
|
||||
}
|
||||
|
||||
QHash<QString, QString> assetFiles;
|
||||
const int outDirPathSize = outDir.path().size();
|
||||
auto insertAsset = [&](const QString &filePath) {
|
||||
QString targetPath = filePath.mid(outDirPathSize);
|
||||
targetPath.prepend(targetDirPath);
|
||||
assetFiles.insert(filePath, targetPath);
|
||||
};
|
||||
|
||||
// Generate qmldir file if importer doesn't already make one
|
||||
QString qmldirFileName = outDir.absoluteFilePath(QStringLiteral("qmldir"));
|
||||
if (!QFileInfo(qmldirFileName).exists()) {
|
||||
@@ -349,8 +351,6 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar
|
||||
int nlIdx = content.lastIndexOf('\n', braceIdx);
|
||||
QByteArray rootItem = content.mid(nlIdx, braceIdx - nlIdx).trimmed();
|
||||
if (rootItem == "Node") { // a 3D object
|
||||
QFile::copy(":/ItemLibrary/images/item-3D_model-icon.png", iconFileName);
|
||||
QFile::copy(":/ItemLibrary/images/item-3D_model-icon@2x.png", iconFileName2x);
|
||||
// create hints file with proper hints
|
||||
QFile file(outDir.path() + '/' + fi.baseName() + ".hints");
|
||||
file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
@@ -359,9 +359,14 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar
|
||||
out << "canBeDroppedInFormEditor: false" << endl;
|
||||
out << "canBeDroppedInView3D: true" << endl;
|
||||
file.close();
|
||||
} else {
|
||||
QFile::copy(":/ItemLibrary/images/item-default-icon.png", iconFileName);
|
||||
QFile::copy(":/ItemLibrary/images/item-default-icon@2x.png", iconFileName2x);
|
||||
}
|
||||
QString outIconSource = QString::fromUtf8(content);
|
||||
if (generateComponentIcon(24, iconFileName, qmlIt.filePath())) {
|
||||
// Since icon is generated by external process, the file won't be
|
||||
// ready for asset gathering below, so assume its generation succeeds
|
||||
// and add it now.
|
||||
insertAsset(iconFileName);
|
||||
insertAsset(iconFileName2x);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,15 +380,10 @@ void ItemLibraryAssetImporter::parseQuick3DAsset(const QString &file, const QVar
|
||||
}
|
||||
|
||||
// Gather all generated files
|
||||
const int outDirPathSize = outDir.path().size();
|
||||
QDirIterator dirIt(outDir.path(), QDir::Files, QDirIterator::Subdirectories);
|
||||
QHash<QString, QString> assetFiles;
|
||||
while (dirIt.hasNext()) {
|
||||
dirIt.next();
|
||||
const QString filePath = dirIt.filePath();
|
||||
QString targetPath = filePath.mid(outDirPathSize);
|
||||
targetPath.prepend(targetDirPath);
|
||||
assetFiles.insert(filePath, targetPath);
|
||||
insertAsset(dirIt.filePath());
|
||||
}
|
||||
|
||||
// Copy the original asset into a subdirectory
|
||||
@@ -428,10 +428,12 @@ void ItemLibraryAssetImporter::copyImportedFiles()
|
||||
// by filesystem watchers.
|
||||
QHash<QString, QString>::const_iterator it = assetFiles.begin();
|
||||
while (it != assetFiles.end()) {
|
||||
if (QFileInfo(it.key()).exists()) {
|
||||
QDir targetDir = QFileInfo(it.value()).dir();
|
||||
if (!targetDir.exists())
|
||||
targetDir.mkpath(QStringLiteral("."));
|
||||
targetDir.mkpath(".");
|
||||
QFile::copy(it.key(), it.value());
|
||||
}
|
||||
++it;
|
||||
}
|
||||
notifyProgress((100 * ++counter) / m_importFiles.size(), progressTitle);
|
||||
@@ -461,6 +463,79 @@ bool ItemLibraryAssetImporter::confirmAssetOverwrite(const QString &assetName)
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes;
|
||||
}
|
||||
|
||||
bool ItemLibraryAssetImporter::generateComponentIcon(int size, const QString &iconFile,
|
||||
const QString &iconSource)
|
||||
{
|
||||
auto doc = QmlDesignerPlugin::instance()->currentDesignDocument();
|
||||
Model *model = doc ? doc->currentModel() : nullptr;
|
||||
|
||||
if (model) {
|
||||
PuppetCreator puppetCreator(doc->currentTarget(), model);
|
||||
puppetCreator.createQml2PuppetExecutableIfMissing();
|
||||
QStringList puppetArgs;
|
||||
puppetArgs << "--rendericon" << QString::number(size) << iconFile << iconSource;
|
||||
QProcess *process = puppetCreator.createPuppetProcess(
|
||||
"custom", {}, this, "", SLOT(processFinished(int, QProcess::ExitStatus)), puppetArgs);
|
||||
|
||||
if (process->waitForStarted(5000)) {
|
||||
connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
process, &QProcess::deleteLater);
|
||||
m_qmlPuppetProcesses << process;
|
||||
return true;
|
||||
} else {
|
||||
delete process;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ItemLibraryAssetImporter::finalizeQuick3DImport()
|
||||
{
|
||||
#ifdef IMPORT_QUICK3D_ASSETS
|
||||
if (!isCancelled()) {
|
||||
// Don't allow cancel anymore as existing asset overwrites are not trivially recoverable.
|
||||
// Also, on Windows at least you can't delete a subdirectory of a watched directory,
|
||||
// so complete rollback is no longer possible in any case.
|
||||
emit importNearlyFinished();
|
||||
|
||||
copyImportedFiles();
|
||||
|
||||
auto doc = QmlDesignerPlugin::instance()->currentDesignDocument();
|
||||
Model *model = doc ? doc->currentModel() : nullptr;
|
||||
if (model && !m_importFiles.isEmpty()) {
|
||||
const QString progressTitle = tr("Updating data model.");
|
||||
addInfo(progressTitle);
|
||||
notifyProgress(0, progressTitle);
|
||||
|
||||
// Trigger underlying qmljs snapshot update by making a non-change to the doc
|
||||
model->rewriterView()->textModifier()->replace(0, 0, {});
|
||||
|
||||
// There is an inbuilt delay before rewriter change actually updates the data model,
|
||||
// so we need to wait for a moment to allow the change to take effect.
|
||||
// Otherwise subsequent subcomponent manager update won't detect new imports properly.
|
||||
QTimer *timer = new QTimer(parent());
|
||||
static int counter;
|
||||
counter = 0;
|
||||
timer->callOnTimeout([this, timer, progressTitle, doc]() {
|
||||
if (!isCancelled()) {
|
||||
notifyProgress(++counter * 10, progressTitle);
|
||||
if (counter >= 10) {
|
||||
doc->updateSubcomponentManager();
|
||||
timer->stop();
|
||||
notifyFinished();
|
||||
}
|
||||
} else {
|
||||
timer->stop();
|
||||
}
|
||||
});
|
||||
timer->start(100);
|
||||
} else {
|
||||
notifyFinished();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ItemLibraryAssetImporter::isCancelled() const
|
||||
{
|
||||
keepUiAlive();
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qjsonobject.h>
|
||||
#include <QtCore/qprocess.h>
|
||||
|
||||
#include "import.h"
|
||||
|
||||
@@ -72,6 +73,9 @@ signals:
|
||||
void importNearlyFinished() const;
|
||||
void importFinished();
|
||||
|
||||
private slots:
|
||||
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
private:
|
||||
void notifyFinished();
|
||||
void reset();
|
||||
@@ -83,6 +87,8 @@ private:
|
||||
void notifyProgress(int value, const QString &text) const;
|
||||
void keepUiAlive() const;
|
||||
bool confirmAssetOverwrite(const QString &assetName);
|
||||
bool generateComponentIcon(int size, const QString &iconFile, const QString &iconSource);
|
||||
void finalizeQuick3DImport();
|
||||
|
||||
#ifdef IMPORT_QUICK3D_ASSETS
|
||||
QScopedPointer<QSSGAssetImportManager> m_quick3DAssetImporter;
|
||||
@@ -93,5 +99,7 @@ private:
|
||||
bool m_cancelled = false;
|
||||
QString m_importPath;
|
||||
QTemporaryDir *m_tempDir = nullptr;
|
||||
QSet<QProcess *> m_qmlPuppetProcesses;
|
||||
int m_qmlPuppetCount = 0;
|
||||
};
|
||||
} // QmlDesigner
|
||||
|
@@ -39,7 +39,6 @@ ItemLibrarySectionModel::ItemLibrarySectionModel(QObject *parent) :
|
||||
|
||||
ItemLibrarySectionModel::~ItemLibrarySectionModel()
|
||||
{
|
||||
clearItems();
|
||||
}
|
||||
|
||||
int ItemLibrarySectionModel::rowCount(const QModelIndex &) const
|
||||
@@ -73,12 +72,6 @@ QHash<int, QByteArray> ItemLibrarySectionModel::roleNames() const
|
||||
return m_roleNames;
|
||||
}
|
||||
|
||||
void ItemLibrarySectionModel::clearItems()
|
||||
{
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void ItemLibrarySectionModel::addItem(ItemLibraryItem *element)
|
||||
{
|
||||
m_itemList.append(element);
|
||||
|
@@ -45,8 +45,6 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
void clearItems();
|
||||
|
||||
void addItem(ItemLibraryItem *item);
|
||||
|
||||
const QList<ItemLibraryItem *> &items() const;
|
||||
|
@@ -98,15 +98,14 @@ void ItemLibraryView::setResourcePath(const QString &resourcePath)
|
||||
void ItemLibraryView::documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &)
|
||||
{
|
||||
if (m_hasErrors && errors.isEmpty())
|
||||
/* For some reason we have to call update from the event loop */
|
||||
QTimer::singleShot(0, m_widget, &ItemLibraryWidget::updateModel);
|
||||
updateImports();
|
||||
|
||||
m_hasErrors = !errors.isEmpty();
|
||||
}
|
||||
|
||||
void ItemLibraryView::updateImports()
|
||||
{
|
||||
m_widget->updateModel();
|
||||
m_widget->delayedUpdateModel();
|
||||
}
|
||||
|
||||
} //QmlDesigner
|
||||
|
@@ -293,6 +293,10 @@ void ItemLibraryWidget::setSearchFilter(const QString &searchFilter)
|
||||
|
||||
void ItemLibraryWidget::delayedUpdateModel()
|
||||
{
|
||||
static bool disableTimer = DesignerSettings::getValue(DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER).toBool();
|
||||
if (disableTimer)
|
||||
updateModel();
|
||||
else
|
||||
m_compressionTimer.start();
|
||||
}
|
||||
|
||||
|
@@ -551,20 +551,46 @@ void NavigatorTreeModel::handleItemLibraryImageDrop(const QMimeData *mimeData, i
|
||||
NodeAbstractProperty targetProperty;
|
||||
|
||||
bool foundTarget = findTargetProperty(rowModelIndex, this, &targetProperty, &targetRowNumber);
|
||||
|
||||
if (foundTarget) {
|
||||
const QString imageFileName = QString::fromUtf8(mimeData->data("application/vnd.bauhaus.libraryresource"));
|
||||
const QmlItemNode newQmlItemNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageFileName, QPointF(), targetProperty);
|
||||
ModelNode targetNode(modelNodeForIndex(rowModelIndex));
|
||||
|
||||
if (newQmlItemNode.isValid()) {
|
||||
QList<ModelNode> newModelNodeList;
|
||||
newModelNodeList.append(newQmlItemNode);
|
||||
const QString imageSource = QString::fromUtf8(mimeData->data("application/vnd.bauhaus.libraryresource")); // absolute path
|
||||
const QString imageFileName = imageSource.mid(imageSource.lastIndexOf('/') + 1);
|
||||
ModelNode newModelNode;
|
||||
|
||||
moveNodesInteractive(targetProperty, newModelNodeList, targetRowNumber);
|
||||
if (targetNode.isSubclassOf("QtQuick3D.DefaultMaterial")) {
|
||||
// if dropping an image on a default material, create a texture instead of image
|
||||
m_view->executeInTransaction("QmlItemNode::createQmlItemNode", [&] {
|
||||
// create a texture item lib
|
||||
ItemLibraryEntry itemLibraryEntry;
|
||||
itemLibraryEntry.setName("Texture");
|
||||
itemLibraryEntry.setType("QtQuick3D.Texture", 1, 0);
|
||||
|
||||
// set texture source
|
||||
PropertyName prop = "source";
|
||||
QString type = "QUrl";
|
||||
QVariant val = imageFileName;
|
||||
itemLibraryEntry.addProperty(prop, type, val);
|
||||
|
||||
// create a texture
|
||||
newModelNode = QmlItemNode::createQmlObjectNode(m_view, itemLibraryEntry, {}, targetProperty, false);
|
||||
|
||||
// set the texture to parent material's diffuseMap property
|
||||
// TODO: allow the user to choose which map property to set the texture for
|
||||
targetNode.bindingProperty("diffuseMap").setExpression(newModelNode.validId());
|
||||
});
|
||||
} else if (targetNode.isSubclassOf("QtQuick3D.Texture")) {
|
||||
// if dropping an image on a texture, set the texture source
|
||||
targetNode.variantProperty("source").setValue(imageFileName);
|
||||
} else {
|
||||
// create an image
|
||||
newModelNode = QmlItemNode::createQmlItemNodeFromImage(m_view, imageSource , QPointF(), targetProperty);
|
||||
}
|
||||
|
||||
if (newQmlItemNode.isValid())
|
||||
m_view->selectModelNode(newQmlItemNode.modelNode());
|
||||
if (newModelNode.isValid()) {
|
||||
moveNodesInteractive(targetProperty, {newModelNode}, targetRowNumber);
|
||||
m_view->setSelectedModelNode(newModelNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -265,7 +265,8 @@ bool PropertyEditorValue::isTranslated() const
|
||||
|
||||
bool PropertyEditorValue::isAvailable() const
|
||||
{
|
||||
const QList<QByteArray> mcuProperties = {"layer", "opacity", "rotation", "scale", "transformOrigin", "smooth", "antialiasing", "border"};
|
||||
const QList<QByteArray> mcuProperties = {"layer", "opacity", "rotation", "scale", "gradient",
|
||||
"transformOrigin", "smooth", "antialiasing", "border"};
|
||||
const QList<QByteArray> list = name().split('.');
|
||||
const QByteArray pureName = list.first();
|
||||
|
||||
|
@@ -94,13 +94,11 @@ public:
|
||||
const Position &position,
|
||||
QmlVisualNode parentQmlItemNode);
|
||||
|
||||
|
||||
|
||||
|
||||
static QmlObjectNode createQmlObjectNode(AbstractView *view,
|
||||
const ItemLibraryEntry &itemLibraryEntry,
|
||||
const Position &position,
|
||||
NodeAbstractProperty parentproperty);
|
||||
NodeAbstractProperty parentProperty,
|
||||
bool createInTransaction = true);
|
||||
|
||||
static QmlVisualNode createQml3DNode(AbstractView *view,
|
||||
const ItemLibraryEntry &itemLibraryEntry,
|
||||
|
@@ -179,7 +179,8 @@ QProcess *PuppetCreator::createPuppetProcess(const QString &puppetMode,
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const
|
||||
const char *finishSlot,
|
||||
const QStringList &customOptions) const
|
||||
{
|
||||
return puppetProcess(qml2PuppetPath(m_availablePuppetType),
|
||||
qmlPuppetDirectory(m_availablePuppetType),
|
||||
@@ -187,7 +188,8 @@ QProcess *PuppetCreator::createPuppetProcess(const QString &puppetMode,
|
||||
socketToken,
|
||||
handlerObject,
|
||||
outputSlot,
|
||||
finishSlot);
|
||||
finishSlot,
|
||||
customOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +199,8 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const
|
||||
const char *finishSlot,
|
||||
const QStringList &customOptions) const
|
||||
{
|
||||
auto puppetProcess = new QProcess;
|
||||
puppetProcess->setObjectName(puppetMode);
|
||||
@@ -230,7 +233,14 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath,
|
||||
if (forceFreeType)
|
||||
forceFreeTypeOption = "-platform windows:fontengine=freetype";
|
||||
|
||||
if (puppetMode == "custom") {
|
||||
QStringList args = customOptions;
|
||||
args << "-graphicssystem raster";
|
||||
args << forceFreeTypeOption;
|
||||
puppetProcess->start(puppetPath, args);
|
||||
} else {
|
||||
puppetProcess->start(puppetPath, {socketToken, puppetMode, "-graphicssystem raster", forceFreeTypeOption });
|
||||
}
|
||||
|
||||
#ifndef QMLDESIGNER_TEST
|
||||
QString debugPuppet = m_designerSettings.value(DesignerSettingsKey::
|
||||
|
@@ -57,7 +57,8 @@ public:
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const;
|
||||
const char *finishSlot,
|
||||
const QStringList &customOptions = {}) const;
|
||||
|
||||
void setQrcMappingString(const QString qrcMapping);
|
||||
|
||||
@@ -87,7 +88,8 @@ protected:
|
||||
const QString &socketToken,
|
||||
QObject *handlerObject,
|
||||
const char *outputSlot,
|
||||
const char *finishSlot) const;
|
||||
const char *finishSlot,
|
||||
const QStringList &customOptions) const;
|
||||
|
||||
QProcessEnvironment processEnvironment() const;
|
||||
|
||||
|
@@ -225,6 +225,10 @@ QDataStream& operator<<(QDataStream& stream, const ItemLibraryEntry &itemLibrary
|
||||
|
||||
QDataStream& operator>>(QDataStream& stream, ItemLibraryEntry &itemLibraryEntry)
|
||||
{
|
||||
// Clear containers so that we don't simply append to them in case the object is reused
|
||||
itemLibraryEntry.m_data->hints.clear();
|
||||
itemLibraryEntry.m_data->properties.clear();
|
||||
|
||||
stream >> itemLibraryEntry.m_data->name;
|
||||
stream >> itemLibraryEntry.m_data->typeName;
|
||||
stream >> itemLibraryEntry.m_data->majorVersion;
|
||||
|
@@ -243,11 +243,12 @@ static QmlObjectNode createQmlObjectNodeFromSource(AbstractView *view,
|
||||
QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
const ItemLibraryEntry &itemLibraryEntry,
|
||||
const Position &position,
|
||||
NodeAbstractProperty parentproperty)
|
||||
NodeAbstractProperty parentProperty,
|
||||
bool createInTransaction)
|
||||
{
|
||||
QmlObjectNode newQmlObjectNode;
|
||||
|
||||
view->executeInTransaction("QmlItemNode::createQmlItemNode", [=, &newQmlObjectNode, &parentproperty](){
|
||||
auto createNodeFunc = [=, &newQmlObjectNode, &parentProperty]() {
|
||||
NodeMetaInfo metaInfo = view->model()->metaInfo(itemLibraryEntry.typeName());
|
||||
|
||||
int minorVersion = metaInfo.minorVersion();
|
||||
@@ -274,8 +275,8 @@ QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
newQmlObjectNode = createQmlObjectNodeFromSource(view, itemLibraryEntry.qmlSource(), position);
|
||||
}
|
||||
|
||||
if (parentproperty.isValid())
|
||||
parentproperty.reparentHere(newQmlObjectNode);
|
||||
if (parentProperty.isValid())
|
||||
parentProperty.reparentHere(newQmlObjectNode);
|
||||
|
||||
if (!newQmlObjectNode.isValid())
|
||||
return;
|
||||
@@ -289,7 +290,12 @@ QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
newQmlObjectNode.modelNode().variantProperty(propertyBindingEntry.first).setEnumeration(propertyBindingEntry.second.toUtf8());
|
||||
|
||||
Q_ASSERT(newQmlObjectNode.isValid());
|
||||
});
|
||||
};
|
||||
|
||||
if (createInTransaction)
|
||||
view->executeInTransaction("QmlItemNode::createQmlItemNode", createNodeFunc);
|
||||
else
|
||||
createNodeFunc();
|
||||
|
||||
Q_ASSERT(newQmlObjectNode.isValid());
|
||||
|
||||
|
@@ -67,6 +67,7 @@ const char STANDALONE_MODE[] = "StandAloneMode";
|
||||
const char ENABLE_TIMELINEVIEW[] = "EnableTimelineView";
|
||||
const char SIMPLE_COLOR_PALETTE_CONTENT[] = "SimpleColorPaletteContent";
|
||||
const char ALWAYS_DESIGN_MODE[] = "AlwaysDesignMode";
|
||||
const char DISABLE_ITEM_LIBRARY_UPDATE_TIMER[] = "DisableItemLibraryUpdateTimer";
|
||||
}
|
||||
|
||||
class DesignerSettings : public QHash<QByteArray, QVariant>
|
||||
|
@@ -398,8 +398,8 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
|
||||
qCDebug(documentManagerLog) << "Checking" << node->displayName() << "(" << node << ")";
|
||||
|
||||
if (node->isVirtualFolderType() && node->displayName() == "Resources") {
|
||||
auto virtualFolderNode = dynamic_cast<ProjectExplorer::VirtualFolderNode*>(node);
|
||||
|
||||
ProjectExplorer::FolderNode *virtualFolderNode = node->asFolderNode();
|
||||
if (QTC_GUARD(virtualFolderNode)) {
|
||||
for (int subFolderIndex = 0; subFolderIndex < virtualFolderNode->folderNodes().size() && !iconQrcFileNode; ++subFolderIndex) {
|
||||
ProjectExplorer::FolderNode *subFolderNode = virtualFolderNode->folderNodes().at(subFolderIndex);
|
||||
|
||||
@@ -414,6 +414,7 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!iconQrcFileNode) {
|
||||
qCDebug(documentManagerLog) << "Didn't find" << isoIconsQrcFile
|
||||
|
@@ -62,6 +62,7 @@ const char EDIT3D_FIT_SELECTED[] = "QmlDesigner.Editor3D.FitSelected";
|
||||
const char EDIT3D_EDIT_CAMERA[] = "QmlDesigner.Editor3D.EditCameraToggle";
|
||||
const char EDIT3D_ORIENTATION[] = "QmlDesigner.Editor3D.OrientationToggle";
|
||||
const char EDIT3D_EDIT_LIGHT[] = "QmlDesigner.Editor3D.EditLightToggle";
|
||||
const char EDIT3D_EDIT_SHOW_GRID[] = "QmlDesigner.Editor3D.ToggleGrid";
|
||||
const char EDIT3D_RESET_VIEW[] = "QmlDesigner.Editor3D.ResetView";
|
||||
|
||||
const char QML_DESIGNER_SUBFOLDER[] = "/designer/";
|
||||
|
@@ -51,6 +51,10 @@ const Utils::Icon EDIT3D_LIGHT_ON({
|
||||
{QLatin1String(":/edit3d/images/edit_light_on.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon EDIT3D_LIGHT_OFF({
|
||||
{QLatin1String(":/edit3d/images/edit_light_off.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon EDIT3D_GRID_ON({
|
||||
{QLatin1String(":/edit3d/images/grid_on.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon EDIT3D_GRID_OFF({
|
||||
{QLatin1String(":/edit3d/images/grid_off.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon EDIT3D_SELECTION_MODE_ON({
|
||||
{QLatin1String(":/edit3d/images/select_group.png"), Utils::Theme::IconsBaseColor}});
|
||||
const Utils::Icon EDIT3D_SELECTION_MODE_OFF({
|
||||
|
@@ -118,6 +118,12 @@ extend_qtc_executable(qml2puppet
|
||||
nodeinstanceserverinterface.cpp nodeinstanceserverinterface.h
|
||||
)
|
||||
|
||||
extend_qtc_executable(qml2puppet
|
||||
SOURCES_PREFIX "${SRCDIR}/qml2puppet/iconrenderer"
|
||||
SOURCES
|
||||
iconrenderer.cpp iconrenderer.h
|
||||
)
|
||||
|
||||
extend_qtc_executable(qml2puppet
|
||||
SOURCES_PREFIX "${SRCDIR}/qml2puppet/instances"
|
||||
SOURCES
|
||||
|
@@ -217,6 +217,8 @@ QtcTool {
|
||||
"editor3d/selectionboxgeometry.h",
|
||||
"editor3d/linegeometry.cpp",
|
||||
"editor3d/linegeometry.h",
|
||||
"iconrenderer/iconrenderer.cpp",
|
||||
"iconrenderer/iconrenderer.h",
|
||||
"qml2puppetmain.cpp",
|
||||
]
|
||||
}
|
||||
|