replicator-workshop 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- replicator/__init__.py +6 -0
- replicator/app.py +204 -0
- replicator/config.py +48 -0
- replicator/core/__init__.py +0 -0
- replicator/core/assembly.py +117 -0
- replicator/core/blender_link.py +161 -0
- replicator/core/critique.py +594 -0
- replicator/core/drawing.py +389 -0
- replicator/core/dxf.py +120 -0
- replicator/core/evaluate.py +439 -0
- replicator/core/explain.py +139 -0
- replicator/core/export.py +96 -0
- replicator/core/fit.py +170 -0
- replicator/core/importers.py +185 -0
- replicator/core/materials.py +104 -0
- replicator/core/ops_advanced.py +496 -0
- replicator/core/ops_engineering.py +223 -0
- replicator/core/physics.py +147 -0
- replicator/core/printers.py +100 -0
- replicator/core/program.py +298 -0
- replicator/core/render.py +145 -0
- replicator/core/reverse.py +350 -0
- replicator/core/robot.py +153 -0
- replicator/core/step.py +245 -0
- replicator/fixtures/gaming_pc_liquid.json +2259 -0
- replicator/fixtures/gas_generator_rocket.json +876 -0
- replicator/fixtures/gas_generator_rocket_aero.json +861 -0
- replicator/fixtures/house_two_bed.json +979 -0
- replicator/fixtures/quadcopter_drone.json +687 -0
- replicator/fixtures/raspberry_pi_5.json +884 -0
- replicator/fixtures/rocket_engine.json +652 -0
- replicator/fixtures/turbofan.json +931 -0
- replicator/fixtures/vector_engine.json +314 -0
- replicator/gpu.py +81 -0
- replicator/image3d/__init__.py +0 -0
- replicator/image3d/comfy.py +181 -0
- replicator/image3d/pipeline.py +208 -0
- replicator/image3d/sheet.py +154 -0
- replicator/knowledge/__init__.py +61 -0
- replicator/knowledge/car_wheel_corner.md +21 -0
- replicator/knowledge/desk_lamp.md +21 -0
- replicator/knowledge/desktop_pc.md +20 -0
- replicator/knowledge/electronics_board.md +21 -0
- replicator/knowledge/exoskeleton.md +21 -0
- replicator/knowledge/house.md +22 -0
- replicator/knowledge/light_aircraft.md +22 -0
- replicator/knowledge/multirotor_drone.md +25 -0
- replicator/knowledge/print_replica.md +13 -0
- replicator/knowledge/rocket_engine.md +27 -0
- replicator/knowledge/turbofan.md +23 -0
- replicator/llm/__init__.py +0 -0
- replicator/llm/client.py +424 -0
- replicator/llm/prompts/blueprint.md +28 -0
- replicator/llm/prompts/edit.md +15 -0
- replicator/llm/prompts/explain.md +37 -0
- replicator/llm/prompts/name_parts.md +13 -0
- replicator/llm/prompts/program.md +72 -0
- replicator/llm/prompts/research_queries.md +8 -0
- replicator/mcp_server.py +307 -0
- replicator/qml/Main.qml +874 -0
- replicator/qml/Replicator/UI/Chip.qml +17 -0
- replicator/qml/Replicator/UI/DockHeader.qml +27 -0
- replicator/qml/Replicator/UI/Icon.qml +118 -0
- replicator/qml/Replicator/UI/IconButton.qml +31 -0
- replicator/qml/Replicator/UI/Kbd.qml +18 -0
- replicator/qml/Replicator/UI/NumField.qml +69 -0
- replicator/qml/Replicator/UI/Pill.qml +28 -0
- replicator/qml/Replicator/UI/RCombo.qml +51 -0
- replicator/qml/Replicator/UI/RMenu.qml +42 -0
- replicator/qml/Replicator/UI/RSlider.qml +23 -0
- replicator/qml/Replicator/UI/Segmented.qml +63 -0
- replicator/qml/Replicator/UI/Swatch.qml +47 -0
- replicator/qml/Replicator/UI/Theme.qml +149 -0
- replicator/qml/Replicator/UI/qmldir +14 -0
- replicator/qml/panels/AgentPrompt.qml +53 -0
- replicator/qml/panels/AttributeManager.qml +171 -0
- replicator/qml/panels/Commander.qml +136 -0
- replicator/qml/panels/HolodeckPanel.qml +117 -0
- replicator/qml/panels/IssuesCard.qml +78 -0
- replicator/qml/panels/LedgerPanel.qml +110 -0
- replicator/qml/panels/MaterialShelf.qml +97 -0
- replicator/qml/panels/ObjectManager.qml +107 -0
- replicator/qml/panels/Preferences.qml +211 -0
- replicator/qml/panels/Presenter.qml +316 -0
- replicator/qml/panels/StatusBar.qml +77 -0
- replicator/qml/panels/Timeline.qml +149 -0
- replicator/qml/panels/Welcome.qml +126 -0
- replicator/qml/viewport/Callouts.qml +87 -0
- replicator/qml/viewport/EdgeMaterial.qml +16 -0
- replicator/qml/viewport/GridMaterial.qml +16 -0
- replicator/qml/viewport/HoloMaterial.qml +23 -0
- replicator/qml/viewport/NavGizmo.qml +72 -0
- replicator/qml/viewport/ReferenceMaterial.qml +17 -0
- replicator/qml/viewport/Viewport.qml +583 -0
- replicator/qt/__init__.py +0 -0
- replicator/qt/bridge.py +1427 -0
- replicator/qt/drawing_sheet.py +33 -0
- replicator/qt/envmap.py +40 -0
- replicator/qt/library.py +68 -0
- replicator/qt/mesh_geometry.py +167 -0
- replicator/qt/svg.py +41 -0
- replicator/research/__init__.py +0 -0
- replicator/research/lane.py +281 -0
- replicator/shaders/edge.frag +9 -0
- replicator/shaders/edge.vert +7 -0
- replicator/shaders/grid.frag +52 -0
- replicator/shaders/grid.vert +6 -0
- replicator/shaders/holo.frag +41 -0
- replicator/shaders/reference.frag +15 -0
- replicator/shaders/reference.vert +6 -0
- replicator/voice.py +120 -0
- replicator_workshop-0.1.0.dist-info/METADATA +410 -0
- replicator_workshop-0.1.0.dist-info/RECORD +118 -0
- replicator_workshop-0.1.0.dist-info/WHEEL +5 -0
- replicator_workshop-0.1.0.dist-info/entry_points.txt +3 -0
- replicator_workshop-0.1.0.dist-info/licenses/LICENSE +21 -0
- replicator_workshop-0.1.0.dist-info/licenses/vendor/mcp-for-blender/LICENSE +21 -0
- replicator_workshop-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Controls
|
|
3
|
+
import QtQuick.Layouts
|
|
4
|
+
import Replicator.UI
|
|
5
|
+
|
|
6
|
+
// Present mode: plays the checked explanation, one chapter at a time. A fixed light palette (ink and
|
|
7
|
+
// dim on the white stage), not theme tokens. Left / Right move, Space pauses, Esc leaves to Reverse (those keys
|
|
8
|
+
// are window Shortcuts; Main.qml routes them here while presenting).
|
|
9
|
+
// A sentence is shown as the checker kept it: cited with its source numbers, measured, or concept.
|
|
10
|
+
Item {
|
|
11
|
+
id: presenter
|
|
12
|
+
anchors.fill: parent
|
|
13
|
+
visible: window.present
|
|
14
|
+
|
|
15
|
+
property var window
|
|
16
|
+
property var viewport
|
|
17
|
+
property int chapter: 0
|
|
18
|
+
property bool playing: true
|
|
19
|
+
property bool ended: false // true when the timer reached the last chapter
|
|
20
|
+
property bool switching: false // inside studio.speak(): its own stop/start is not "speech ended"
|
|
21
|
+
|
|
22
|
+
readonly property var doc: studio.explanation
|
|
23
|
+
readonly property var chapters: doc.chapters || []
|
|
24
|
+
readonly property var cur: chapters.length ? chapters[chapter] : ({})
|
|
25
|
+
readonly property var sources: doc.sources || []
|
|
26
|
+
|
|
27
|
+
readonly property color ink: "#14181f"
|
|
28
|
+
readonly property color dim: "#5b6472"
|
|
29
|
+
readonly property color amber: "#b45309"
|
|
30
|
+
|
|
31
|
+
function go(i) {
|
|
32
|
+
if (!chapters.length) return
|
|
33
|
+
ended = false
|
|
34
|
+
const c = Math.max(0, Math.min(i, chapters.length - 1))
|
|
35
|
+
if (c === chapter) show(); else chapter = c // onChapterChanged calls show()
|
|
36
|
+
}
|
|
37
|
+
function next() {
|
|
38
|
+
if (!chapters.length) return
|
|
39
|
+
if (chapter < chapters.length - 1) go(chapter + 1)
|
|
40
|
+
else { playing = false; ended = true; studio.stopSpeaking() }
|
|
41
|
+
}
|
|
42
|
+
function prev() { if (chapter > 0) go(chapter - 1) }
|
|
43
|
+
function togglePlay() {
|
|
44
|
+
if (!chapters.length) return
|
|
45
|
+
if (!playing && ended) { playing = true; go(0); return }
|
|
46
|
+
playing = !playing
|
|
47
|
+
if (!playing) studio.stopSpeaking(); else show()
|
|
48
|
+
}
|
|
49
|
+
// Entering Present mode, or a new explanation arriving while presenting: start from the first chapter.
|
|
50
|
+
function start() {
|
|
51
|
+
ended = false; playing = true
|
|
52
|
+
if (!chapters.length) { studio.stopSpeaking(); window.isolate = ""; viewport.frameAll(true); return }
|
|
53
|
+
go(0)
|
|
54
|
+
}
|
|
55
|
+
// Put the current chapter on stage: isolate and frame its component, read it aloud, arm the timer.
|
|
56
|
+
function show() {
|
|
57
|
+
if (!chapters.length || !visible) return
|
|
58
|
+
window.isolate = cur.component || ""
|
|
59
|
+
viewport.frameComponent(cur.component || "")
|
|
60
|
+
advance.stop()
|
|
61
|
+
if (playing && studio.services.speak) { switching = true; studio.speak(cur.text || ""); switching = false }
|
|
62
|
+
if (playing && !studio.speaking) advance.start()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onChapterChanged: show()
|
|
66
|
+
onDocChanged: if (visible) start()
|
|
67
|
+
onVisibleChanged: if (!visible) { advance.stop(); studio.stopSpeaking() }
|
|
68
|
+
|
|
69
|
+
Timer { // advances when no voice is reading; a voice advances on speech end instead
|
|
70
|
+
id: advance
|
|
71
|
+
interval: Math.round((presenter.cur.seconds || 10) * 1000)
|
|
72
|
+
repeat: false
|
|
73
|
+
onTriggered: if (presenter.playing && presenter.visible) presenter.next()
|
|
74
|
+
}
|
|
75
|
+
Connections {
|
|
76
|
+
target: studio
|
|
77
|
+
function onVoiceChanged() { // `speaking` notifies through voiceChanged
|
|
78
|
+
if (presenter.switching || studio.speaking || !presenter.visible) return
|
|
79
|
+
if (presenter.playing && presenter.chapters.length) presenter.next()
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ------------------------------------------------- title and concept notice, top left
|
|
84
|
+
Column {
|
|
85
|
+
anchors.left: parent.left; anchors.top: parent.top
|
|
86
|
+
anchors.leftMargin: 30; anchors.topMargin: 26
|
|
87
|
+
spacing: 12
|
|
88
|
+
Text {
|
|
89
|
+
text: presenter.doc.subject || studio.title
|
|
90
|
+
color: presenter.ink; font.family: Theme.sans; font.pixelSize: 30; font.weight: Font.DemiBold
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
Rectangle {
|
|
94
|
+
anchors.left: parent.left; anchors.top: parent.top
|
|
95
|
+
anchors.leftMargin: 30; anchors.topMargin: 70
|
|
96
|
+
visible: presenter.doc.concept === true
|
|
97
|
+
width: Math.min(560, parent.width - 120); height: badgeCol.implicitHeight + 20; radius: 10
|
|
98
|
+
color: Qt.rgba(presenter.amber.r, presenter.amber.g, presenter.amber.b, 0.08)
|
|
99
|
+
border.color: Qt.rgba(presenter.amber.r, presenter.amber.g, presenter.amber.b, 0.5)
|
|
100
|
+
Column {
|
|
101
|
+
id: badgeCol
|
|
102
|
+
x: 12; y: 10; width: parent.width - 24; spacing: 4
|
|
103
|
+
Row { spacing: 6
|
|
104
|
+
Icon { name: "alert"; size: 14; color: presenter.amber }
|
|
105
|
+
Text { text: "CONCEPT"; color: presenter.amber; font.pixelSize: 11; font.weight: Font.Bold
|
|
106
|
+
font.letterSpacing: 1.5; font.family: Theme.sans
|
|
107
|
+
anchors.verticalCenter: parent.verticalCenter }
|
|
108
|
+
}
|
|
109
|
+
Text { text: presenter.doc.notice || ""; color: presenter.dim; width: parent.width
|
|
110
|
+
wrapMode: Text.WordWrap; font.pixelSize: 12; font.family: Theme.sans; lineHeight: 1.3 }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ------------------------------------------------- sources, right
|
|
115
|
+
Column {
|
|
116
|
+
anchors.right: parent.right; anchors.top: parent.top
|
|
117
|
+
anchors.rightMargin: 30; anchors.topMargin: 26
|
|
118
|
+
visible: presenter.chapters.length > 0 && presenter.sources.length > 0
|
|
119
|
+
width: 300
|
|
120
|
+
Text { text: "SOURCES · " + presenter.sources.length
|
|
121
|
+
color: presenter.dim; font.pixelSize: 10; font.weight: Font.DemiBold; font.letterSpacing: 1.5
|
|
122
|
+
font.family: Theme.sans }
|
|
123
|
+
Flickable {
|
|
124
|
+
width: 300
|
|
125
|
+
height: Math.min(contentHeight, presenter.height - 330)
|
|
126
|
+
contentWidth: 300; contentHeight: srcCol.height
|
|
127
|
+
clip: true
|
|
128
|
+
boundsBehavior: Flickable.StopAtBounds
|
|
129
|
+
Column {
|
|
130
|
+
id: srcCol
|
|
131
|
+
width: 300; spacing: 2
|
|
132
|
+
Repeater {
|
|
133
|
+
model: presenter.sources
|
|
134
|
+
delegate: Rectangle {
|
|
135
|
+
required property var modelData
|
|
136
|
+
width: 300; height: 34; radius: 8
|
|
137
|
+
color: srcMa.containsMouse ? Qt.rgba(presenter.dim.r, presenter.dim.g, presenter.dim.b, 0.08) : "transparent"
|
|
138
|
+
Row {
|
|
139
|
+
id: srcRow
|
|
140
|
+
x: 10; y: 6; spacing: 8
|
|
141
|
+
Text { text: "[" + modelData.n + "]"; color: Theme.accent; font.pixelSize: 12
|
|
142
|
+
font.weight: Font.Bold; font.family: Theme.mono }
|
|
143
|
+
Column {
|
|
144
|
+
id: srcCol2
|
|
145
|
+
anchors.verticalCenter: parent.verticalCenter
|
|
146
|
+
spacing: 1
|
|
147
|
+
Text { text: modelData.title; color: presenter.ink; font.pixelSize: 12
|
|
148
|
+
font.family: Theme.sans; elide: Text.ElideRight
|
|
149
|
+
width: Math.min(220, srcCol.width - 46) }
|
|
150
|
+
Text { text: modelData.domain; color: presenter.dim; font.pixelSize: 10
|
|
151
|
+
font.family: Theme.sans; elide: Text.ElideRight
|
|
152
|
+
width: Math.min(220, srcCol.width - 46) }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
MouseArea {
|
|
156
|
+
id: srcMa
|
|
157
|
+
anchors.fill: parent; hoverEnabled: true; cursorShape: Qt.PointingHandCursor
|
|
158
|
+
onClicked: Qt.openUrlExternally(modelData.url)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ------------------------------------------------- caption card, bottom centre
|
|
167
|
+
Rectangle {
|
|
168
|
+
id: card
|
|
169
|
+
visible: presenter.chapters.length > 0
|
|
170
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
171
|
+
y: parent.height - height - 60
|
|
172
|
+
width: Math.min(940, parent.width - 40)
|
|
173
|
+
// grows with the chapter's sentences up to a cap (then clips); the layout never sets this height
|
|
174
|
+
readonly property real sentH: Math.min(sentCol.implicitHeight, Math.max(80, presenter.height * 0.32))
|
|
175
|
+
height: 22 + 20 + 12 + sentH + 12 + 30 + 22
|
|
176
|
+
radius: 16
|
|
177
|
+
color: "#f2ffffff"
|
|
178
|
+
border.color: "#d5dae1"
|
|
179
|
+
ColumnLayout {
|
|
180
|
+
anchors.fill: parent
|
|
181
|
+
anchors.margins: 22
|
|
182
|
+
spacing: 12
|
|
183
|
+
RowLayout {
|
|
184
|
+
Layout.fillWidth: true
|
|
185
|
+
spacing: 10
|
|
186
|
+
Text { text: presenter.cur.title || ""; color: presenter.ink; font.pixelSize: 15
|
|
187
|
+
font.weight: Font.Bold; font.family: Theme.sans }
|
|
188
|
+
Item { Layout.fillWidth: true }
|
|
189
|
+
Text { text: (presenter.chapter + 1) + " / " + presenter.chapters.length
|
|
190
|
+
color: presenter.dim; font.pixelSize: 12; font.family: Theme.mono }
|
|
191
|
+
}
|
|
192
|
+
Item {
|
|
193
|
+
Layout.fillWidth: true
|
|
194
|
+
Layout.preferredHeight: card.sentH
|
|
195
|
+
clip: true
|
|
196
|
+
Column {
|
|
197
|
+
id: sentCol
|
|
198
|
+
width: parent.width; spacing: 8
|
|
199
|
+
Repeater {
|
|
200
|
+
model: presenter.cur.sentences || []
|
|
201
|
+
delegate: Column {
|
|
202
|
+
required property var modelData
|
|
203
|
+
width: sentCol.width
|
|
204
|
+
spacing: 5
|
|
205
|
+
Text {
|
|
206
|
+
width: parent.width; text: modelData.text
|
|
207
|
+
color: presenter.ink; font.pixelSize: 14; font.family: Theme.sans
|
|
208
|
+
wrapMode: Text.WordWrap; lineHeight: 1.35
|
|
209
|
+
}
|
|
210
|
+
Row {
|
|
211
|
+
spacing: 5
|
|
212
|
+
Repeater {
|
|
213
|
+
model: modelData.kind === "cited" ? modelData.cite : []
|
|
214
|
+
delegate: Rectangle {
|
|
215
|
+
required property int modelData
|
|
216
|
+
implicitWidth: t.implicitWidth + 12; implicitHeight: 18; radius: 9
|
|
217
|
+
color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.12)
|
|
218
|
+
Text { id: t; anchors.centerIn: parent; text: "[" + modelData + "]"
|
|
219
|
+
color: Theme.accent; font.pixelSize: 11; font.weight: Font.Bold
|
|
220
|
+
font.family: Theme.mono }
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
Rectangle {
|
|
224
|
+
visible: modelData.kind === "measured"
|
|
225
|
+
implicitWidth: 14 + 12; implicitHeight: 18; radius: 9
|
|
226
|
+
color: Qt.rgba(presenter.dim.r, presenter.dim.g, presenter.dim.b, 0.12)
|
|
227
|
+
Icon { anchors.centerIn: parent; name: "ruler"; size: 11; color: presenter.dim }
|
|
228
|
+
}
|
|
229
|
+
Rectangle {
|
|
230
|
+
visible: modelData.kind === "concept"
|
|
231
|
+
implicitWidth: t2.implicitWidth + 12; implicitHeight: 18; radius: 9
|
|
232
|
+
color: Qt.rgba(presenter.amber.r, presenter.amber.g, presenter.amber.b, 0.12)
|
|
233
|
+
Text { id: t2; anchors.centerIn: parent; text: "concept"
|
|
234
|
+
color: presenter.amber; font.pixelSize: 11; font.weight: Font.DemiBold
|
|
235
|
+
font.family: Theme.sans }
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
RowLayout {
|
|
243
|
+
Layout.fillWidth: true
|
|
244
|
+
spacing: 14
|
|
245
|
+
Row { spacing: 4; Layout.alignment: Qt.AlignVCenter
|
|
246
|
+
Repeater {
|
|
247
|
+
model: presenter.chapters.length
|
|
248
|
+
delegate: Rectangle {
|
|
249
|
+
required property int index
|
|
250
|
+
implicitWidth: 7; implicitHeight: 7; radius: 3.5
|
|
251
|
+
color: index === presenter.chapter ? presenter.ink : Qt.rgba(presenter.dim.r, presenter.dim.g, presenter.dim.b, 0.35)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
Item { Layout.fillWidth: true }
|
|
256
|
+
RowLayout {
|
|
257
|
+
spacing: 6
|
|
258
|
+
IconButton {
|
|
259
|
+
icon: "first"; tip: "Previous chapter (Left)"
|
|
260
|
+
onHit: presenter.prev()
|
|
261
|
+
}
|
|
262
|
+
IconButton {
|
|
263
|
+
icon: presenter.playing ? "pause" : "play"; tip: "Play / pause (Space)"
|
|
264
|
+
onHit: presenter.togglePlay()
|
|
265
|
+
}
|
|
266
|
+
IconButton {
|
|
267
|
+
icon: "last"; tip: "Next chapter (Right)"
|
|
268
|
+
onHit: presenter.next()
|
|
269
|
+
}
|
|
270
|
+
IconButton {
|
|
271
|
+
icon: studio.services.speak ? "speaker" : "speakerOff"
|
|
272
|
+
tip: studio.services.speak ? "Voice on" : "Voice off"
|
|
273
|
+
onHit: {
|
|
274
|
+
studio.setService("speak", JSON.stringify(!studio.services.speak))
|
|
275
|
+
if (!studio.services.speak) studio.stopSpeaking(); else presenter.show()
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// ------------------------------------------------- empty state: no explanation yet
|
|
284
|
+
Rectangle {
|
|
285
|
+
visible: presenter.chapters.length === 0
|
|
286
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
287
|
+
y: parent.height - height - 60 // where the captions will play, never over the model
|
|
288
|
+
width: Math.min(460, parent.width - 80); height: empCol.implicitHeight + 44; radius: 16
|
|
289
|
+
color: "#f2ffffff"; border.color: "#d5dae1"
|
|
290
|
+
ColumnLayout {
|
|
291
|
+
id: empCol
|
|
292
|
+
anchors.centerIn: parent
|
|
293
|
+
spacing: 12
|
|
294
|
+
Text {
|
|
295
|
+
text: "How it works"
|
|
296
|
+
color: presenter.ink; font.pixelSize: 18; font.weight: Font.DemiBold; font.family: Theme.sans
|
|
297
|
+
Layout.alignment: Qt.AlignHCenter
|
|
298
|
+
}
|
|
299
|
+
Pill {
|
|
300
|
+
primary: true
|
|
301
|
+
icon: "book"; text: "Explain how it works"
|
|
302
|
+
Layout.alignment: Qt.AlignHCenter
|
|
303
|
+
onHit: studio.explain()
|
|
304
|
+
}
|
|
305
|
+
Text {
|
|
306
|
+
text: !studio.services.research
|
|
307
|
+
? "Web research is off, so only measurements can be shown. Turn it on in Preferences (Ctrl+,)."
|
|
308
|
+
: "The local model checks every sentence before it is shown."
|
|
309
|
+
color: presenter.dim; font.pixelSize: 12; font.family: Theme.sans
|
|
310
|
+
wrapMode: Text.WordWrap; horizontalAlignment: Text.AlignHCenter
|
|
311
|
+
Layout.alignment: Qt.AlignHCenter
|
|
312
|
+
Layout.preferredWidth: Math.min(400, presenter.width - 128)
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Layouts
|
|
3
|
+
import QtQuick.Controls
|
|
4
|
+
import Replicator.UI
|
|
5
|
+
|
|
6
|
+
// The status bar: the last console line on the left, kernel read-outs on the right (step, parts, triangles,
|
|
7
|
+
// size, how long the last rebuild took and how much of it came from the cache, the model, the display GPU).
|
|
8
|
+
Rectangle {
|
|
9
|
+
id: sb
|
|
10
|
+
implicitHeight: 26
|
|
11
|
+
color: Theme.header
|
|
12
|
+
Rectangle { width: parent.width; height: 1; color: Theme.line }
|
|
13
|
+
readonly property var st: studio.stats
|
|
14
|
+
readonly property bool roomy: width >= 1760 // below this the diagnostics (TRIS, CACHE) give way to what a user reads
|
|
15
|
+
function n(v) { return v === undefined ? "—" : Number(v).toLocaleString(Qt.locale("en_US"), "f", 0) }
|
|
16
|
+
|
|
17
|
+
RowLayout {
|
|
18
|
+
anchors.fill: parent
|
|
19
|
+
anchors.leftMargin: 12; anchors.rightMargin: 12
|
|
20
|
+
spacing: 16
|
|
21
|
+
Rectangle { width: 7; height: 7; radius: 3.5; color: studio.busy !== "" ? Theme.amber : Theme.observed
|
|
22
|
+
SequentialAnimation on opacity { running: studio.busy !== ""; loops: Animation.Infinite; alwaysRunToEnd: true
|
|
23
|
+
NumberAnimation { to: 0.3; duration: 500 } NumberAnimation { to: 1; duration: 500 } } }
|
|
24
|
+
Text {
|
|
25
|
+
Layout.fillWidth: true
|
|
26
|
+
text: studio.lastLog; elide: Text.ElideRight
|
|
27
|
+
color: studio.lastLog.indexOf("failed") >= 0 || studio.lastLog.indexOf("rejected") >= 0 || studio.lastLog.indexOf("error") >= 0
|
|
28
|
+
? Theme.danger : Theme.dim
|
|
29
|
+
font.pixelSize: Theme.fsTiny; font.family: Theme.mono
|
|
30
|
+
}
|
|
31
|
+
Chip { visible: studio.stepCount > 0; label: "STEP"; value: (studio.step + 1) + "/" + studio.stepCount }
|
|
32
|
+
Chip { visible: studio.stepCount > 0; label: "PARTS"; value: sb.n(sb.st.parts) }
|
|
33
|
+
Chip { visible: studio.stepCount > 0 && sb.roomy; label: "TRIS"; value: sb.n(sb.st.triangles) }
|
|
34
|
+
Chip { visible: studio.dimensions.length === 3; label: "SIZE"
|
|
35
|
+
value: studio.dimensions.map(d => Math.round(d)).join(" × ") + " mm" }
|
|
36
|
+
Item {
|
|
37
|
+
visible: studio.mass.kg !== undefined
|
|
38
|
+
implicitWidth: massChip.implicitWidth; implicitHeight: massChip.implicitHeight
|
|
39
|
+
readonly property var m: studio.mass
|
|
40
|
+
Chip {
|
|
41
|
+
id: massChip
|
|
42
|
+
label: "MASS"
|
|
43
|
+
value: parent.m.kg === undefined ? "" : (parent.m.kg >= 1000 ? (parent.m.kg / 1000).toFixed(2) + " t"
|
|
44
|
+
: parent.m.kg >= 1 ? parent.m.kg.toFixed(1) + " kg" : (parent.m.kg * 1000).toFixed(0) + " g") + (parent.m.assumed ? " *" : "")
|
|
45
|
+
valueColor: parent.m.assumed ? Theme.inferred : Theme.text
|
|
46
|
+
}
|
|
47
|
+
MouseArea { id: massMa; anchors.fill: parent; hoverEnabled: true }
|
|
48
|
+
ToolTip.visible: massMa.containsMouse; ToolTip.delay: 300
|
|
49
|
+
ToolTip.text: "Computed from measured volumes and handbook densities by material name. Centre of gravity "
|
|
50
|
+
+ (m.cg ? m.cg.join(", ") : "") + " mm."
|
|
51
|
+
+ (m.assumed ? " * " + m.assumed + " part(s) have no recognised material and count as aluminium." : "")
|
|
52
|
+
+ (m.stands === false ? " It would tip over." : m.stands ? " It stands on its footprint." : "")
|
|
53
|
+
}
|
|
54
|
+
Chip { visible: studio.stepCount > 0; label: "KERNEL"
|
|
55
|
+
value: (sb.st.buildMs !== undefined ? sb.st.buildMs.toFixed(1) : "—") + " ms"
|
|
56
|
+
valueColor: sb.st.buildMs > 120 ? Theme.amber : Theme.text }
|
|
57
|
+
Chip { visible: studio.stepCount > 0 && sb.roomy; label: "CACHE"
|
|
58
|
+
value: sb.n(sb.st.cacheHits) + " hit · " + sb.n(sb.st.cacheMisses) + " built" }
|
|
59
|
+
Item { // the active printer: every STL/3MF export is gated on this bed (empty when none is set)
|
|
60
|
+
readonly property var p: studio.activePrinter
|
|
61
|
+
visible: p.id !== undefined
|
|
62
|
+
implicitWidth: printerChip.implicitWidth; implicitHeight: printerChip.implicitHeight
|
|
63
|
+
Chip {
|
|
64
|
+
id: printerChip
|
|
65
|
+
icon: "printer"
|
|
66
|
+
label: "PRINTER"
|
|
67
|
+
value: parent.visible ? parent.p.name + " " + parent.p.usable.join("×") : ""
|
|
68
|
+
}
|
|
69
|
+
MouseArea { id: printerMa; anchors.fill: parent; hoverEnabled: true }
|
|
70
|
+
ToolTip.visible: printerMa.containsMouse; ToolTip.delay: 300
|
|
71
|
+
ToolTip.text: !visible ? "" : "Prints for " + p.name + ": usable volume " + p.usable.join(" × ") + " mm after a 2 mm margin. "
|
|
72
|
+
+ "Set in services.json (active_printer); a build that overflows is refused, never clipped."
|
|
73
|
+
}
|
|
74
|
+
Rectangle { width: 1; height: 12; color: Theme.line }
|
|
75
|
+
Chip { icon: "chip"; label: "DRAWS ON"; value: studio.drawsOn }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Controls
|
|
3
|
+
import QtQuick.Layouts
|
|
4
|
+
import Replicator.UI
|
|
5
|
+
|
|
6
|
+
// The build timeline: one block per build step with its component colour along the top, a playhead you can drag,
|
|
7
|
+
// play forward (build) or backward (disassemble: parts dematerialize in reverse order) and a speed control.
|
|
8
|
+
Rectangle {
|
|
9
|
+
id: tl
|
|
10
|
+
color: Theme.panel
|
|
11
|
+
implicitHeight: 96
|
|
12
|
+
property int playDir: 0 // 1 build, -1 disassemble, 0 stopped
|
|
13
|
+
property real speed: 1.0
|
|
14
|
+
property var playlist: [] // step indices to play (a component's "how it's made"), [] = all
|
|
15
|
+
signal stepped()
|
|
16
|
+
|
|
17
|
+
function play(dir) {
|
|
18
|
+
if (studio.stepCount === 0) return
|
|
19
|
+
if (dir > 0 && studio.step >= studio.stepCount - 1 && playlist.length === 0) studio.setStep(0)
|
|
20
|
+
if (dir < 0 && studio.step <= 0) studio.setStep(studio.stepCount - 1)
|
|
21
|
+
playDir = dir
|
|
22
|
+
}
|
|
23
|
+
function stop() { playDir = 0; playlist = [] }
|
|
24
|
+
|
|
25
|
+
Timer {
|
|
26
|
+
interval: Math.max(120, 1150 / tl.speed)
|
|
27
|
+
repeat: true
|
|
28
|
+
running: tl.playDir !== 0
|
|
29
|
+
onTriggered: {
|
|
30
|
+
if (tl.playlist.length) {
|
|
31
|
+
const i = tl.playlist.indexOf(studio.step)
|
|
32
|
+
const next = tl.playDir > 0 ? tl.playlist[i + 1] : tl.playlist[i - 1]
|
|
33
|
+
if (next === undefined) { tl.stop(); return }
|
|
34
|
+
studio.setStep(next)
|
|
35
|
+
} else {
|
|
36
|
+
const n = studio.step + tl.playDir
|
|
37
|
+
if (n < 0 || n >= studio.stepCount) { tl.playDir = 0; return }
|
|
38
|
+
studio.setStep(n)
|
|
39
|
+
}
|
|
40
|
+
tl.stepped()
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
Rectangle { width: parent.width; height: 1; color: Theme.line }
|
|
44
|
+
|
|
45
|
+
ColumnLayout {
|
|
46
|
+
anchors.fill: parent
|
|
47
|
+
anchors.leftMargin: 10; anchors.rightMargin: 10; anchors.topMargin: 7; anchors.bottomMargin: 9
|
|
48
|
+
spacing: 7
|
|
49
|
+
RowLayout {
|
|
50
|
+
spacing: 2
|
|
51
|
+
IconButton { size: 26; iconSize: 14; icon: "first"; tip: "First step"; onHit: { tl.stop(); studio.setStep(0) } }
|
|
52
|
+
IconButton { size: 26; iconSize: 14; icon: "playBack"; tip: "Disassemble (play backward)"; keys: "Shift+Space"; on: tl.playDir < 0; onHit: tl.play(-1) }
|
|
53
|
+
IconButton { size: 26; iconSize: 14; icon: tl.playDir !== 0 ? "pause" : "play"; tip: tl.playDir !== 0 ? "Pause" : "Build (play forward)"; keys: "Space"
|
|
54
|
+
on: tl.playDir > 0; onHit: tl.playDir !== 0 ? tl.stop() : tl.play(1) }
|
|
55
|
+
IconButton { size: 26; iconSize: 14; icon: "last"; tip: "Finished build"; onHit: { tl.stop(); studio.setStep(studio.stepCount - 1) } }
|
|
56
|
+
Segmented {
|
|
57
|
+
Layout.leftMargin: 10
|
|
58
|
+
implicitHeight: 24; segWidth: 38
|
|
59
|
+
current: String(tl.speed)
|
|
60
|
+
model: [ { key: "0.5", label: "½×" }, { key: "1", label: "1×" }, { key: "2", label: "2×" }, { key: "4", label: "4×" } ]
|
|
61
|
+
onPick: (k) => tl.speed = parseFloat(k)
|
|
62
|
+
}
|
|
63
|
+
Text {
|
|
64
|
+
Layout.leftMargin: 14
|
|
65
|
+
text: studio.stepCount ? (studio.step + 1) + " / " + studio.stepCount : ""
|
|
66
|
+
color: Theme.accentHi; font.pixelSize: Theme.fsSmall; font.family: Theme.mono
|
|
67
|
+
}
|
|
68
|
+
Text {
|
|
69
|
+
Layout.leftMargin: 8
|
|
70
|
+
readonly property var op: studio.ops[studio.step]
|
|
71
|
+
text: studio.stepCount ? (op ? op.label : "") : "No build yet"
|
|
72
|
+
color: Theme.text; font.pixelSize: Theme.fs; font.family: Theme.sans; font.weight: Font.Medium
|
|
73
|
+
}
|
|
74
|
+
Rectangle {
|
|
75
|
+
readonly property var op: studio.ops[studio.step]
|
|
76
|
+
visible: !!op
|
|
77
|
+
Layout.leftMargin: 6
|
|
78
|
+
implicitWidth: opk.implicitWidth + 12; implicitHeight: 17; radius: 8.5; color: Theme.panel2
|
|
79
|
+
Text { id: opk; anchors.centerIn: parent; text: parent.op ? parent.op.op : ""; color: Theme.dim
|
|
80
|
+
font.pixelSize: Theme.fsTiny; font.family: Theme.mono }
|
|
81
|
+
}
|
|
82
|
+
Text {
|
|
83
|
+
visible: tl.playlist.length > 0
|
|
84
|
+
Layout.leftMargin: 8
|
|
85
|
+
text: "playing one component"
|
|
86
|
+
color: Theme.accentHi; font.pixelSize: Theme.fsSmall; font.family: Theme.sans
|
|
87
|
+
}
|
|
88
|
+
Item { Layout.fillWidth: true }
|
|
89
|
+
}
|
|
90
|
+
Item {
|
|
91
|
+
id: track
|
|
92
|
+
Layout.fillWidth: true
|
|
93
|
+
Layout.fillHeight: true
|
|
94
|
+
readonly property real bw: studio.stepCount ? width / studio.stepCount : width
|
|
95
|
+
Row {
|
|
96
|
+
anchors.fill: parent
|
|
97
|
+
Repeater {
|
|
98
|
+
model: studio.ops
|
|
99
|
+
delegate: Item {
|
|
100
|
+
id: blk
|
|
101
|
+
required property var modelData
|
|
102
|
+
required property int index
|
|
103
|
+
readonly property bool built: index <= studio.step
|
|
104
|
+
readonly property bool cur: index === studio.step
|
|
105
|
+
readonly property color cc: modelData.color
|
|
106
|
+
width: track.bw; height: track.height
|
|
107
|
+
Rectangle {
|
|
108
|
+
anchors.fill: parent; anchors.leftMargin: 1; anchors.rightMargin: 1; radius: Theme.r1
|
|
109
|
+
color: blk.built ? Qt.rgba(blk.cc.r, blk.cc.g, blk.cc.b, blk.cur ? 0.42 : 0.2) : Theme.panel2
|
|
110
|
+
border.width: blk.cur ? 1 : 0
|
|
111
|
+
border.color: blk.cc
|
|
112
|
+
Behavior on color { ColorAnimation { duration: Theme.med } }
|
|
113
|
+
Rectangle { // component strip
|
|
114
|
+
x: 1; y: 1; width: parent.width - 2; height: 3; radius: 1.5
|
|
115
|
+
color: blk.cc; opacity: blk.built ? 1 : 0.3
|
|
116
|
+
}
|
|
117
|
+
Rectangle { anchors.fill: parent; radius: parent.radius; color: Theme.hover; visible: tipArea.containsMouse }
|
|
118
|
+
}
|
|
119
|
+
Text {
|
|
120
|
+
anchors.centerIn: parent; anchors.verticalCenterOffset: 2; width: parent.width - 8
|
|
121
|
+
text: blk.modelData.label; elide: Text.ElideRight; horizontalAlignment: Text.AlignHCenter
|
|
122
|
+
color: blk.cur ? Theme.text : blk.built ? Theme.dim : Theme.faint
|
|
123
|
+
font.pixelSize: Theme.fsTiny; font.family: Theme.sans; font.weight: blk.cur ? Font.DemiBold : Font.Normal
|
|
124
|
+
visible: track.bw > 46
|
|
125
|
+
}
|
|
126
|
+
ToolTip.visible: tipArea.containsMouse
|
|
127
|
+
ToolTip.delay: 300
|
|
128
|
+
ToolTip.text: (index + 1) + ". " + modelData.label + " · " + modelData.op + " · " + modelData.component
|
|
129
|
+
MouseArea { id: tipArea; anchors.fill: parent; hoverEnabled: true; acceptedButtons: Qt.NoButton }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
Rectangle { // playhead
|
|
134
|
+
x: (studio.step + 1) * track.bw - 1
|
|
135
|
+
width: 2; height: track.height + 8; y: -4; radius: 1; color: Theme.accent
|
|
136
|
+
visible: studio.stepCount > 0
|
|
137
|
+
Behavior on x { NumberAnimation { duration: Theme.fast + 40; easing.type: Easing.OutCubic } }
|
|
138
|
+
Rectangle { anchors.horizontalCenter: parent.horizontalCenter; y: -3; width: 8; height: 8; radius: 4; color: Theme.accent }
|
|
139
|
+
}
|
|
140
|
+
MouseArea {
|
|
141
|
+
anchors.fill: parent
|
|
142
|
+
function seek(x) { tl.stop(); studio.setStep(Math.floor(Math.max(0, x) / track.bw)) }
|
|
143
|
+
onPressed: (m) => seek(m.x)
|
|
144
|
+
onPositionChanged: (m) => seek(m.x)
|
|
145
|
+
onClicked: (m) => { const o = studio.ops[Math.floor(m.x / track.bw)]; if (o) studio.select(o.id) }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import QtQuick
|
|
2
|
+
import QtQuick.Layouts
|
|
3
|
+
import Replicator.UI
|
|
4
|
+
|
|
5
|
+
// The start screen, shown while nothing is open: the tagline, a slot the dream capsule floats into, three ways in
|
|
6
|
+
// (open, reverse engineer, picture to 3D), the bundled examples and the most recent builds.
|
|
7
|
+
Item {
|
|
8
|
+
id: w
|
|
9
|
+
signal openFile(string path)
|
|
10
|
+
signal runAction(string id)
|
|
11
|
+
readonly property real capsuleY: col.y + slot.y + 4 // Main.qml parks the dream capsule here
|
|
12
|
+
|
|
13
|
+
readonly property var kinds: ({ example: ["Example", "build"], dream: ["Specified", "sparkle"],
|
|
14
|
+
reverse: ["Reverse", "reverse"], image: ["Image to 3D", "image"] })
|
|
15
|
+
|
|
16
|
+
Flickable {
|
|
17
|
+
anchors.fill: parent
|
|
18
|
+
contentHeight: col.y + col.height + 40
|
|
19
|
+
clip: true
|
|
20
|
+
boundsBehavior: Flickable.StopAtBounds
|
|
21
|
+
Column {
|
|
22
|
+
id: col
|
|
23
|
+
width: Math.min(parent.width - 80, 1040)
|
|
24
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
25
|
+
y: Math.max(36, w.height * 0.11)
|
|
26
|
+
spacing: 0
|
|
27
|
+
|
|
28
|
+
Text {
|
|
29
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
30
|
+
text: "You specify it, you build it."
|
|
31
|
+
color: Theme.viewText; font.family: Theme.sans; font.pixelSize: 38; font.weight: Font.DemiBold
|
|
32
|
+
font.letterSpacing: -0.6
|
|
33
|
+
}
|
|
34
|
+
Item { width: 1; height: 10 }
|
|
35
|
+
Text {
|
|
36
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
37
|
+
width: Math.min(parent.width, 640); horizontalAlignment: Text.AlignHCenter; wrapMode: Text.WordWrap
|
|
38
|
+
text: "Describe an object. A local model plans it, writes the build program, and it assembles on the floor one step at a time."
|
|
39
|
+
color: Theme.viewDim; font.family: Theme.sans; font.pixelSize: 14; lineHeight: 1.35
|
|
40
|
+
}
|
|
41
|
+
Item { width: 1; height: 28 }
|
|
42
|
+
Item { id: slot; width: 1; height: 62 } // the dream capsule lands here
|
|
43
|
+
Item { width: 1; height: 22 }
|
|
44
|
+
|
|
45
|
+
Row {
|
|
46
|
+
anchors.horizontalCenter: parent.horizontalCenter
|
|
47
|
+
spacing: 10
|
|
48
|
+
Repeater {
|
|
49
|
+
model: [ ["open", "folder", "Open a build", "Ctrl+O"], ["import", "importIn", "Take a model apart", "Ctrl+I"],
|
|
50
|
+
["image3d", "image", "Picture to 3D", "Ctrl+Shift+I"], ["commander", "search", "Every action", "Ctrl+K"] ]
|
|
51
|
+
delegate: Rectangle {
|
|
52
|
+
required property var modelData
|
|
53
|
+
width: tRow.implicitWidth + 30; height: 38; radius: 19
|
|
54
|
+
color: tMa.containsMouse ? Theme.hover : "transparent"
|
|
55
|
+
border.color: tMa.containsMouse ? Theme.accentLine : Theme.glassLine
|
|
56
|
+
Row {
|
|
57
|
+
id: tRow
|
|
58
|
+
anchors.centerIn: parent; spacing: 8
|
|
59
|
+
Icon { name: modelData[1]; size: 15; color: Theme.accentHi; anchors.verticalCenter: parent.verticalCenter }
|
|
60
|
+
Text { text: modelData[2]; color: Theme.viewText; font.pixelSize: Theme.fs; font.family: Theme.sans
|
|
61
|
+
font.weight: Font.Medium; anchors.verticalCenter: parent.verticalCenter }
|
|
62
|
+
Kbd { keys: modelData[3]; anchors.verticalCenter: parent.verticalCenter }
|
|
63
|
+
}
|
|
64
|
+
MouseArea { id: tMa; anchors.fill: parent; hoverEnabled: true; cursorShape: Qt.PointingHandCursor
|
|
65
|
+
onClicked: w.runAction(modelData[0]) }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
Item { width: 1; height: 40 }
|
|
70
|
+
|
|
71
|
+
Repeater {
|
|
72
|
+
model: [ ["EXAMPLES", studio.examples], ["RECENT", studio.recents] ]
|
|
73
|
+
delegate: Column {
|
|
74
|
+
id: sect
|
|
75
|
+
required property var modelData
|
|
76
|
+
width: col.width
|
|
77
|
+
visible: modelData[1].length > 0
|
|
78
|
+
spacing: 10
|
|
79
|
+
bottomPadding: 26
|
|
80
|
+
Text { text: sect.modelData[0]; color: Theme.viewDim; font.pixelSize: Theme.fsTiny; font.family: Theme.sans
|
|
81
|
+
font.weight: Font.DemiBold; font.letterSpacing: 1.8 }
|
|
82
|
+
Grid {
|
|
83
|
+
id: grid
|
|
84
|
+
columns: Math.max(1, Math.floor((col.width + 12) / 252))
|
|
85
|
+
spacing: 12
|
|
86
|
+
Repeater {
|
|
87
|
+
model: sect.modelData[1]
|
|
88
|
+
delegate: Rectangle {
|
|
89
|
+
id: card
|
|
90
|
+
required property var modelData
|
|
91
|
+
width: (col.width - (grid.columns - 1) * 12) / grid.columns; height: 104; radius: Theme.r3
|
|
92
|
+
color: cMa.containsMouse ? Theme.raised : Theme.glass
|
|
93
|
+
border.color: cMa.containsMouse ? Theme.accentLine : Theme.glassLine
|
|
94
|
+
Behavior on color { ColorAnimation { duration: Theme.fast } }
|
|
95
|
+
scale: cMa.pressed ? 0.985 : 1
|
|
96
|
+
Behavior on scale { NumberAnimation { duration: Theme.fast } }
|
|
97
|
+
ColumnLayout {
|
|
98
|
+
anchors.fill: parent; anchors.margins: 13
|
|
99
|
+
spacing: 5
|
|
100
|
+
RowLayout {
|
|
101
|
+
spacing: 6
|
|
102
|
+
Icon { name: w.kinds[card.modelData.kind][1]; size: 13; color: Theme.accentHi }
|
|
103
|
+
Text { text: w.kinds[card.modelData.kind][0].toUpperCase(); color: Theme.accentHi
|
|
104
|
+
font.pixelSize: 9; font.family: Theme.sans; font.weight: Font.Bold; font.letterSpacing: 1.2 }
|
|
105
|
+
Item { Layout.fillWidth: true }
|
|
106
|
+
Text { text: card.modelData.when; color: Theme.faint; font.pixelSize: 9; font.family: Theme.mono
|
|
107
|
+
visible: card.modelData.kind !== "example" }
|
|
108
|
+
}
|
|
109
|
+
Text { text: card.modelData.name; color: Theme.text; font.pixelSize: Theme.fsLarge; font.family: Theme.sans
|
|
110
|
+
font.weight: Font.DemiBold; elide: Text.ElideRight; Layout.fillWidth: true }
|
|
111
|
+
Item { Layout.fillHeight: true }
|
|
112
|
+
Text { text: card.modelData.steps + (card.modelData.steps === 1 ? " step · " : " steps · ") + card.modelData.components + (card.modelData.components === 1 ? " component" : " components")
|
|
113
|
+
color: Theme.dim; font.pixelSize: Theme.fsSmall; font.family: Theme.sans }
|
|
114
|
+
Text { text: card.modelData.ops; color: Theme.faint; font.pixelSize: Theme.fsTiny; font.family: Theme.mono
|
|
115
|
+
elide: Text.ElideRight; Layout.fillWidth: true }
|
|
116
|
+
}
|
|
117
|
+
MouseArea { id: cMa; anchors.fill: parent; hoverEnabled: true; cursorShape: Qt.PointingHandCursor
|
|
118
|
+
onClicked: w.openFile(card.modelData.path) }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|