Commit graph

145 commits

Author SHA1 Message Date
Yann Lanthony
107b1e959a [ui] GraphEditor: cache selected node computability status
Avoid to evaluate the computability/submitability status of each
node twice by caching the information when creating the node
context menu.
2024-12-06 10:14:50 +01:00
Yann Lanthony
ade1f87b8f [ui] GraphEditor: Centralize node selection computability status
Re-write the computability status of the current node selection
as properties within the node menu component.
Note that this should be further improved to better scale with the size
of the selection, as it requires to traverse the graph for each node.
2024-12-06 10:14:50 +01:00
Yann Lanthony
b5836d96ed [ui] GraphEditor: Create node context menu after selection update
Delay the loading of the node context menu once the node selection
has been updated, for it to consider the proper selection.
2024-12-06 10:14:50 +01:00
Yann Lanthony
b3a8c6a1f2 [ui] GraphEditor: move node context menu to a Loader
Avoid having the node context menu always evaluating the current
state of the selected nodes for its own display, by dynamically
creating it on demand with a Loader.
Use callbacks for recomputing/resubmitting actions, instead of
storing state in the UI components.
2024-12-06 10:14:50 +01:00
Yann Lanthony
686927a92d [ui] Graph: add removeSelectedNodes method
Add and use an explicit method to remove the currently selected nodes
in a graph.
2024-12-06 10:14:43 +01:00
Yann Lanthony
05eabb2b13 [ui] Graph: Node selection refactor (1)
Switch selection management backend to a QItemSelectionModel,
while keeping the current 'selectedNodes' API for now.
Use DelegateSectionBox for node selection in the graph, and
rewrite the handling of node selection / displacement.
2024-12-06 10:13:51 +01:00
waaake
3a04ce668f [ui] GraphEditor: Search filtering fix
Fixed the issue where navigation arrows on the Filtering was allowing to set an index even when the search had null as the result.

Accepted signal on the Seach invokes the function rather than invoking the sigal for the button
2024-11-30 20:14:13 +05:30
waaake
b0ed5e465e [ui] GraphEditor: Graph Editor gets the toggle based search
Search bar is now placed in the bottom pane of the Graph Editor making it non-obstructing for navigating nodes across Graph Editor
2024-11-30 20:09:04 +05:30
waaake
225f4dc7e5 [ui] Color Selector Shortcut Fix: Fixed the shortcut clash with node copy 2024-11-29 09:51:13 +05:30
waaake
233bbb76c8 [ui] Graph: Updating the way how color gets set on the selected nodes
Coloring the nodes now uses setAttribute command instead of relying on refrences to Nodes within the graph.
2024-11-28 09:28:36 +05:30
waaake
d77b7a398a [ui] Coloring a Node: Added ColorSelector to the Graph Editor
The color selector in the Graph Editor provides a quick way to color nodes with predefined palette of colors.

Added Command to allow the Coloring to be undone and redone using QUndoStack
2024-11-25 09:22:14 +05:30
Candice Bentéjac
5a0b1c0c95 [qt6][qml] Clean-up code and harmonize comments 2024-11-07 18:15:37 +01:00
Candice Bentéjac
05e7d9eaee [qt6] Use JS functions format to declare explicit parameters in slots 2024-11-07 18:09:14 +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
12249de216 [GraphEditor] Stop manually editing pins based on the edge's visibility
Editing the pins manually was useful when trying to hide fully the
connection whenever there was an edge connected to an attribute that
was disabled. Disabled attributes now have a special display if they are
connected, meaning both ends of the edge do not need artificial updates.
2024-10-15 16:05:41 +02:00
Candice Bentéjac
d563451a53 [ui] GraphEditor: check node is valid
Only count valid nodes
2024-10-15 15:05:11 +02:00
Aurore LAFAURIE
b6df2852e7 [ui] Recompute and Re-submit not allowed with Compatibility Nodes
Renaming of canCompute to canComputeTopologically to understand the static aspect of the function
2024-09-13 18:32:46 +02:00
Aurore LAFAURIE
7d93a54b4c [ui] Fix click on Category in Node Menu to keep the nodes displayed 2024-09-10 12:37:44 +02:00
Candice Bentéjac
801ac369cd [GraphEditor] Do not update pins when the app is closing
When an edge is removed, the pins it is connected to are
updated depending on their status while the edge is getting destroyed. When the window is
closing, all the components are being destroyed while the QML context is being invalidated: no function call to components that are being destroyed should be made in that context.
2024-09-05 09:36:17 +02:00
Aurore LAFAURIE
85bfc5614b [ui] Thicker edges for for loops and better draw of them
If it's a for loop edge, it needs 2 shapes to draw from each side of the info section
2024-09-02 19:04:22 +02:00
Aurore LAFAURIE
f9ec52a39b [ui] Prevent modification of iterations while expanded for loop 2024-09-02 17:08:04 +02:00
Aurore LAFAURIE
0d346ab2da [ui] Value of current edge iteration and TaskManager protected 2024-09-02 17:08:04 +02:00
Fabien Castan
a9b22b0aaa [ui] GraphEditor: fix tooltip camel case 2024-09-02 17:08:03 +02:00
Fabien Castan
62ea6924f6 [ui] GraphEditor: simplify foreach loop menu 2024-09-02 17:08:03 +02:00
Fabien Castan
48d08b1f88 [ui] GraphEditor: improve alignments
Reduce usage of anchors (except centerIn/fill).
Display of Next/Previous for IntSelector.
2024-09-02 17:08:02 +02:00
Aurore LAFAURIE
ff86a5182e [GraphEditor] Close edge popup when action is triggered 2024-09-02 17:08:02 +02:00
Aurore LAFAURIE
c60c4d4d6c [ui] Collapse and Expand for loop are not allowed for Compatibility Nodes 2024-09-02 17:08:02 +02:00
Aurore LAFAURIE
aba045f4aa [ui] Display for loop size on edges 2024-09-02 17:08:02 +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
Candice Bentéjac
da2c3fda05 [GraphEditor] Return empty bbox if the graph is empty
This commit checks whether there is a node in the graph before trying
to determine the size and position of the bounding box. If the graph is
empty, an bounding box set with 0s is returned.
2024-08-26 16:21:28 +02:00
Fabien Castan
6646bde7a9 [ui] GraphEditor.newNodeMenu: fix unstable menu height
Use an explicit height on the newNodeMenu, this fixes the issue with
unstable size of the menu.
2024-08-22 22:23:28 +02:00
Candice Bentéjac
16e951bad8 [ui] Update Delete data label according to selected nodes 2024-08-01 14:53:43 +02:00
Aurore LAFAURIE
82dd2a1f31 [ui] Re-submit behavior implemented 2024-08-01 11:07:29 +01:00
Aurore LAFAURIE
72201a80ff [GraphEditor] Implementation of Recompute Button
Allows to do Delete data + Compute in less clicks
2024-08-01 11:07:29 +01:00
Aurore LAFAURIE
cc6acbc610 [ui] Removal of useless option for Compute and Submit selected nodes
It is now included directly in Compute and Submit options.
2024-07-17 16:08:01 +02:00
Aurore LAFAURIE
887844541c Compute or Submit selected nodes 2024-07-17 16:08:00 +02:00
Aurore LAFAURIE
671b3ff128 [ui] InputNode behavior for menu and display 2024-05-27 22:03:42 +02:00
Aurore LAFAURIE
697a8a562f [ui] Change order and put getSelectedNodes function outside specific action 2024-05-10 11:52:26 +02:00
Aurore LAFAURIE
c3ab36deb0 [ui] Cut option available in GraphEditor 2024-05-06 17:11:54 +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
Candice Bentéjac
04a7191b15 [ui] Simplify error dialog titles and capitalize first letters 2024-04-05 18:06:23 +02:00
Aurore LAFAURIE
dea13eb48a [ui] Warning dialog when project and images are dropped
Warning dialog when project and images are dropped, both for
ImageGallery and GraphEditor.

Counter of meshroom projects and compare to actual list of files
dragged.
2024-03-28 16:42:17 +01:00
Aurore LAFAURIE
67fbf1b00f [ui] drag&drop: common behavior for graph editor and image gallery
In Image Gallery :
- drop 1 .mg open the scene
- drop images either create new camera or augment the reconstruction

In Graph Editor :
- drop 1 .mg open the scene
- drop images create new camera at position of mouse
2024-03-28 11:28:29 +01:00
Candice Bentéjac
e9d80611c7 [GraphEditor] Clean-up: Harmonize syntax across all files 2023-11-06 16:28:22 +01:00
Abdelrahman AL MAROUK
af8eabfa97 [ui] add searchbar for graph nodes 2023-09-01 09:03:39 +02: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
9b5dd40b02 [qml] Qt5.15: Upgrade all QtQuick modules 2023-07-03 12:11:29 +02:00
Candice Bentéjac
614f831457 [ui] Force nodes' status update before performing a submit/compute/delete
This ensures that each node's status is correct before being computed,
submitted, or before having its data deleted. This is especially useful
when the File Poller is in minimal node, and only monitors the nodes that
are currently submitted or running.

If a graph is being opened in two different instances of Meshroom, and
computations are started on it in one of the instances, the other one will
not be aware of it (as the signals indicating computations have started
will have been emitted in the first instance, so no chunk will be added
to the monitoring in the second one). By forcing the update of the statuses
before actually starting computations or deleting data, we ensure that
there will not be any computational conflicts (same nodes submitted twice
in farm, for example) and that the users can know at all times what they
are doing without manually triggering a refresh.

This is not critical for the "Delete Data" part, as the action can already
be triggered even with there is no data to delete, but is still useful
to keep the displayed nodes as up-to-date with their actual status as
possible.
2023-03-02 19:13:00 +01:00
Sarah Brood
56fe514582
[ui] GraphEditor: use maxZoom to fit on nodes (#1865) 2023-01-18 11:49:03 +00:00