PrintSetupSelector.qml 1002 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.7
  4. import QtQuick.Controls 2.0
  5. import UM 1.3 as UM
  6. import Cura 1.0 as Cura
  7. Cura.ExpandableComponent
  8. {
  9. id: printSetupSelector
  10. property bool preSlicedData: PrintInformation.preSliced
  11. contentPadding: UM.Theme.getSize("default_lining").width
  12. contentHeaderTitle: catalog.i18nc("@label", "Print settings")
  13. enabled: !preSlicedData
  14. disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G code file can not be modified.")
  15. UM.I18nCatalog
  16. {
  17. id: catalog
  18. name: "cura"
  19. }
  20. headerItem: PrintSetupSelectorHeader {}
  21. property var extrudersModel: CuraApplication.getExtrudersModel()
  22. contentItem: PrintSetupSelectorContents {}
  23. onExpandedChanged: UM.Preferences.setValue("view/settings_visible", expanded)
  24. Component.onCompleted: expanded = UM.Preferences.getValue("view/settings_visible")
  25. }