mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
191 files reformatted across views, components, widgets, hybrid, contexts. New components: CCreateSchemaDialog, CAddFieldDialog, CAdminContentPanel. JS helpers: connBadgeStatus/Text, adminStats, exampleLabels, onLevelClicked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
84 lines
2.4 KiB
QML
84 lines
2.4 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
property var workflows: []
|
|
property int selectedWorkflowIndex: -1
|
|
|
|
signal workflowSelected(int index)
|
|
signal nodeDoubleClicked(string nodeType, real canvasCenterX,
|
|
real canvasCenterY)
|
|
|
|
// Pass canvas dimensions so parent can compute center
|
|
property real canvasWidth: 800
|
|
property real canvasHeight: 600
|
|
|
|
Layout.preferredWidth: 260
|
|
Layout.fillHeight: true
|
|
color: Theme.paper
|
|
border.color: Theme.border
|
|
border.width: 1
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
|
|
// Workflow List Section
|
|
ColumnLayout {
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 200
|
|
Layout.margins: 12
|
|
spacing: 4
|
|
|
|
CText { variant: "h4"; text: "Workflows" }
|
|
CText { variant: "caption"; text: workflows.length + " registered" }
|
|
|
|
CDivider { Layout.fillWidth: true; Layout.topMargin: 4
|
|
Layout.bottomMargin: 4 }
|
|
|
|
ListView {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
model: workflows.length
|
|
spacing: 2
|
|
clip: true
|
|
delegate: CListItem {
|
|
width: parent ? parent.width : 200
|
|
title: workflows[index].name
|
|
subtitle: (workflows[index].nodes
|
|
? workflows[index].nodes.length : 0) + " nodes"
|
|
selected: root.selectedWorkflowIndex === index
|
|
onClicked: root.workflowSelected(index)
|
|
|
|
CBadge {
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 8
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: workflows[index].active ? "ON" : "OFF"
|
|
accent: workflows[index].active
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
CDivider { Layout.fillWidth: true }
|
|
|
|
// Node Palette Section
|
|
CNodePalette {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Layout.margins: 12
|
|
|
|
onNodeDoubleClicked: function(nodeType) {
|
|
var cx = root.canvasWidth / 2
|
|
var cy = root.canvasHeight / 2
|
|
root.nodeDoubleClicked(nodeType, cx, cy)
|
|
}
|
|
}
|
|
}
|
|
}
|