Commit graph

388 commits

Author SHA1 Message Date
Yann Lanthony
d11a1f62cc [ui] Graph Editor: fix remaining use of deleted function 2024-12-06 10:14:50 +01:00
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
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
0dca19f158 [GraphEditor] Edge: Correctly update the EdgeMouseArea when moving nodes 2024-12-03 11:56:56 +01:00
waaake
9404b73845 [ui] NodeEditor: Implementation of Toggle based Search.
Node Editor search can now be toggled making it take lesser space by default.
2024-11-30 20:17:06 +05:30
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
Fabien Castan
2a27f4c6fe
Merge pull request #2578 from alicevision/fix/unexposedEdges
[GraphEditor] Node: Check if unexposed `ListAttributes` contain links
2024-11-29 21:58:49 +01:00
Yann Lanthony
e800cd4e31
Merge pull request #2604 from alicevision/dev/NodeColoring
[ui] Graph Editor Update: Quick Node Coloring with the Color Selector Tool
2024-11-29 11:16:25 +01:00
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
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
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
05a742a221 [ui] Fix color for MaterialToolLabel
The name of the property used to set the color was ambiguous, causing
the colors to not be applied at all.
2024-11-22 16:54:58 +01: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
b12d1fed06 [qt6][qml] Remove unnecessary module imports 2024-11-07 18:13:36 +01:00
Candice Bentéjac
039504782f [qt6][GraphEditor] Fix connections to ListAttribute pins
The callbacks of `childrenRepeater` (which was used to "fill"
`ListAttributes` with children) were not correctly set. Their prototypes
were missing the `index` argument, meaning that instead of being
provided with the child attribute that was added or deleted,
they were provided with its index in the model.

The added children attributes were also instatiated as empty attribute
pins that were still visible, thus increasing indirectly the spacing of
the initial pin.
2024-11-07 18:13:34 +01:00
Candice Bentéjac
52444ef0ad [GraphEditor] Edge: Set curve scale after initializing EdgeMouseArea
The curve scale of the mouse area for an edge used to be defined when
initializing the `EdgeMouseArea` for that edge. Setting it triggers a
chain of event that allow the mouse area to be active, thus correctly
detecting when it is being hovered or clicked on.

With Qt6, these events unfolded before the `EdgeMouseArea` had finished
initializing, which then caused it to not be active until the edge's
shape was modified (and the chain of events triggered again). It is now
set once the component has been created, so all the events can happen
in an environment where they are taken into account.
2024-11-07 18:13:33 +01:00
Candice Bentéjac
645b822e56 [qt6][GraphEditor] Fix the width for the TaskManager's list 2024-11-07 18:13:26 +01:00
Candice Bentéjac
8007bc51e8 [qt6][GraphEditor] Set preferred size for the list of chunks 2024-11-07 18:13:23 +01:00
Candice Bentéjac
fbe72a0ad6 [qt6][GraphEditor] Correctly detect clicks on edges 2024-11-07 18:13:22 +01:00
Candice Bentéjac
9867773953 [qt6][GraphEditor] Check for object's existence before accessing it 2024-11-07 18:13:20 +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
3ff279d99a [qt6] Use JS functions format to declare explicit parameters in slots 2024-11-07 18:09:10 +01:00
Candice Bentéjac
d5b5163828 [qt6] Remove shaders from Meshroom and move them to QtAliceVision 2024-11-07 18:09:05 +01:00
Candice Bentéjac
a62bed08eb [qt6][GraphEditor] Fix ColorDialog selection 2024-11-07 18:09:03 +01:00
Candice Bentéjac
b9ec8fe3b7 [qt6][GraphEditor] Rename identifiers for attribute items 2024-11-07 18:09:03 +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
1b9e75cd4f [qt6] Replace Qt.labs.settings with QtCore.Settings 2024-11-07 18:08:58 +01:00
Candice Bentéjac
02be73df65 [qt6] Remove properties that do not exist anymore in Qt6.6 2024-11-07 18:08:55 +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
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
3bac0d0e37 [GraphEditor] AttributePin: Fix condition for the highlight pin display 2024-10-15 16:05:40 +02:00
Fabien Castan
52ecb18471 [ui] GraphEditor: SplitView fixes 2024-10-15 15:05:19 +02:00
Candice Bentéjac
d563451a53 [ui] GraphEditor: check node is valid
Only count valid nodes
2024-10-15 15:05:11 +02:00
Fabien Castan
2852a4cf19 [ui] Custom SplitView to have a larger handle 2024-09-19 20:39:43 +02:00
Aurore LAFAURIE
ccd88c4646 [ui] Replacement of Controls1 SplitView to Controls2 SplitView 2024-09-17 18:32:59 +02:00
Candice Bentéjac
ccd5f369e4
Merge pull request #2532 from alicevision/fix/descriptionAttributeTooltip
[AttributeItemDelegate] Position the attribute description tooltip
2024-09-16 15:15:37 +02:00
Aurore LAFAURIE
23caca0a36 [AttributePin] Fix set position tooltip in custom component to not override all tooltips position 2024-09-16 11:52:54 +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
fbfe83e371 [AttributeItemDelegate] Type of attribute in tooltip doesn't need to be bold 2024-09-13 16:42:07 +02:00
Aurore LAFAURIE
2186a61fd8 [AttributeItemDelegate] Position the attribute description tooltip under the mouse position to be sure it doesn't slide on the screen 2024-09-12 15:21:13 +02:00
Fabien Castan
e077e8cb36
Merge pull request #2528 from alicevision/dev/exposingAttributesInGraphEditor
[core/ui] Exposed property added to attributeDesc
2024-09-11 20:03:18 +02:00