Merge branch '15.10' of https://github.com/Ultimaker/Cura into 15.10

This commit is contained in:
Jaime van Kessel 2015-09-11 13:49:49 +02:00
commit e08aa9f2ec
11 changed files with 234 additions and 193 deletions

View File

@ -23,7 +23,7 @@ def show(type, value, tb):
label = QLabel(dialog) label = QLabel(dialog)
layout.addWidget(label) layout.addWidget(label)
label.setText(catalog.i18nc("@info", "<p>An uncaught exception has occurred!</p><p>Please use the information below to post a bug report at <a href=\"http://github.com/Ultimaker/Cura/issues\">http://github.com/Ultimaker/Cura/issues</a></p>")) label.setText(catalog.i18nc("@label", "<p>An uncaught exception has occurred!</p><p>Please use the information below to post a bug report at <a href=\"http://github.com/Ultimaker/Cura/issues\">http://github.com/Ultimaker/Cura/issues</a></p>"))
textarea = QTextEdit(dialog) textarea = QTextEdit(dialog)
layout.addWidget(textarea) layout.addWidget(textarea)
@ -43,7 +43,7 @@ def show(type, value, tb):
buttons = QDialogButtonBox(QDialogButtonBox.Close, dialog) buttons = QDialogButtonBox(QDialogButtonBox.Close, dialog)
layout.addWidget(buttons) layout.addWidget(buttons)
buttons.addButton(self._i18n_catalog.i18nc("action:button", "Open Web Page"), QDialogButtonBox.HelpRole) buttons.addButton(catalog.i18nc("@action:button", "Open Web Page"), QDialogButtonBox.HelpRole)
buttons.rejected.connect(lambda: dialog.close()) buttons.rejected.connect(lambda: dialog.close())
buttons.helpRequested.connect(lambda: webbrowser.open("http://github.com/Ultimaker/Cura/issues")) buttons.helpRequested.connect(lambda: webbrowser.open("http://github.com/Ultimaker/Cura/issues"))

View File

@ -27,7 +27,7 @@ class ProcessSlicedObjectListJob(Job):
def run(self): def run(self):
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
self._progress = Message(catalog.i18nc("@info", "Layers"), 0, False, 0) self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0)
self._progress.show() self._progress.show()
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged) Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
@ -108,7 +108,7 @@ class ProcessSlicedObjectListJob(Job):
if self.isRunning(): if self.isRunning():
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
if not self._progress: if not self._progress:
self._progress = Message(catalog.i18nc("Layers View mode", "Layers"), 0, False, 0) self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0)
self._progress.show() self._progress.show()
else: else:
if self._progress: if self._progress:

View File

@ -39,10 +39,10 @@ class RemovableDrivePlugin(OutputDevicePlugin):
def ejectDevice(self, device): def ejectDevice(self, device):
result = self.performEjectDevice(device) result = self.performEjectDevice(device)
if result: if result:
message = Message(catalog.i18n("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName())) message = Message(catalog.i18nc("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName()))
message.show() message.show()
else: else:
message = Message(catalog.i18n("@info:status", "Failed to eject {0}. Maybe it is still in use?").format(device.getName())) message = Message(catalog.i18nc("@info:status", "Failed to eject {0}. Maybe it is still in use?").format(device.getName()))
message.show() message.show()
def performEjectDevice(self, device): def performEjectDevice(self, device):

View File

@ -24,7 +24,6 @@ Item
//property alias unMergeObjects: unMergeObjectsAction; //property alias unMergeObjects: unMergeObjectsAction;
property alias multiplyObject: multiplyObjectAction; property alias multiplyObject: multiplyObjectAction;
property alias splitObject: splitObjectAction;
property alias deleteAll: deleteAllAction; property alias deleteAll: deleteAllAction;
property alias reloadAll: reloadAllAction; property alias reloadAll: reloadAllAction;
@ -51,6 +50,7 @@ Item
id:toggleFullScreenAction id:toggleFullScreenAction
shortcut: StandardKey.FullScreen; shortcut: StandardKey.FullScreen;
text: catalog.i18nc("@action","Toggle Full Screen"); text: catalog.i18nc("@action","Toggle Full Screen");
iconName: "view-fullscreen";
} }
Action Action
@ -93,14 +93,15 @@ Item
Action Action
{ {
id: settingsAction; id: settingsAction;
text: catalog.i18nc("@action","Manage Printers"); text: catalog.i18nc("@action","Manage Printers...");
iconName: "configure"; iconName: "configure";
} }
Action Action
{ {
id: manageProfilesAction; id: manageProfilesAction;
text: catalog.i18nc("@action","Manage Profiles"); text: catalog.i18nc("@action","Manage Profiles...");
iconName: "configure";
} }
Action Action
@ -151,6 +152,7 @@ Item
id: groupObjectsAction id: groupObjectsAction
text: catalog.i18nc("@action","Group Objects"); text: catalog.i18nc("@action","Group Objects");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false enabled: UM.Scene.numObjectsSelected > 1 ? true: false
iconName: "object-group"
} }
Action Action
@ -158,6 +160,7 @@ Item
id: unGroupObjectsAction id: unGroupObjectsAction
text: catalog.i18nc("@action","Ungroup Objects"); text: catalog.i18nc("@action","Ungroup Objects");
enabled: UM.Scene.isGroupSelected enabled: UM.Scene.isGroupSelected
iconName: "object-ungroup"
} }
Action Action
@ -165,32 +168,28 @@ Item
id: mergeObjectsAction id: mergeObjectsAction
text: catalog.i18nc("@action","Merge Objects"); text: catalog.i18nc("@action","Merge Objects");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false enabled: UM.Scene.numObjectsSelected > 1 ? true: false
iconName: "merge";
} }
Action Action
{ {
id: multiplyObjectAction; id: multiplyObjectAction;
text: catalog.i18nc("@action","Duplicate Object"); text: catalog.i18nc("@action","Duplicate Object");
} iconName: "edit-duplicate"
Action
{
id: splitObjectAction;
text: catalog.i18nc("@action","Split Object into Parts");
enabled: false;
} }
Action Action
{ {
id: deleteAllAction; id: deleteAllAction;
text: catalog.i18nc("@action","Clear Build Platform"); text: catalog.i18nc("@action","Clear Build Platform");
iconName: "edit-clear"; iconName: "edit-delete";
} }
Action Action
{ {
id: reloadAllAction; id: reloadAllAction;
text: catalog.i18nc("@action","Reload All Objects"); text: catalog.i18nc("@action","Reload All Objects");
iconName: "document-revert";
} }
Action Action

View File

@ -41,7 +41,7 @@ UM.MainWindow
Menu Menu
{ {
id: recentFilesMenu; id: recentFilesMenu;
title: catalog.i18nc("@title:menu", "Open Recent") title: catalog.i18nc("@title:menu", "Open &Recent")
iconName: "document-open-recent"; iconName: "document-open-recent";
enabled: Printer.recentFiles.length > 0; enabled: Printer.recentFiles.length > 0;
@ -70,7 +70,7 @@ UM.MainWindow
MenuItem MenuItem
{ {
text: catalog.i18nc("@action:inmenu", "Save Selection to File"); text: catalog.i18nc("@action:inmenu", "&Save Selection to File");
enabled: UM.Selection.hasSelection; enabled: UM.Selection.hasSelection;
iconName: "document-save-as"; iconName: "document-save-as";
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file"); onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file");
@ -78,8 +78,8 @@ UM.MainWindow
Menu Menu
{ {
id: saveAllMenu id: saveAllMenu
title: catalog.i18nc("@title:menu","Save All") title: catalog.i18nc("@title:menu","Save &All")
iconName: "document-save"; iconName: "document-save-all";
enabled: devicesModel.rowCount() > 0 && UM.Backend.progress > 0.99; enabled: devicesModel.rowCount() > 0 && UM.Backend.progress > 0.99;
Instantiator Instantiator
@ -96,6 +96,8 @@ UM.MainWindow
} }
} }
MenuItem { action: actions.reloadAll; }
MenuSeparator { } MenuSeparator { }
MenuItem { action: actions.quit; } MenuItem { action: actions.quit; }
@ -111,6 +113,12 @@ UM.MainWindow
MenuSeparator { } MenuSeparator { }
MenuItem { action: actions.deleteSelection; } MenuItem { action: actions.deleteSelection; }
MenuItem { action: actions.deleteAll; } MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.resetAllTranslation; }
MenuItem { action: actions.resetAll; }
MenuSeparator { }
MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.mergeObjects;}
MenuItem { action: actions.unGroupObjects;}
} }
Menu Menu
@ -119,7 +127,7 @@ UM.MainWindow
id: top_view_menu id: top_view_menu
Instantiator Instantiator
{ {
model: UM.Models.viewModel model: UM.ViewModel { }
MenuItem MenuItem
{ {
text: model.name; text: model.name;
@ -184,6 +192,32 @@ UM.MainWindow
MenuItem { action: actions.configureMachines; } MenuItem { action: actions.configureMachines; }
} }
Menu
{
id: profileMenu
title: catalog.i18nc("@title:menu", "&Profile")
Instantiator
{
model: UM.ProfilesModel { }
MenuItem {
text: model.name;
checkable: true;
checked: model.active;
exclusiveGroup: profileMenuGroup;
onTriggered: UM.MachineManager.setActiveProfile(model.name)
}
onObjectAdded: profileMenu.insertItem(index, object)
onObjectRemoved: profileMenu.removeItem(object)
}
ExclusiveGroup { id: profileMenuGroup; }
MenuSeparator { }
MenuItem { action: actions.manageProfiles; }
}
Menu Menu
{ {
id: extension_menu id: extension_menu
@ -351,7 +385,7 @@ UM.MainWindow
id: viewMenu; id: viewMenu;
Instantiator Instantiator
{ {
model: UM.Models.viewModel; model: UM.ViewModel { }
MenuItem MenuItem
{ {
text: model.name; text: model.name;
@ -515,7 +549,6 @@ UM.MainWindow
showEngineLog.onTriggered: engineLog.visible = true; showEngineLog.onTriggered: engineLog.visible = true;
about.onTriggered: aboutDialog.visible = true; about.onTriggered: aboutDialog.visible = true;
toggleFullScreen.onTriggered: base.toggleFullscreen() toggleFullScreen.onTriggered: base.toggleFullscreen()
} }
Menu Menu
@ -526,16 +559,14 @@ UM.MainWindow
MenuItem { action: actions.centerObject; } MenuItem { action: actions.centerObject; }
MenuItem { action: actions.deleteObject; } MenuItem { action: actions.deleteObject; }
MenuItem { action: actions.multiplyObject; } MenuItem { action: actions.multiplyObject; }
MenuItem { action: actions.splitObject; }
MenuSeparator { } MenuSeparator { }
MenuItem { action: actions.deleteAll; } MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.reloadAll; } MenuItem { action: actions.reloadAll; }
MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAllTranslation; }
MenuItem { action: actions.resetAll; } MenuItem { action: actions.resetAll; }
MenuItem { action: actions.groupObjects;} MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuItem { action: actions.mergeObjects;} MenuItem { action: actions.mergeObjects;}
MenuItem { action: actions.unGroupObjects;}
} }
Menu Menu
@ -546,8 +577,8 @@ UM.MainWindow
MenuItem { action: actions.resetAllTranslation; } MenuItem { action: actions.resetAllTranslation; }
MenuItem { action: actions.resetAll; } MenuItem { action: actions.resetAll; }
MenuItem { action: actions.groupObjects;} MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuItem { action: actions.mergeObjects;} MenuItem { action: actions.mergeObjects;}
MenuItem { action: actions.unGroupObjects;}
} }
Connections Connections

View File

@ -42,20 +42,17 @@ UM.PreferencesPage
model: ListModel model: ListModel
{ {
id: languageList id: languageList
//: English language combo box option
ListElement { text: QT_TR_NOOP("English"); code: "en" } ListElement { text: QT_TR_NOOP("English"); code: "en" }
//: German language combo box option
ListElement { text: QT_TR_NOOP("German"); code: "de" } ListElement { text: QT_TR_NOOP("German"); code: "de" }
//: French language combo box option ListElement { text: QT_TR_NOOP("French"); code: "fr" }
// ListElement { text: QT_TR_NOOP("French"); code: "fr" }
//: Spanish language combo box option
ListElement { text: QT_TR_NOOP("Spanish"); code: "es" } ListElement { text: QT_TR_NOOP("Spanish"); code: "es" }
//: Italian language combo box option ListElement { text: QT_TR_NOOP("Italian"); code: "it" }
// ListElement { text: QT_TR_NOOP("Italian"); code: "it" }
//: Finnish language combo box option
ListElement { text: QT_TR_NOOP("Finnish"); code: "fi" } ListElement { text: QT_TR_NOOP("Finnish"); code: "fi" }
//: Russian language combo box option
ListElement { text: QT_TR_NOOP("Russian"); code: "ru" } ListElement { text: QT_TR_NOOP("Russian"); code: "ru" }
ListElement { text: QT_TR_NOOP("Polish"); code: "pl" }
ListElement { text: QT_TR_NOOP("Czech"); code: "cs" }
ListElement { text: QT_TR_NOOP("Bulgarian"); code: "bg" }
} }
currentIndex: currentIndex:
@ -80,7 +77,7 @@ UM.PreferencesPage
// Because ListModel is stupid and does not allow using qsTr() for values. // Because ListModel is stupid and does not allow using qsTr() for values.
for(var i = 0; i < languageList.count; ++i) for(var i = 0; i < languageList.count; ++i)
{ {
languageList.setProperty(i, "text", catalog.i18nc("@action:inmenu",languageList.get(i).text)); languageList.setProperty(i, "text", catalog.i18n(languageList.get(i).text));
} }
// Glorious hack time. ComboBox does not update the text properly after changing the // Glorious hack time. ComboBox does not update the text properly after changing the
@ -96,7 +93,7 @@ UM.PreferencesPage
Layout.columnSpan: 2 Layout.columnSpan: 2
//: Language change warning //: Language change warning
text: catalog.i18nc("@label","You will need to restart the application for language changes to have effect.") text: catalog.i18nc("@label", "You will need to restart the application for language changes to have effect.")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.italic: true font.italic: true
} }
@ -112,11 +109,11 @@ UM.PreferencesPage
id: pushFreeText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox id: pushFreeText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox //: Display Overhang preference checkbox
text: catalog.i18nc("@option:check","Automatically arrange the distancing between objects"); text: catalog.i18nc("@option:check", "Ensure objects are kept apart");
onClicked: pushFreeCheckbox.checked = !pushFreeCheckbox.checked onClicked: pushFreeCheckbox.checked = !pushFreeCheckbox.checked
//: Display Overhang preference tooltip //: Display Overhang preference tooltip
tooltip: catalog.i18nc("@info:tooltip","Are objects on the platform automatically moved so that they no longer intersect") tooltip: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.")
style: ButtonStyle style: ButtonStyle
{ {
@ -145,11 +142,11 @@ UM.PreferencesPage
id: sendDataText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox id: sendDataText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox //: Display Overhang preference checkbox
text: catalog.i18nc("@option:check","Send (anonymous) slice info"); text: catalog.i18nc("@option:check","Send (Anonymous) Print Information");
onClicked: sendDataCheckbox.checked = !sendDataCheckbox.checked onClicked: sendDataCheckbox.checked = !sendDataCheckbox.checked
//: Display Overhang preference tooltip //: Display Overhang preference tooltip
tooltip: catalog.i18nc("@info:tooltip","Should anonymous data about your slices be sent to Ultimaker. No models or IP's are sent / stored.") tooltip: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.")
style: ButtonStyle style: ButtonStyle
{ {
@ -177,11 +174,11 @@ UM.PreferencesPage
id: scaleToFitText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox id: scaleToFitText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox //: Display Overhang preference checkbox
text: catalog.i18nc("@option:check","Scale loaded meshes when too large"); text: catalog.i18nc("@option:check","Scale Too Large Files");
onClicked: scaleToFitCheckbox.checked = !scaleToFitCheckbox.checked onClicked: scaleToFitCheckbox.checked = !scaleToFitCheckbox.checked
//: Display Overhang preference tooltip //: Display Overhang preference tooltip
tooltip: catalog.i18nc("@info:tooltip","Should loaded meshes be scaled to the max build volume if they are too large.") tooltip: catalog.i18nc("@info:tooltip","Should opened files be scaled to the build volume when they are too large?")
style: ButtonStyle style: ButtonStyle
{ {

View File

@ -21,163 +21,176 @@ Item
Component.onDestruction: PrintInformation.enabled = false Component.onDestruction: PrintInformation.enabled = false
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
// Rectangle { Rectangle{
// anchors.top: simpleModeGrid.top id: infillCellLeft
// anchors.left: simpleModeGrid.left anchors.top: parent.top
// width: simpleModeGrid.width anchors.left: parent.left
// height: simpleModeGrid.height width: base.width/100*55 - UM.Theme.sizes.default_margin.width
// color: "blue" height: childrenRect.height < UM.Theme.sizes.simple_mode_infill_caption.height ? UM.Theme.sizes.simple_mode_infill_caption.height : childrenRect.height
// }
Grid { Label{
id: simpleModeGrid id: infillLabel
anchors.fill: parent; //: Infill selection label
columns: 2 text: catalog.i18nc("@label","Infill:");
spacing: 0 font: UM.Theme.fonts.default;
anchors.top: parent.top
// Rectangle{ anchors.topMargin: UM.Theme.sizes.default_margin.height
// id: infillLabelCell anchors.left: parent.left
// width: base.width/100*45 anchors.leftMargin: UM.Theme.sizes.default_margin.width
// height: 100
// Column {
// spacing: 0
// anchors{
// top: parent.top
// topMargin: UM.Theme.sizes.default_margin.height
// right: parent.right
// rightMargin: UM.Theme.sizes.default_margin.width
// bottom: parent.bottom
// bottomMargin: UM.Theme.sizes.default_margin.height
// left: parent.left
// leftMargin: UM.Theme.sizes.default_margin.width
// }
//
// Label{
// id: infillLabel
// //: Infill selection label
// text: catalog.i18nc("@label","Infill:");
// font: UM.Theme.fonts.default;
// }
// Label{
// id: infillCaption
// width: infillLabelCell.width - UM.Theme.sizes.default_margin.width
// text: "hier staat overig tekst hier staat overig tekst hier staat overig tekst"
// font: UM.Theme.fonts.caption
// wrapMode: Text.Wrap
// color: UM.Theme.colors.text
// }
// }
// }
//
// Rectangle{
// id: infillCell
// height: 100
// width: base.width/100*55
// Row {
// spacing: 0
// anchors.right: parent.right
// anchors.rightMargin: UM.Theme.sizes.default_margin.width
// Rectangle {
// id: infillWrapper
// width: infillCell.width/4;
// height: infillCell.height
// Rectangle{
// id: infillIconLining
// anchors.top: parent.top
// anchors.topMargin: UM.Theme.sizes.default_margin.height
// anchors.horizontalCenter: parent.horizontalCenter
// z: parent.z + 1
// width: parent.width - UM.Theme.sizes.default_margin.width/2
// height: parent.width - UM.Theme.sizes.default_margin.width/2
// color: "grey"
// border.color: "black"
// border.width:1
// UM.RecolorImage {
// id: infillIcon
// z: parent.z + 1
// anchors.verticalCenter: parent.verticalCenter
// anchors.horizontalCenter: parent.horizontalCenter
// width: UM.Theme.sizes.save_button_specs_icons.width
// height: UM.Theme.sizes.save_button_specs_icons.height
// sourceSize.width: width
// sourceSize.height: width
// color: UM.Theme.colors.text_hover
// source: UM.Theme.icons.print_time;
// }
// }
// Label{
// //: Infill version label "light:
// text: catalog.i18nc("@label","Light");
// anchors.top: infillIconLining.bottom
// anchors.horizontalCenter: parent.horizontalCenter
// font.bold: true
// }
// }
// Rectangle {
// color: "green";
// width: infillCell.width/4;
// height: infillCell.height
// }
// Rectangle {
// color: "blue";
// width: infillCell.width/4;
// height: infillCell.height
// }
// Rectangle {
// color: "yellow";
// width: infillCell.width/4;
// height: infillCell.height
// }
// }
// }
Rectangle {
width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
height: 100
Label{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
//: Helpers selection label
text: catalog.i18nc("@label:listbox","Helpers:");
font: UM.Theme.fonts.default;
}
} }
Rectangle { Label{
width: parent.width/100*55 - UM.Theme.sizes.default_margin.width id: infillCaption
height: 100 width: infillCellLeft.width - UM.Theme.sizes.default_margin.width
Column { text: infillModel.get(infillListView.activeIndex).text
spacing: 4 font: UM.Theme.fonts.caption
wrapMode: Text.Wrap
color: UM.Theme.colors.text
anchors.top: infillLabel.bottom
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
}
}
CheckBox{ Rectangle{
Layout.preferredHeight: UM.Theme.sizes.section.height; id: infillCellRight
//: Setting enable skirt adhesion checkbox height: 100
text: catalog.i18nc("@option:check","Enable Skirt Adhesion"); width: base.width/100*45
style: UM.Theme.styles.checkbox; anchors.right: parent.right
checked: Printer.getSettingValue("skirt_line_count") == null ? false: Printer.getSettingValue("skirt_line_count"); anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
onCheckedChanged: anchors.top: parent.top
{ anchors.topMargin: UM.Theme.sizes.default_margin.height
if(checked != Printer.getSettingValue("skirt_line_count")) Component{
{ id: infillDelegate
Printer.setSettingValue("skirt_line_count", checked) Item{
width: infillCellRight.width/3
x: index * (infillCellRight.width/3)
anchors.top: parent.top
Rectangle{
id: infillIconLining
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - (UM.Theme.sizes.default_margin.width/2)
height: parent.width - (UM.Theme.sizes.default_margin.width/2)
border.color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
border.width: infillListView.activeIndex == index ? 2 : 1
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_category_active : "transparent"
UM.RecolorImage {
id: infillIcon
z: parent.z + 1
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - UM.Theme.sizes.default_margin.width
height: parent.width - UM.Theme.sizes.default_margin.width
sourceSize.width: width
sourceSize.height: width
color: UM.Theme.colors.setting_control_text
source: UM.Theme.icons[model.icon];
}
MouseArea {
anchors.fill: parent
onClicked: {
infillListView.activeIndex = index
} }
} }
} }
CheckBox{ Label{
Layout.preferredHeight: UM.Theme.sizes.section.height; id: infillLabel
anchors.top: infillIconLining.bottom
anchors.horizontalCenter: parent.horizontalCenter
color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
text: name
//font.bold: infillListView.activeIndex == index ? true : false
}
}
}
ListView{
id: infillListView
property int activeIndex: 0
model: infillModel
delegate: infillDelegate
anchors.fill: parent
}
ListModel {
id: infillModel
//: Setting enable support checkbox ListElement {
text: catalog.i18nc("@option:check","Enable Support"); name: "Sparse"
percentage: 20
text: "Sparse (20%) infill will give your model an average strength"
icon: "sparse"
}
ListElement {
name: "Dense"
percentage: 50
text: "Dense (50%) infill will give your model an above average strength"
icon: "dense"
}
ListElement {
name: "Solid"
percentage: 100;
text: "Solid (100%) infill will make your model completely solid"
icon: "solid"
}
}
}
style: UM.Theme.styles.checkbox; Rectangle {
id: helpersCellLeft
anchors.top: infillCellLeft.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
Label{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
//: Helpers selection label
text: catalog.i18nc("@label:listbox","Helpers:");
font: UM.Theme.fonts.default;
}
}
Rectangle {
id: helpersCellRight
anchors.top: helpersCellLeft.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: helpersCellLeft.right
width: parent.width/100*55 - UM.Theme.sizes.default_margin.width
height: childrenRect.height
checked: Printer.getSettingValue("support_enable") == null? false: Printer.getSettingValue("support_enable"); CheckBox{
onCheckedChanged: id: skirtCheckBox
{ anchors.top: parent.top
if(checked != Printer.getSettingValue("support_enable")) anchors.left: parent.left
{ Layout.preferredHeight: UM.Theme.sizes.section.height;
Printer.setSettingValue("support_enable", checked) //: Setting enable skirt adhesion checkbox
} text: catalog.i18nc("@option:check","Enable Skirt Adhesion");
} style: UM.Theme.styles.checkbox;
checked: Printer.getSettingValue("skirt_line_count") == null ? false: Printer.getSettingValue("skirt_line_count");
onCheckedChanged:
{
if(checked != Printer.getSettingValue("skirt_line_count"))
{
Printer.setSettingValue("skirt_line_count", checked)
}
}
}
CheckBox{
anchors.top: skirtCheckBox.bottom
anchors.topMargin: UM.Theme.sizes.default_lining.height
anchors.left: parent.left
Layout.preferredHeight: UM.Theme.sizes.section.height;
//: Setting enable support checkbox
text: catalog.i18nc("@option:check","Enable Support");
style: UM.Theme.styles.checkbox;
checked: Printer.getSettingValue("support_enable") == null? false: Printer.getSettingValue("support_enable");
onCheckedChanged:
{
if(checked != Printer.getSettingValue("support_enable"))
{
Printer.setSettingValue("support_enable", checked)
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 791 B

View File

@ -172,6 +172,7 @@
"setting_control_margin": [3.0, 3.0], "setting_control_margin": [3.0, 3.0],
"setting_unit_margin": [0.5, 0.5], "setting_unit_margin": [0.5, 0.5],
"setting_text_maxwidth": [40.0, 0.0], "setting_text_maxwidth": [40.0, 0.0],
"simple_mode_infill_caption": [0.0, 5.0],
"standard_list_lineheight": [1.5, 1.5], "standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0], "standard_list_input": [20.0, 25.0],