mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Move QML files to resources
This commit is contained in:
parent
81aac4a1c1
commit
70d714def5
17 changed files with 0 additions and 0 deletions
111
resources/qml/SidebarSimple.qml
Normal file
111
resources/qml/SidebarSimple.qml
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
|
||||
Item {
|
||||
id: base;
|
||||
|
||||
anchors.fill: parent;
|
||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
||||
|
||||
property Action configureSettings;
|
||||
|
||||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent;
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||
|
||||
Label {
|
||||
anchors.left: parent.left;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
text: base.minimumPrintTime.valid ? base.minimumPrintTime.getDisplayString(UM.DurationFormat.Short) : "??:??";
|
||||
font: UM.Theme.fonts.timeslider_time;
|
||||
color: UM.Theme.colors.primary;
|
||||
}
|
||||
Label {
|
||||
anchors.centerIn: parent;
|
||||
text: {
|
||||
if (UM.Backend.progress < 0)
|
||||
{
|
||||
return qsTr("No Model Loaded");
|
||||
}
|
||||
else if (!base.minimumPrintTime.valid || !base.maximumPrintTime.valid)
|
||||
{
|
||||
return qsTr("Calculating...")
|
||||
}
|
||||
else
|
||||
{
|
||||
return qsTr("Estimated Print Time");
|
||||
}
|
||||
}
|
||||
color: UM.Theme.colors.text;
|
||||
font: UM.Theme.fonts.default;
|
||||
}
|
||||
Label {
|
||||
anchors.right: parent.right;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
text: base.maximumPrintTime.valid ? base.maximumPrintTime.getDisplayString(UM.DurationFormat.Short) : "??:??";
|
||||
font: UM.Theme.fonts.timeslider_time;
|
||||
color: UM.Theme.colors.primary;
|
||||
}
|
||||
}
|
||||
|
||||
Slider {
|
||||
Layout.fillWidth: true;
|
||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||
|
||||
minimumValue: 0;
|
||||
maximumValue: 100;
|
||||
|
||||
value: PrintInformation.timeQualityValue;
|
||||
onValueChanged: PrintInformation.setTimeQualityValue(value);
|
||||
|
||||
style: UM.Theme.styles.slider;
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true;
|
||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||
|
||||
Label {
|
||||
anchors.left: parent.left;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
text: qsTr("Minimum\nDraft");
|
||||
color: UM.Theme.colors.text;
|
||||
font: UM.Theme.fonts.default;
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors.right: parent.right;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
text: qsTr("Maximum\nQuality");
|
||||
horizontalAlignment: Text.AlignRight;
|
||||
color: UM.Theme.colors.text;
|
||||
font: UM.Theme.fonts.default;
|
||||
}
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
Layout.fillWidth: true;
|
||||
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||
|
||||
text: qsTr("Enable Support");
|
||||
|
||||
style: UM.Theme.styles.checkbox;
|
||||
|
||||
checked: Printer.getSettingValue('support_enable');
|
||||
onCheckedChanged: Printer.setSettingValue('support_enable', checked);
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue