Add a preference and preference page for displaying overhangs

This commit is contained in:
Arjen Hiemstra 2015-03-13 16:56:18 +01:00
parent 5dcd5c2258
commit c723601f85
2 changed files with 30 additions and 1 deletions

View file

@ -196,7 +196,13 @@ UM.MainWindow {
}
}
UM.PreferencesDialog { id: preferences }
UM.PreferencesDialog {
id: preferences
Component.onCompleted: {
addPage(qsTr('View'), Qt.resolvedUrl('./ViewPage.qml'));
}
}
PrinterActions {
id: actions;

23
ViewPage.qml Normal file
View file

@ -0,0 +1,23 @@
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import UM 1.0 as UM
UM.PreferencesPage {
//: General configuration page title
title: qsTr("View");
GridLayout {
columns: 2;
CheckBox {
checked: UM.Preferences.getValue('view/show_overhang');
onCheckedChanged: UM.Preferences.setValue('view/show_overhang', checked)
text: qsTr("Display overhang");
}
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
}
}