mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
WIP: dos2unix new files
This commit is contained in:
parent
51c773fd80
commit
9c66921538
4 changed files with 255 additions and 255 deletions
|
@ -1,60 +1,60 @@
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from typing import TYPE_CHECKING, Optional
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
from PyQt5.QtCore import QUrl, Qt
|
from PyQt5.QtCore import QUrl, Qt
|
||||||
|
|
||||||
from UM.Qt.ListModel import ListModel
|
from UM.Qt.ListModel import ListModel
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
|
|
||||||
|
|
||||||
class WelcomePagesModel(ListModel):
|
class WelcomePagesModel(ListModel):
|
||||||
|
|
||||||
IdRole = Qt.UserRole + 1 # Page ID
|
IdRole = Qt.UserRole + 1 # Page ID
|
||||||
PageUrlRole = Qt.UserRole + 2 # URL to the page's QML file
|
PageUrlRole = Qt.UserRole + 2 # URL to the page's QML file
|
||||||
NextPageIdRole = Qt.UserRole + 3 # The next page ID it should go to
|
NextPageIdRole = Qt.UserRole + 3 # The next page ID it should go to
|
||||||
|
|
||||||
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self.addRoleName(self.IdRole, "id")
|
self.addRoleName(self.IdRole, "id")
|
||||||
self.addRoleName(self.PageUrlRole, "page_url")
|
self.addRoleName(self.PageUrlRole, "page_url")
|
||||||
self.addRoleName(self.NextPageIdRole, "next_page_id")
|
self.addRoleName(self.NextPageIdRole, "next_page_id")
|
||||||
|
|
||||||
self._pages = []
|
self._pages = []
|
||||||
|
|
||||||
def initialize(self) -> None:
|
def initialize(self) -> None:
|
||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
# Add default welcome pages
|
# Add default welcome pages
|
||||||
self._pages.append({"id": "welcome",
|
self._pages.append({"id": "welcome",
|
||||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||||
os.path.join("WelcomePages",
|
os.path.join("WelcomePages",
|
||||||
"WelcomeContent.qml"))),
|
"WelcomeContent.qml"))),
|
||||||
})
|
})
|
||||||
self._pages.append({"id": "user_agreement",
|
self._pages.append({"id": "user_agreement",
|
||||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||||
os.path.join("WelcomePages",
|
os.path.join("WelcomePages",
|
||||||
"UserAgreementContent.qml"))),
|
"UserAgreementContent.qml"))),
|
||||||
})
|
})
|
||||||
self._pages.append({"id": "whats_new",
|
self._pages.append({"id": "whats_new",
|
||||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||||
os.path.join("WelcomePages",
|
os.path.join("WelcomePages",
|
||||||
"WhatsNewContent.qml"))),
|
"WhatsNewContent.qml"))),
|
||||||
})
|
})
|
||||||
self._pages.append({"id": "data_collections",
|
self._pages.append({"id": "data_collections",
|
||||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||||
os.path.join("WelcomePages",
|
os.path.join("WelcomePages",
|
||||||
"DataCollectionsContent.qml"))),
|
"DataCollectionsContent.qml"))),
|
||||||
})
|
})
|
||||||
|
|
||||||
self.setItems(self._pages)
|
self.setItems(self._pages)
|
||||||
|
|
||||||
def addPage(self):
|
def addPage(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
__all__ = ["WelcomePagesModel"]
|
__all__ = ["WelcomePagesModel"]
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
|
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
|
||||||
//
|
//
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: titleLabel
|
id: titleLabel
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: catalog.i18nc("@label", "Help us to improve Ultimaker Cura")
|
text: catalog.i18nc("@label", "Help us to improve Ultimaker Cura")
|
||||||
color: UM.Theme.getColor("primary_button")
|
color: UM.Theme.getColor("primary_button")
|
||||||
font: UM.Theme.getFont("large_bold")
|
font: UM.Theme.getFont("large_bold")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.top: titleLabel.bottom
|
anchors.top: titleLabel.bottom
|
||||||
anchors.topMargin: 80
|
anchors.topMargin: 80
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
spacing: 60
|
spacing: 60
|
||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
id: curaImage
|
id: curaImage
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
source: UM.Theme.getImage("first_run_share_data")
|
source: UM.Theme.getImage("first_run_share_data")
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: textLabel
|
id: textLabel
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality<br/>and user experience. <a href=\"TODO\">More information</a>")
|
text: catalog.i18nc("@text", "Ultimaker Cura collects anonymous data to improve print quality<br/>and user experience. <a href=\"TODO\">More information</a>")
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.PrimaryButton
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: getStartedButton
|
id: getStartedButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: 40
|
anchors.margins: 40
|
||||||
text: catalog.i18nc("@button", "Next")
|
text: catalog.i18nc("@button", "Next")
|
||||||
width: 140
|
width: 140
|
||||||
fixedWidthMode: true
|
fixedWidthMode: true
|
||||||
onClicked: base.showNextPage()
|
onClicked: base.showNextPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
|
|
||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
|
||||||
Window
|
Window
|
||||||
{
|
{
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
|
|
||||||
title: catalog.i18nc("@title", "Welcome to Ultimaker Cura")
|
title: catalog.i18nc("@title", "Welcome to Ultimaker Cura")
|
||||||
modality: Qt.ApplicationModal
|
modality: Qt.ApplicationModal
|
||||||
flags: Qt.Window | Qt.FramelessWindowHint
|
flags: Qt.Window | Qt.FramelessWindowHint
|
||||||
|
|
||||||
width: 580 // TODO
|
width: 580 // TODO
|
||||||
height: 600 // TODO
|
height: 600 // TODO
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property alias currentStep: stepPanel.currentStep
|
property alias currentStep: stepPanel.currentStep
|
||||||
|
|
||||||
StepPanel
|
StepPanel
|
||||||
{
|
{
|
||||||
id: stepPanel
|
id: stepPanel
|
||||||
currentStep: 0
|
currentStep: 0
|
||||||
model: CuraApplication.getWelcomePagesModel()
|
model: CuraApplication.getWelcomePagesModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close this dialog when there's no more page to show
|
// Close this dialog when there's no more page to show
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: stepPanel
|
target: stepPanel
|
||||||
onPassLastPage: close()
|
onPassLastPage: close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,87 +1,87 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
|
// This component contains the content for the page "What's new in Ultimaker Cura" of the welcome on-boarding process.
|
||||||
//
|
//
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: titleLabel
|
id: titleLabel
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: catalog.i18nc("@label", "What's new in Ultimaker Cura")
|
text: catalog.i18nc("@label", "What's new in Ultimaker Cura")
|
||||||
color: UM.Theme.getColor("primary_button")
|
color: UM.Theme.getColor("primary_button")
|
||||||
font: UM.Theme.getFont("large_bold")
|
font: UM.Theme.getFont("large_bold")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
anchors.top: titleLabel.bottom
|
anchors.top: titleLabel.bottom
|
||||||
anchors.bottom: getStartedButton.top
|
anchors.bottom: getStartedButton.top
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
anchors.bottomMargin: 40
|
anchors.bottomMargin: 40
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: parent.width * 3 / 4
|
width: parent.width * 3 / 4
|
||||||
|
|
||||||
border.color: "#dfdfdf"
|
border.color: "#dfdfdf"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 1
|
anchors.margins: 1
|
||||||
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
TextArea
|
TextArea
|
||||||
{
|
{
|
||||||
id: whatsNewTextArea
|
id: whatsNewTextArea
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: catalog.i18nc("@text", "<p><b>Ultimaker Cura 4.0</b></p>
|
text: catalog.i18nc("@text", "<p><b>Ultimaker Cura 4.0</b></p>
|
||||||
|
|
||||||
<p>New features</p>
|
<p>New features</p>
|
||||||
|
|
||||||
<p><b>Brand new user interface.</b> Ultimaker Cura is a very powerful tool with many features to support users’ needs. In the new UI, we present these features in a better, more intuitive way based on the workflow of our users. The Marketplace and user account control have been integrated into the main interface to easily access material profiles and plugins. Within the UI, three stages are shown in the header to give a clear guidance of the flow. The stage menu is populated with collapsible panels that allow users to focus on the 3D view when needed, while still showing important information at the same time, such as slicing configuration and settings. Users can now easily go to the preview stage to examine the layer view after slicing the model, which previously was less obvious or hidden. The new UI also creates more distinction between recommended and custom mode. Novice users or users who are not interested in all the settings can easily prepare a file without diving into details. Expert users can use custom mode with a resizable settings panel to make more settings visible, and the set position will persist between sessions.</p>
|
<p><b>Brand new user interface.</b> Ultimaker Cura is a very powerful tool with many features to support users’ needs. In the new UI, we present these features in a better, more intuitive way based on the workflow of our users. The Marketplace and user account control have been integrated into the main interface to easily access material profiles and plugins. Within the UI, three stages are shown in the header to give a clear guidance of the flow. The stage menu is populated with collapsible panels that allow users to focus on the 3D view when needed, while still showing important information at the same time, such as slicing configuration and settings. Users can now easily go to the preview stage to examine the layer view after slicing the model, which previously was less obvious or hidden. The new UI also creates more distinction between recommended and custom mode. Novice users or users who are not interested in all the settings can easily prepare a file without diving into details. Expert users can use custom mode with a resizable settings panel to make more settings visible, and the set position will persist between sessions.</p>
|
||||||
|
|
||||||
<p><b>Cloud printing.</b> Pair your Ultimaker printer with an Ultimaker account so you can send and monitor print jobs from outside your local network.</p>
|
<p><b>Cloud printing.</b> Pair your Ultimaker printer with an Ultimaker account so you can send and monitor print jobs from outside your local network.</p>
|
||||||
|
|
||||||
<p><b>Redesigned "Add Printer" dialog.</b> Updated one of the first dialogs a new user is presented with. The layout is loosely modeled on the layout of the Ultimaker 3/Ultimaker S5 "Connect to Network" dialog, and adds some instructions and intention to the dialog. Contributed by fieldOfView.</p>
|
<p><b>Redesigned "Add Printer" dialog.</b> Updated one of the first dialogs a new user is presented with. The layout is loosely modeled on the layout of the Ultimaker 3/Ultimaker S5 "Connect to Network" dialog, and adds some instructions and intention to the dialog. Contributed by fieldOfView.</p>
|
||||||
|
|
||||||
<p><b>Integrated backups.</b> Cura backups has been integrated into Ultimaker Cura and can be found in the 'extensions' menu. With this feature, users can backup their Ultimaker Cura configurations to the cloud.</p>
|
<p><b>Integrated backups.</b> Cura backups has been integrated into Ultimaker Cura and can be found in the 'extensions' menu. With this feature, users can backup their Ultimaker Cura configurations to the cloud.</p>
|
||||||
")
|
")
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
readOnly: true
|
readOnly: true
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.PrimaryButton
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
id: getStartedButton
|
id: getStartedButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.margins: 40
|
anchors.margins: 40
|
||||||
text: catalog.i18nc("@button", "Next")
|
text: catalog.i18nc("@button", "Next")
|
||||||
width: 140
|
width: 140
|
||||||
fixedWidthMode: true
|
fixedWidthMode: true
|
||||||
onClicked: base.showNextPage()
|
onClicked: base.showNextPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue