Skip to content

Commit

Permalink
NodeEditor: ObjectGraph styling fixes.
Browse files Browse the repository at this point in the history
MacOS deployment configuration.
  • Loading branch information
dinusv committed Jun 1, 2020
1 parent f1336be commit 577290c
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 28 deletions.
1 change: 1 addition & 0 deletions lib/lveditqmljs/src/projectqmlscope.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QHash>
#include <QSharedPointer>
#include <QMutex>
#include <QTimer>

#include "live/lveditqmljsglobal.h"
#include "live/qmllanguageinfo.h"
Expand Down
23 changes: 21 additions & 2 deletions livekeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,17 +774,18 @@
{
"copy": {
"{release}/bin/livekeys.app": "-",
"{source}/samples": "livekeys.app/Contents/Samples",
"{source}/project": "livekeys.app/Contents/Project",
"{opencv_dir}/lib/libopencv_*": "livekeys.app/Contents/Frameworks/OpenCV.framework/Libraries/-",
"{qtdir}/qml": {
"Qt": "livekeys.app/Contents/PlugIns/Qt",
"QtCanvas3D": "livekeys.app/Contents/PlugIns/QtCanvas3D",
"Qt3D": "livekeys.app/Contents/PlugIns/Qt3D",
"QtGraphicalEffects": "livekeys.app/Contents/PlugIns/QtGraphicalEffects",
"QtMultimedia": "livekeys.app/Contents/PlugIns/QtMultimedia",
"QtQml": "livekeys.app/Contents/PlugIns/QtQml",
"QtQuick": "livekeys.app/Contents/PlugIns/QtQuick",
"QtQuick.2": "livekeys.app/Contents/PlugIns/QtQuick.2",
"QtQuick3D": "livekeys.app/Contents/PlugIns/QtQuick3D",
"QtWebEngine": "livekeys.app/Contents/PlugIns/QtWebEngine",
"QtWebSockets": "livekeys.app/Contents/PlugIns/QtWebSockets"
},
"{qtdir}/plugins": {
Expand Down Expand Up @@ -814,6 +815,8 @@
"QtPositioning.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtPositioning.framework/Versions/5",
"QtPrintSupport.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5",
"QtQml.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQml.framework/Versions/5",
"QtQmlModels.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQmlModels.framework/Versions/5",
"QtQmlWorkerScript.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQmlWorkerScript.framework/Versions/5",
"QtQuick.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQuick.framework/Versions/5",
"QtQuickControls2.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQuickControls2.framework/Versions/5",
"QtQuickParticles.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtQuickParticles.framework/Versions/5",
Expand All @@ -823,6 +826,10 @@
"QtUiPlugin.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtUiPlugin.framework/Versions/5",
"QtWebChannel.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWebChannel.framework/Versions/5",
"QtWebSockets.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWebSockets.framework/Versions/5",
"QtWebEngine.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWebEngine.framework/Versions/5",
"QtWebEngineCore.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/5",
"QtWebEngineCore.framework/Versions/5/Resources": "livekeys.app/Contents/Frameworks/QtWebEngineCore.framework/Resources",
"QtWebEngineCore.framework/Helpers": "livekeys.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers",
"QtWebView.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWebView.framework/Versions/5",
"QtWidgets.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtWidgets.framework/Versions/5",
"QtXml.framework/Versions/5": "livekeys.app/Contents/Frameworks/QtXml.framework/Versions/5",
Expand Down Expand Up @@ -921,6 +928,13 @@
]
}
},
{
"dylibaddrpath": {
"livekeys.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess*": [
"@executable_path/../../../../.."
]
}
},
{
"solveincludes": [
{
Expand Down Expand Up @@ -980,6 +994,11 @@
"to": "livekeys.app/Contents/Dev/plugins/lcvvideo/include"
}
]
},
{
"livedoc": {
"path": "livekeys.app/Contents"
}
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/workspace/nodeeditor/qml/ObjectGraph.qml
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,14 @@ Rectangle{
edgeDelegate: Edge{}
verticalDockDelegate : VerticalDock{}
portDelegate: Port{}
selectionDelegate: Selection{}
connectorItem : PortConnector{}
onNodeClicked : root.nodeClicked(node)
onConnectorEdgeInserted : root.userEdgeInserted(edge)

selectionColor: "#fff"
selectionWeight: 1

nodeDelegate: ObjectNode{}
Component.onCompleted : {
styleManager.styles.at(1).lineColor = '#666'
Expand Down
4 changes: 3 additions & 1 deletion plugins/workspace/nodeeditor/qml/ObjectNode.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Qan.NodeItem{
property Component paletteContainerFactory: Component{ PaletteContainer{} }
property Component addBoxFactory: Component{ AddQmlBox{} }

resizable: false


Rectangle{
id: wrapper
Expand Down Expand Up @@ -212,7 +214,7 @@ Qan.NodeItem{
id: paletteAddMouse
anchors.fill: parent
onClicked: {

root.selected = false
var palettes = documentHandler.codeHandler.findPalettes(editingFragment.position(), true)
if (palettes.size() ){
paletteHeaderList.forceActiveFocus()
Expand Down
62 changes: 62 additions & 0 deletions plugins/workspace/nodeeditor/qml/Selection.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import QtQuick 2.7

Rectangle {
id: selectionItem

// QuickQanava global selection properties support: see qan::Selectable,
// qan::Graph::configureSelectionItem() and qan::Graph::createSelectionItem() for documentation
property real selectionMargin: 3
property color selectionColor: "#999"
property real selectionWeight: 1

anchors.margins: selectionMargin
border {
width: selectionWeight
color: selectionColor
}
opacity: 0.1
color: Qt.rgba(0.,0.,0.,0.)
clip: true
radius: 4
visible: true

transformOrigin: Item.Center // scale is used in transitions

// States Management //----------------------------------------------------
states: [
State {
name: "UNSELECTED"
PropertyChanges { target: selectionItem; opacity : 0.; scale : 0.99 }
},
State {
name: "SELECTED"
PropertyChanges { target: selectionItem; opacity : 0.8; scale : 1. }
}
]
transitions: [
Transition {
from: "UNSELECTED"; to: "SELECTED"
SequentialAnimation {
ScriptAction { script: selectionItem.visible = true }
ParallelAnimation {
NumberAnimation { target: selectionItem; properties: "opacity"; duration: 300 }
NumberAnimation { target: selectionItem; properties: "scale";
easing.overshoot: 30.; easing.type: Easing.OutBack; duration: 300 }
}
}
},
Transition {
from: "SELECTED"; to: "UNSELECTED"
SequentialAnimation {
ParallelAnimation {
NumberAnimation { target: selectionItem; properties: "opacity"; duration: 300 }
NumberAnimation { target: selectionItem; properties: "scale";
easing.type: Easing.InBack;
easing.overshoot: 30.;
duration: 300 }
}
ScriptAction { script: selectionItem.visible = false }
}
}
]
}
1 change: 1 addition & 0 deletions plugins/workspace/nodeeditor/qml/qmldir
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ ObjectNodeProperty 1.0 ObjectNodeProperty.qml
Port 1.0 Port.qml
PortConnector 1.0 PortConnector.qml
VerticalDock 1.0 VerticalDock.qml
Selection 1.0 Selection.qml
25 changes: 0 additions & 25 deletions samples/executable.qml

This file was deleted.

0 comments on commit 577290c

Please sign in to comment.