Skip to content

Commit

Permalink
Add file and make gui_default more exciting
Browse files Browse the repository at this point in the history
  • Loading branch information
ervanalb authored and zbanks committed Oct 14, 2018
1 parent c157b65 commit c609a11
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 10 deletions.
108 changes: 98 additions & 10 deletions resources/models/gui_default.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,127 @@
{
"edges": [
{
"fromVertex": 0,
"fromVertex": 7,
"toInput": 0,
"toVertex": 1
"toVertex": 8
},
{
"fromVertex": 6,
"toInput": 0,
"toVertex": 9
},
{
"fromVertex": 2,
"toInput": 0,
"toVertex": 6
},
{
"fromVertex": 10,
"toInput": 0,
"toVertex": 2
},
{
"fromVertex": 5,
"toInput": 0,
"toVertex": 10
},
{
"fromVertex": 8,
"toInput": 0,
"toVertex": 12
},
{
"fromVertex": 1,
"toInput": 0,
"toVertex": 7
},
{
"fromVertex": 12,
"toInput": 1,
"toVertex": 2
},
{
"fromVertex": 2,
"fromVertex": 11,
"toInput": 0,
"toVertex": 0
},
{
"fromVertex": 4,
"toInput": 0,
"toVertex": 11
},
{
"fromVertex": 9,
"toInput": 0,
"toVertex": 3
},
{
"fromVertex": 3,
"toInput": 0,
"toVertex": 4
}
],
"vertices": [
{
"file": "images/nyancat.gif",
"type": "ScreenOutputNode"
},
{
"file": "effects/oscope.glsl",
"intensity": 0.4811999999999999,
"type": "EffectNode"
},
{
"file": "effects/uvmap.glsl",
"intensity": 0.1,
"type": "EffectNode"
},
{
"file": "effects/rfuzz.glsl",
"intensity": 0.2,
"type": "EffectNode"
},
{
"file": "effects/edge.glsl",
"intensity": 1,
"type": "EffectNode"
},
{
"file": "images/logo.png",
"type": "ImageNode"
},
{
"file": "effects/test.glsl",
"intensity": 0,
"file": "effects/diodelpf.glsl",
"intensity": 0.34769999999999984,
"type": "EffectNode"
},
{
"file": "effects/droste.glsl",
"intensity": 1,
"type": "EffectNode"
},
{
"file": "effects/warble.glsl",
"intensity": 0.5181,
"type": "EffectNode"
},
{
"file": "effects/rainblur.glsl",
"intensity": 1,
"type": "EffectNode"
},
{
"file": "effects/zoomout.glsl",
"intensity": 0.3,
"type": "EffectNode"
},
{
"file": "effects/interstellar.glsl",
"intensity": 0,
"file": "effects/smoky.glsl",
"intensity": 0.1,
"type": "EffectNode"
},
{
"file": "effects/crossfader.glsl",
"intensity": 0,
"file": "effects/lpf.glsl",
"intensity": 0.5952,
"type": "EffectNode"
}
]
Expand Down
103 changes: 103 additions & 0 deletions resources/qml/ConsoleWidget.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import QtQuick 2.7
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.2
import QtQml.Models 2.2
import radiance 1.0
import "."

Item {
id: consoleWidget
property var graph
property alias count: listModel.count
signal popOut()
signal popIn()

function message(videoNode, str) {
addItem("message", videoNode, str)
}

function warning(videoNode, str) {
addItem("warning", videoNode, str)
}

function error(videoNode, str) {
addItem("error", videoNode, str)
}

function addItem(type, videoNode, str) {
listModel.append({"type": type, "videoNode": videoNode, "str": str});
popOut();
}

ListView {
id: listView
clip: true

anchors.fill: parent

model: ListModel {
id: listModel
}
delegate: Item {
height: t.height + 8
width: parent.width - 15
anchors.margins: 5
Rectangle {
anchors.fill: parent
anchors.margins: 2
opacity: 0.1
color: type == "warning" ? "gold" : type == "error" ? "red" : "green"
radius: 3
}
ColumnLayout {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
Text {
color: RadianceStyle.mainTextColor
id: t
text: str
Layout.maximumWidth: parent.width - 20
}
}
MouseArea {
anchors.fill: parent
onClicked: {
graph.view.tileForVideoNode(videoNode).forceActiveFocus();
}
}
Rectangle {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 10
width: 12
height: 12
color: "transparent"
border.color: RadianceStyle.mainLineColor
border.width: 1
Text {
text: "X"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: RadianceStyle.mainTextColor
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
listModel.remove(index)
}
}
}
}

onCountChanged: {
if (count == 0) popIn();
}
onContentHeightChanged: {
contentY = contentHeight - height;
}

ScrollIndicator.vertical: ScrollIndicator {}
}
}

0 comments on commit c609a11

Please sign in to comment.