diff --git a/Printer.qml b/Printer.qml new file mode 100644 index 0000000000..f4c3c1fdd2 --- /dev/null +++ b/Printer.qml @@ -0,0 +1,79 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import QtQuick.Layouts 1.1 + +import Cura 1.0 as Cura + +Cura.MainWindow { + id: base + 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" + } + } + } +} diff --git a/PrinterApplication.py b/PrinterApplication.py index 16857c65a2..78c16df188 100644 --- a/PrinterApplication.py +++ b/PrinterApplication.py @@ -1,11 +1,7 @@ -from Cura.Wx.WxApplication import WxApplication -from Cura.Wx.MainWindow import MainWindow - +from Cura.Qt.QtApplication import QtApplication from Cura.Scene.SceneObject import SceneObject -import wx - -class PrinterApplication(WxApplication): +class PrinterApplication(QtApplication): def __init__(self): super(PrinterApplication, self).__init__() @@ -21,7 +17,11 @@ class PrinterApplication(WxApplication): mesh.setMeshData(self.getMeshFileHandler().read("plugins/STLReader/simpleTestCube.stl",self.getStorageDevice('local'))) root.addChild(mesh) - window = MainWindow("Cura Printer", self) - window.getCanvas().setBackgroundColor(wx.Colour(255, 0, 0, 255)) - window.Show() - super(PrinterApplication, self).run() + self.setMainQml("printer/Printer.qml") + self.initializeEngine() + + if self._engine.rootObjects: + self.exec_() + + def registerObjects(self, engine): + pass