Commit Graph

40 Commits

Author SHA1 Message Date
Alessandro Portale
c192536b64 Examples: Use theme colors for section separator + link
Change-Id: Ia5706dd81c0494f0a7c1a1df346918462b52ba53
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-02 09:23:41 +00:00
Eike Ziller
d42e48f424 Examples: Hide "Show All" link if items fit
It doesn't make sense to indicate to the user that there are more items,
if there aren't.

Change-Id: I80a3a113dc5f7aea693c054bb1755923cb02944c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-26 07:53:22 +00:00
Eike Ziller
ea5e78e822 Examples/Marketplace: Put separator into heading for expanded view too
Amends e596ee2b68

Change-Id: I888942bab2d330e8e8028e01017e7599a8fa567d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-26 07:53:08 +00:00
Eike Ziller
e596ee2b68 Examples/Marketplace: Put horizontal ruler into the heading
Avoid the separate line above the heading, which also doesn't
make much sense for the first item.

Change-Id: I2cb4aa270f805552215f4f3dc114103f9f3c313f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-21 12:17:45 +00:00
Eike Ziller
9650a2bded Examples: Limit categories to single row and allow showing all
Limit the items shown for categories to a single row (two rows for first,
"featured" category), and add a "Show All" link/button in the heading,
that shows all items in that category only (with a "Back" button).

The "Search in Examples" input ignores categories.

Change-Id: I7c8561a306ad86c3b537587621d3fd030cd08af8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 13:05:32 +00:00
Eike Ziller
3afe94777c Examples/Marketplace: Create grid view with all items on demand
No need to create that at startup.

Change-Id: Iff4cc634777fdd6cc9920a60e3260ee6d5a1a619
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-27 06:48:35 +00:00
Eike Ziller
a98c45f9ba Examples/Marketplace: Move ownership to the "all" products model
To allow the same item to appear in multiple categories.

Change-Id: Ib957b1fb0d98a28ceeb1d80e9fb497cc2a6b1f48
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-13 10:59:02 +00:00
Eike Ziller
4d71a24cb9 Welcome/Qt: Show featured examples in separate section
Task-number: QTCREATORBUG-28546
Change-Id: I9cf42cd11b442f720070c250da789d23001a1375
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 10:17:11 +00:00
Eike Ziller
6c6277bc7d ExamplesListModel: Remove direct access of model items variable
Change-Id: I8dc2833f61fe0267953acfa8746151cea893c7f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 10:16:46 +00:00
Eike Ziller
e3acf9262b Make categorized product/example view reusable
Extract a SectionedGridView from the SectionedProducts that are used in
the MarketPlace plugin, and make item delegate and pixmap fetching
function to be used with the model(s) pluggable.

Change-Id: I02aba87b27afd8ad18ff23346d1ac98da906db4b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 10:16:31 +00:00
Eike Ziller
aff6c4b2d2 Welcome: Remove requirement for subclassing ListModel
By using aggregation for the pixmap fetching.

Change-Id: I6647cc6fa7995581c692050af32e41ba9aa86491
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-18 08:42:16 +00:00
hjk
015b1ee53c Core: Tr::tr
Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-17 14:34:16 +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
Jarek Kobus
1f59f42287 Remove unused includes of QLayout
Change-Id: I12777e07f3d6fcc639b48f02080e73b1a0a3ea30
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:35 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
ca480ec601 Merge remote-tracking branch 'origin/7.0'
Change-Id: I9a7a9a5579f1f4e277e7927eefb1bab9ca60ad4a
2022-04-07 09:51:40 +02:00
Eike Ziller
4e59ca2bb5 Examples: Match tags case insensitively
Fixes: QTCREATORBUG-27339
Change-Id: I33a5726f9e1d66dafa876ec279f3c1ca939d964c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-04-06 12:53:46 +00:00
Eike Ziller
4cb04ad798 Merge remote-tracking branch 'origin/7.0'
Change-Id: If390b9264dba14c6c71752a0de84ab7ff881b2c5
2022-03-01 08:59:05 +01:00
Alessandro Portale
736cca6a40 Welcome: Fix issues with handling of mouse presses on tags
1) Handle all clicks anywhere on the item area. If a tag gets clicked,
   handle that, otherwise always open the item.

2) Ensure that m_currentTagRects is up-to-date. It sometimes contained
   the tag list of another item. Now it is handled in the same way as
   m_blurredThumbnail.

Task-number: QTCREATORBUG-27106
Change-Id: I394ceb55987f903d17254225b69cae347021f78c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-28 13:03:55 +00:00
Eike Ziller
fcb8d3b2a4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp

Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
2022-02-11 11:20:13 +01:00
Alessandro Portale
d84c5da4e9 Core: Limit rendering of tag rows in ListItemDelegate
Unlimited rows make the tags flow over the lower edge. Two rows should
be enough for proper tagging.

All tags are still used for searching, even if some are omitted in the
rendering.

Change-Id: Ia731031f362165c75ef5fa34a80200c85d2f93aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 08:41:50 +00:00
Eike Ziller
68fd73713b Merge remote-tracking branch 'origin/7.0'
Change-Id: I967615c66a11bb4823a6b403ca59e63dd1971032
2022-02-07 16:34:41 +01:00
Alessandro Portale
a8a1f036cd Core: Explicitly detach QPalette in WelcomePageHelpers
Workaround for QPalette behavior change Qt 6.2.2 -> 6.2.3

Task-number: QTBUG-100439
Fixes: QTCREATORBUG-26981
Change-Id: If28195023929baf7dfeb2b0196c8339b84658488
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:25:30 +00:00
Alessandro Portale
3740f04dd0 Core: Cleanup in ListItemDelegate::paint
Do some stuff only if animationProgress < 1.

Change-Id: Ib864cae64e8454ea7ad71f872d572a72d4e0c893
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-01 12:50:25 +00:00
Alessandro Portale
c9374b4d74 Core: Fix drawing of items without images
For items without images (e.g. Marketplace items during the loading
phase), the description text is drawn as fallback.

This change fixes the layout of the fallback text. Also, The drawing of
the hover effect is fixed by drawing a solid rectancgle instead of the
"blurred" image.

Fixes: QTCREATORBUG-26916
Change-Id: Icd1151d3b9412752a482abf869a2ec9ff5c3465e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-21 08:47:00 +00:00
Alessandro Portale
ebe5879723 Core: Fix redrawing of the current area in ListItemDelegate
If the ItemView is scrolled during the hover animation (e.g. via
mouse wheel), the previously stored Item QRect is not valid,
anymore.

Change-Id: I97b81cf063479a988221142474c9f511d02414d8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-21 08:46:53 +00:00
Christian Stenger
ca653a6a2c Core: Fix resetting animation timer on marketplace items
While the current animation is played other items may be painted
as well and will reset the animation what they should not.
Reset the animation hover timer only if it is the same
item we are hovering over.

Fixes: QTCREATORBUG-26908
Change-Id: I5fc55b5efb6f6b0db541604a92c7e4ddb8811336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-20 14:24:29 +00:00
Alessandro Portale
196aee97b1 Welcome: Unify design with Qt Design Studio
This applies the design of the new Welcome Screen for the Qt Design
Studio to the Welcome Screen of Qt Creator.

Change-Id: Id63283da1db43ac1036d371694cc2ea4a6de8d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-14 12:12:21 +00:00
Alessandro Portale
37e118b5ec Core: Base GridView on QListView (instead of on QTableView)
Use QListView with its very capable icon view mode instead of QTableView
in order to layout items in a grid.

This removes the need for the GridProxyModel.
It also leaves the previously self-implemented calculation of columns
count to QListView. Only the ProductGridView still needs to calculate
that.

Change-Id: If6e7f033fc78883930794c1e261aea396ae25190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-29 19:09:58 +00:00
Alessandro Portale
d7ed48ac6f Add missing "emit"s
Change-Id: I88a7397c7689b1e72cdd0e52077f8097443963c0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-11 14:10:42 +00:00
Alessandro Portale
edfdcd1a53 Core: Polish welcome screen grid hover animation
* Fix offset calculation (arrived at top in less than 200ms)
* Use "OutQuad" easing for the speed of the sliding text
* "Fade in" separator line and description during animation
* Animate covering of image by background color
* Draw rectangles with qdrawutil (fixes HighDpi)
* Change refresh timer from 5 to 10 ms

Change-Id: I53899227d875a3faf086ebc6b3d83e5eb9dcaa12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-24 09:37:39 +00:00
Eike Ziller
fee671dfbe Merge remote-tracking branch 'origin/4.14' into 4.15
Change-Id: Ifbfb495fff50b5bb27a12b204653cf1697820913
2021-03-05 17:18:43 +01:00
Alessandro Portale
011bc5ce33 Core: Hide the horizontal scrollbar in WelcomePage
The horizontal scrollbar appears with some certain window sizes. That is
most likely due to the column count calculation not taking the vertical
scroll bar width into consideration.

This change simply prevents the unneeded horizontal scrolbar from
sporadically popping up.

Change-Id: I2fb4aac0921f4a6627058d3e73af22c1fe6db3b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-05 08:34:34 +00:00
Eike Ziller
28f53a9040 macOS: Fix vanishing controls in Welcome mode with macOS dark mode
The example set selector and the search input field were missing some
palette tweaks that were done by other classes deriving from
WelcomePageFrame.

Fixes: QTCREATORBUG-25405
Change-Id: I43a022aa5464a1167f94d26e945de225a436b768
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-05 07:34:32 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Christian Stenger
0f502b0516 Core: Only act on left click on examples and the like
Change-Id: I4f676743851136d42ca87aa3f3bc49769ba86d56
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-07 05:04:38 +00:00
Christian Stenger
f05477dc39 Core: Propagate dataChanged signal
If the ListModel needs to emit dataChanged signals
ensure they will be handled correctly.

Change-Id: I2a543737ca442819fc4d3dead15108cb3a00765d
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-01-23 08:42:54 +00:00
Christian Stenger
5353532fa2 Core: Handle editor event only for real items
Rows which do not fill an entire row are treated
as if they contained empty placeholder items.
Do not try to handle these as the item data for
these will be a nullptr.

Change-Id: Ia9420aeafe3e2a0a3f7d29208ad21c81e52ac81a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-22 06:32:49 +00:00
Christian Stenger
f2351b06e0 QtSupport: Extract welcome page list model handling
...and move it to Core.
Preparation for easier re-usage to avoid re-implementing
the same more often.

Change-Id: I4c902e74e63dd5416f2a52b4b08900e28e2a052a
Reviewed-by: hjk <hjk@qt.io>
2020-01-20 12:27:05 +00:00
Christian Stenger
a7f55ff566 QtSupport: Extract and move welcomepage helper to Core
Change-Id: I32798e8f3b5cdef6e256de542714be80cc8aa9e3
Reviewed-by: hjk <hjk@qt.io>
2020-01-20 09:10:42 +00:00