mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Merge branch 'cura4.0_header' into cura4.0_action_panel
This commit is contained in:
commit
c08a90faac
134 changed files with 14803 additions and 11458 deletions
|
@ -165,6 +165,7 @@ Item
|
|||
id: manageMaterialsAction
|
||||
text: catalog.i18nc("@action:inmenu", "Manage Materials...")
|
||||
iconName: "configure"
|
||||
shortcut: "Ctrl+K"
|
||||
}
|
||||
|
||||
Action
|
||||
|
@ -179,7 +180,7 @@ Item
|
|||
{
|
||||
id: resetProfileAction;
|
||||
enabled: Cura.MachineManager.hasUserSettings
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile","&Discard current changes");
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile", "&Discard current changes");
|
||||
onTriggered:
|
||||
{
|
||||
forceActiveFocus();
|
||||
|
@ -191,20 +192,21 @@ Item
|
|||
{
|
||||
id: addProfileAction;
|
||||
enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile","&Create profile from current settings/overrides...");
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile", "&Create profile from current settings/overrides...");
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: manageProfilesAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile","Manage Profiles...");
|
||||
iconName: "configure";
|
||||
id: manageProfilesAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile", "Manage Profiles...")
|
||||
iconName: "configure"
|
||||
shortcut: "Ctrl+J"
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: documentationAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:help","Show Online &Documentation");
|
||||
text: catalog.i18nc("@action:inmenu menubar:help", "Show Online &Documentation");
|
||||
iconName: "help-contents";
|
||||
shortcut: StandardKey.Help;
|
||||
onTriggered: CuraActions.openDocumentation();
|
||||
|
@ -212,7 +214,7 @@ Item
|
|||
|
||||
Action {
|
||||
id: reportBugAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:help","Report a &Bug");
|
||||
text: catalog.i18nc("@action:inmenu menubar:help", "Report a &Bug");
|
||||
iconName: "tools-report-bug";
|
||||
onTriggered: CuraActions.openBugReportPage();
|
||||
}
|
||||
|
@ -220,7 +222,7 @@ Item
|
|||
Action
|
||||
{
|
||||
id: aboutAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:help","About...");
|
||||
text: catalog.i18nc("@action:inmenu menubar:help", "About...");
|
||||
iconName: "help-about";
|
||||
}
|
||||
|
||||
|
@ -410,7 +412,7 @@ Item
|
|||
Action
|
||||
{
|
||||
id: browsePackagesAction
|
||||
text: catalog.i18nc("@action:menu", "Browse packages...")
|
||||
text: catalog.i18nc("@action:menu", "&Marketplace")
|
||||
iconName: "plugins_browse"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,10 +45,46 @@ UM.Dialog
|
|||
}
|
||||
|
||||
signal machineAdded(string id)
|
||||
|
||||
function getMachineName()
|
||||
{
|
||||
var name = machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).name : ""
|
||||
return name
|
||||
return machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).name : "";
|
||||
}
|
||||
|
||||
function getMachineMetaDataEntry(key)
|
||||
{
|
||||
var metadata = machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).metadata : undefined;
|
||||
if (metadata)
|
||||
{
|
||||
return metadata[key];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
Label {
|
||||
id: titleLabel
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
topMargin: UM.Theme.getSize("default_margin")
|
||||
}
|
||||
text: catalog.i18nc("@title:tab", "Add a printer to Cura")
|
||||
|
||||
font.pointSize: 18
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: captionLabel
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
top: titleLabel.bottom
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
text: catalog.i18nc("@title:tab", "Select the printer you want to use from the list below.\n\nIf your printer is not in the list, use the \"Custom FFF Printer\" from the \"Custom\" category and adjust the settings to match your printer in the next dialog.")
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
ScrollView
|
||||
|
@ -57,13 +93,21 @@ UM.Dialog
|
|||
|
||||
anchors
|
||||
{
|
||||
left: parent.left;
|
||||
top: parent.top;
|
||||
right: parent.right;
|
||||
bottom: machineNameRow.top;
|
||||
top: captionLabel.visible ? captionLabel.bottom : parent.top;
|
||||
topMargin: captionLabel.visible ? UM.Theme.getSize("default_margin").height : 0;
|
||||
bottom: addPrinterButton.top;
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
|
||||
width: Math.round(parent.width * 0.45)
|
||||
|
||||
frameVisible: true;
|
||||
Rectangle {
|
||||
parent: viewport
|
||||
anchors.fill: parent
|
||||
color: palette.light
|
||||
}
|
||||
|
||||
ListView
|
||||
{
|
||||
id: machineList
|
||||
|
@ -184,32 +228,76 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
Row
|
||||
Column
|
||||
{
|
||||
id: machineNameRow
|
||||
anchors.bottom:parent.bottom
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label
|
||||
anchors
|
||||
{
|
||||
text: catalog.i18nc("@label", "Printer Name:")
|
||||
anchors.verticalCenter: machineName.verticalCenter
|
||||
top: machinesHolder.top
|
||||
left: machinesHolder.right
|
||||
right: parent.right
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
TextField
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
Label
|
||||
{
|
||||
id: machineName
|
||||
width: parent.width
|
||||
wrapMode: Text.WordWrap
|
||||
text: getMachineName()
|
||||
implicitWidth: UM.Theme.getSize("standard_list_input").width
|
||||
maximumLength: 40
|
||||
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
|
||||
validator: RegExpValidator
|
||||
font.pointSize: 16
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Grid
|
||||
{
|
||||
width: parent.width
|
||||
columns: 2
|
||||
rowSpacing: UM.Theme.getSize("default_lining").height
|
||||
columnSpacing: UM.Theme.getSize("default_margin").width
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
|
||||
Label
|
||||
{
|
||||
regExp: {
|
||||
machineName.machine_name_validator.machineNameRegex
|
||||
}
|
||||
wrapMode: Text.WordWrap
|
||||
text: catalog.i18nc("@label", "Manufacturer")
|
||||
}
|
||||
Label
|
||||
{
|
||||
width: Math.floor(parent.width * 0.65)
|
||||
wrapMode: Text.WordWrap
|
||||
text: getMachineMetaDataEntry("manufacturer")
|
||||
}
|
||||
Label
|
||||
{
|
||||
wrapMode: Text.WordWrap
|
||||
text: catalog.i18nc("@label", "Author")
|
||||
}
|
||||
Label
|
||||
{
|
||||
width: Math.floor(parent.width * 0.75)
|
||||
wrapMode: Text.WordWrap
|
||||
text: getMachineMetaDataEntry("author")
|
||||
}
|
||||
Label
|
||||
{
|
||||
wrapMode: Text.WordWrap
|
||||
text: catalog.i18nc("@label", "Printer Name")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: machineName
|
||||
text: getMachineName()
|
||||
width: Math.floor(parent.width * 0.75)
|
||||
implicitWidth: UM.Theme.getSize("standard_list_input").width
|
||||
maximumLength: 40
|
||||
//validator: Cura.MachineNameValidator { } //TODO: Gives a segfault in PyQt5.6. For now, we must use a signal on text changed.
|
||||
validator: RegExpValidator
|
||||
{
|
||||
regExp: {
|
||||
machineName.machine_name_validator.machineNameRegex
|
||||
}
|
||||
}
|
||||
property var machine_name_validator: Cura.MachineNameValidator { }
|
||||
}
|
||||
property var machine_name_validator: Cura.MachineNameValidator { }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ Rectangle
|
|||
}
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@action:button", "Toolbox")
|
||||
text: catalog.i18nc("@action:button", "Marketplace")
|
||||
height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height)
|
||||
color: UM.Theme.getColor("main_window_header_secondary_button_background_active")
|
||||
hoverColor: UM.Theme.getColor("main_window_header_secondary_button_background_hovered")
|
||||
|
|
|
@ -152,7 +152,7 @@ SettingItem
|
|||
maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10;
|
||||
clip: true; //Hide any text that exceeds the width of the text box.
|
||||
|
||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||
validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry
|
||||
|
||||
Binding
|
||||
{
|
||||
|
|
|
@ -1118,6 +1118,7 @@ Item
|
|||
{
|
||||
id: platformAdhesionType
|
||||
containerStack: Cura.MachineManager.activeMachine
|
||||
removeUnusedValue: false //Doesn't work with settings that are resolved.
|
||||
key: "adhesion_type"
|
||||
watchedProperties: [ "value", "enabled" ]
|
||||
storeIndex: 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue