Commit Graph

16 Commits

Author SHA1 Message Date
Samuel Ghinet
dbf91a8f03 QmlDesigner: Fix Material download not showing any progress
Also, now delayed the finish part by 200ms so that 100% progress would
be visible to the user.

Task-number: QDS-9562
Change-Id: Ie8f87ff70770b206256d4dbf0c08227723067eeb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-31 07:26:45 +00:00
Samuel Ghinet
129153e663 QmlDesigner: Allow user to download multiple textures at once
Task-number: QDS-9224
Change-Id: Ia1ec8f8b0951e8dd31d47f64509d39137cdeaa41
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-30 12:26:36 +00:00
Samuel Ghinet
77720c1122 Download textures and materials only by clicking the download icon
Previously, clicking the texture thumbnail itself would start the
download.

Also, improved the look of the download icon:
* added a margin to the right
* the inside "arrow" is now black, instead of transparent

Task-number: QDS-9398
Change-Id: I58f958493f1c6072a57402288ea155135909e117
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-27 17:59:05 +00:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Samuel Ghinet
98be6d289f Make Content Library Materials downloadable
Task-number: QDS-9267
Change-Id: Ib4da1871cd1d9f0bf52323793b7d8d1b028ae170
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-03-21 12:30:31 +00:00
Thomas Hartmann
fb685307f9 QmlDesigner: Use StudioQuickWidget in content library
The event filter has to be installed on the actual QQuickWidget.
Using registerPropertyMap instead of global context properties.

Task-number: QDS-9124
Change-Id: I148ecc6b489f6d72d80a345aa195f74676a92d51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-03-09 08:10:12 +00:00
Miikka Heikkinen
333ebb5bc2 QmlDesigner: Fix content library textures tooltip width
Width calculation didn't account for possible status text.

Change-Id: I58378a2dd185ea9ad47459ce107c1c227c2f6fd8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-07 14:24:47 +00:00
Miikka Heikkinen
9a55bb0fd0 QmlDesigner: Take content library texture metadata file in use
Metadata file texture_bundle.json will be included with bundle icons,
and it contains details about the texture (format, dimensions, and size)
that are useful to know before downloading the texture.

Metadata is used to generate proper tooltip for non-downloaded textures
in content library.

Also removed default suffix from displayed filename in case metadata is
missing, as it was misleading.

Fixes: QDS-9230
Change-Id: Icbe0bbb7f1e663e0adc41d379231b7f41dc79e31
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-06 12:22:54 +00:00
Samuel Ghinet
6c8d75e690 QmlDesigner: Fix textures becoming misaligned in a search
When doing a search, some textures appeared misaligned. This was caused
by the fact that the "invisible" (i.e. hidden) textures had their Image
set correctly as invisible but the delegate itself remained visible.

Task-number: QDS-9234
Change-Id: Ia2cd6f4f6795bb435567b8915e770b78461babed
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-23 09:55:00 +00:00
Samuel Ghinet
f45080e619 QmlDesigner: Don't show the context menu for not-downloaded textures
Task-number: QDS-9227
Change-Id: I1f0c147e2dfd69bee9da0872b15d796741b57609
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-21 12:41:46 +00:00
Samuel Ghinet
bf61be5cc0 QmlDesigner: Allow texture download only via left mouse button
Previously, the user would have downloaded the real texture even when
clicking with the right mouse button.

Task-number: QDS-9226
Change-Id: I4040cda4a8c541edc12b4bfe821a09c76eb7efc4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-02-21 12:38:48 +00:00
Samuel Ghinet
87f76d9bfa QmlDesigner: Fix downloading textures no longer working after some clicks
A "locking" mechanism was implemented to prevent multiple textures from
being downloaded at the same time. However, there was a mistake made,
which made it so that when a texture that had already been downloaded
was clicked again, this locking would be enforced and not released.

Also, fixed minor issues:
* The download button now has a black outline, so as to better
distinguish it inside black-and-white textures
* Canceling the download of a texture no longer marks the download as
failed -- it should show it as if the download was never attempted.
* Fixed tooltips not showing the texture size for downloaded textures
- and now we also update the tooltip text after the real texture has been
downloaded.
* Always creating the "target path" in the FileExtractor, if it does not
exist -- this is different from the "target folder" name, which is an
folder that can optionally be created inside this "target path"

Task-number: QDS-8664
Change-Id: Ieac0e81a5595a8bff3d1aa7ff6252e16c2509c2e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-21 11:47:01 +00:00
Samuel Ghinet
1a6cc6fa5e QmlDesigner: Make ContentLibrary textures downloadable
At this point the textures_bundle is still required, but only because
of the icons of the textures. Also, some changes should be done for the
visuals of the downloading.

Also, did a fix in FileDownloader: In case the URL given does not look
to be an image file, we should cancel the download instead of treating
it as a zip archive--it can be that eg we were redirected to a sign-in
page and we don't want to download the content of the page and save it
as a zip file.

Task-number: QDS-8664
Change-Id: Iec40e540c116030288df76e1922eab56ba323d1e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-20 12:28:44 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Mahmoud Badri
e4af787ff6 QmlDesigner: Add image info to content library texture tooltip
Fixes: QDS-8489
Change-Id: I1afbf91ad12839cc93a46f0a608ab3bda135b76b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-20 11:29:30 +00:00
Mahmoud Badri
d5a7f25e60 QmlDesigner: Implement content library view
Fixes: QDS-8058
Fixes: QDS-8059
Change-Id: I1adfdc7ac15141e010467813ec6e673060269241
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-08 10:04:43 +00:00