Giter VIP home page Giter VIP logo

nodelink's Introduction

NodeLink

Introduction

NodeLink is a qml node editor library that can be used for a wide range of applications. This library allows for the visualization and manipulation of complex graphs while also providing the flexibility for customization and integration with other software.

Usage

The Nodelink library is a tool that can be used to connect different components within a system or application. To use this library, one can refer to the examples provided within the library and follow the instructions accordingly. The examples provided serve as a guide and demonstrate how to connect different nodes and manipulate data between them.

Platforms

  • Linux (x64, gcc-7.0, clang-7)
  • OSX (Apple Clang - LLVM 3.6)
  • Windows (Win32, x64, msvc2017, MinGW 5.3)

Dependencies

  • Qt > 6.4.0 (Will test on lower version soon)
  • CMake 3.8

Current State (v0.9.0)

The main features are as follows:

  • MVC design
  • Background/Foreground drawings
  • Custom Node UI
  • Custom Node Data
  • Custom Link/Connection
  • Link/Connection Type (Bezzier, Straight Line, L Shape, etc)
  • Scene Overview
  • Dynamic Links/Ports
  • Dynamic Scene
  • Undo/Redo
  • Zooming
  • Save/Load
  • Snapping

Help Needed

  • Zoom performance

Any suggestions are welcome!

Calculator Example

calculator_example

Building

Linux

  git clone [email protected]:Roniasoft/NodeLink.git
  cd NodeLink
  mkdir build
  cd build
  cmake ..
  make -j && make install

Qt Creator

  1. Open CMakeLists.txt as project.
  2. Build -> Run CMake
  3. Build -> Build All
  4. Click the button Run

Contribution

#. Be polite, respectful and collaborative. #. For submitting a bug:

#. Describe your environment (Qt version, compiler, OS etc) #. Describe steps to reproduce the issue

#. For submitting a pull request:

#. Create a proposal task first. We can come up with a better design together. #. Create a pull-request. If applicable, create a simple example for your problem, describe the changes in details, provide use cases.

#. For submitting a development request:

#. Describe your issue in details #. Provide some use cases.

Citing

RONIA AB, NodeLink, (2023), GitHub repository, https://github.com/Roniasoft/NodeLink

BibTeX::

@misc{RONIA AB,
  author = {RONIA AB},
  title = {NodeLink. Qt Quick Library},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Roniasoft/NodeLink}},
  commit = {6ba9c66cdbc8e6d00fd4a8c6b3bde05c616cfa6a}
}

Showcase

NodeLink Simple Example: image

IMG_20230429_081006

image

License

This library is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

nodelink's People

Contributors

alirezah95 avatar hamedmasafi avatar l3enq avatar mohsenakondori avatar mohsenkondori avatar mosiqt avatar tayebe79 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nodelink's Issues

[FEATURE]: Zoom In and Out smoothly

** User Story **
As a user, I want to zoom in and out, so that I can look into specific area smoothly and big picture as well.

** Acceptance Criteria **

  • in big picture state, I want to see the nodes minimal without details.
  • zoom in and out should be happened around mouse position
  • It should feel good and smooth with appropriate speed according to current zoom level (Obsidian)
  • it should work everywhere
  • ability to fit all to the window
  • zoom into the selected node when we edit it in big picture state
  • zoom In should be done maximum to 2 and zoomOut to 0.35

** extra acceptance **

  • #57
  • zoom into should be animated
  • Aggregate successive wheel events

[BUG]: Shift Modifier for multi selection is not working in a stable way

Describe the bug
Sometimes it's not working. Test more pls

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions
Application version: (add either official git release version or git SHA)
Firmware version: (add either official git release version or git SHA)

Additional context
Add any other context about the problem here.

[Bug] Wrong node icon when using clone

Steps to reproduce the issue:

  1. Open the application.
  2. Create a node, excluding the 'general node' type.
  3. Utilize the clone feature to duplicate the node.
  4. Observe that the duplicated node icon does not reflect the node's properties and remains the same as the 'general node' icon.

[Bug] Zoom Crash

Instructions to reproduce the issue:

  1. Launch the SituationSimulator (Or NodeLink example)
  2. Create a minimum of 20 nodes (No need to establish connections between them).
  3. Attempt to rapidly zoom in or out using the 'Ctrl + mouse wheel' combination.
  4. You will likely encounter an unpredictable crash occurring consistently during the zooming process.

Custom Repeater

The repeater instantiates all the delegates with every change in the model data. We should customize a repeater so that only modified items will be instantiated.

[BUG]: Need to revise the BasicLinkCalculator.calculateControlPoints

Describe the bug
We need to be able to have access to equation of all link types. Currently the LType line is impossible to have access to equation type.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions
Application version: (add either official git release version or git SHA)
Firmware version: (add either official git release version or git SHA)

Additional context
Add any other context about the problem here.

[BUG]: NodeView needs to be refactored/revised

Describe the bug
NodeView class is very big. Some parts can be encapsulated into smaller objects.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Software Versions
Application version: (add either official git release version or git SHA)
Firmware version: (add either official git release version or git SHA)

Additional context
Add any other context about the problem here.

[FEATURE]: NodeLink Logo

** User Story **
As a Developer, I want to design a icon so we can use it for branding

** Acceptance criteria **
A logo for the project is required to help its branding.

  • vector graphics like svg
  • multiple design for different sizes
  • use 'N' and 'L' letters and have the concept of the library
  • minimalistic

[IMPROVMENT] Using 'Undo' should follow the modified item

Steps to reproduce the issue:

  1. Start the NodeLink example project.
  2. Perform various actions, such as creating new nodes/connections and moving them.
  3. Attempt to undo some of these actions.
  4. Observe that the view remained fixed on a point rather than following the modified item.

Expected behavior:
The view should maintain focus on the modified element rather than resetting to a fixed point. This ensures that users can easily identify the changes made.

[Feat] AI Integration

As a game developer, I want to incorporate a user-friendly "Suggest Text" feature into our software, similar to what is used in NPC dialogue systems, to streamline and enhance the process of generating in-game dialogues.

Acceptance Criteria:

  • When the user accesses the software, a "Suggest Text" option should be prominently displayed within the node editor. (We can add a new option to the node options)
  • The "Suggest Text" option should be accessible for the Step nodes only.
  • Upon clicking the "Suggest Text" option, the software should open a user-friendly prompt, asking the user what specific aspect of the dialogue they would like suggestions on.
  • After selecting the option, the user should be able to interact with the integrated ChatGPT system seamlessly, just like using a ChatGPT interface.
  • The software should display generated suggestions from ChatGPT in real-time as the user interacts with the system.
  • For any suggestion that the user finds suitable, there should be a clear and intuitive "Insert" option that allows them to easily incorporate the suggested text into their dialogue.
  • Users should have the ability to customize and edit the suggested text to match their specific narrative or stylistic requirements.

Bug with resizing the nodes

while resizing the nodes from the left corners, if the nodes become in minimum size, then it's impossible to resize it back

[Doc] Update NodeLink/Calculator Documentations

The NodeLink/Calculator documentation needs to be revised and updated to ensure accuracy, clarity, and completeness.

A.C:

  • Thoroughly review the current NodeLink/Calculator documentation to identify areas that require updates or improvements.
  • Ensure that all information related to NodeLink/Calculator is up to date, including features, functionalities, and usage instructions (Update the versions in the doc specially)
  • Incorporate diagrams, screenshots, or illustrations where necessary to visually assist users in understanding the NodeLink/Calculator tool.
  • Include practical examples and use cases to demonstrate how to use NodeLink/Calculator effectively.
  • Maintain a consistent format, style, and terminology throughout the documentation to enhance readability.

[FEATURE]: Rubber band for multi selection

Is your feature request related to a problem? Please describe.
Drawing a rubber band rectangle for enabling multiple selection. With left click. (like obsidian)
Also enable multi selection options (tools) same as obisidian

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Firmware change required?
Yes/No

Additional context
Add any other context or screenshots about the feature request here.

[BUG]: The app becomes very slow after adding some connections

As a user, I want the application to perform efficiently even when a significant number of node connections are added to the project. Currently, when a large number of connections are present, the app becomes excessively slow, impacting my productivity and user experience.

Acceptance Criteria:

  • The application should handle a considerable number of node connections without experiencing significant performance degradation. Ideally, the app should remain responsive and smooth even with a substantial number of connections.

  • Performance tests should be conducted to determine the maximum number of connections the application can handle without becoming slow.

  • The development team should conduct a thorough investigation to identify potential bottlenecks in the code related to managing connections and optimize the relevant sections to improve performance.

  • The new approach should have the current features that LinkView supports (e.g. selection/arrow/color/type(dash-dot)/shape)

  • The new approach should look smooth and not pixelized.

Overview feature

As a user, I want access to an Overview window that provides a simplified and compact version of the scene. This Overview window should clearly distinguish the visible parts of the diagram from the non-visible areas. By having this feature, I can easily grasp the entire diagram at a glance and quickly comprehend the context of the scene without having to navigate through the entire diagram in detail. This will enhance my ability to make informed decisions and efficiently interact with the main scene.

A.C.

  • The Overview window should be easily accessible from the main scene with a designated button or control (It's desired to use the current button groups on the scene).
  • When the user opens the Overview window, it should display a scaled-down, simplified representation of the main scene's diagram.
  • The visible parts of the main scene should be visually distinguishable from the non-visible areas in the Overview window. This can be achieved through shading, borders, or any other appropriate visual cues.
  • The content within the Overview window should update in real-time to reflect any changes made in the main scene, providing an accurate representation of the latest state.
  • The Overview window should be resizable, allowing users to adjust its size to their preference.
  • Users should be able to interact with the Overview window by panning or clicking on specific areas, which should automatically navigate to the corresponding part of the main scene.
  • The Overview window should maintain an aspect ratio that accurately represents the main scene's proportions.
  • The feature should be responsive and perform efficiently, even with large and complex diagrams.
  • The Overview window should not obscure or overlap with critical elements of the main scene when opened.
  • The Overview window should have the option to be closed or minimized, allowing users to focus solely on the main scene when needed.
  • If there are any limitations or restrictions in terms of the supported diagram types or features in the Overview window, they should be clearly communicated to users.

[FEATURE]: CTRL + mouse wheel should zoom out/in

Is your feature request related to a problem? Please describe.
Enable zooming feature by ctrl+wheel

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Firmware change required?
Yes/No

Additional context
Add any other context or screenshots about the feature request here.

[FEATURE]: Abstract NodeView

User Story:
As a developer I want to have an abstract class for the node view, so I can design my own view according to the data structure.

**Acceptance Criteria: **

  • Ability to override the header item.
  • Ability to override the content item.
  • Ability to override the footer item.
  • All the events should be activated by default (Drag, left click, right-click, etc).
  • Ability to override the events.
  • There should be a default example to show how it can be used

[BUG]: Issue with nodes and connection appearing after resizing the nodes

Describe the bug
After resizing a node, it appears that the ports are still in the previous place.

To Reproduce
Steps to reproduce the behavior:

  1. Create two nodes
  2. Connect the first node's right port to the second node's left port
  3. Resize the first node, from its rightside
  4. See error

Screenshots
Before resizing:
image

After resizing:
image

Software Versions
main branch

[IMPROVMENT]: Fix the compatibility for other qt6 versions

** User Story **
As a developer, I want the NodeLink to be compatible with Qt 6+, so I can use any version for my application.

** Acceptance criteria **

  • Compatible with Qt 6.5+ version
  • Windos (msvc, mingw, GCC)
  • Compatible with Qt 6.4+ version
  • Compatible with Qt 6+ version
  • Compatible with Qt 5.15.2 version
  • Linux (gcc, Clang)
  • MAC (Clang)

links have different behavior than Obsidian

** User Story **
as an end user, I want to fix some link issue so I can feel exactly like the Obsidian.

Describe the bug
links have different behavior than Obsidian.

To Reproduce
1- when you press a link port a temp connection immediately created
2- temp connection is above the nodes in z value
3- temp connection is not snapped to the destination port when is near
4- when temp connection is released in empty space and the objects node is shown, mouse movement moves the connection

Acceptance criteria

  • 1- the temp connection should be created only if the user moved the mouse after press
  • 2- temp connection should be below the nodes in z value
  • 3- temp connection should be snapped to the destination port when is near
  • 4- when temp connection is released in empty space and the objects node is shown, mouse movement should not move the connection and just can affect the object menu

[Bug] Scene size changes after several zoom in/out

The scene size is intended to remain fixed.

Instructions for reproducing the issue:

  1. Launch the SituationSimulator or NodeLink example.
  2. Position 4 nodes at the corners of the scene and 1 in the center.
  3. Experiment with zooming in and out, using the maximum level.
  4. Occasionally, you may observe extra space being added to the scene, or the scene size may shrink, causing content to be cut off.

Image

Sticky Node

As a game developer, I want to be able to add sticky notes to the scene in the application. These sticky notes should serve as a quick and flexible way for me to jot down important information, or comments related to the diagram or project I am working on.
For a suggestion, you can check the windows sticky note.

Acceptance Criteria:

  • The application should provide a designated "Sticky Note" tool or option that allows me to easily add a new sticky note to the scene.

  • When adding a sticky note, I should be able to click on the canvas or a specific node to position it accurately within the scene.

  • Each sticky note should have an editable text area where I can type, modify, or format the content according to my needs.

  • The sticky notes should be resizable, allowing me to adjust their size to accommodate different amounts of text.

  • The application should support multiple sticky notes on the scene simultaneously, and I should be able to add, remove, or manage them easily.

  • Sticky notes should have a visually distinctive appearance, making them easily recognizable from other elements in the scene.

  • The application should provide options to change the color and style of the sticky notes, enabling me to categorize or highlight different types of information.

  • Sticky notes should support basic formatting options like bold, italic, bullet points, etc., to enhance the readability and organization of the content.

  • The application should allow me to move the sticky notes freely across the canvas, ensuring flexibility in organizing and rearranging information as needed.

  • The sticky notes should be saved/loaded with the project file.

  • The users should be able to connect the sticky notes to the other nodes (by the connections)

Calculator Example

As a developer, I want to have an example calculator project included in the project (as a subproject). This example project should serve as a reference and template for creating calculator functionalities using the available nodes. I should be able to add the following nodes to the example project:

Input Number Node (Source): This node will allow me to input numerical values into the calculator.

Operations Node (Additive, Multiplier, Subtraction, etc.): These nodes will perform different mathematical operations on the input numbers, such as addition, multiplication, subtraction, etc.

Display Node: This node will display the output or result of the calculations performed by the operations nodes.

Acceptance Criteria:

  • The example calculator project should be accessible and readily available when cloning the project

  • I should be able to choose the example calculator project as a starting point.

  • The example calculator project should be well-documented, providing clear instructions on how to use and customize it.

  • Each type of node (input number, operations, display) should have a distinct and visually recognizable representation in the node editor.

  • The input number node should allow me to input numerical values when connected to other nodes.

  • The operations nodes should correctly perform the specified mathematical operations and produce accurate results.

  • The display node should receive the output from the operations nodes and display the calculated result accurately.

  • The nodes should be easy to connect and configure to create different calculator functions.

  • The example project should demonstrate basic calculator operations, such as addition, subtraction, multiplication, and division.

  • The example calculator project should be free of any bugs or errors that could hinder its proper functioning.

  • It should be possible to modify and expand the example calculator project to create more complex calculator functionalities.

  • The example calculator project should be compatible with the main project and not cause any conflicts or compatibility issues.

  • The example calculator project should be well-organized and follow best practices for creating node-based projects.

[Enhancement]: Move Font and Radius into NLStyle.

Move Fonts and Radiuses into NLStyle.

  • Create a font property that holds all fonts (such as nodeIcon, nodeTitle, nodeDescription, and linkDescription, and can use a primary font for common fonts).
  • Create a radius property that holds all Radiuses (such as node, button, and contextMenu items, and can use a primary Radius for common Radiuses ).

[BUG]: Crash when creating a link from the source node after a node is removed.

Crash when creating a link from the source node after a node is removed
Crash when creating a link from the source node after a node is removed.

To Reproduce
Steps to reproduce the behavior:

  1. Create two nodes or more
  2. Create a link (Node1 to Node2)
  3. Remove a Node2
  4. create a Link from the source port (Node1) to the destination port(Any)
  5. See the error

[Bug] Make zoom to fit animated

The zooming feature is not smooth and becomes slower with more nodes/connections

** extra acceptance **

  • make zoom to fit animated
  • zoom into should be animated
  • Aggregate successive wheel events

[BUG]: Multiple links between two same ports cause issues

Describe the bug
Once a connection is created between two ports, it should be stable. However in the current version, when a connection is made between two ports, If the user attempts to create the same connection with the same starting point and ending point, the previous connection is unlinked and starts moving with the mouse

To Reproduce
Steps to reproduce the behavior:

  1. Create two nodes
  2. Create a connection from port A of the first node to the port B of the second node
  3. Attempt to create another connection from port A to port B
  4. Previously made connection starts moving around and is unlinked

Expected behavior
Two approaches for fixing this:
1- We allow the user to make more than one connection between two ports
2- If there already is a connection between two points, then second attempted connection (temp connection) should disappear in the proximity of the output port. Either way, the previously made connection should be stable at all costs.

[Enhancement]: When starting to drag a link, the direction is always downward

Describe the bug
1- When starting to drag a link, the direction is always downward, no matter which port is chosen sidewise
2- When a new node is made at the end of an arrow (link), the node should be at that exact place. in our current version, the node is made at the top left corner of the arrow position

To Reproduce
Steps to reproduce the behavior:

  1. Create a node (any node)
  2. start making a link by dragging the right hand port

Screenshots
actual behavior:
Screenshot (28)

Obsidian (desired behavior):
Screenshot (27)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.