Skip to content

Commit

Permalink
Merge pull request cneben#186 from cneben/develop
Browse files Browse the repository at this point in the history
2.2.0
  • Loading branch information
cneben authored Dec 25, 2022
2 parents 9af0dbb + b447aae commit 7559d74
Show file tree
Hide file tree
Showing 21 changed files with 343 additions and 174 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-linux-qt5.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Linux build develop
name: Linux Qt5 QMake g++

on:
push:
branches: [master]
branches: [master, develop]

jobs:
test-build:
Expand All @@ -20,7 +20,7 @@ jobs:
modules: qtcore qttools qtgui qtquickcontrols2
version: 5.15.2
target: desktop
#setup-python: false
setup-python: false

- name: Create Build Dir
run: mkdir build
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/build-win64-qt5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Win64 Qt5 QMake msvc2019

on:
push:
branches: [master, develop]

jobs:
test-build:
runs-on: windows-2019
timeout-minutes: 120
steps:
- name: Clone QuickQanava
uses: actions/checkout@v2
with:
ref: master

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.*'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
dir: '${{ github.workspace }}/'
install-deps: 'true'
modules: 'qtwebengine'
cache: 'false'
cache-key-prefix: 'install-qt-action'
setup-python: 'false'

- name: Create Build Dir
run: mkdir build
working-directory: ${{runner.workspace}}

- uses: ilammy/msvc-dev-cmd@v1

- name: Configure qmake
run: |
QT_SELECT=5 qmake CONFIG+=release -o Makefile ${GITHUB_WORKSPACE}/quickqanava.pro
working-directory: ${{runner.workspace}}/build
shell: bash

- name: Build Project
run: |
echo "NMAKE..."
set CL=/MP & rem "Enabling multi-threading (max. available)"
nmake
shell: cmd
working-directory: ${{runner.workspace}}/build
2 changes: 1 addition & 1 deletion .github/workflows/build-win64-qt6.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Win64 build master
name: Win64 Qt6 CMake msvc2019

on:
push:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 20221215 v2.2.0:
- #183: Add a `multipleSelectionEnabled` property to `qan::Graph` to enable or disable multiple selection.

## 20221204 v2.2.0:
- #161: Add graph dynamic graph preview (move, center on, zoom on).

## 20221011 v2.2.0:
- #169: Create qan::RightResizer and qan::BottomResizer.
- By default, nodes and groups are resizable from their right and bottom borders.
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# QuickQanava

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

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

![](https://github.com/cneben/QuickQanava/blob/master/doc/web/docs/images/home.png)
Expand Down
23 changes: 7 additions & 16 deletions doc/web/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ weight: 0
---
![home](images/home.png)

[![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)

[![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)
![Linux Qt5 g++ qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-linux-qt5.yml/badge.svg) (Linux, g++, Qt5.15, qmake)

![Win64 Qt5 msvc qmake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt5.yml/badge.svg) (Windows, msvc2019, Qt5.15, qmake)

![Win64 Qt6 msvc CMake](https://github.com/cneben/QuickQanava/actions/workflows/build-win64-qt6.yml/badge.svg) (Windows, msvc2019, Qt6.4, CMake)

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


!!! warning "QuickQanava is alpha, interface may change before 1.0.0 release, but QuickQanava is already used extensively in production code."
!!! warning "QuickQanava is still alpha, but QuickQanava is already used extensively in production code."

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

Expand All @@ -25,7 +27,7 @@ weight: 0

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

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

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

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

![styles](samples/topology.png)

## Roadmap

- **pre v2.0:**
- [X] Add full support for groups inside group (ie subgraphs).
- [X] Update geometry creation interface and delegate management.
- [X] Rewrite CMake configuration, add install step, use QML plugins.
- **v2.1.x:**
- [ ] Add support for direct visual dragging of port items.
- [ ] Add "snap to grid" support.


12 changes: 7 additions & 5 deletions doc/web/docs/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ BottomRightResizer:
------------------


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" );`
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");`

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

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

~~~~~~~~~~~~~{.cpp}
// From c++:
qmlRegisterType< fql::BottomRightResizer >( "YourModule", 1, 0, "BottomRightResizer" );
qmlRegisterType<qan::BottomRightResizer >("YourModule", 1, 0, "BottomRightResizer");
// From QML:
import YourModule 1.0 as Fql
import YourModule 1.0 as Qan
Item {
id: targetItem
Fql.BottomRightResizer { target: targetItem }
Qan.BottomRightResizer { target: targetItem }
}
~~~~~~~~~~~~~

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).
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).

Right and bottom resizer are also available, see: `qan::RightResizer` and `qan::BottomResizer`.

Navigable:
------------------
Expand Down
10 changes: 5 additions & 5 deletions quickqanava.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ test-tools.subdir = samples/tools

# Uncomment to activate samples projects:
SUBDIRS += test-nodes
#SUBDIRS += test-edges
#SUBDIRS += test-connector
SUBDIRS += test-edges
SUBDIRS += test-connector
SUBDIRS += test-groups
#SUBDIRS += test-selection
SUBDIRS += test-selection
#SUBDIRS += test-style
#SUBDIRS += test-topology
#SUBDIRS += test-dataflow
SUBDIRS += test-topology
SUBDIRS += test-dataflow
#SUBDIRS += test-cpp
#SUBDIRS += test-tools

Expand Down
1 change: 1 addition & 0 deletions samples/dataflow/TintNode.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.15

import QuickQanava 2.0 as Qan
import "qrc:/QuickQanava" as Qan
Expand Down
12 changes: 11 additions & 1 deletion samples/groups/groups.qml
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,15 @@ ApplicationWindow {
}
} // Control groupEditor
} // Qan.GraphView
}
Qan.GraphPreview {
id: graphPreview
source: graphView
viewWindowColor: Material.accent
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: graphView.bottom
anchors.bottomMargin: 8
width: 350
height: 198
} // Qan.GraphPreview
} // ApplicationWindow: window

5 changes: 5 additions & 0 deletions samples/selection/selection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ ApplicationWindow {
}
}
}
Switch {
text: "Multiple selection enabled"
checked: topology.multipleSelectionEnabled
onClicked: topology.multipleSelectionEnabled = checked
}
RowLayout {
Layout.margins: 2
Label { text:"Policy:" }
Expand Down
5 changes: 3 additions & 2 deletions src/GraphPreview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Control {

// PUBLIC /////////////////////////////////////////////////////////////////
width: 200
height: 113
height: 135

//! Source Qan.GraphView that should be previewed.
property var source: undefined
Expand All @@ -54,14 +54,15 @@ Control {
// PRIVATE ////////////////////////////////////////////////////////////////
padding: 0

property real previewSize: 0.15
property real graphRatio: source ? (source.containerItem.childrenRect.width /
source.containerItem.childrenRect.height) :
1.
property real previewRatio: source ? (source.width / source.height) : 1.0
onGraphRatioChanged: updateNavigablePreviewSize()
onPreviewRatioChanged: updateNavigablePreviewSize()
onSourceChanged: updateNavigablePreviewSize()
onWidthChanged: updateNavigablePreviewSize()
onHeightChanged: updateNavigablePreviewSize()

function updateNavigablePreviewSize() {
// Update the navigable preview width/height such that it's aspect ratio
Expand Down
3 changes: 2 additions & 1 deletion src/GraphView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ Qan.AbstractGraphView {
// Do not show resizers when group is collapsed
groupRightResizer.visible = groupBottomResizer.visible =
groupResizer.visible = Qt.binding(() => { // Resizer is visible :
return group && group.item && // If group and group.item are valid
return group && ! group.locked &&
group.item && // If group and group.item are valid
group.item.visible &&
(!group.item.collapsed) && // And if group is not collapsed
group.item.resizable; // And if group is resizeable
Expand Down
1 change: 0 additions & 1 deletion src/HeatMapPreview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Control {
// PRIVATE ////////////////////////////////////////////////////////////////
padding: 0

property real previewSize: 0.15
property real graphRatio: source ? (source.containerItem.childrenRect.width /
source.containerItem.childrenRect.height) :
1.
Expand Down
Loading

0 comments on commit 7559d74

Please sign in to comment.