PrintSetupSelector.qml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. dragPreferencesNamePrefix: "view/settings"
  11. property bool preSlicedData: PrintInformation !== null && PrintInformation.preSliced
  12. contentPadding: UM.Theme.getSize("default_lining").width
  13. contentHeaderTitle: catalog.i18nc("@label", "Print settings")
  14. enabled: !preSlicedData
  15. disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
  16. UM.I18nCatalog
  17. {
  18. id: catalog
  19. name: "cura"
  20. }
  21. headerItem: PrintSetupSelectorHeader {}
  22. property var extrudersModel: CuraApplication.getExtrudersModel()
  23. contentItem: PrintSetupSelectorContents {}
  24. onExpandedChanged: UM.Preferences.setValue("view/settings_visible", expanded)
  25. Component.onCompleted: expanded = UM.Preferences.getValue("view/settings_visible")
  26. }