C++14 network/graph visualization library / Qt node editor.

Overview

QuickQanava

Build linux master Build linux develop Build win64 master Build win64 develop

Documentation License Twitter URL

QuickQanava is a C++14 library designed to display graphs and relational content in a Qt/QML application. QuickQanava provide QML components and C++ classes to visualize medium-sized directed graphs in a C++/QML application. QuickQanava focus on displaying relational content into a dynamic user interface with DnD support, resizable content and visual creation of topology. More advanced layouts algorithms might be integrated in future versions.

QuickQanava main repository is hosted on GitHub: http://cneben.github.io/QuickQanava/index.html

QuickQanava is primarily developed for Linux with Qt 5.15 with MSVC2017 and g++7.5 (minimal required Qt version is Qt 5.10, recommended is Qt 5.15.2)

For any questions, please contact: [email protected]

QuickQanava focus on writing content delegates in QML (even if they could be 100% defined in C++, a QML engine is still necessary in the background).

QuickQanava Showcase

Edges:

Curved-Straight Edges

Nodes: User Doc: QuickStart - Custom Nodes

Custom content

Visual Connector: User Doc: QuickStart - Visual Connector

Visual Connector

Groups: User Doc: QuickStart - Using Groups

Groups

Styles: User Doc: QuickStart - Using Styles

Custom styles

Contributors

GitHub Contributors Image

  • @kwallner / Conan.io and CMake configuration
  • @Letrab / Edge configuration
  • @machinekoder / QML plugin and CMake configuration
  • @NielsBillen / Ports support and stability fixes
  • @walterbrebels
  • @chesnoksatan / Major connector feature, build configuration

License

License

Copyright (c) 2017-2020 BA

Comments
  • Integration with CXXGraph Library

    Integration with CXXGraph Library

    Hi, very good work. I would ask you if is possible to collaborate to integrate the CXXGraph Library and it's data-structure in QuickQanava. Could be a good oppurtunities for both, to integrate a visualization tool for the CXXGraph library and to Intregrate a well-done data structure representation of graph in C++ language.

    You can find the CXXGraph project at this link.

    It is just a proposal, but I think can be useful for both the project development. Thank you so much

    opened by ZigRazor 10
  • Install step / Build QML plugins with CMake - Discussion

    Install step / Build QML plugins with CMake - Discussion

    Currently, there is no install step specified in the CMakeLists.txt. This makes it unclear how to use QuickQanava in an application.

    I suggest deploying QuickQanava as QML module, so it can be easily used by other applications, even if they are written in PyQt for example. I have done this in my framework by installing the QML files and libraries to the QT_INSTALL_QML path (see deployment.pri). This also requires adding a plugin.cpp containing the plugin description.

    Unfortunately, I haven't worked a lot with the Qt + CMake combination so far, so I can't provide any recipes. However, if QuickQanava turns out to be useful for my application, I'm happy to contribute any changes I make back upstream.

    enhancement 
    opened by machinekoder 10
  • Build fails with Qt 6.3 and clang

    Build fails with Qt 6.3 and clang

    Hello!

    Thanks for a great library. I have been using it for a while with Qt 6.3 and g++ without any issues. Recently I tried to switch my project's build system to clang and I started seeing the following build error:

    [13/176] Building CXX object lib/quickqanava/src/CMakeFiles/QuickQanava.dir/QuickQanava_autogen/mocs_compilation.cpp.o
    FAILED: lib/quickqanava/src/CMakeFiles/QuickQanava.dir/QuickQanava_autogen/mocs_compilation.cpp.o
    /usr/bin/clang++ -DMM_CMAKE_PROJECT_VERSION=\"0.6.0\" -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050F00 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_DEBUG -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQUICKQANAVA_STATIC -I/tmp/project/build/lib/quickqanava/src -I/tmp/project/lib/quickqanava/src -I/tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/include -I/tmp/project/lib/quickqanava/QuickContainers/include -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtQuickControls2 -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/qt6/QtOpenGL -g -fcolor-diagnostics -fPIC -std=gnu++17 -MD -MT lib/quickqanava/src/CMakeFiles/QuickQanava.dir/QuickQanava_autogen/mocs_compilation.cpp.o -MF lib/quickqanava/src/CMakeFiles/QuickQanava.dir/QuickQanava_autogen/mocs_compilation.cpp.o.d -o lib/quickqanava/src/CMakeFiles/QuickQanava.dir/QuickQanava_autogen/mocs_compilation.cpp.o -c /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/mocs_compilation.cpp
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/mocs_compilation.cpp:2:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/moc_qanBehaviour.cpp:10:
    In file included from /tmp/project/lib/quickqanava/src/./qanBehaviour.h:43:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanEdge.h:40:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanNode.h:43:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/node.h:46:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/./container_adapter.h:49:
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:262:33: error: no member named 'append' in 'qcm::adapter<QVector, qan::EdgeItem *>'
                qcm::adapter<C, T>::append(_container, item);
                                    ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:419:20: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::append' requested here
            _container.append(reinterpret_cast<typename Container::Item_type>(object));
                       ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:394:16: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::appendImpl' requested here
            return appendImpl( object, typename ItemDispatcher<typename Container::Item_type>::type{} );
                   ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:264:14: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::append' requested here
        explicit ContainerModelImpl(Container& container) :
                 ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:152:26: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::ContainerModelImpl' requested here
            _modelImpl = new ModelImpl{*this};
                             ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:141:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::createModel' requested here
        virtual ~Container() {
                ^
    /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanPortItem.h:65:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::~Container' requested here
        virtual ~PortItem() override = default;
                ^
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/mocs_compilation.cpp:2:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/moc_qanBehaviour.cpp:10:
    In file included from /tmp/project/lib/quickqanava/src/./qanBehaviour.h:43:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanEdge.h:40:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanNode.h:43:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/node.h:46:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/./container_adapter.h:49:
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:324:51: error: no member named 'indexOf' in 'qcm::adapter<QVector, qan::EdgeItem *>'
            const auto itemIndex = qcm::adapter<C,T>::indexOf(_container, item);
                                                      ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:441:20: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::removeAll' requested here
            _container.removeAll(qobject_cast<typename Container::Item_type>(const_cast<QObject*>(object)));
                       ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:399:13: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::removeImpl' requested here
                removeImpl( object, typename ItemDispatcher<typename Container::Item_type>::type{} );
                ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:264:14: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::remove' requested here
        explicit ContainerModelImpl(Container& container) :
                 ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:152:26: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::ContainerModelImpl' requested here
            _modelImpl = new ModelImpl{*this};
                             ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:141:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::createModel' requested here
        virtual ~Container() {
                ^
    /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanPortItem.h:65:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::~Container' requested here
        virtual ~PortItem() override = default;
                ^
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/mocs_compilation.cpp:2:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/moc_qanBehaviour.cpp:10:
    In file included from /tmp/project/lib/quickqanava/src/./qanBehaviour.h:43:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanEdge.h:40:
    In file included from /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanNode.h:43:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/node.h:46:
    In file included from /tmp/project/lib/quickqanava/src/./gtpo/./container_adapter.h:49:
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:334:32: error: no member named 'removeAll' in 'qcm::adapter<QVector, qan::EdgeItem *>'
                qcm::adapter<C,T>::removeAll(_container, item);
                                   ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:436:89: error: no member named 'indexOf' in 'qcm::adapter<QVector, qan::EdgeItem *>'
        inline auto    indexOf( T item ) const noexcept -> int { return qcm::adapter<C, T>::indexOf(_container, item); }
                                                                                            ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:485:47: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::indexOf' requested here
            return ( item != nullptr ? _container.indexOf(qobject_cast<T>(item)) : -1 );
                                                  ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:409:16: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::indexOfImpl' requested here
            return indexOfImpl( item, typename ItemDispatcher<typename Container::Item_type>::type{} );
                   ^
    /tmp/project/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:264:14: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::indexOf' requested here
        explicit ContainerModelImpl(Container& container) :
                 ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:152:26: note: in instantiation of member function 'qcm::ContainerModelImpl<qcm::Container<QVector, qan::EdgeItem *>>::ContainerModelImpl' requested here
            _modelImpl = new ModelImpl{*this};
                             ^
    /tmp/project/lib/quickqanava/src/./gtpo/../../QuickContainers/include/qcmContainer.h:141:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::createModel' requested here
        virtual ~Container() {
                ^
    /tmp/project/build/lib/quickqanava/src/QuickQanava_autogen/EWIEGA46WW/../../../../../../lib/quickqanava/src/qanPortItem.h:65:13: note: in instantiation of member function 'qcm::Container<QVector, qan::EdgeItem *>::~Container' requested here
        virtual ~PortItem() override = default;
                ^
    4 errors generated.
    ninja: build stopped: subcommand failed.
    

    Seems very similar to this error encountered in #118.

    Couple of useful information about my toolchain:

    $ g++ --version  
    Using built-in specs.
    COLLECT_GCC=g++
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
    Target: x86_64-pc-linux-gnu
    Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 12.1.0 (GCC)
    
    $ clang++ --version  
    clang version 14.0.6
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
    Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/12.1.0
    Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0
    Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
    $ cmake --version                                                                                                                                                                                                              cmake version 3.23.2
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    

    ... using Qt 6.3.1 Archlinux package with QuickQanava at 2f21d9b. I am building QuickQanava as a CMake target added via add_subdirectory. Any ideas would be welcome!

    bug 
    opened by petrmanek 7
  • Feature request: Add support for port associated delegate components and other enhancements

    Feature request: Add support for port associated delegate components and other enhancements

    I am trying to copy this look: blender

    • As you can see, each port has an associated "qml component" with it. (Now only the graph has a port delegate.)

    • I'd like to create node ports dynamically with custom and different delegates (as you can see in the pic). And this being not only visual but each port having a value QVariant property that can be read (and modified from within node/port).

    • A model for ports (getting the label, dock type, value..)

    • Also it would be nice to being able to connect ports without needing to click on the port and drag the connector, and just drag from the port (less of a pain).

    • Expose the selection rectangle instead of {color,weight,margin} for better configurability (like radius etc.)

    enhancement help wanted 
    opened by Jackneill 7
  • Build fails with Qt 6.4 and MSVC

    Build fails with Qt 6.4 and MSVC

    Hello!

    I have recently switched over to Windows to see if my app still builds there, and encountered the following compilation error with QuickQanava 2.1.0 (9af64e6dc5a85796bedfdf666a9244dc2fd69da1), Qt 6.4.0, Windows SDK 10.0.18362.0 and msvc2019_64, v142). The compiler message reminds me of those seen in #159 and #118.

    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(436,4): error C2039: 'indexOf': is not a member of 'qcm::adapter<C,T>'
    3>        with
    3>        [
    3>            C=QVector,
    3>            T=qan::Node *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanBehaviour.cpp)
    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(436): message : see declaration of 'qcm::adapter<C,T>'
    3>        with
    3>        [
    3>            C=QVector,
    3>            T=qan::Node *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanBehaviour.cpp)
    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(436): message : while compiling class template member function 'int qcm::Container<QVector,node_t *>::indexOf(T) noexcept const'
    3>        with
    3>        [
    3>            node_t=qan::Node,
    3>            T=qan::Node *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanBehaviour.cpp)
    

    Similar messages can be observed for T=qan::Group * and T=qan::EdgeItem *. There is also the following message:

    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(430,4): error C2039: 'contains': is not a member of 'qcm::adapter<C,T>'
    3>        with
    3>        [
    3>            C=QVector,
    3>            T=QObject *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanStyleManager.cpp)
    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(430): message : see declaration of 'qcm::adapter<C,T>'
    3>        with
    3>        [
    3>            C=QVector,
    3>            T=QObject *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanStyleManager.cpp)
    3>C:\myproject\lib\quickqanava\src\../QuickContainers/include/qcmContainer.h(430): message : while compiling class template member function 'bool qcm::Container<QVector,QObject *>::contains(const T) noexcept const'
    3>        with
    3>        [
    3>            T=QObject *
    3>        ] (compiling source file C:\myproject\lib\quickqanava\src\qanStyleManager.cpp)
    3>C:\myproject\lib\quickqanava\src\qanStyleManager.cpp(68): message : see reference to function template instantiation 'bool qcm::Container<QVector,QObject *>::contains(const T) noexcept const' being compiled
    3>        with
    3>        [
    3>            T=QObject *
    3>        ]
    

    I would be happy to test any fixes/patches that you propose. As always, many thanks for your help in advance!

    bug 
    opened by petrmanek 6
  • Way to obtain destination port of `qan::Connector`?

    Way to obtain destination port of `qan::Connector`?

    During implementation of my custom drag-to-connect logic I found that there is no easy way to obtain the destination port item of qan::Connector inside my requestEdgeCreation() signal handler.

    The default implementation exposes getSourcePort() that allows me to determine from where the drag originated. In connectorReleased() the internals of qan::Connector also retrieve the destination port that is used to bind the default edge, if enabled. Unfortunately, if I want to create my custom edge using the requestEdgeCreation signal instead, the destination port is lost in the scope of that function and not accessible anywhere else. I could implement my custom connector for this, however I believe that would be an overkill, especially given that this is would be easy to remedy. Below I propose two alternative solutions to extend the current API.

    Option 1: add destinationPort as a property of qan::Connector

    class Connector : public qan::NodeItem
    {
        // ...
    public:
        Q_PROPERTY(qan::PortItem* destinationPort READ getDestinationPort NOTIFY destinationPortChanged FINAL)
        inline qan::PortItem*   getDestinationPort() const noexcept { return _destinationPort.data(); }
    private:
        QPointer<qan::PortItem> _destinationPort;
    signals:
        void                    destinationPortChanged();
    private slots:
        //! Called when the current destination port is destroyed.
        void                    destinationPortDestroyed();
        // ...
    };
    

    This property can be set somewhere around here and later accessed by user code in requestEdgeCreation().

    Option 2: pass destination port in the signal

    class Connector : public qan::NodeItem
    {
        // ...
        void    requestEdgeCreation(qan::Node* src, QObject* dst, qan::PortItem* dstPort);
        // ...
    };
    

    This is a little bit out of line with the current API but it is less work. When the signal is emitted, it can be passed dstPort from here.

    enhancement 
    opened by petrmanek 6
  • module “QtQuick.Shapes” is not installed (qt 5.12.2)

    module “QtQuick.Shapes” is not installed (qt 5.12.2)

    Cloned the source with Git and compiled with QTCreator, compilation ends without any error. Running any of the examples successed with QtCreator,but when i run the release version with the .exe , then the message show up that "module “QtQuick.Shapes” is not installed "

    opened by Caprey 6
  • Check OGL context at startup, report error - (Getting application output about ShaderEffectSource)

    Check OGL context at startup, report error - (Getting application output about ShaderEffectSource)

    I got tons of the same message when the view is being updated. Is it normal? What should I do about it?

    Message:

    ShaderEffectSource: 'recursive' must be set to true when rendering recursively.

    BTW, I'm using Qt 5.11.1 with MinGW 5.3 and MSVC2017.

    bug help wanted 
    opened by yizhoumo 6
  • Assertion failure when removing a node

    Assertion failure when removing a node

    I have a QtQuick app where the user can select a node in QuickQanava and hit a keystroke to delete it from the view. When that happens, I directly call qan::Graph::removeNode() and my app crashes with the following message:

    ASSERT failure in qan::Node: "Called object is not of the correct type (class destructor may have already run)", file /usr/include/qt6/QtCore/qobjectdefs_impl.h, line 119 (/usr/include/qt6/QtCore/qobjectdefs_impl.h:119, unknown function)
    

    Further analysis reveals that the problem comes from somewhere deep inside QuickQanava (or possibly even Qt). See the following backtrace:

    #0  0x00007ffff50a164c in  () at /usr/lib/libc.so.6
    #1  0x00007ffff5051958 in raise () at /usr/lib/libc.so.6
    #2  0x00007ffff503b53d in abort () at /usr/lib/libc.so.6
    #3  0x00007ffff56a41c7 in  () at /usr/lib/libQt6Core.so.6
    #4  0x00007ffff56a449a in qt_assert(char const*, char const*, int) () at /usr/lib/libQt6Core.so.6
    #5  0x00007ffff56a4559 in  () at /usr/lib/libQt6Core.so.6
    #6  0x00005555556808a8 in QtPrivate::assertObjectType<qan::Node>(QObject*) (o=0x555555cce170) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:119
    #7  0x00005555556803df in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (qan::Node::*)()>::call(void (qan::Node::*)(), qan::Node*, void**)
         (f=(void (qan::Node::*)(qan::Node * const)) 0x55555561343e <qan::Node::inDegreeChanged()>, o=0x555555cce170, arg=0x7fffffff9fe8) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:134
    #8  0x000055555567ffa4 in QtPrivate::FunctionPointer<void (qan::Node::*)()>::call<QtPrivate::List<>, void>(void (qan::Node::*)(), qan::Node*, void**)
        (f=(void (qan::Node::*)(qan::Node * const)) 0x55555561343e <qan::Node::inDegreeChanged()>, o=0x555555cce170, arg=0x7fffffff9fe8) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:172
    #9  0x000055555567fc31 in QtPrivate::QSlotObject<void (qan::Node::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x555555cdae80, r=0x555555cce170, a=0x7fffffff9fe8, ret=0x0)
        at /usr/include/qt6/QtCore/qobjectdefs_impl.h:383
    #10 0x00007ffff57805c3 in  () at /usr/lib/libQt6Core.so.6
    #11 0x000055555569c241 in qcm::ContainerModel::lengthChanged() (this=0x555555cad3e0) at /path/redacted/build/lib/quickqanava/QuickContainers/QuickContainers_autogen/6YEA5652QU/moc_qcmContainerModel.cpp:256
    #12 0x00005555555afeb8 in qcm::ContainerModel::emitLengthChanged() (this=0x555555cad3e0) at /path/redacted/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:244
    #13 0x00005555555afe48 in qcm::ContainerModel::fwdEmitLengthChanged() (this=0x555555cad3e0) at /path/redacted/lib/quickqanava/QuickContainers/include/qcmContainerModel.h:225
    #14 0x00005555555b00ae in qcm::AbstractContainer::fwdEmitLengthChanged() (this=0x555555cce230) at /path/redacted/lib/quickqanava/QuickContainers/include/qcmAbstractContainer.h:68
    #15 0x000055555564f71a in qcm::Container<QList, qan::Node*>::clear() (this=0x555555cce230) at /path/redacted/lib/quickqanava/src/../QuickContainers/include/qcmContainer.h:385
    #16 0x000055555567f200 in gtpo::node<QObject, qan::Graph, qan::Node, qan::Edge, qan::Group>::~node() (this=0x555555cce170, __in_chrg=<optimized out>) at /path/redacted/lib/quickqanava/src/././gtpo/node.h:79
    #17 0x000055555567e812 in qan::Node::~Node() (this=0x555555cce170, __in_chrg=<optimized out>) at /path/redacted/lib/quickqanava/src/qanNode.cpp:69
    #18 0x00005555555ae84a in ActorNode::~ActorNode() (this=0x555555cce170, __in_chrg=<optimized out>) at /path/redacted/build/ngui/app_autogen/ZNMSKYHDQK/../../../../ngui/session/actornode.h:15
    #19 0x00005555555ae866 in ActorNode::~ActorNode() (this=0x555555cce170, __in_chrg=<optimized out>) at /path/redacted/build/ngui/app_autogen/ZNMSKYHDQK/../../../../ngui/session/actornode.h:15
    #20 0x0000555555651072 in gtpo::graph<QQuickItem, qan::Node, qan::Group, qan::Edge>::remove_node(qan::Node*) (this=0x555555b155c0, node=0x555555cce170) at /path/redacted/lib/quickqanava/src/././gtpo/./graph.hpp:177
    #21 0x00005555556449e3 in qan::Graph::removeNode(qan::Node*) (this=0x555555b155c0, node=0x555555cce170) at /path/redacted/lib/quickqanava/src/qanGraph.cpp:679
    

    This looks like some type of nasty double-free bug. Curiously, though, this only happens under Linux. When I attempted to reproduce it under macOS, there was the app behaved as expected and did not crash. Unfortunately, my app currently does not compile under Windows, so I cannot verify there.

    If it helps, please note that I do not perform any direct calls to the delete operator, or do not call deleteLater on anything related to QuickQanava -- in this regard my implementation pretty much follows the example projects. The destructor of my ActorNode class is implemented as:

    virtual ~ActorNode() = default;
    
    bug 
    opened by petrmanek 5
  • Connecting ports via drag&drop isn't possible

    Connecting ports via drag&drop isn't possible

    It isn't possible to connect the OUTs with the INs. Unfortunately In none of the provided examples. See attached video. Setup:

    • Build with fresh git clone
    • qmake build
    • Qt. 5.12.3
    • OS X 10.14

    quickquanava_bug.mov.zip

    opened by friedemannm 4
  • Cannot click on connector (its real place is shifted from where its visually drawn)

    Cannot click on connector (its real place is shifted from where its visually drawn)

    The example project from https://github.com/cneben/QuickQanava/issues/29 can demostrate this. Try to move the node's connector: you can't, it just moves the node. But if you click a bit shifted away, to the top-left, compared to the connector, then you can grab it. In my personal project on windows i cant even click on a node but have to shift. Right click also does not appear where it should but shifted to the right-bottom direction. Seems universal. And yes, this is a windows-only issue....:)

    opened by Jackneill 4
  • Add snap to grid and keyboard navigation support for selected nodes/groups

    Add snap to grid and keyboard navigation support for selected nodes/groups

    • [x] Add "snap to grid" support in qan::DraggableCtrl.

      • [x] Add a snapToGrid property to qan::Graph.
      • [x] Add a gridSize property to qan::Graph.
    • [ ] Add support for selection keyboard navigation (moving).

      • [ ] Ensure it work with node/groups heterogeneous selections.
      • [ ] Ensure snapToGrid is taken into account.
    • [x] FIX: qan::EdgeDraggableCtrl is no longer working with snapping and snap orientation constrains...

    • [ ] Fix all FIXME #185

    enhancement 
    opened by cneben 0
  • GraphPreview navigation.

    GraphPreview navigation.

    • [x] Graph qan::Navigable should be moved when graph preview window rect is dragged.

    • [x] Add "move to click" when graph preview window is clicked.

    • [x] Add "zoom to click" when graph preview window is double clicked.

    • [ ] Move to click / zoom to click must work when preview window fits in graph preview.

    • [ ] Set a minimum size on preview window.

    enhancement 
    opened by cneben 0
  • Opacity issue in Qan.GraphView

    Opacity issue in Qan.GraphView

    Hi,

    Have you encountered the following issue while working with QuickQanava? I'm using Qt 5.11(+QML) and QuickQanava from 20201205 (probably version 0.10.0)

    I have a QML module which is a plugin in main app and it uses Qan.GraphView When I call a Popup control with background: Rectangle{} property the background like transparent and some of the controls behind it are visible. If I add opacity property like this _ Popup { .... background: Rectangle { ... opacity: 0.999 ... } }_ the background is opaque as expected and it overlaps all controls behind it.

    The same Popup control doesn't have any background transparency issues when Qan.GraphView is not applied.

    Why the background like transparent by default when using Qan.GraphView? What do I need to fix in QuickQanava to prevent the Popup control background from becoming transparent?

    question 
    opened by topper7 2
  • Discussion for 2.3.0

    Discussion for 2.3.0

    • [ ] Integrate @DistinctVision https://github.com/DistinctVision/QuickQanava fork.
    • [ ] Refactor QuickContainers:
      • [ ] Remove std::shared_ptr support ?
      • [ ] Add full support for QPointer.
      • [ ] Add a sample with all supported T.
    enhancement question 
    opened by cneben 0
  • Installing QuickQanava through CMake seems to be broken

    Installing QuickQanava through CMake seems to be broken

    Installing QuickQanava using cmake seems to be broken. After running make install, the qml files and binaries seem to be installed in the correct place, but the header files are unusable in the current configuration. Some headers like for example container_adapter.h (amoung many) use #include with relative paths to other headers like QuickContainers.h. This is a problem since the directory structure of the installed headers differs from the directory structure inside the QuickQanava project. And so when building QuickQanava, no compiler errors are reported, while it's impossible to include QuickQanava.h in another project after installation.

    I managed to fix this while integrating QuickQanava into my project, but along the way I also made some other (exclusively build system) changes.

    Generally it's nice to have the ability to build and install headers, binaries, cmake package files and qml files of dependencies locally inside a projects directory tree (like KDE modules which have this good practice). What I mean by this is that it would be good to be able to change CMAKE_INSTALL_PREFIX from the default /usr/local to some subdirectory in your project and have everything loaded from there. This would make it very straightforward to use QuickQanava by building it directly from github using ExternalProject_Add. And since it would be installed locally, no admin privileges would be required in the install step. Then it can easily be included using find_package etc. This also makes it easier to later package the project in question.

    I managed to enable this and get QuickQanava working in my project so I was thinking that something like this would also be generally desirable. If you want I could contribute these modifications to QuickQanava. All changes are made exclusively to CMake files, no source or header files were changed.

    opened by sheepy9 1
Releases(2.2.0)
  • 2.2.0(Dec 25, 2022)

    Version 2.2.0 changelog

    • #183: Add a multipleSelectionEnabled property to qan::Graph to enable or disable multiple selection.
    • #161: Graph preview (mini-map) is now dynamic (move, center on, zoom on).
    • #169: Create qan::RightResizer and qan::BottomResizer to enable resizing by bottom and right node/group edges.
    • Complete refactoring of qan::BottomRightResizer.
    • #167: Reduce memory use by 7%/8% when lot of edges are used.
    • #167: Add partial edge selection support.
    • #164: Change signature of qan::Graph::connectorRequestEdgeCreation().
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Aug 17, 2022)

    First release following clean semantic versioning.

    Changelog:

    • Multiple bug fixes on internal topology backend and memory management.
    • QuickQanava now build with Qt from Qt 5.15 to Qt 6.3 with g++, msvc and clang with both qmake and CMake.

    QuickQanava 2.1.0 include new Qan.HeatMapPreview component that could be used to help user explore large graphs:

    image

    See milestones for orientations on future releases.

    Source code(tar.gz)
    Source code(zip)
Owner
cpp_Qt_QML_Python(UIs, AI, DataSciences, Graphs)
null
HARFANG®3D is an all-in-one 3D visualization library usable in C++, Python, Lua and Go.

HARFANG® 3D engine HARFANG®3D is an all-in-one 3D visualization library usable in C++, Python, Lua and Go. Table of contents About Features Screenshot

HARFANG® 3D 280 Jan 1, 2023
Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

Matplot++ A C++ Graphics Library for Data Visualization Data visualization can help programmers and scientists identify trends in their data and effic

Alan de Freitas 3k Jan 4, 2023
Lightweight and modular C++11 graphics middleware for games and data visualization

Magnum — Lightweight and modular C++11/C++14 graphics middleware for games and data visualization Looking for an open-source library that gives you gr

Vladimír Vondruš 4.3k Dec 30, 2022
RGL - 3D visualization device system for R using OpenGL

RGL - 3D visualization device system for R using OpenGL INTRODUCTION The RGL package is a visualization device system for R, using OpenGL or WebGL as

null 68 Dec 27, 2022
Binary visualization tool primarily aimed at videogame reverse engineering & research.

binviz Binary visualization tool. Allows you to load a binary and pan/zoom around its content. Each byte (or 4 bytes in 4-byte mode) is represented by

Nick Renieris 31 Dec 6, 2022
Vis: Asynchronous 3D Visualization Tool

English | 简体中文 Vis: Asynchronous 3D Visualization Tool Vis 是一款交互式异步3D可视化工具,旨在让3D视觉和机器人应用开发更简单。 其核心功能包括: 图形绘制 3D模型文件导入 多种交互工具 Gzimo 安装 Linux # 安装必要的依

RVBUST 117 Nov 2, 2022
Powerful, easy to use, and portable visualization toolkit for mixed 3D and 2D content

Powerful, easy to use, and portable visualization toolkit for mixed 3D and 2D content

Microsoft 138 Jan 8, 2023
Mandelbrot set visualization in OpenGL

Mandelbort-Set done in OpenGL Steps to build and run ( program tested only on Linux-Ubuntu 18.04,20.04 ) install the necessary packages- glut,glfw,glm

Paleti Krishnasai 2 Feb 13, 2022
Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X

Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X (probably BSD also). Web Link Website

Arun Narayanankutty 171 Dec 26, 2022
Graphlite is a lightweight C++ generic graph library

Introduction Graphlite is a lightweight generic graph library that supports node properties edge properties directed/undirected graphs multi-edges & s

null 52 Aug 14, 2022
CXXGraph is a small library, header only, that manages the Graph and it's algorithms in C++.

CXXGraph is a small library, header only, that manages the Graph and it's algorithms in C++.

ZigRazor 184 Dec 28, 2022
Tiny and efficient graph abstractions.

Tiny and efficient graph abstractions. Usage See tinygraph-example.c Interface See documentation in tinygraph.h Building The tinygraph library require

tinygraph 18 Dec 14, 2022
Dramatic EDitor

Dramatic EDitor Quick Start POSIX $ ./build.sh $ ./ded src\main.c Windows MSVC > .\setup_dependencies.bat > .\build_msvc.bat > .\ded.exe src\main.c Fo

Tsoding 60 Dec 29, 2022
Graphical and minimalistic hex editor.

hexing Graphical and minimalistic hex editor. Comes with coloring of magic numbers to aid in recognizing the type of file you are dealing with. Build

null 14 Nov 19, 2022
2D lowpoly editor heavily based on this one

polyedit 2D lowpoly editor heavily based on this one Download Direct link Releases page Libraries This project uses: SFML Tiny File Dialogs jsoncpp im

null 19 Aug 7, 2021
The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.

Open Asset Import Library (assimp) A library to import and export various 3d-model-formats including scene-post-processing to generate missing render

Open Asset Import Library 8.6k Jan 4, 2023
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

bgfx - Cross-platform rendering library GitHub Discussions Discord Chat What is it? Cross-platform, graphics API agnostic, "Bring Your Own Engine/Fram

Бранимир Караџић 12.6k Jan 8, 2023
Modern C++14 library for the development of real-time graphical applications

CI Community Support bs::framework is a C++ library that aims to provide a unified foundation for the development of real-time graphical applications,

null 1.7k Jan 2, 2023