Commit graph

409 commits

Author SHA1 Message Date
waaake
7384db89e3 [ui] ScriptEditor: Updated to Use Horizontal MSplitView 2025-01-10 08:18:43 +01:00
waaake
1b963ab1f2 [ui] ScriptEditor: Adjusted Icon Size and Layout 2025-01-10 07:44:45 +01:00
waaake
a90d5c4d38 [ui] ScriptEditor: Updated the content width of the input and output flickables
Formatted the input and output text for output display text area
2025-01-08 09:47:37 +05:30
waaake
49052dfc0f [ui] ScriptEditor: ScriptEditor gets new icons
Updated Icons for ScriptEditor

Script Editor shows a confirmation dialog before clearing history
2025-01-07 09:37:33 +05:30
waaake
8207e84a41 [ui] ScriptEditor: ScriptEditor gets a RowLayout
A Row Layout is more practical for using script editor with the current placement of meshroom GUI.
2025-01-07 09:32:14 +05:30
waaake
2e577274e6 [ui] ScriptEditor: Added syntax colorization for the script editor
Python syntax within the script editor is now highlighted making it easier to understand and write smaller code in it.
2025-01-07 09:32:12 +05:30
waaake
4464cdf799 [ui] ScriptEditor: Updated Script Editor layout
ScriptEditor is now part of a ColumnLayout in an MSplitView allowing more control over what is being viewed.
2025-01-07 09:32:07 +05:30
Fabien Castan
e43cd62f79
Merge pull request #2627 from alicevision/fix/jsParamInjection
[GraphEditor] Fix injections into signal handlers with JS functions
2025-01-06 15:14:39 +01:00
waaake
a2f4ac560f [ui] NodeEditor: Added refresh function to update the currentIndex of the tabBar 2024-12-31 09:43:27 +05:30
waaake
d142a745d0 [fix][ui] StatViewer: Updated Layouts for Stat Viewer
The sub column layouts in the parent column layouts were causing polish loop during show/resize ops
2024-12-30 09:28:36 +05:30
Candice Bentéjac
cb301b2aaa [GraphEditor] Fix injections into signal handlers with JS functions 2024-12-26 15:44:11 +01:00
waaake
2f0996f7bf [ui] NodeEditor: Addressed the issue with retaining tabs when switching node selection
Updated the event trigger to be onVisibleChanged and the condition to check whether the current selected node is an incomputable node and the current tab index does not exist for it before resetting the index to 0
2024-12-23 09:07:29 +05:30
waaake
b31da19e66 [ui] GraphEditor: Fixed Key handling for Node creation Menu
Keys.AfterItem as the priority ensures the Item's own key events are handled before Forwarding it to specified items. This handles all defined Enter and Return key presses
2024-12-19 06:05:11 +01:00
Candice Bentéjac
9aa9e7fe6e [GraphEditor] Add missing import of Utils to access Format methods 2024-12-17 11:03:33 +00:00
Candice Bentéjac
e565458131 [GraphEditor] AttributeItemDelegate: Use MaterialLabel for uncomputed components 2024-12-11 14:59:35 +01:00
Yann Lanthony
944ff15002 [ui] Additive mode for select following Nodes
Implement additive selection behavior when selecting downstream
nodes from a node, using Alt+Shift+Click.
2024-12-09 11:16:33 +01:00
Yann Lanthony
fc85999011 [ui] GraphEditor: toggle node selected state on Ctrl+click
Closer to the standard behavior of the Ctrl modifier key for selection.
2024-12-09 10:18:48 +01:00
Yann Lanthony
87c0cef605 [ui] GraphEditor: fix indentation 2024-12-06 11:03:30 +01:00
Yann Lanthony
4a60e24c2e [ui] GraphEditor: Improve node selected status logic
Instead of connecting to onSelectionChanged, use ItemSelectionModel.hasSelection
property, that can be use for direct bindings with the same behavior.
https://doc.qt.io/qt-6/qml-qtqml-models-itemselectionmodel.html#hasSelection-prop
2024-12-06 10:47:20 +01:00
Yann Lanthony
67bd43e040 [ui] Graph: remove selectedNodes model
Expose `getSelectedNode` that relies on the QItemSelectionModel
for imperative code in QML that still requires to access the
selected node instances.
2024-12-06 10:14:50 +01:00
Yann Lanthony
cdfa6186b1 [ui] Graph: Add clearSelectedNodesData method
Convenient function to directly work on the current node selection.
2024-12-06 10:14:50 +01:00
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