Skip to content

Commit 7559d74

Browse files
authored
Merge pull request #186 from cneben/develop
2.2.0
2 parents 9af0dbb + b447aae commit 7559d74

21 files changed

+343
-174
lines changed

.github/workflows/build-linux-qt5.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Linux build develop
1+
name: Linux Qt5 QMake g++
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, develop]
66

77
jobs:
88
test-build:
@@ -20,7 +20,7 @@ jobs:
2020
modules: qtcore qttools qtgui qtquickcontrols2
2121
version: 5.15.2
2222
target: desktop
23-
#setup-python: false
23+
setup-python: false
2424

2525
- name: Create Build Dir
2626
run: mkdir build

.github/workflows/build-win64-qt5.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Win64 Qt5 QMake msvc2019
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
7+
jobs:
8+
test-build:
9+
runs-on: windows-2019
10+
timeout-minutes: 120
11+
steps:
12+
- name: Clone QuickQanava
13+
uses: actions/checkout@v2
14+
with:
15+
ref: master
16+
17+
- name: Install Qt
18+
uses: jurplel/install-qt-action@v3
19+
with:
20+
version: '5.15.*'
21+
host: 'windows'
22+
target: 'desktop'
23+
arch: 'win64_msvc2019_64'
24+
dir: '${{ github.workspace }}/'
25+
install-deps: 'true'
26+
modules: 'qtwebengine'
27+
cache: 'false'
28+
cache-key-prefix: 'install-qt-action'
29+
setup-python: 'false'
30+
31+
- name: Create Build Dir
32+
run: mkdir build
33+
working-directory: ${{runner.workspace}}
34+
35+
- uses: ilammy/msvc-dev-cmd@v1
36+
37+
- name: Configure qmake
38+
run: |
39+
QT_SELECT=5 qmake CONFIG+=release -o Makefile ${GITHUB_WORKSPACE}/quickqanava.pro
40+
working-directory: ${{runner.workspace}}/build
41+
shell: bash
42+
43+
- name: Build Project
44+
run: |
45+
echo "NMAKE..."
46+
set CL=/MP & rem "Enabling multi-threading (max. available)"
47+
nmake
48+
shell: cmd
49+
working-directory: ${{runner.workspace}}/build

.github/workflows/build-win64-qt6.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Win64 build master
1+
name: Win64 Qt6 CMake msvc2019
22

33
on:
44
push:

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 20221215 v2.2.0:
4+
- #183: Add a `multipleSelectionEnabled` property to `qan::Graph` to enable or disable multiple selection.
5+
6+
## 20221204 v2.2.0:
7+
- #161: Add graph dynamic graph preview (move, center on, zoom on).
8+
39
## 20221011 v2.2.0:
410
- #169: Create qan::RightResizer and qan::BottomResizer.
511
- By default, nodes and groups are resizable from their right and bottom borders.

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# QuickQanava
22

3-
![Build linux Qt5.15](https://github.com/cneben/QuickQanava/actions/workflows/build-linux-qt5.yml/badge.svg)
4-
![Build win64 Qt6.4](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt6.yml/badge.svg)
3+
![Linux Qt5 g++ qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-linux-qt5.yml/badge.svg)
4+
![Win64 Qt5 msvc qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt5.yml/badge.svg)
5+
![Win64 Qt6 msvc CMake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt6.yml/badge.svg)
56

67
[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue.svg)](http://cneben.github.io/QuickQanava/)
78
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
8-
![](https://img.shields.io/badge/version-2.0.0-blue.svg)
9+
![](https://img.shields.io/badge/version-2.1.0-blue.svg)
910
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social&label=Follow%20%40QuickQanava)](https://twitter.com/QuickQanava)
1011

1112
![](https://github.com/cneben/QuickQanava/blob/master/doc/web/docs/images/home.png)

doc/web/docs/index.md

+7-16
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ weight: 0
66
---
77
![home](images/home.png)
88

9-
[![Build Status](https://travis-ci.org/cneben/QuickQanava.svg?branch=master)](https://travis-ci.org/cneben/QuickQanava) (Linux/g++6/Qt5.12.1 - OSX/Clang/Qt5.12.1)
109

11-
[![Build status](https://ci.appveyor.com/api/projects/status/ghpiaqqew63er8ea?svg=true)](https://ci.appveyor.com/project/cneben/quickqanava) (Windows MSVC 2015 x64/Qt5.10.1)
10+
![Linux Qt5 g++ qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-linux-qt5.yml/badge.svg) (Linux, g++, Qt5.15, qmake)
11+
12+
![Win64 Qt5 msvc qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt5.yml/badge.svg) (Windows, msvc2019, Qt5.15, qmake)
13+
14+
![Win64 Qt6 msvc CMake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt6.yml/badge.svg) (Windows, msvc2019, Qt6.4, CMake)
1215

1316
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](http://www.destrat.io/quickqanava/doc)
1417
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
1518
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social&label=Follow%20%40QuickQanava)](https://twitter.com/QuickQanava)
1619

17-
18-
!!! warning "QuickQanava is alpha, interface may change before 1.0.0 release, but QuickQanava is already used extensively in production code."
20+
!!! warning "QuickQanava is still alpha, but QuickQanava is already used extensively in production code."
1921

2022
!!! note "QuickQanava is licensed under BSD-3, specific features or support is available on demand: [email protected]"
2123

@@ -25,7 +27,7 @@ weight: 0
2527

2628
QuickQanava main repository is hosted on GitHub: https://github.com/cneben/quickqanava
2729

28-
QuickQanava is primarily developed with Qt >= 5.13 with MSVC2015 and g++7. minimal required Qt version is **Qt 5.10**.
30+
QuickQanava is primarily developed on Linux and Qt 5.15. minimal required Qt version is **Qt 5.10**.
2931

3032
+ Project homepage: [http://cneben.github.io/QuickQanava/index.html](http://cneben.github.io/QuickQanava/index.html)
3133

@@ -42,14 +44,3 @@ Please refer to [Installation](installation.md) manual and [Graph](graph.md), [N
4244

4345
![styles](samples/topology.png)
4446

45-
## Roadmap
46-
47-
- **pre v2.0:**
48-
- [X] Add full support for groups inside group (ie subgraphs).
49-
- [X] Update geometry creation interface and delegate management.
50-
- [X] Rewrite CMake configuration, add install step, use QML plugins.
51-
- **v2.1.x:**
52-
- [ ] Add support for direct visual dragging of port items.
53-
- [ ] Add "snap to grid" support.
54-
55-

doc/web/docs/utilities.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@ BottomRightResizer:
55
------------------
66

77

8-
Qan.BottomRightResizer add a "resize handler" ont the bottom right of a target QML Item. Bottom right resizer component is automatically initialized in the QuickQanava::initialize method, it has no dependencies on QuickQanava and could be used in an isolated project just by copying its source code: fqlBotomRightRizer.h and fqlBotomRightRizer.cpp with a call to `#!js qmlRegisterType< fql::BottomRightResizer >( "YourModule", 1, 0, "BottomRightResizer" );`
8+
Qan.BottomRightResizer add a "resize handler" ont the bottom right of a target QML Item. Bottom right resizer component is automatically initialized in the QuickQanava::initialize method, it has no dependencies on QuickQanava and could be used in an isolated project just by copying its source code: `qanBottomRightResizer.h` and `qanBottomRightResizer.cpp` with a call to `#!js qmlRegisterType<qan::BottomRightResizer>( "YourModule", 1, 0, "BottomRightResizer");`
99

1010
![BottomRightResizer](utilities/utilities-resizer.png)
1111

1212
![BottomRightResizer](utilities/utilities-resizer.gif)
1313

1414
~~~~~~~~~~~~~{.cpp}
1515
// From c++:
16-
qmlRegisterType< fql::BottomRightResizer >( "YourModule", 1, 0, "BottomRightResizer" );
16+
qmlRegisterType<qan::BottomRightResizer >("YourModule", 1, 0, "BottomRightResizer");
1717
1818
// From QML:
19-
import YourModule 1.0 as Fql
19+
import YourModule 1.0 as Qan
2020
2121
Item {
2222
id: targetItem
23-
Fql.BottomRightResizer { target: targetItem }
23+
Qan.BottomRightResizer { target: targetItem }
2424
}
2525
~~~~~~~~~~~~~
2626

27-
Resizer not necessarilly has to be in *target* (host) sibling, `#!js Fql.BottomRightResizer` could be defined outside of target item hierarchy, for example to avoid corrupting the target `childrenRect` property. It is however more efficient to use the resizer as a target child (most common case).
27+
Resizer not necessarilly has to be in *target* (host) sibling, `#!js Qan.BottomRightResizer` could be defined outside of target item hierarchy, for example to avoid corrupting the target `childrenRect` property. It is however more efficient to use the resizer as a target child (most common case).
28+
29+
Right and bottom resizer are also available, see: `qan::RightResizer` and `qan::BottomResizer`.
2830

2931
Navigable:
3032
------------------

quickqanava.pro

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ test-tools.subdir = samples/tools
1616

1717
# Uncomment to activate samples projects:
1818
SUBDIRS += test-nodes
19-
#SUBDIRS += test-edges
20-
#SUBDIRS += test-connector
19+
SUBDIRS += test-edges
20+
SUBDIRS += test-connector
2121
SUBDIRS += test-groups
22-
#SUBDIRS += test-selection
22+
SUBDIRS += test-selection
2323
#SUBDIRS += test-style
24-
#SUBDIRS += test-topology
25-
#SUBDIRS += test-dataflow
24+
SUBDIRS += test-topology
25+
SUBDIRS += test-dataflow
2626
#SUBDIRS += test-cpp
2727
#SUBDIRS += test-tools
2828

samples/dataflow/TintNode.qml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import QtQuick 2.7
3636
import QtQuick.Controls 2.0
3737
import QtQuick.Layouts 1.3
38+
import QtGraphicalEffects 1.15
3839

3940
import QuickQanava 2.0 as Qan
4041
import "qrc:/QuickQanava" as Qan

samples/groups/groups.qml

+11-1
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,15 @@ ApplicationWindow {
301301
}
302302
} // Control groupEditor
303303
} // Qan.GraphView
304-
}
304+
Qan.GraphPreview {
305+
id: graphPreview
306+
source: graphView
307+
viewWindowColor: Material.accent
308+
anchors.horizontalCenter: parent.horizontalCenter
309+
anchors.bottom: graphView.bottom
310+
anchors.bottomMargin: 8
311+
width: 350
312+
height: 198
313+
} // Qan.GraphPreview
314+
} // ApplicationWindow: window
305315

samples/selection/selection.qml

+5
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ ApplicationWindow {
175175
}
176176
}
177177
}
178+
Switch {
179+
text: "Multiple selection enabled"
180+
checked: topology.multipleSelectionEnabled
181+
onClicked: topology.multipleSelectionEnabled = checked
182+
}
178183
RowLayout {
179184
Layout.margins: 2
180185
Label { text:"Policy:" }

src/GraphPreview.qml

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Control {
3838

3939
// PUBLIC /////////////////////////////////////////////////////////////////
4040
width: 200
41-
height: 113
41+
height: 135
4242

4343
//! Source Qan.GraphView that should be previewed.
4444
property var source: undefined
@@ -54,14 +54,15 @@ Control {
5454
// PRIVATE ////////////////////////////////////////////////////////////////
5555
padding: 0
5656

57-
property real previewSize: 0.15
5857
property real graphRatio: source ? (source.containerItem.childrenRect.width /
5958
source.containerItem.childrenRect.height) :
6059
1.
6160
property real previewRatio: source ? (source.width / source.height) : 1.0
6261
onGraphRatioChanged: updateNavigablePreviewSize()
6362
onPreviewRatioChanged: updateNavigablePreviewSize()
6463
onSourceChanged: updateNavigablePreviewSize()
64+
onWidthChanged: updateNavigablePreviewSize()
65+
onHeightChanged: updateNavigablePreviewSize()
6566

6667
function updateNavigablePreviewSize() {
6768
// Update the navigable preview width/height such that it's aspect ratio

src/GraphView.qml

+2-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ Qan.AbstractGraphView {
292292
// Do not show resizers when group is collapsed
293293
groupRightResizer.visible = groupBottomResizer.visible =
294294
groupResizer.visible = Qt.binding(() => { // Resizer is visible :
295-
return group && group.item && // If group and group.item are valid
295+
return group && ! group.locked &&
296+
group.item && // If group and group.item are valid
296297
group.item.visible &&
297298
(!group.item.collapsed) && // And if group is not collapsed
298299
group.item.resizable; // And if group is resizeable

src/HeatMapPreview.qml

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Control {
5757
// PRIVATE ////////////////////////////////////////////////////////////////
5858
padding: 0
5959

60-
property real previewSize: 0.15
6160
property real graphRatio: source ? (source.containerItem.childrenRect.width /
6261
source.containerItem.childrenRect.height) :
6362
1.

0 commit comments

Comments
 (0)