68 Commits

Author SHA1 Message Date
Jaime van Kessel
3514c01b25 Remove duplicated code
CURA-9352
2022-06-17 15:21:30 +02:00
Remco Burema
6b04c736e9 Revert "Disable the material sync message again"
This reverts commit 1f6e1942d775d47dd48be4fd83c5346271827a5e.
2022-05-31 12:34:55 +02:00
Ghostkeeper
c7d7dd11d1
Merge branch 'master' into PyQt6_upgrade
Conflicts:
	cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
	plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
2022-02-21 11:52:28 +01:00
Ghostkeeper
f4d60b38ee
Shorten two texts of 'Sync materials with printers'
In most languages this doesn't properly fit in the space we have for these buttons.
The same text in the window title and header was not changed. There we do have space for it. The button in the material manager was also not adjusted since it's different and already about as short as can be (but needs to refer to printers instead of materials due to the context of already being in the material manager).

Contributes to issue CURA-8753.
2022-01-10 17:28:45 +01:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Jaime van Kessel
8f1cf4a963 Move openSYncAllWindow to the right class
CURA-8609
2021-10-28 09:43:12 +02:00
Jaime van Kessel
79117d5898 Fix merge mistakes
CURA-8609
2021-10-27 14:48:12 +02:00
Ghostkeeper
88d08b27d1
Merge branch 'master' into CURA-8609_sync_materials_to_printer
Conflicts:
	cura/Machines/Models/MaterialManagementModel.py -> On Master we had temporarily reverted the action of this button because it became apparent that the sync wasn't going to be in 4.12. That revert is no longer necessary if this is merged.
2021-10-27 14:21:05 +02:00
Ghostkeeper
273e933145
Reset sync status when closing and re-opening sync window
Otherwise when you want to sync again, it'll just say that you're done. Not what a user would expect, I reckon.

Contributes to issue CURA-8609.
2021-10-27 14:13:49 +02:00
Ghostkeeper
82441f97b1
Clarify context of error message for translators
This should improve the translation for next time.

Contributes to issue CURA-8638.
2021-10-25 15:22:28 +02:00
Jaime van Kessel
1f6e1942d7 Disable the material sync message again
CURA-8639
2021-10-21 10:39:47 +02:00
Ghostkeeper
4661b02e4c
Move code and status related to uploading materials to separate class
There's quite a lot of status to track, errors and progress. It's better kept separate.

Contributes to issue CURA-8609.
2021-10-12 09:43:21 +02:00
Ghostkeeper
c3d392c5cf
Show upload error or success in header once completed
According to the brand new design.

Contributes to issue CURA-8609.
2021-10-11 15:27:54 +02:00
Ghostkeeper
ffd3277854
Show error if the upload failed
Contributes to issue CURA-8609.
2021-10-11 14:57:21 +02:00
Ghostkeeper
e7b49ee551
Disable sync button while in progress
Need to show a bit more feedback I think. Let's see what the design said...

Contributes to issue CURA-8609.
2021-10-11 13:11:54 +02:00
Ghostkeeper
9729f4f3d2
Set properties immediately upon constructing
Instead of afterwards. A bit more efficient.

Contributes to issue CURA-8609.
2021-10-08 17:46:10 +02:00
Ghostkeeper
599c59bd3a
Add a background job to upload material archives
It creates the archive now. It doesn't yet upload it.

Contributes to issue CURA-8609.
2021-10-08 15:15:57 +02:00
Ghostkeeper
038db1fc4f
Implement functionality of export to USB button
It now creates a similar dialogue of what the old button did. The dialogue is no longer necessary in the materials page, so I've moved it to here specifically.

Contributes to issue CURA-8609.
2021-10-06 15:20:26 +02:00
Ghostkeeper
5db964aed1
Link opening sync all window to the button that should open it
This is a new button just merged in from the Master branch. With the window implemented, we can now properly open it.

Contributes to issue CURA-8609.
2021-10-06 14:25:12 +02:00
Ghostkeeper
b98da6b538
Merge branch 'master' into CURA-8609_sync_materials_to_printer
Conflicts:
	cura/Machines/Models/MaterialManagementModel.py -> Both master and my branch added an __init__ function. I merged the two __init__s to do both things that need to be done.
2021-10-06 14:22:18 +02:00
Konstantinos Karmas
e4f6c1a440 Fix typing
CURA-8254

Co-Authored-By: Jaime van Kessel <3922611+nallath@users.noreply.github.com>
2021-10-05 14:53:38 +02:00
Konstantinos Karmas
587421f97a Make the installed_packages private
CURA-8254
2021-10-05 14:51:14 +02:00
Ghostkeeper
f2aba01eff
Reset page index to 0 when re-opening sync dialogue
When the user previously opened the dialog and advanced through the pages, but closes the window, then they'll probably have to restart when they want to try it again.

Contributes to issue CURA-8609.
2021-10-05 14:00:15 +02:00
Konstantinos Karmas
cb4d5ce6e5 Update message text
CURA-8254
2021-10-05 13:11:52 +02:00
Konstantinos Karmas
bdbac23fdf Add comment
CURA-8254
2021-10-05 11:43:36 +02:00
Konstantinos Karmas
8157cedfef Show the message only if there are printers that support material export
If none of the user's printers support exporting materials to it, then the message should not be shown.

CURA-8254
2021-10-05 11:42:00 +02:00
Konstantinos Karmas
658e54c8e5 Simplify the check for new materials
If there is at least one material, we can already show the message without checking the rest of the installed packages.

CURA-8254
2021-10-05 11:36:10 +02:00
Konstantinos Karmas
5732fc2b51 Update campaign tags
CURA-8254
2021-10-04 17:05:36 +02:00
Konstantinos Karmas
ce34e16cdd Add documentation
CURA-8254
2021-10-04 16:47:48 +02:00
Konstantinos Karmas
4b7f385077 Add external link to "Learn more" action
CURA-8254
2021-10-04 16:43:17 +02:00
Ghostkeeper
9ec731eaf6
Create MaterialsSyncDialog from a Python function
Rather than from the QML.
This allows creating this dialogue from a message button without needing to put it in the base application.

Contributes to issue CURA-8609.
2021-10-04 16:23:28 +02:00
Konstantinos Karmas
1f5672acca Check if new materials were installed on initialization
When the MaterialManagementModel is initialized, it will check whether during this startup new materials were installed. If that's the case, then it will show the prompt message to sync those materials with the printers, which should initiate the sync materials flow.

CURA-8254
2021-10-04 15:55:06 +02:00
Ghostkeeper
43f1df1723
Show error when failing to save archive
It could be that you don't have permission to save the archive. Instead of crashing Cura, show an error to the user.

Fixes Sentry issue CURA-2VS.
2021-09-23 15:44:28 +02:00
Konstantinos Karmas
fe640d42cf Don't crash if a material fails to be written in the zip
This fixes Sentry issue CURA-2WS.
2021-09-21 09:33:30 +02:00
Ghostkeeper
a4f6e94ae0
Update the sync-storage path every time you sync
Instead of updating the storage path every time you add or remove a removable drive, we now update the storage path every time you press the button to sync. That way this detail has no impact on performance of other parts of Cura if they don't use this button. It also makes the code a bit simpler.
The only downside is that this FileDialog then contains state, instead of automatically syncing with the MaterialManagement property for its folder property. I see that as a lesser of two evils.

Contributes to issue CURA-8055.
2021-07-23 15:16:38 +02:00
Ghostkeeper
f82384d93c
Revert "Revert CURA-8055 in the 4.10 branch. This should not have been merged in there."
This reverts commit 4d29de45796dc42f76c774a216a0601bb57cf790.
Effectively this re-applies the changes for CURA-8055 / #9957.
2021-06-24 14:20:38 +02:00
Ghostkeeper
4d29de4579
Revert CURA-8055 in the 4.10 branch. This should not have been merged in there.
Revert "Change file extension to .umm"

This reverts commit 56db7f7144083df4bca77746d7ee30f2a54fda36.

Revert "Re-enable compression"

This reverts commit 62bc9be22bbc5595dbfce69893163c3a0ebc4415.

Revert "Add documentation"

This reverts commit e9031f1aff5d40f3c69ac625edf11963a3253eb8.

Revert "Fix writing bytes to string-stream"

This reverts commit 66b2825a667f9aa9618005d2a5875383a3658f4f.

Revert "Hide button entirely if no export is available"

This reverts commit ec727e1068c3ac2cab7f95fb88c5d4d101e28e17.

Revert "Basic implementation of exporting all materials in a .zip archive"

This reverts commit bdcaef134f556f455f352786123476ec40e3ae4c.

Revert "Implement default path for exporting all materials"

This reverts commit e66783664bf73dd9b1e3c6af6f01321763470d2e.

Revert "Implement a sync button and file dialogue to export all materials"

This reverts commit abba3bdd10a994a1b38bcb426a27ba379febeac7.

Revert "Add notion of whether printers support the material export archive"

This reverts commit f436cb8e7b879a8913b25f2a049413ec0721f1c5.
2021-06-24 14:15:54 +02:00
Ghostkeeper
62bc9be22b
Re-enable compression
I had disabled that in an attempt to fix the bytes-to-str conversion issue, but it turned out to not be the cause. Compression is fine.

Contributes to issue CURA-8055.
2021-06-09 17:14:46 +02:00
Ghostkeeper
e9031f1aff
Add documentation
Contributes to issue CURA-8055.
2021-06-09 17:10:31 +02:00
Ghostkeeper
66b2825a66
Fix writing bytes to string-stream
Don't open the file first. We can let the zipfile module handle that.

Contributes to issue CURA-8055.
2021-06-09 17:08:57 +02:00
Ghostkeeper
bdcaef134f
Basic implementation of exporting all materials in a .zip archive
It seems to complain about the data types though.

Contributes to issue CURA-8055.
2021-06-09 16:35:51 +02:00
Ghostkeeper
e66783664b
Implement default path for exporting all materials
It needs to be a removable drive if one is available, or else just the local file paths.

Contributes to issue CURA-8055.
2021-06-08 17:36:25 +02:00
Ghostkeeper
2f8f98fcca
Add a log entry for importing, duplicating or removing a material
We encountered an issue yesterday that we had to find in a log file when a user was importing a material. Nothing is shown in the log when importing a material, so it was impossible to find.
Now we'll log this action. It is a direct user action, so info is a good log level.
2021-06-04 02:51:13 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Jelle Spijker
120541a8db
Updated comments in Models
Converted doxygen style comments to reStructuredText style in the files
 found in Cura/cura/Model directory recursively  using the script
dox_2_rst.py (provided in the Uranium repo). Comments were manually
 checked and changed if needed.

 Note: dox_2rst.py struggles with decorated functions.
2020-05-08 18:59:38 +02:00
Lipu Fei
0af8bd5e94 Fix merge conflicts 2019-10-15 15:00:03 +02:00
Nino van Hooff
845cab5573 Clarified comment for duplicating materials 2019-10-15 14:37:37 +02:00
Lipu Fei
43fa4337f9 Fix merge conflicts 2019-10-15 13:08:00 +02:00
Lipu Fei
36aab5d56b Fix removeMaterials() and optimization
CURA-6886
2019-10-15 13:04:57 +02:00
Lipu Fei
dd8f6dc10e Fix ContainerTree reacting to duplicating materials
CURA-6863
2019-10-14 12:24:05 +02:00