Commit graph

2372 commits

Author SHA1 Message Date
joeydelarago
ee7c8d1f02 Move creatFlattenedContainerInstnance into CuraStackBuilder so it can be reused.
CURA-9224
2022-09-05 10:42:48 +02:00
Jaime van Kessel
4b2d03fe1d
Don't show warning message if creating abstract printer failed 2022-09-05 10:27:03 +02:00
Remco Burema
afeec473f6 Small fixes (mostly QML warnings and the like).
done as part of CURA-9422
2022-08-31 14:15:05 +02:00
Remco Burema
4ea437ba28 Make send to DF in monitor for abstract printer work (again-ish).
Already moslty implemented, but a new approach of the base feature (abstract cloud printers) made a more? elegant and functioning implementation possible.

(re)implements CURA-9422
2022-08-31 14:13:47 +02:00
Jaime van Kessel
4c55befad7
Merge branch 'main' of github.com:Ultimaker/Cura into CURA-8463_cloud_configuration 2022-08-31 10:39:05 +02:00
Jaime van Kessel
506f2b9820
Remove code duplication in createAbstractMachine
This also caused a crash when an abstract machine with multiple extruders was selected

CURA-8463
2022-08-26 14:08:03 +02:00
Jaime van Kessel
46532828a4
Add logging for when setting the active machine failed
CURA-8463
2022-08-26 13:46:01 +02:00
Remco Burema
95f234679c Placeholder; the selected printer to monitor is abstract, but cloud-capable.
forms the base of CURA-9422
2022-08-26 13:10:09 +02:00
c.lamboo
f000b75661 Move getMachinesWithDefinition to MachinesManager
CURA-9514, CURA-9277
2022-08-26 11:16:10 +02:00
c.lamboo
8b84db7059 Remove AbstractMachine
Having a separate class for the AbstractMachine complicated things; it's behaviour was extremely similar to the GlobalStack so adding one more stack container type in addition to the many similar setting container types we already have adds complexity to the system. Having these different classes for machines and abstract machines also add complexity to the update script as the abstract machines were stored in a separate folder from the machine types.

Because of these reasons we decided to replace the AbstractMachine by a GlobalStack where the is_abstract_machine property metadata property is set to True.

CURA-9514, CURA-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-26 10:45:45 +02:00
joeydelarago
04580b8fdc Simplify logic by having abstract printers always be online.
CURA-9221
2022-08-24 14:33:04 +02:00
joeydelarago
b4e5fd8526 Remove debug statement
CURA-9514
2022-08-24 10:24:53 +02:00
joeydelarago
52b2a8322c Include LAN printers in abstract printers list
Make filtering clearer by splitting it up into multiple lines.

CURA-9514
2022-08-24 10:06:51 +02:00
joeydelarago
eea8935741 Set minimum width, so that drop down is still readable on small screens
CURA-9514
2022-08-23 16:20:04 +02:00
joeydelarago
93e2bef303 Group printers by section (Connected Printers/Other Printers)
Cleanup redundant code.

CURA-9514
2022-08-23 15:44:16 +02:00
joeydelarago
bedb76d516 Update comment
CURA-9514
2022-08-23 13:11:17 +02:00
joeydelarago
7ffa770fb4 Searching container registry returns ContainerStacks.
Made typing more generic to work with an ContainerStack to compensate.

Made AbstractMachine getMachines a classmethod so it can be called with ContainerStacks.

CURA-9514
2022-08-23 10:35:00 +02:00
Jelle Spijker
896cfb2a7e
Merge pull request #12989 from digitalfrost/090822b
CuraContainerStack.py: improve TypeIndexMap
2022-08-23 09:57:05 +02:00
joeydelarago
c80dd62169 Fix circular import.
CURA-9277
2022-08-22 16:34:18 +02:00
c.lamboo
5884aa3311 Add comment about circular import
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-22 15:03:48 +02:00
c.lamboo
f6bf7050fb Revert "Move cura-import to top of the file"
This reverts commit 5082e64f0c.
2022-08-22 15:01:51 +02:00
c.lamboo
5082e64f0c Move cura-import to top of the file
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-22 14:58:32 +02:00
Casper Lamboo
35502e45fa
Apply suggestions from code review
CURA-9277

Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
2022-08-22 14:48:04 +02:00
Casper Lamboo
5761b3f27b
Typing
CUR-9277

Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
2022-08-22 14:35:07 +02:00
Casper Lamboo
77a179be76
Code style
CURA-9277

Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
2022-08-22 14:32:59 +02:00
joeydelarago
d83673a972 Use ConnectionType enum
Move import statement

CURA-9277
2022-08-22 14:25:17 +02:00
c.lamboo
c4be0e298c Add mime type to AbstractMachine
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-22 11:57:18 +02:00
c.lamboo
963110a9c6 Remove Fix me
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-19 16:41:02 +02:00
c.lamboo
f22d446fa4 Implement getMachines function
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-19 16:35:13 +02:00
c.lamboo
d7f119415f Use pretty-printed string for the AbstractMachine name
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-19 16:35:00 +02:00
c.lamboo
761bf3b8fa Fix creating abstract machines on account sync
Cura-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
2022-08-19 14:44:19 +02:00
joeydelarago
b82f1f4a8c Add new Abstract machine stack type. This represents a type of printers (ultimaker_s3 etc).
These are created whenever a cloud printer of a new printer type is added.

CURA-9277

Co-authored-by: casperlamboo <c.lamboo@ultimaker.com>
2022-08-19 13:53:43 +02:00
digitalfrost
60c8712b10 CuraContainerStack.py: improve TypeIndexMap
Cleaner and more idiomatic way to reverse a dictionary
2022-08-09 11:42:18 +02:00
Ghostkeeper
bd131257fe
Implement sending a signal when changing intent changes quality level
For now it does nothing. But I'm adding a function that should cause the combobox to pulse. That'll be a new feature so I'm implementing it in a separate commit.

Contributes to issue CURA-8849.
2022-06-14 16:00:13 +02:00
j.delarago
a87695cd8d Added new intent selection buttons and resolution drop down to replace the matrix.
We are now selecting intents first and then quality, however the container hierarchy quality -> intents. This is the reason for the new functions inside machine manager.

CURA-8849
2022-06-14 11:41:38 +02:00
j.delarago
ed7ec6ab8f Add intent change signal so intent changes can trigger updates in resolution drop down.
CURA-8849
2022-06-14 09:59:22 +02:00
Ghostkeeper
4a08b88f31
Allow setting metadata subentries that don't exist yet
Otherwise it crashes here. The ContainerManager should be flexible enough to allow that sort of thing.
It works with plain entries, but crashed with subentries (like 'properties/diameter') if those weren't present yet in the metadata.

Fixes Sentry issue CURA-3FH.
2022-06-08 11:24:46 +02:00
Jaime van Kessel
e6551821aa Use intent category if no translation is available
Previously we would only accept intents that had a translation. If we
could not find one, we would use "unknown" as the intent category. However,
we didn't really do this consistently. In some places it would show unkown
and in others we'd show the intent type.

This should make the behavior the same across the board. It will try to get a
translation for the intent category and show that. If it's unable to find that
it will use the category instead. Note that it will use the python title function
to ensure it has nice capitalisation

CURA-9297
2022-06-01 11:07:01 +02:00
Ghostkeeper
d6bd7cce9e
Oops 2022-05-31 13:39:47 +02:00
Ghostkeeper
35147d7f5e
Don't crash if machine_extruder_trains metadata is missing
This old function is only necessary for upgrading from before v3.4. Best not let it crash in any other case, even if that would sometimes make very old machine instances corrupt if I made a mistake in thinking here.

Fixes Sentry issue CURA-3XG.
2022-05-31 11:24:08 +02:00
Jelle Spijker
334fca6691
Merge remote-tracking branch 'origin/gracefully_fail_cloud_printer' into 5.0 2022-05-09 10:54:07 +02:00
Jaime van Kessel
0c98ce2384 Use correct role for standardbutton
Otherwise the no won't register...

CURA-9229
2022-05-04 11:09:49 +02:00
Jaime van Kessel
e4e993a44e Fail gracefully when adding unknown cloud printer 2022-04-19 15:43:31 +02:00
Jaime van Kessel
c9e625767b Use right enum for message dialog 2022-04-13 16:40:14 +02:00
Jaime van Kessel
b4b7e6a2b9 Fix warnings that "instanceContainer" is not a recognised type 2022-03-31 14:03:04 +02:00
Jelle Spijker
12ee57e4ad
Merge branch 'master' into CURA-8640_PyQt6
# Conflicts:
#	cura/UI/CuraSplashScreen.py
2022-03-28 15:02:18 +02:00
Jaime van Kessel
1532779d1b Remove Extruders property from global stack
CURA-7810
2022-03-24 14:26:03 +01:00
Tim Kuipers
33e3a45b5c fixes for optional skirt_brim_extruder_nr 2022-03-16 11:31:40 +01:00
Tim Kuipers
2698cd76c5 make skirt_brim_extruder_nr an optional_extruder to allow for the brim_per_material feature 2022-03-16 11:31:40 +01: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