Commit graph

8923 commits

Author SHA1 Message Date
Ghostkeeper
f14a512718
Use ListView instead of Column
The ListView works in mostly the same way, except it loads its contents asynchronously as they come into view.

Contributes to issue CURA-8556.
2021-10-25 16:17:23 +02:00
Ghostkeeper
6b6b6f613f
Remove superfluous pyqtSlot marking
This can already be set via the isLoading property. What's more, it really only ever needs to be called from Python. I just added the fset because we have the setter anyway.

Contributes to issue CURA-8556.
2021-10-25 15:43:41 +02:00
Ghostkeeper
476321be5c
Remove log entry for when Marketplace QML fails to load
This is already logged with a warning by the QML engine.

Contributes to issue CURA-8556.
2021-10-25 15:38:54 +02:00
Ghostkeeper
77d1bebbdb
Put PackageList in Marketplace namespace
This way it's not available to the rest of Cura, especially since PackageList is not such an uncommon name. It could give name collisions. Moreover, the rest of Cura doesn't need to have a list of packages from the Marketplace, so it's better separation.

Contributes to issue CURA-8556.
2021-10-25 15:35:28 +02:00
Jaime van Kessel
43b8476572 Remove unneeded parenthesis
CURA-8556
2021-10-25 10:38:36 +02:00
Jaime van Kessel
37ccf5b823 Add missing return types on init
CURA-8556
2021-10-25 10:37:02 +02:00
Ghostkeeper
daf450142b
Implement error handling and showing error state
If an error occurs, the error message is stored in the list model, so that it can be shown with the list.

Contributes to issue CURA-8556.
2021-10-25 01:56:57 +02:00
Ghostkeeper
bca2f36186
Use states rather than individually switching properties
This is necessary because we'll add a fourth state here: An error state. This would get quite complex otherwise.

Contributes to issue CURA-8556.
2021-10-25 01:28:37 +02:00
Ghostkeeper
1ab677f5dd
Add state for when it's loading
This has a slight bug in that the icon will immediately change to an arrow once loading has completed, but will slowly rotate back to angle 0. You don't see this, since the new plug-ins will come in between. The new plug-ins will always be a full page, or otherwise the icon disappears altogether and it's not visible anyway. But if you hold down the scrollbar while loading and quickly scroll down when loading completed, you can see this happen. I don't think anyone will really mind though.

Contributes to issue CURA-8556.
2021-10-21 18:37:02 +02:00
Ghostkeeper
e3cd5606f0
Make load more button load more packages
This adds the functionality of the button.

Contributes to issue CURA-8556.
2021-10-21 18:26:29 +02:00
Ghostkeeper
46ad1ad077
Add disabled state for load more button
Can't click on the button then.

Contributes to issue CURA-8556.
2021-10-21 18:25:33 +02:00
Ghostkeeper
8776294932
Set loading state to False once parsing has completed
This allows the user to request the next one.

Contributes to issue CURA-8556.
2021-10-21 18:23:19 +02:00
Ghostkeeper
35ec8f7190
Add basic layout for button to load more packages
Contributes to issue CURA-8556.
2021-10-21 18:06:52 +02:00
Ghostkeeper
27da03d862
Add a property to see whether there are any more packages to load
Contributes to issue CURA-8556.
2021-10-21 17:10:32 +02:00
Ghostkeeper
1320d8c9f4
Add a simplistic design for a card for each package
It just displays the package name for now.

Contributes to issue CURA-8556.
2021-10-21 17:09:12 +02:00
Ghostkeeper
031c8efbe6
Implement pagination for package list
The simplest way I can think of.
Currently we only call the request function once, so we can only get the first page. Before calling it multiple times, we should check if there are more pages by checking if the request URL is an empty string.

Contributes to issue CURA-8556.
2021-10-21 16:56:53 +02:00
Ghostkeeper
b585c02207
Add background to page content, and restructure margins
To display the background across the entire bottom side and not with the margins of the column, we have to restructure where the margins are a bit.

Contributes to issue CURA-8556.
2021-10-21 16:35:54 +02:00
Ghostkeeper
38038b3752
Store items directly in listModel when parsing them
No need to use a custom list in Python and update the ListModel from that. This is much simpler and more efficient.

Contributes to issue CURA-8556.
2021-10-21 16:10:23 +02:00
Ghostkeeper
6415a2649e
Parse responses from package API call
Only positive responses so far. Error handling is not implemented yet.

Contributes to issue CURA-8556.
2021-10-21 16:02:46 +02:00
Ghostkeeper
3138452f94
Allow PackageList to be used as a model from QML
QML is leading here and holding the pointers for creation and destruction.

Contributes to issue CURA-8556.
2021-10-21 15:46:46 +02:00
Ghostkeeper
4337e81b77
Make request to Marketplace API when package list loads
We don't parse the response just yet, but this is part of the work.

Contributes to issue CURA-8556.
2021-10-21 15:33:37 +02:00
Jaime van Kessel
00a01569be Add clarifying comment to pause at height
It was a bit confusing what was happening, so i've added an extra comment to clarify
what was going on.

CURA-7292
2021-10-21 15:30:32 +02:00
Jaime van Kessel
bf2b42b0b8 Add clarifying comment to pause at height
It was a bit confusing what was happening, so i've added an extra comment to clarify
what was going on.

CURA-7292
2021-10-21 15:29:21 +02:00
Ghostkeeper
5851ad52c6
Add property to tell if the list is currently loading or loading more
We'll need to display a spinner of some kind in the front-end, I think.

Contributes to issue CURA-8556.
2021-10-21 15:15:56 +02:00
Ghostkeeper
0f5c923d93
Add model to represent packages and export information to QML
We'll construct a bunch of these when we receive information from the API.

Contributes to issue CURA-8556.
2021-10-21 15:03:41 +02:00
Remco Burema
86046a32b3
Merge branch 'master' into merge_main_20211019 2021-10-20 08:38:01 +02:00
Ghostkeeper
cf2b0d2777
Add empty ListModel to store list of packages with
This model does nothing yet.

Contributes to issue CURA-8556.
2021-10-19 17:48:21 +02:00
Ghostkeeper
ffce865c85
Add constant for API URLs
I figured this out now. Don't want to forget it. We'll need it later anyway.

Contributes to issue CURA-8556.
2021-10-19 17:47:40 +02:00
Ghostkeeper
97edf59660
High-level layout of Marketplace window
Currently just a title and a page. The title is separate because in between there will be the tabs selecting which page is shown. The title will also change depending on that, but that'll have to be implemented separately. The page is loaded with a loader to make it efficient, and also to make it extensible when the tabs get implemented in a follow-up ticket.

Contributes to issue CURA-8556.
2021-10-19 16:50:57 +02:00
Ghostkeeper
c35b1f4135
Bring window into focus when it opens
It can be behind the Cura main window now, where the user won't see it if it was already open.

Contributes to issue CURA-8556.
2021-10-19 13:45:25 +02:00
Ghostkeeper
5897b3de38
Add function to open Marketplace window
This will now load in a QML file, cache it, and create an empty window with the title 'Marketplace'.

Contributes to issue CURA-8556.
2021-10-19 13:43:41 +02:00
Ghostkeeper
73ad2a4e08
Add Marketplace plug-in, starting a rewrite from the Toolbox
This plug-in will be a complete re-write of the previous Toolbox plug-in. It's intended to solve some of the inherent architectural problems with the Toolbox.
We're calling it Marketplace now as well.

Contributes to issue CURA-8556.
2021-10-19 13:06:04 +02:00
Jelle Spijker
666880ad20
Only show certain App Switcher icons when account has DF access
Added a dictionary where additional user rights can be set.
A plugin such as the DigitalFactory can update this dictionary
if certain account rights change. The `account.additionalRights`
is intended to allow us some flexibility, without breaking the API
in the future.

The Application Switcher now queries the additional account rights,
which is updated by the DF plugin to only show `My printers`,
`Digital Library` and `Print jobs` when the user has access to the
DF.

Contributes to CURA-8624
2021-10-18 15:37:06 +02:00
Ghostkeeper
0d350b5f96
Merge branch '4.12' into CURA-8609_sync_materials_to_printer 2021-10-18 13:23:29 +02:00
Ghostkeeper
5ed57e403c
Delete existing log-in information to force the user to log in again
Otherwise they won't be able to sync material profiles.

Contributes to issue CURA-8609.
2021-10-18 13:17:22 +02:00
Ghostkeeper
a349606fef
Make my name more anonymous
Yes, it's my name. I'm okay with people learning that if they are really looking. I'm less okay with search engines learning that. Removing my name here linked to my nickname will eventually cause search engines to unlink it too.
2021-10-16 11:45:48 +02:00
legend069
3b639d2119 Update ChangeAtZ.py
updated, as suggested by
https://github.com/Ultimaker/Cura/pull/10554#issuecomment-939812755
2021-10-11 19:57:42 +11:00
Konstantinos Karmas
4759007ed8
Merge pull request #10580 from Ultimaker/CURA-8443_Add_sign_in_status_datapoint
CURA-8443: Add is_logged_in status datapoint
2021-10-11 10:01:52 +02:00
Ghostkeeper
8234276204
Add log entry when syncing with cloud printers
Not only do I now have an interface where the user doesn't get any feedback when syncing happens, but even in the log there was nothing shown when it happens.

Contributes to issue CURA-8609.
2021-10-08 14:13:54 +02:00
Ghostkeeper
93953630ec
Update online status when updating account printer status
This updates the metadata entries. Naturally this updates every 60 seconds in Cura, but it could also manually be triggered by the refresh button.

Contributes to issue CURA-8609.
2021-10-08 14:08:02 +02:00
Jaime van Kessel
7d9c6e1449 Fix QML warning 2021-10-08 13:35:01 +02:00
Konstantinos Karmas
6a1f09def0 Add is_logged_in status datapoint
CURA-8443
2021-10-06 16:19:31 +02:00
Jelle Spijker
8466a291fd
Merge pull request #10547 from Ultimaker/CURA-8601_update_connect_to_cloud_popup
Update connect to cloud popup
2021-10-05 14:44:12 +02:00
Jelle Spijker
501b4c4fde
Spaces around assignment operator
According to UM codestyle

Contributes to CURA-8601
2021-10-05 13:54:13 +02:00
Jaime van Kessel
527de2b6ef Use image instead of custom message type
CURA-8601
2021-10-05 10:20:52 +02:00
Ghostkeeper
9e1dc98cd1
Catch environment errors when reading license file from package
The package may be inaccessible for whatever reason, which would crash Cura.

New attempt to fix CURA-2RP (without breaking the unit test saying that this error should be raised by Uranium then).
2021-10-04 14:31:25 +02:00
legend069
35dd43675c Update ChangeAtZ.py
fixed typos and the gcode insert makes it easier to find for others "changeatz"
2021-10-03 20:00:08 +11:00
legend069
4508f60ce5 Update ChangeAtZ.py
PR
2021-10-03 19:43:50 +11:00
Jaime van Kessel
dc7a45eacf Remove cloud-flow-start icon
It wasn't used anymore

CURA-8601
2021-10-01 16:51:39 +02:00
Jaime van Kessel
6bc9aaa4bf Add message type to cloud
CURA-8601
2021-10-01 11:54:27 +02:00