When QDS starts for the first time, and there is no internet connection
(to download the materials bundle and the textures bundle), tell the
user that the problem might be the internet connection.
Task-number: QDS-9539
Change-Id: I81311bf00c830b76019e0edb53eeb980362a1339
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
When clicking outside any view that has sections and a section's
context-menu is visible, it is now closed.
Fixes: QDS-9564
Change-Id: I73cd3a9754c5a18360427525a2a943c2c549e83f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
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>
Section collapse all and expand all functionalities are controlled via
a singleton instance. Since multiple views are now sharing QML engine,
they also share this controller singleton. Therefore it is necessary
to allow user of the Section to specify which category the section
belongs to, so that invoking expand all from one view doesn't
expand sections in another view, but only sections in the same
category.
This also allows fine tuning which sections are grouped within a view,
which was not possible previously.
Fixes: QDS-9248
Change-Id: I0a1c870e6746580255a02f91d590eb80ce6ebcbe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For now changing the path triggers the "restart needed" dialog. Some
refactoring (for future) is needed to make the change works right away.
Also added few missing ContentLibraryBackend uses.
Fixes: QDS-9233
Change-Id: I3a576d397b0452a70d9940edaaa38193c41af347
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
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>
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>
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>
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>
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>
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>
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>
Also enabled the auto expand for textures and environments tabs
Fixes: QDS-8443
Change-Id: I190f919ccb2cff90c7cd151e65b77ebd52f0a87c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Changed resolving the currently active scene environment to be done
on demand instead of trying to track it realtime, since resolving it
is relatively cheap operation, so it doesn't cause noticeable delay
at context menu opening. The alternative would be to implement multiple
different notification handlers in ContentLibraryView, which would slow
down all operations and would be much more complex to ensure all edge
cases are covered.
Fixes: QDS-8437
Change-Id: Ib33cd1ad549d836b9d780f9b0f92e70d223e2a25
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>