mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:35:53 +08:00
Move panels etc to a common "DefaultWindow" qml object so it can be shared
This commit is contained in:
parent
3b9bc5a3a8
commit
4f2fba04ea
72
Printer.qml
72
Printer.qml
@ -4,76 +4,6 @@ import QtQuick.Layouts 1.1
|
|||||||
|
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Cura.MainWindow {
|
Cura.DefaultWindow {
|
||||||
id: base
|
|
||||||
title: "Cura"
|
title: "Cura"
|
||||||
visible: true
|
|
||||||
|
|
||||||
backgroundColor: Qt.rgba(1.0, 0.0, 0.0, 1.0)
|
|
||||||
application: curaApplication
|
|
||||||
|
|
||||||
width: 1024
|
|
||||||
height: 768
|
|
||||||
|
|
||||||
Cura.FilePanel {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Cura.Panel {
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
|
||||||
|
|
||||||
title: "Camera"
|
|
||||||
|
|
||||||
contents: RowLayout {
|
|
||||||
ToolButton { text: "3D" }
|
|
||||||
ToolButton { text: "Left" }
|
|
||||||
ToolButton { text: "Top" }
|
|
||||||
ToolButton { text: "Front" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Cura.ToolPanel {
|
|
||||||
anchors.top: parent.top;
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Cura.Panel {
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
title: "View"
|
|
||||||
|
|
||||||
contents: ComboBox {
|
|
||||||
model: ListModel {
|
|
||||||
ListElement { text: "Normal" }
|
|
||||||
ListElement { text: "Layers" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Cura.Panel {
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
title: "Settings"
|
|
||||||
|
|
||||||
contents: ColumnLayout {
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
Layout.preferredHeight: 400
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
color: "grey"
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: "Save"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
from Cura.Qt.QtApplication import QtApplication
|
from Cura.Qt.QtApplication import QtApplication
|
||||||
from Cura.Scene.SceneObject import SceneObject
|
from Cura.Scene.SceneObject import SceneObject
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
|
||||||
class PrinterApplication(QtApplication):
|
class PrinterApplication(QtApplication):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(PrinterApplication, self).__init__()
|
super(PrinterApplication, self).__init__()
|
||||||
@ -17,7 +19,7 @@ class PrinterApplication(QtApplication):
|
|||||||
mesh.setMeshData(self.getMeshFileHandler().read("plugins/STLReader/simpleTestCube.stl",self.getStorageDevice('local')))
|
mesh.setMeshData(self.getMeshFileHandler().read("plugins/STLReader/simpleTestCube.stl",self.getStorageDevice('local')))
|
||||||
root.addChild(mesh)
|
root.addChild(mesh)
|
||||||
|
|
||||||
self.setMainQml("printer/Printer.qml")
|
self.setMainQml(os.path.dirname(__file__) + "/Printer.qml")
|
||||||
self.initializeEngine()
|
self.initializeEngine()
|
||||||
|
|
||||||
if self._engine.rootObjects:
|
if self._engine.rootObjects:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user