2287 Commits

Author SHA1 Message Date
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
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
3534894eeb
Don't mark interface extruder as used when there are none
If there are 0 interface layers, the extruder doesn't necessarily gets used.

Contributes to issue CURA-8915.
2022-02-03 15:59:21 +01:00
Ghostkeeper
403d92a760
Fix getting used and starting extruders with new adhesion extruder settings
Getting more involved than I thought. But it's not complex yet.

Contributes to issue CURA-8868.
2022-01-12 14:29:01 +01:00
Ghostkeeper
ab0c03cf65
Catch KeyError['empty_material'] when evaluating whether there's any profiles
This is currently only used in the pre-read of workspaces. In some cases, the project file may have a material that is not compatible with its own stack using the current rules in Cura, either because the rules changed or because the project file is wrongly crafted/edited. This causes Cura to say there are no quality profiles if the material profile is not compatible with the printer, preventing a crash due to the KeyError.
2022-01-05 10:26:28 +01:00
Remco Burema
6586bcc762
Qt5->Qt6: Fix cause of stack-overflow errors for newer Python/Qt.
part of CURA-8591
2021-12-29 09:23:11 +01:00
Remco Burema
b62e708b87
Qt5->Qt6: (Until) attempted fix Python 3.10 'stack overflow' issue.
part of CURA-8591
2021-12-28 18:12:36 +01:00
Remco Burema
32b52c6166
Qt5->Qt6: Rectify constant locations: UserRole, CppOwnership
part of CURA-8591
2021-12-28 14:54:56 +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
998ba3631c Add missing format to error log 2021-12-15 12:03:55 +01:00
fieldOfView
19dbd1f168 Merge branch 'master' into feature_extruder_warning_icon 2021-11-16 14:56:43 +01:00
Ghostkeeper
ca942a15e8
Don't use infinite lifetimes lightly
This is very annoying if switching profiles. This is not a critical message. The message should disappear after the default amount of time.

Discovered while working on CURA-8584.
2021-11-09 14:45:40 +01:00
Jaime van Kessel
c7c052e51c Fix crash when profile referenced unavailable extruder
CURA-8584
2021-11-05 15:50:24 +01:00
Jaime van Kessel
285a4584e7 Improve speed of the inherit button
A few unneeded conversions were done. Also moved one check to python from JS
2021-10-08 18:12:35 +02:00
Jaime van Kessel
e88ac49fd6 Add global & extruder stack to ignore list for name filters
This prevents the weird spam about "global_stack" not being a plugin ID
2021-09-27 13:41:53 +02:00
Ghostkeeper
58f4d44694
Don't crash when switching to printer with fewer extruders
This seems to have happened with an UM2+C.

Fixes Sentry issue CURA-2R5.
2021-09-21 13:40:40 +02:00
Remco Burema
b2eae08cc7
Merge pull request #10327 from Ultimaker/CURA-6096_profile_database
Store metadata in database
2021-09-09 17:29:40 +02:00
Ghostkeeper
034f62ea2c
Match table name with container type
The table name is used as the container type in the resulting metadata, so we need to use the container type string as table name correctly, or none of the profiles can be found.

Contributes to issue CURA-6096.
2021-09-08 16:40:22 +02:00
Ghostkeeper
057ba8cdeb
Fix setting container type of subclasses
This mistake caused all of the container types to end up as either None or the actual instance itself, which was causing crashes.

Contributes to issue CURA-6096.
2021-09-08 15:46:25 +02:00
Ghostkeeper
adac0af1ec
Revert "Use SQLQueryFactory for container DB"
This reverts commit 571a051041b7c126ca942055961c7714312a967f.
2021-09-08 15:10:32 +02:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
jelle Spijker
571a051041
Use SQLQueryFactory for container DB
Needed to add a Filter possibility to facilitate that
Created a Simple UserString class which can be used as:

```py
        sql_filter = SQLFilter(f"SELECT {{}} FROM table_name WHERE id = ?")
        cursor.execute(sql_filter)  # Will execute: SELECT * FROM table_name WHERE id = ?
        cursor.execute(sql_filter["id", "name"])  # Will execute: SELECT id, name FROM table_name WHERE id = ?

```

Contributes to CURA-6096
2021-09-02 16:55:24 +02:00
jelle Spijker
4067d9d607
Fixed typing
Contributes to CURA-6096
2021-09-02 10:17:40 +02:00
jelle Spijker
f80e1ec279
Updated documentation
Contributes to CURA-6096
2021-09-01 18:58:03 +02:00
jelle Spijker
7aa08d4acd
Use a class to build to sql queries
This greatly reduced the amount of duplicate code in the DataBaseHandlers
Not sure how secure this is SQL injections. Need to check that and maybe
put in some guards. Using double underscores for now and only provide a
getter. But then again why bother with an SQL injection as
you can just as easily modify the Python code, and we still have the old
Containers to fallback to if the Database gets corrupted.

Contributes to CURA-6096
2021-09-01 16:58:48 +02:00
Jaime van Kessel
3191baf5a0 Add delete to handlers
CURA-6096
2021-08-27 14:36:04 +02:00
Jaime van Kessel
55d6ff0e61 Clean up formating of the insert queries
CURA-6096
2021-08-25 13:58:11 +02:00
Jaime van Kessel
132b863e13 Add update queries for variant, intent & qualit DB handlers
CURA-6096
2021-08-25 13:48:25 +02:00
fieldOfView
96a1019f1e Merge branch 'master' into feature_extruder_warning_icon 2021-08-24 17:39:28 +02:00
Jaime van Kessel
2bef85c6c2 Remove weird whitespace
CURA-6096
2021-08-24 14:45:52 +02:00
Jaime van Kessel
e0e8223c5d Move DB handling into specialised classes
This keeps CuraContainerRegistry a lot cleaner, especially when more container types are
added

Cura-6096
2021-08-20 15:40:50 +02:00
Jaime van Kessel
27f0fe8bb9 Ensure that all metadata of profiles is stored
CURA-6096
2021-08-20 14:40:55 +02:00
Jaime van Kessel
6f32809a3a Prepare the inserts before actually doing them
CURA-6096
2021-08-20 13:09:40 +02:00
Jaime van Kessel
5311c949f0 Add variants to the database
CURA-6096
2021-08-20 11:05:37 +02:00
Jaime van Kessel
48ab21ac68 Add functions to get & add variants & qualities from DB
CURA-6096
2021-08-20 10:17:57 +02:00
Jaime van Kessel
3f80fcb5e5 Add first stub for profile database
CURA-6096
2021-08-19 15:20:20 +02:00
Jelle Spijker
2263969d5f
Updated message with message types
Contributes to CURA-8418
2021-07-28 08:45:42 +02:00