Skip to content

Conversation

@g-abilio
Copy link

@g-abilio g-abilio commented Oct 21, 2025

Type of change

  • Bug fix
  • (X) New feature
  • Breaking change
  • Documentation/refactoring

Description

Node Processing Status is a feature that allows the user to track the processing steps taking place on a node. The gif below illustrates this with the Random Number node, created as an example of this functionality:

processing_status_gif

The dynamic icons that appear on the lower right side of the node demonstrate the processing scheme: the first icon (empty icon) demonstrates that there are empty entries in the node; the second icon (processing icon) shows that processing is taking place within the node; the third (updated icon) shows that processing has completed and the node has been updated.
Other icons are also present in the feature's schematic:

  • Failed icon: shows that processing has failed.
  • Partial icon: shows a partial processing status.
  • Pending icon: shows that processing is yet to begin, useful in manual processing nodes.

Testing

  • Qt version tested:
  • (X) Existing tests still pass
  • Added tests for new functionality (if applicable)

tatatupi and others added 27 commits June 20, 2025 15:26
Integrate upstream
…-from-nodedelegatemodel

Add UI update signal
@tatatupi tatatupi self-requested a review November 11, 2025 17:26
@tatatupi
Copy link
Collaborator

It seems OK to merge.
What do you think about this functionality @Llcoolsouder?

Copy link
Collaborator

@Llcoolsouder Llcoolsouder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tatatupi
Seems mostly fine to me. A few probing questions:

  • Am I correct that this only applies to the DataFlow use-case; not the straight abstract graph classes?
  • Can the icon be disabled if we don't want it to show?
  • Can the icons be configured to match an end user's theme more closely?

Empty = 4, ///
Failed = 5, ///
Partial = 6, ///
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some use-cases or a short comment could help others?
What is the difference between NoStatus and Empty?
Between Processing and Partial?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The short comments have been added. Thanks for the suggestion!

NoStatus indicates the absence of a processing status for the node in the UI. Empty means that there is no valid input data and therefore nothing to compute.
Processing means that processing is in progress. Partial means that the computation was finished incompletely and only partial results are available.

QSize size = geometry.size(nodeId);

QIcon icon = ngo.processingStatusIcon();
QSize iconSize(16, 16);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the demo/preview animation the icons were quite pixelized. Would it help to generate a slightly higher-resolution bitmap? Like 64x64, for example

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For resizable nodes we draw a dot approximately in the same corner of the node. What happens if we use both features at the same time?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 64x64 bitmap resolution is now applied. Thanks for the suggestion!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now choose the style of the icon as well:

/**
 * Defines the processing icon style;
 */
struct ProcessingIconStyle
{
    ProcessingIconPos _pos{ProcessingIconPos::BottomRight};
    double _size{20.0};
    double _margin{8.0};
};
image

Copy link
Author

@g-abilio g-abilio Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Llcoolsouder, it is now possible to configure the icon theme, changing the size, margin, bitmap resolution, and also the image. Here's an example:

QtNodes::ProcessingIconStyle style;
style._margin = 4.0;
style._pos = QtNodes::ProcessingIconPos::BottomLeft;
style._size = 10.0;

setStatusIconStyle(style);

QPixmap pixmap(32, 32);
pixmap.fill(QColor("red"));

setStatusIcon(QtNodes::NodeProcessingStatus::Updated, pixmap);
image

Copy link
Owner

@paceholder paceholder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions in the review need explanation. Thanks for this feature, looks cool.

@g-abilio
Copy link
Author

@tatatupi Seems mostly fine to me. A few probing questions:

  • Am I correct that this only applies to the DataFlow use-case; not the straight abstract graph classes?
  • Can the icon be disabled if we don't want it to show?
  • Can the icons be configured to match an end user's theme more closely?

@Llcoolsouder

  • Yes, it only applies to the DataFlow use-case.
  • Yes. It's disabled by default because the default processing status is NoStatus. To enable the icon, you can use the setNodeProcessingStatus method.
  • Currently no, because the icons are defined by .svg files saved in the repository. However, it is possible to create setter methods for these icons so that they can be configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants