mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Add a large set of QML components (qml/Material, qml/MetaBuilder, qml/dbal) and a QmlComponents symlink for local development; migrate many frontends/qt6 files into qml/qt6. Replace the email client bootloader with a self-contained demo UI using FakeMUI primitives (MailboxLayout, ThreadList, EmailHeader, ComposeWindow), demo data, handlers, and new folder-navigation styles in globals.css. Update several QML component APIs to new signal/handler names (e.g. selectAllChanged→selectAllToggled, pageChanged→pageRequested, *Changed→*Edited) to standardize events. Add find_config_files() to frontends/qt6/generate_cmake.py to include config JS/JSON in QML/files and resources. Also add /frontends/qt6/_build to .gitignore.
151 lines
3.9 KiB
QML
151 lines
3.9 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
spacing: 14
|
|
|
|
property var node: null
|
|
property int childCount: 0
|
|
|
|
signal nameChanged(string name)
|
|
signal typeChanged(string type)
|
|
signal visibleChanged(bool visible)
|
|
signal addProp()
|
|
signal removeProp(int index)
|
|
|
|
// Name field
|
|
ColumnLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 4
|
|
CText { variant: "caption"; text: "NAME" }
|
|
CTextField {
|
|
Layout.fillWidth: true
|
|
text: root.node ? root.node.name : ""
|
|
onTextChanged: {
|
|
if (root.node && text !== root.node.name)
|
|
root.nameChanged(text)
|
|
}
|
|
}
|
|
}
|
|
|
|
// Type selector
|
|
ColumnLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 4
|
|
CText { variant: "caption"; text: "TYPE" }
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 6
|
|
|
|
Repeater {
|
|
model: ["container", "layout", "widget", "atom"]
|
|
delegate: CButton {
|
|
text: modelData
|
|
size: "sm"
|
|
variant: (root.node && root.node.type === modelData) ? "primary" : "ghost"
|
|
onClicked: root.typeChanged(modelData)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Visible toggle
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 12
|
|
CText { variant: "body2"; text: "Visible" }
|
|
Item { Layout.fillWidth: true }
|
|
CSwitch {
|
|
checked: root.node ? root.node.visible : false
|
|
onCheckedChanged: {
|
|
if (root.node && checked !== root.node.visible)
|
|
root.visibleChanged(checked)
|
|
}
|
|
}
|
|
}
|
|
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
// Info row
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 16
|
|
ColumnLayout {
|
|
spacing: 2
|
|
CText { variant: "caption"; text: "DEPTH" }
|
|
CText { variant: "body1"; text: root.node ? root.node.depth.toString() : "0" }
|
|
}
|
|
ColumnLayout {
|
|
spacing: 2
|
|
CText { variant: "caption"; text: "CHILDREN" }
|
|
CText { variant: "body1"; text: root.childCount.toString() }
|
|
}
|
|
ColumnLayout {
|
|
spacing: 2
|
|
CText { variant: "caption"; text: "NODE ID" }
|
|
CText { variant: "body1"; text: root.node ? root.node.nodeId.toString() : "-" }
|
|
}
|
|
}
|
|
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
// Custom props header
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 8
|
|
CText { variant: "h4"; text: "Custom Properties" }
|
|
Item { Layout.fillWidth: true }
|
|
CButton {
|
|
text: "Add Prop"
|
|
variant: "ghost"
|
|
size: "sm"
|
|
onClicked: root.addProp()
|
|
}
|
|
}
|
|
|
|
// Props list
|
|
ListView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
clip: true
|
|
spacing: 6
|
|
model: root.node ? root.node.props : []
|
|
|
|
delegate: CPaper {
|
|
width: parent ? parent.width : 300
|
|
height: 44
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
anchors.margins: 8
|
|
spacing: 8
|
|
|
|
CText {
|
|
variant: "body2"
|
|
text: modelData.key
|
|
Layout.preferredWidth: 120
|
|
opacity: 0.7
|
|
}
|
|
|
|
CText {
|
|
variant: "body1"
|
|
text: modelData.value
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
CButton {
|
|
text: "\u00D7"
|
|
variant: "ghost"
|
|
size: "sm"
|
|
onClicked: root.removeProp(index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|