59 Commits

Author SHA1 Message Date
casper
9ba44f1d30 Move details plane caption to management page
This way the caption can be correctly aligned with the hamburger menu
button

CURA-8979
2022-03-10 10:15:31 +01:00
casper
f9a5cb33fd Implement basic styling of material management page
CURA-8979
2022-03-09 15:26:55 +01:00
casper
e03176a1fa Replace UM.MessageDialog with newly added Cura.MessageDialog
This dialog is different from the `UM.MessageDialog` in that it

CURA-8688
2022-02-23 14:09:38 +01:00
casper
99478d6a15 Add "Ok" button in export/import materials popup dialog
Proposed solution takes a different approach compared to the previous
solution. Previously there was one message dialog that was hidden by
default. When the import/export material confirm dialog was triggered
the text and body of this message dialog would change.

I did deviate from this pattern as this might introduce hard to debug
issues when a property would be set on this dialog. As this dialog is
used for various instances every instance should update the same
properties. If one property is missed then the popup might show unwanted
information.

I propose a different solution instead. Here a popup is created
dynamically. This way the properties used for each instance is clear.
This might add a delay when showing the popup as the whole component
needs to be created when called.

CURA-8959
2022-02-15 11:18:02 +01:00
Ghostkeeper
a03988d146
Replace MessageDialogs with new custom version
Changing a few fields.

Contributes to issue CURA-8687.
2022-02-04 14:38:25 +01:00
Ghostkeeper
6db4a55f6e
Merge branch 'replace_controls_1_for_controls_2' into CURA-8684_QtControls_replacement_Buttons,_Actions_&_'Exclusivity'
Conflicts:
	plugins/ImageReader/ConfigUI.qml
	plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml
	plugins/PerObjectSettingsTool/SettingPickDialog.qml
	resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml
	resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml
	resources/qml/Preferences/GeneralPage.qml
	resources/qml/Preferences/Materials/MaterialsPage.qml
	resources/qml/Preferences/Materials/MaterialsView.qml
	resources/qml/Preferences/ProfilesPage.qml

These conflicts are all arising from headers/includes being updated at the same time, or from the two branches marking the other one's components as needing OldControls.
This introduced more OldControls markers which don't get marked as merge conflicts by Git. This happens when an element could just be left as the original name but from the new import (e.g. a Button stays a Button in Controls 2, but should be marked as from OldControls on the branch that doesn't update the Button).
2022-01-31 16:53:45 +01:00
casper
3e98282871 Update material preferences page to QtControls 2
CURA-8684
2022-01-24 22:31:36 +01:00
Ghostkeeper
52f5b91621
Upgrade material list ScrollView to Controls2
Took some effort. This was a weird one. I had to manually set the contentHeight to the height of the contents. Perhaps the ScrollBar itself was messing with it?

Contributes to issue CURA-8686.
2022-01-18 19:01:22 +01: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
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
Ghostkeeper
1c78452d39
Add basis for a new material sync wizard
Just the set-up with a basic page to test the window with.

Contributes to issue CURA-8609.
2021-10-01 17:54:01 +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
56db7f7144
Change file extension to .umm
Because that's apparently what the firmware is looking for.

Contributes to issue CURA-8055.
2021-06-09 17:17:33 +02:00
Ghostkeeper
ec727e1068
Hide button entirely if no export is available
Not just disabling it.

Contributes to issue CURA-8055.
2021-06-09 16:42:37 +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
abba3bdd10
Implement a sync button and file dialogue to export all materials
Contributes to issue CURA-8055.
2021-06-08 16:57:24 +02:00
Konstantinos Karmas
504f6dbe70
Revert "Cura 7813 qml modules version bump" 2021-03-30 09:48:28 +02:00
jelle Spijker
9da321ffb9
Update Layouts, Control.Styles and Dialogs
CURA-7813
2021-03-29 18:04:47 +02:00
jelle Spijker
2986d50745
Update QtQuick and QtQuick.Controls
CURA-7813
2021-03-29 17:55:19 +02:00
Jaime van Kessel
a706b42782
Disable create & import on materialpage if machine does not support materials 2020-01-27 16:12:26 +01:00
Jaime van Kessel
e805c3db05
Ensure material is selected on first opening of material manager 2019-10-25 11:05:38 +02:00
Lipu Fei
38ee4bf208 Remove deprecated functions in MachineManager
CURA-6858
2019-10-22 14:11:40 +02:00
Jaime van Kessel
cadc145008
Prevent infinite recursion in material page if it could not be found 2019-10-08 16:49:54 +02:00
Ghostkeeper
21412986d3
Remove material manager from MaterialsPage
It is no longer used now that everything relevant has been moved to a separate class for this page specifically.

Contributes to issue CURA-6600.
2019-08-27 18:01:35 +02:00
Ghostkeeper
3952366798
Move createMaterial to MaterialManagementModel and simplify it a bit
We can reuse our duplicateMaterial function again but in a simpler way. Also finding the preferred material is simpler with our container tree.
However there seems to be a problem with finding the preferred material; it's not finding generic_pla for UM3 and AA0.4 anyway, and then falls back on a random material. This needs to be fixed in the variant node class.

Contributes to issue CURA-6600.
2019-08-27 17:21:22 +02:00
Ghostkeeper
1874a6453d
Move duplicateMaterial into MaterialManagementModel
To move away from the deprecated MaterialManager class.

Contributes to issue CURA-6600.
2019-08-27 17:21:21 +02:00
Ghostkeeper
8346e465f6
Turn MaterialManagementModel into a singleton
Just like MaterialManager used to be. There can be only one instance of the page then.
This prevents a crash when Qt deletes the QObject because it's no longer used in the page when you close the preferences screen. But when you open it again it doesn't construct a new one. Now there is always one instance so that's not a problem any more. Also it allows other pages to access this item.

Contributes to issue CURA-6600.
2019-08-27 15:47:41 +02:00
Ghostkeeper
3dc7c7b61c
Move removeMaterial to MaterialManagementModel
Moving away from the MaterialManager.

Contributes to issue CURA-6600.
2019-08-27 15:47:40 +02:00
Ghostkeeper
5b8ed91b04
Create new MaterialManagementModel and move canMaterialBeRemoved
Just like the QualityManagementModel, this class is intended to be used as proxy for the material management page in the preferences. I'm intending to move all relevant pyqtSlots from the material manager into this one. The advantage of this switch is that the material manager had no well-bounded scope and so tended to become a big mess of all sorts of functions. This one has a clear scope: serve as a proxy for the buttons you can press in the preferences screen for materials.

Contributes to issue CURA-6600.
2019-08-27 15:47:40 +02:00
Jaime van Kessel
8759aae73e Fix crash when materialManager could not be converted to QObject
No idea why this was causing issues, but this should also be a bit faster.

CURA-6600
2019-08-19 12:47:07 +02:00
Lipu Fei
2ce567ccfe Fix material current item reset
CURA-6679
2019-07-30 15:16:50 +02:00
Jaime van Kessel
914d2e98e9 Fix the disabling of the material setting fields.
This was caused by using 2 different modelsItems.
2019-07-30 11:29:49 +02:00
Ghostkeeper
18d1148c78
Don't reset selected material upon container changed
The onActiveMaterialChanged signal is triggered upon loading a material for the first time. This is hard to fix without breaking stuff, so we will revert this part.

This re-introduces a bug where if you change a material diameter such that the material disappears from the list, it is still selected and you can change its properties in the details panel.

Contributes to issue CURA-6679.
2019-07-24 17:01:37 +02:00
Ghostkeeper
be4e754984
Remove cache of material manager
It doesn't make the code much simpler because the cache is also not a local variable.

Contributes to issue CURA-6679.
2019-07-24 16:04:40 +02:00
Remco Burema
fea8262656 Listen to 'material-changed' since it doesn't update immediately.
part of CURA-6590
2019-07-03 16:14:08 +02:00
Jaime van Kessel
2cd6b73d12 Ensure that the material selection gets reset when diameter is changed
CURA-6590
2019-07-02 17:59:27 +02:00
Jaime van Kessel
99e6ec9509 Fix the last material qml warnings 2019-05-16 14:29:05 +02:00
Satish
3b4e253e98 Added ids to materials for squish tests
-Added a text property to MaterialsBrandSection
-Added ids to materials menu buttons
2019-05-07 12:37:42 +02:00
Jaime van Kessel
c3a373e2a2 Remove usages of deprecated activeMachineName 2019-05-03 13:38:06 +02:00
Jaime van Kessel
d42f446d70 Remove usages of deprecated function 2019-05-03 13:17:10 +02:00
Ghostkeeper
c79ffab9fb
Merge branch '4.0' 2019-03-18 11:24:23 +01:00
Jaime van Kessel
8b3290fb1e Prevent the deletion of materials that are still active 2019-03-14 10:50:53 +01:00
Diego Prado Gesto
fa39ba9132 Fix typo. Remove parenthesis. 2018-11-19 16:37:12 +01:00
Diego Prado Gesto
df38e7db85 Do not allow the user to activate a material if the printer is not
defined to have materials.

Contributes to #4550.
2018-11-19 16:31:15 +01:00
Diego Prado Gesto
6c9c68e004 Active the focus when the selected item changes.
In this case, if the user was updating some information in one material
and then select other material, the new data is stored.

Contributes to CURA-5682.
2018-09-17 14:41:45 +02:00
Diego Prado Gesto
bafc2b98c9 Reuse MaterialBrandSection component for Favorites, Generic and branded
materials.

This component will show different children depending on the
hasMaterialTypes flag.

Adjust some small UI issues.

Contributes to CURA-5682.
2018-09-17 12:08:41 +02:00
Diego Prado Gesto
6dc53cc60a Select the next selected material when it is activated or removed.
Contributes to CURA-5682.
2018-09-12 18:39:19 +02:00