587 Commits

Author SHA1 Message Date
Ghostkeeper
b7213ad020
Don't require material manager any more to find available materials
We have our container tree for that.

Contributes to issue CURA-6600.
2019-08-22 09:25:17 +02:00
Jaime van Kessel
80dd8a0061 Merge branch 'feature_intent_container_tree' of github.com:Ultimaker/Cura into feature_intent_container_tree 2019-08-21 09:43:04 +02:00
Jaime van Kessel
47d082b5dc Fix updating of material models
CURA-6600
2019-08-21 09:42:49 +02:00
ChrisTerBeke
a179d7118d Fix renaming mistake from 1fa5628cb2e35425d1b42f9dbb20a9bda45da032 2019-08-20 17:17:52 +02:00
Remco Burema
507cb356d2 Remove (all?, most?) deprecated ContainerNode.getMetaDataEntry calls.
part of CURA-6600
2019-08-20 15:38:45 +02:00
Ghostkeeper
46b489c3f9
getAvailableMaterialsForMachineExtruder can never return None
So no need to check for it.

Contributes to issue CURA-6600.
2019-08-19 17:32:39 +02:00
Ghostkeeper
5abb03e269
No longer update all material models when favourites change
The MaterialManager.materialsUpdated signal was only called once upon init and for the rest when a favourite was added or removed. So only the FavoriteMaterialsModel would need to listen to it.
Because the MaterialManager is being deprecated, the favourite materials model now just listens to the preferences changing instead, as it was supposed to be doing anyway.

Contributes to issue CURA-6600.
2019-08-19 17:09:16 +02:00
Jaime van Kessel
646222f2ac Fix removing of material
CURA-6600
2019-08-19 13:01:05 +02:00
Ghostkeeper
d4cd5a7ea5
Add convenience function to get quality groups for current printer
This is used very often all over the code.

Contributes to issue CURA-6600.
2019-08-15 17:01:22 +02:00
Ghostkeeper
3f944462ed
Use ContainerTree to get quality groups
Contributes to issue CURA-6600.
2019-08-15 17:01:22 +02:00
Ghostkeeper
ed19e9e15c
Use ContainerTree to find quality groups
Contributes to issue CURA-6600.
2019-08-15 17:01:22 +02:00
Remco Burema
7fb9642e45 Replace deprecated .getContainer() calls with .container
part of CURA-6600
2019-08-15 13:40:08 +02:00
Ghostkeeper
7d1f8e981b
Fix models using new MaterialNode class
The new one doesn't have getMetadata. Maybe we should allow it to have that actually.

Contributes to issue CURA-6600.
2019-08-13 17:20:58 +02:00
Ghostkeeper
6a8e1557c3
Merge branch 'feature_intent' into feature_intent_container_tree
Conflicts:
	.gitlab-ci.yml
	cura/Machines/MaterialManager.py
	cura/Machines/VariantManager.py
	cura/Settings/ContainerManager.py
	cura/Settings/MachineManager.py
	tests/TestMachineManager.py
2019-08-13 14:59:05 +02:00
Ghostkeeper
20201c65e6
Merge branch 'master' into feature_intent
Conflicts:
	resources/bundled_packages/cura.json -> 4.1 to 4.2 upgrade package added simultaneously
	tests/TestMachineManager.py -> Due to changes in conftest.py
	tests/conftest.py -> Simultaneously expanding the magic mocks to have some correct properties
2019-08-13 14:43:28 +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
Ghostkeeper
f65e672887
Don't get build plate variants from tree any more
It's not in that tree.

Contributes to issue CURA-6600.
2019-08-09 13:43:54 +02:00
ChrisTerBeke
1fa5628cb2 Rename output device to prevent inheritance naming confusion 2019-08-02 15:16:08 +02:00
ChrisTerBeke
1aa70748af Consistent naming, some bug fixes 2019-07-29 17:24:10 +02:00
ChrisTerBeke
ddd282eef3 Remove absolute plugin imports, some fixes 2019-07-29 16:11:01 +02:00
Lipu Fei
4e0b9d7b78 Fix typing
CURA-6597
2019-07-09 13:02:01 +02:00
Lipu Fei
8863516aa4 Rename function name and fix tests
CURA-6597
2019-07-09 12:53:44 +02:00
Lipu Fei
659a276f65 Rename signal
CURA-6597
2019-07-09 11:29:27 +02:00
Ghostkeeper
e2fd90506a
Include intent profiles from the default intents
If we have the default intent category, list all quality types available.

Contributes to issue CURA-6597.
2019-07-09 10:56:21 +02:00
Ghostkeeper
86750c0446
Don't continue after returning empty list
Oops. Shouldn't have pushed...

Contributes to issue CURA-6597.
2019-07-09 10:54:47 +02:00
Ghostkeeper
07c5c4d9f0
Return empty model if there is no printer added yet
Contributes to issue CURA-6597.
2019-07-09 10:26:49 +02:00
Ghostkeeper
45cb34c3e4
Refresh list of intents upon changing category
The category is changed after constructing by the QML code in order to set its property.
This is now updating twice: Once for the default category and once for the final one set by QML. This is a bit inefficient. But make it work before optimising it!

Contributes to issue CURA-6597.
2019-07-05 11:19:16 +02:00
Ghostkeeper
6e373e02c0
Update through self.setItems rather than super().update
Because super().update doesn't exist in this case. Stupid.

Contributes to issue CURA-6597.
2019-07-04 12:36:14 +02:00
Ghostkeeper
0047874f03
Get translation from list of keys rather than items
Because the category is not in a list of tuples. It's just the key of the dict.

Contributes to issue CURA-6597.
2019-07-04 12:35:11 +02:00
Ghostkeeper
a6e3828eaa
Efficiency: Don't update model if adding different container types
In fact we might want to delay updating until after the program has started up.

Contributes to issue CURA-6597.
2019-07-04 12:33:50 +02:00
Ghostkeeper
cf68157508
Fix updating upon containers or configuration changing
Copy-paste mistake...

Contributes to issue CURA-6597.
2019-07-04 12:29:02 +02:00
Ghostkeeper
bd2237dc45
Update intent categories upon adding containers or changing configuration
Also upon start-up.

Contributes to issue CURA-6597.
2019-07-04 11:31:59 +02:00
Ghostkeeper
6ba70f3425
Rewrite IntentModel to return quality types rather than actual profiles
We don't want the profiles, because that'd be specific to one extruder. We want the quality types and intent categories as tuples again.

Contributes to issue CURA-6597.
2019-07-04 11:04:44 +02:00
Ghostkeeper
3f29bce263
List intents per category
This is the naive one. We want to list the default intents multiple times, once for every quality level.

Contributes to issue CURA-6597.
2019-07-03 16:51:47 +02:00
Remco Burema
6b918dbd1d Fix typing in IntentCategoryModel. 2019-06-28 12:04:04 +02:00
Ghostkeeper
f339686c49
Implement category model
Not just pseudocode. However this code is not yet tested.

Contributes to issue CURA-6091.
2019-06-21 12:45:44 +02:00
Ghostkeeper
fa65875824
Add psuedocode/boilerplate for intent manager
This won't run. Don't try to import this class yet. It's outlining what we need to implement to get intents per stack.

It does no form of caching at this point. Build first, optimise later, right.

Contributes to issue CURA-6091.
2019-06-19 14:29:19 +02:00
Ghostkeeper
5ab1881a21
Merge branch 'master' into feature_intent
Conflicts:
	plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py -> There is a new version upgrade in master, so the old one is sort of obsolete. We may have to move this part to a new version upgrade for 4.3.
	plugins/VersionUpgrade/VersionUpgrade41to42/__init__.py
2019-06-19 13:10:36 +02:00
Jaime van Kessel
a98f88e6a3 Also move _getMachineTypeNameFromId to DiscoveredPrintersModel
As this is only used by that model, there is no point in keeping it in the machine manager
2019-06-07 15:04:19 +02:00
Jaime van Kessel
5eee3fc368 Move hasHumanReadableMachienTypeName to discovered printers 2019-06-07 15:01:30 +02:00
Jaime van Kessel
35ec70a3cf Add a selector for the intent profile
CURA-6534
2019-06-05 11:13:32 +02:00
Jaime van Kessel
2d8c19203e Expose intent model to QML
CURA-6534
2019-06-05 09:57:42 +02:00
Jaime van Kessel
2e7f8b066a Ensure that the intent model gets populated
CURA-6534
2019-06-04 17:32:11 +02:00
Jaime van Kessel
266cf52cbc Add stub for the IntentModel
CURA-6534
2019-06-04 17:24:34 +02:00
Lipu Fei
53d595f698 Use loader for machine actions in dialog
CURA-6495
2019-05-06 13:06:23 +02:00
Lipu Fei
7d4c821551 Prevent auto selecting an invalid printer
CURA-6483
2019-05-03 08:49:39 +02:00
Lipu Fei
1e89ce3673 Merge remote-tracking branch 'origin/4.1' into CURA-6483_fix_add_by_ip 2019-05-02 14:06:07 +02:00
Lipu Fei
5fee82bcb7 Fix machine settings page
CURA-6495
2019-05-02 09:46:00 +02:00