39 Commits

Author SHA1 Message Date
Jaime van Kessel
2c9f31cbde Remove unneeded signal connections 2021-10-08 13:50:21 +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
Ghostkeeper
c12817170c
Merge branch 'master' into CURA-6793_performance 2019-10-16 15:47:41 +02:00
Lipu Fei
d350c9e3d9 Update quality and intent models when extruders get changed
CURA-6894
2019-10-15 15:53:55 +02:00
Ghostkeeper
ce4c5a1c93
Remove unnecessary listening to switching extruder tabs
Also fix unnecessary emitting of switching extruder tabs.

This should improve performance a lot. I tested a lot of things and am convinced that it didn't break anything. But the automated GUI tests and QA team should be the final arbiters of that...

Contributes to issue CURA-6793.
2019-10-15 15:01:45 +02:00
Lipu Fei
1967dd8404 Fix code style
CURA-6840
2019-10-07 08:12:54 +02:00
Nino van Hooff
88e0a57374 Fix typing and deduplicate fetch_layer_height
CURA-6840
2019-10-04 13:25:58 +02:00
Lipu Fei
296f8af59c Always clear ListModel so layer height selector will align properly
CURA-6836
2019-10-01 16:15:36 +02:00
Ghostkeeper
2571f54d3c
Simplify looping over quality groups
Contributes to issue CURA-6600.
2019-09-18 14:01:23 +02:00
Jaime van Kessel
55a8d03d42
Fix typing error 2019-09-13 13:16:48 +02:00
Ghostkeeper
f4a2f3efa6
Emit activeStackChanged as documented when containers in the active stack change
This fixes updating the intent models when you switch nozzles. Among other things, probably.

Contributes to issue CURA-6600.
2019-09-12 17:27:30 +02:00
Ghostkeeper
603f18ebc9
No need to sort quality groups by type alphabetically
Like, it would put 'draft' first and 'verydraft' last. Just makes no sense. They have unique layer heights already.

Contributes to issue CURA-6600.
2019-09-12 16:44:40 +02:00
Ghostkeeper
7d49fd7fa2
Don't import type that's only used for type checking
Contributes to issue CURA-6600.
2019-09-12 16:15:03 +02:00
Ghostkeeper
b05de3e6d8
Remove unused import
Contributes to issue CURA-6600.
2019-09-02 16:48:01 +02:00
Ghostkeeper
3655981c41
Use container tree to get the current printer's quality groups
Contributes to issue CURA-6600.
2019-08-26 14:00:35 +02:00
Remco Burema
7fb9642e45 Replace deprecated .getContainer() calls with .container
part of CURA-6600
2019-08-15 13:40:08 +02:00
Ghostkeeper
fff26bb021
Fix imports and references to managers
Use getInstance() where applicable.

Contributes to issue CURA-6600.
2019-08-12 14:15:40 +02:00
Ghostkeeper
80e27b62d3
Don't cache singletons in constructor
It makes it harder to test these things.

Contributes to issue CURA-6600.
2019-08-09 15:53:08 +02:00
Ghostkeeper
709584cc5e
No longer listen to qualitiesChanged signal to update
It was only being called once upon initialisation. Turns out that this model updates itself properly only because the qualities don't change during runtime unless you change the active quality group (due to materials changing) or the printer itself.

Contributes to issue CURA-6600.
2019-08-09 15:14:52 +02:00
Jaime van Kessel
fc11286c6c Also ensure that the QualtiyProfilesModel is on a changeTimer on create 2019-02-21 18:38:51 +01:00
Jaime van Kessel
f627560751 Add timer to QualityProfilesDropdownMenuModel to prevent unneeded updates
It's the same old trick we've pulled off quite often, so this should be pretty safe
2018-12-21 17:12:07 +01:00
Lipu Fei
2c8ed99281 Add is_experimental to Qt models and QMLs
CURA-5879
2018-11-27 15:50:03 +01:00
Lipu Fei
ab572e9de2 SettingFunction evaluation needs a stack to provide values
Note that this is still not correct. When the value gets evaluated, we
need to evaluate it with that container in the stack(s), but this case,
the stack may have other containers, so the evaluation can give
incorrect values because its context is simply not correct. This change
only prevents it from breaking because it's missing a provider.
2018-09-03 14:03:46 +02:00
Ghostkeeper
6df029971d
Don't crash if layer height is a formula
We obtain the layer height here but that might be a formula so we should evaluate that formula here.

Fixes #4005.
2018-09-03 11:02:24 +02:00
Diego Prado Gesto
762a1b1bfd Fix code-style 2018-07-03 12:06:06 +02:00
Diego Prado Gesto
6e364f0895 CURA-5330 Fix typing and code-style in the ContainerNode and all the
related children, and QualityGroup and its children.
Also fix the related calls in the managers.
2018-06-13 10:55:57 +02:00
Diego Prado Gesto
5cd464c5de CURA-5330 Fix some typing issues in QualityProfilesDropDownMenuModel and
SettingInheritanceManager.
2018-06-12 16:35:46 +02:00
Diego Prado Gesto
2dfedf3ae4 CURA-5330 Add typing in CuraContainerRegistry and
QualityProfilesDropDownMenuModel
2018-06-08 17:02:59 +02:00
Ian Paschal
8db4396ee7
Merge pull request #3436 from Ultimaker/feature_enable_disable_extruder
CURA-4400 Feature enable disable extruder
2018-03-12 16:42:25 +01:00
Ghostkeeper
f08407cf97
Document Available role
Contributes to issue CURA-4606.
2018-03-12 16:32:10 +01:00
Jack Ha
81d036d5e4 Merge branch 'master' into feature_enable_disable_extruder 2018-03-12 15:15:27 +01:00
Ghostkeeper
bb7fccbd48
Add logging for every setting model update
You can clearly see that some models are updated 4 times or so now.

Contributes to issue CURA-4606.
2018-03-12 14:48:56 +01:00
Jack Ha
bad637eb14 CURA-4400 fixed merge conflicts 2018-03-05 16:47:40 +01:00
Lipu Fei
2255dc628b Remove unnecessary comments 2018-03-05 10:31:04 +01:00
Lipu Fei
b4deb3e828 Better logging in quality profile model 2018-03-05 10:23:36 +01:00
Lipu Fei
afae550b5a Store layer_height as float 2018-03-01 16:00:46 +01:00
Lipu Fei
e87077802f Change to layer_height and layer_height_unit 2018-03-01 15:55:44 +01:00
Lipu Fei
d1c518f6d7 Fix the usage of protected variables in quality models 2018-03-01 15:44:06 +01:00
Lipu Fei
06ec16d627 Rename quality drop down menu models 2018-03-01 15:37:48 +01:00