Commit graph

79 commits

Author SHA1 Message Date
Yann Lanthony
dfe2166942 [ui] Node: expose additional mouse events
Forward mouse 'released' and 'clicked' events for giving
more control over node selection management.
2024-12-06 10:12:11 +01:00
Candice Bentéjac
248229edcf [GraphEditor] Node: Check if unexposed ListAttributes contain links
If unexposed attributes (ie. attributes that are located in the lower
side of a node, and hidden by default) are connected, they are meant
to remain visible even if the lower part of that node is hidden.

This was working fine for any attribute that was not a `ListAttribute`,
as the check was made on whether the attribute's value was a link to
another attribute. For `ListAttributes`, whose value is actually a list
of values, this was not working as nested links were not checked.

Instead of relying on the `isLink` property, we now use `isLinkNested`:
for regular attributes, this is equivalent to using `isLink`, but for
`ListAttributes`, the full list of values will be checked.
2024-11-26 11:46:24 +00:00
Candice Bentéjac
a61231916f [qt6][GraphEditor] Node: Ensure readOnly is set with a boolean 2024-11-07 18:19:13 +01:00
Candice Bentéjac
5a0b1c0c95 [qt6][qml] Clean-up code and harmonize comments 2024-11-07 18:15:37 +01:00
Candice Bentéjac
0e71f2a520 [qt6] Update versions for all the imported modules
Qt3D.Extras cannot be updated to 2.6 yet, otherwise there are errors.
2024-11-07 18:09:01 +01:00
Candice Bentéjac
6d845376eb [qt6] Use JS functions format to declare explicit parameters in slots
This fixes all the "Injection of parameters into signal handlers
is deprecated. Use JavaScript functions with formal parameters instead."
warnings.
2024-11-07 18:08:59 +01:00
Candice Bentéjac
96a70c04ff [qt6] Remove imports of QML modules that do not exist anymore with Qt6.6 2024-11-07 18:08:55 +01:00
Aurore LAFAURIE
da3335ee94 [core/ui] Exposed property added to attributeDesc
Exposed is useful to display the attribute in the upper part of the node in the Graph Editor.
By default, File attributes are exposed.
2024-09-11 11:53:34 +02:00
Candice Bentéjac
7686c48e89 [GraphEditor] Do not assign undefined to edge-related properties
This fixes the following QML warnings that may appear when performing
lots of operations on edges:
`Unable to assign [undefined] to QString/bool`

These warnings do not seem to have any functional impact on the connection
processes.
2024-09-05 09:36:18 +02:00
Aurore LAFAURIE
019e137386 [ui/core] First version of For Loop implementation
If you connect a list to an attribute, you can iterate over the list as a for loop
2024-09-02 17:08:01 +02:00
Aurore LAFAURIE
9acc0a7492 [ui] Eye displayed for node with sequence output 2024-06-20 11:54:30 +02:00
Aurore LAFAURIE
c95afc8179 [GraphEditor] Eye on displayable node even if not computed 2024-06-07 10:21:55 +02:00
Aurore LAFAURIE
840ed3a8b8 [Node] Show all outputs of node in Graph 2024-05-28 18:07:31 +02:00
Aurore LAFAURIE
796493417d [Node] Fix visible property usage for nodes output in Graph 2024-05-28 18:06:35 +02:00
Aurore LAFAURIE
671b3ff128 [ui] InputNode behavior for menu and display 2024-05-27 22:03:42 +02:00
Fabien Castan
8c242cbbec [ui] GraphEditor: update color/width of node's border
Avoid ambiguities between mainSelected/selected/hover.
2024-05-22 21:34:33 +02:00
Aurore LAFAURIE
f38154b109 [ui] Selected node header set to base color 2024-05-14 18:13:41 +02:00
Aurore LAFAURIE
0a770f474f [ui] Disabled behavior applied to all types of parameters and attributes
Disabled behavior applied to all types of parameters and attributes
2024-04-19 17:16:21 +02:00
Aurore LAFAURIE
1b55dc8649 [ui] Attribute becomes grey in graph editor and attribute editor when connected but disabled
If attribute is disabled but has output connections, it becomes grey.
If the connection is removed while being disabled, it hides itself.

Both is working in GraphEditor on the nodes and in the AttributeEditor.
2024-04-19 17:16:20 +02:00
Candice Bentéjac
6f1ac9a06e [ui] Hide disabled File attributes and their edges but keep the connections
This commit effectively hides a node's attributes when they are disabled.
If these attributes have connections, the edges representing these
connections are hidden but not destroyed. When the edges are hidden, if
one of the connected attributes is still enabled, its pin becomes empty as
if it was not connected to anything.

If the disabled attribute is re-enabled and the connection has not been
broken (if the enabled attribute on the other side of the edge has not
been reconnected to another attribute, for example), the edge re-appears.
If the connection has been broken, then the attribute will be unconnected.

Hidden connections are saved in project files and taken into account when
a project file containing some is loaded.
2024-04-19 17:16:20 +02:00
Aurore LAFAURIE
f3027d1988 [ui] Visible property handles the show of an output attribute in the node in the GraphEditor 2024-04-12 15:43:35 +02:00
Candice Bentéjac
e9d80611c7 [GraphEditor] Clean-up: Harmonize syntax across all files 2023-11-06 16:28:22 +01:00
Candice Bentéjac
091346cbb8 [qml] Optimize QML files and fix syntax warnings
This commit addresses warnings that were raised by QtCreator's linter:
- IDs declared more than once
- variables declared more than once in the same scope
- type coercions
- variables declared as "var" when their type is known
- unclosed "case" in switch-case
2023-07-04 12:04:14 +02:00
Candice Bentéjac
8c494198e0 [qml] Qt5.15: Update syntax for slots
Slots now need to be written as function; the previous syntax is
deprecated.
2023-07-03 12:11:33 +02:00
Candice Bentéjac
62ba08447d [qml] Qt5.15: Upgrade all remaining modules
The upgrade concerns the following modules:
- QtCharts
- QtPositioning
- QtLocation
- QtGraphicalEffects
- QtQml
2023-07-03 12:11:32 +02:00
Candice Bentéjac
9b5dd40b02 [qml] Qt5.15: Upgrade all QtQuick modules 2023-07-03 12:11:29 +02:00
Candice Bentéjac
b5638fe034 [ui] Display icon for nodes with 3D outputs
The tooltip that is displayed when hovering over the icon specifies
which loader will be used, depending on the type of output attribute
(either the Image/2D viewer, or the 3D viewer).
2023-06-13 14:45:59 +02:00
Candice Bentéjac
f2767aec33 [ui] GraphEditor: Add a "preview" icon when the node's output can be loaded
If the node has been computed (i.e. its status is `SUCCESS`) and has at
least one output that can be loaded in the 2D viewer, then display an icon
with a tooltip that indicates that double-clicking the node allows to load
it and its outputs in the 2D Viewer.
2023-06-09 17:32:05 +02:00
Candice Bentéjac
6381371e7d Display the invalidation and comment messages in the internal attributes' tooltip
The tooltip now displays both the invalidation message, followed by the
comments. The invalidation message is displayed first in bold font,
followed by an empty line and the comments in regular font.

The tooltip now appears if at least one of the invalidation or comment
messages exists.

The invalidation and comment messages are formatted with HTML tags prior
to their display. The descriptions of both attributes is also updated
to indicate which one is displayed in bold or regular font.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
4b7a548687 Notify changes in internal attributes' properties
The "label", "color" and "comment" properties are not constant anymore,
their changes in value are notified with the internalAttributesChanged()
signal, like the "invalidation" property.

This implies that the connection on "internalAttributesChanged" on the
QML side is not needed anymore.
2023-02-15 08:36:16 +00:00
Candice Bentéjac
1015ea448a [ui] Add an icon and tooltip on a node's header if it has a comment
If the "Comments" internal attribute is filled, add a corresponding
icon in the node's header, as well as a tooltip that contains the
comment.
2023-02-15 08:36:13 +00:00
Candice Bentéjac
21d01acc9a Add "color" as an internal attribute
Setting this attribute allows the user to change the color
of a node, either by directly providing an SVG color name or an
hexadecimal color code, or by picking a color with the selector.
2023-02-15 08:36:11 +00:00
Candice Bentéjac
330382ab0c Add "label" as an internal attribute
Setting the "label" internal attribute allows to give a custom
label to replace the node's default label.
2023-02-15 08:36:10 +00:00
Candice Bentéjac
45d3f202fc Display the "Computed Externally" icon whenever the node runs externally
A node running externally used to mean it was running on a submitter.
This definition has been extended and a node is now considered to be
external if it is running on a submitter or running in another instance
of Meshroom. The "Computed Externally" is updated to reflect that
change.
2023-01-05 16:44:55 +01:00
Candice Bentéjac
61e0482a21 Add an offset to the position of pasted nodes if a node is hovered
If a node is being hovered when the user performs the paste, an
offset is added to the mouse's position, both in the horizontal and
vertical directions. This aims at avoiding a complete overlap with
the nodes on top of which the clipboard content is pasted.
2022-09-08 15:21:57 +02:00
ChemicalXandco
ecb1662b6b [ui] GraphEditor: highlight the edge that will be deleted when it is replaced with another edge 2021-06-04 19:59:49 +01:00
Fabien Castan
18be350e6f
Merge pull request #1227 from ChemicalXandco/box_select
[ui] add support for selecting multiple nodes at once
2021-05-03 23:42:11 +02:00
ChemicalXandco
975ee5e414 [ui] GraphEditor: fix node highlight radius 2021-03-29 16:37:21 +01:00
Fabien Castan
e5ad4b2e64 [ui] GraphEditor: improve readOnly behavior on attributes 2021-01-22 14:53:57 +01:00
Fabien Castan
078120696a [ui] GraphEditor: fix some readOnly regarding CompatibilityNodes 2021-01-22 14:30:33 +01:00
ChemicalXandco
c253e7d363 [ui] add support for selecting multiple nodes at once 2021-01-15 18:16:45 +00:00
Fabien Castan
8ef793a488 [ui] GraphEditor: output attributes are never read-only
Also allow to expand attributes list on a locked node.
2020-12-28 19:01:36 +01:00
Fabien Castan
ecf10a65f7 [ui] GraphEditor: visualize edges between params (non File attributes) 2020-12-18 01:13:54 +01:00
Fabien Castan
bfdf2eae8b [ui] GraphEditor: use globalExecMode method 2020-12-02 19:56:23 +01:00
Julien-Haudegond
827e98a83a [ui] Node: improve duplicates' button ToolTip 2020-09-05 13:14:25 +02:00
Julien-Haudegond
95c7a9b87f [ui] Node: move compatibility badge inside the node icon bar 2020-09-02 15:39:31 +02:00
Julien-Haudegond
06b821349f [ui] Node: duplicates button improvement but still perf issues
As described in the comment, for an unknown reason, the icon seems to make the UI slow in some cases but not always.
2020-08-27 16:28:23 +02:00
Julien-Haudegond
ae7daf0365 [ui] GraphEditor: fix binding warnings 2020-08-24 15:34:51 +02:00
Julien-Haudegond
79e1c69d5d Merge remote-tracking branch 'origin/develop' into dev/nodesAndTaskManager 2020-08-24 15:19:31 +02:00
Julien-Haudegond
12de900e96 [ui] fix binding warnings when closing Meshroom 2020-08-17 17:50:44 +02:00