From cc7ce1d408f91d003b2ac157f067e6cc82f24993 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 6 May 2015 18:41:22 +0200 Subject: [PATCH] Rename everything "Printer" to either "Cura" or drop the prefix since it is no longer needed --- cura.py | 6 ++++++ printer.py | 6 ------ resources/qml/{PrinterActions.qml => Actions.qml} | 0 resources/qml/{Printer.qml => Cura.qml} | 11 +++++++---- resources/qml/PrinterButton.qml | 11 ----------- resources/qml/{PrinterToolbar.qml => Toolbar.qml} | 4 +++- src/{PrinterApplication.py => CuraApplication.py} | 4 ++-- 7 files changed, 18 insertions(+), 24 deletions(-) create mode 100755 cura.py delete mode 100755 printer.py rename resources/qml/{PrinterActions.qml => Actions.qml} (100%) rename resources/qml/{Printer.qml => Cura.qml} (98%) delete mode 100644 resources/qml/PrinterButton.qml rename resources/qml/{PrinterToolbar.qml => Toolbar.qml} (95%) rename src/{PrinterApplication.py => CuraApplication.py} (99%) diff --git a/cura.py b/cura.py new file mode 100755 index 0000000000..7ec66e3913 --- /dev/null +++ b/cura.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from src.CuraApplication import CuraApplication + +app = CuraApplication.getInstance() +app.run() diff --git a/printer.py b/printer.py deleted file mode 100755 index cc6914893c..0000000000 --- a/printer.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from src.PrinterApplication import PrinterApplication - -app = PrinterApplication.getInstance() -app.run() diff --git a/resources/qml/PrinterActions.qml b/resources/qml/Actions.qml similarity index 100% rename from resources/qml/PrinterActions.qml rename to resources/qml/Actions.qml diff --git a/resources/qml/Printer.qml b/resources/qml/Cura.qml similarity index 98% rename from resources/qml/Printer.qml rename to resources/qml/Cura.qml index 3581464fe0..7158332417 100644 --- a/resources/qml/Printer.qml +++ b/resources/qml/Cura.qml @@ -190,10 +190,11 @@ UM.MainWindow { source: UM.ActiveView.valid ? UM.ActiveView.activeViewPanel : ""; } - PrinterButton { + Button { id: openFileButton; iconSource: UM.Theme.icons.open; + style: UM.Theme.styles.tool_button; anchors { top: parent.top; @@ -220,7 +221,7 @@ UM.MainWindow { sourceSize.height: height; } - PrinterButton { + Button { anchors { top: parent.top; topMargin: UM.Theme.sizes.window_margin.height; @@ -232,6 +233,8 @@ UM.MainWindow { text: qsTr("View Mode"); iconSource: UM.Theme.icons.viewmode; + style: UM.Theme.styles.tool_button; + menu: Menu { id: viewMenu; Instantiator { @@ -251,7 +254,7 @@ UM.MainWindow { } } - PrinterToolbar { + Toolbar { id: toolbar; anchors { @@ -272,7 +275,7 @@ UM.MainWindow { } } - PrinterActions { + Actions { id: actions; open.onTriggered: openDialog.open(); diff --git a/resources/qml/PrinterButton.qml b/resources/qml/PrinterButton.qml deleted file mode 100644 index dfbbbe2984..0000000000 --- a/resources/qml/PrinterButton.qml +++ /dev/null @@ -1,11 +0,0 @@ -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 - -Button { - id: base; - style: UM.Theme.styles.tool_button; -} diff --git a/resources/qml/PrinterToolbar.qml b/resources/qml/Toolbar.qml similarity index 95% rename from resources/qml/PrinterToolbar.qml rename to resources/qml/Toolbar.qml index 37911bc6b5..ee051416aa 100644 --- a/resources/qml/PrinterToolbar.qml +++ b/resources/qml/Toolbar.qml @@ -24,7 +24,7 @@ Item { model: UM.Models.toolModel - PrinterButton { + Button { text: model.name; iconSource: UM.Theme.icons[model.icon]; tooltip: model.description; @@ -32,6 +32,8 @@ Item { checkable: true; checked: model.active; + style: UM.Theme.styles.tool_button; + //Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead //just catch the click so we do not trigger that behaviour. MouseArea { diff --git a/src/PrinterApplication.py b/src/CuraApplication.py similarity index 99% rename from src/PrinterApplication.py rename to src/CuraApplication.py index 3fc3a1bf6c..40084255b4 100644 --- a/src/PrinterApplication.py +++ b/src/CuraApplication.py @@ -37,7 +37,7 @@ import os.path import numpy numpy.seterr(all="ignore") -class PrinterApplication(QtApplication): +class CuraApplication(QtApplication): def __init__(self): if not hasattr(sys, "frozen"): Resources.addResourcePath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) @@ -129,7 +129,7 @@ class PrinterApplication(QtApplication): self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Loading interface...")) - self.setMainQml(Resources.getPath(Resources.QmlFilesLocation, "Printer.qml")) + self.setMainQml(Resources.getPath(Resources.QmlFilesLocation, "Cura.qml")) self.initializeEngine() self.getStorageDevice("LocalFileStorage").removableDrivesChanged.connect(self._removableDrivesChanged)