Commit graph

81 commits

Author SHA1 Message Date
Yann Lanthony
e7b49f31c7 [ui][GraphEditor] use 'C' locale for FloatParam validator + minor fixes
* using 'C' locale to ensure floating point values can be written using '.' decimal separator
* make TextField larger by default for numbers and fill width when slider is not defined
* avoid binding loop on height for ListAttributes by using contentHeight as implicitHeight
* add explicitly id for Connections in ComboBox
2019-01-04 17:30:37 +01:00
Yann Lanthony
00feb46667 [ui] extract NodeEditor from AttributeEditor
* NodeEditor
    * exposes Node parameters: compatibility, attributes and logs
    * provides a placeholder when no active Node
* AttributeEditor
    * only displays the list of Attributes
    * use 'AttributeEditor' for GroupAttributes in AttributeItemDelegate
* Layout
   * move NodeEditor on the same SplitView level as GraphEditor
   * move current node name and menu to the Panel's header
2019-01-04 17:30:37 +01:00
Yann Lanthony
dc8be1efae [ui] Attribute: display icon on advanced parameters 2018-12-20 11:17:23 +01:00
Yann Lanthony
1c935b6b5a [ui] GraphEditor: show/hide advanced Attributes
* use SortFilterModels to filter out  advanced attributes when hidden
* add GraphEditorSettings with persistent settings related to the GraphEditor
2018-12-20 11:17:23 +01:00
Yann Lanthony
05854ed897 [ui] UIGraph: add hoveredNode property + node hovering visual feedback
* keep track of currently hovered node in UIGraph on Python side
* Node: show border on hover + make MouseArea contain everything else to always get hover events, even when cursor is over children attribute pins
2018-12-07 16:07:42 +01:00
Yann Lanthony
5b991053a8 [ui] UIGraph: add selectedNode property
move node selection management to the Python side
2018-12-07 16:07:42 +01:00
Yann Lanthony
717b4f8b37 [ui] GraphEditor: display compatible attributes in Viewer3D on double click 2018-12-07 16:07:41 +01:00
Yann Lanthony
7db4beea89 [ui] use Node label in GraphEditor 2018-11-19 15:17:37 +01:00
Yann Lanthony
3b656d97fd [ui] NodeLog: load file only if visible
* when visibility changes, only load current file if log is actually visible
* set 'keepCursorPosition' default value to false in 'loadCurrentFile' method
2018-09-06 15:56:52 +02:00
Yann Lanthony
143b519dbd [ui] NodeLog: cross-platform monospace display
Specify multiple fixed size font families:
- Linux: "Monospace" 
- Windows: "Consolas" 
- OSX: "Monaco"
2018-09-06 15:56:52 +02:00
Yann Lanthony
fc8ea7ca18 [ui] GraphLayout: fix bouding box computation
correctly initialize width and height with first item
2018-08-06 10:37:45 +02:00
Fabien Castan
44e34d7eb3 [ui] use shift to pan (instead of Ctrl) 2018-08-03 14:38:08 +02:00
Yann Lanthony
94cba653d5 [ui] GraphEditor: improved ToolBar
* replace text buttons with MaterialToolButtons
* hide advanced min/max depth settings to a Settings menu
2018-07-27 19:12:55 +02:00
Yann Lanthony
713ca7c6a3 [ui] GraphEditor: simplify attributes connection
* make Drag/DropArea overflow on the attribute's label to be more tolerant when connecting attributes
* add visual feedback when hovering interactive areas
* tweak spacings between attributes
2018-07-27 19:12:53 +02:00
Yann Lanthony
e95c88292e [ui] GraphEditor: improve node selection
* deselect node background click
* always select node when pressed
* fix 'mouse.button/s' testing
2018-07-27 19:05:53 +02:00
Yann Lanthony
754a4360a3 [ui] AttributeEditor: set attribute when edited TextField is destroyed
ensure attribute is correctly set when the AttributeItemDelegate is abruptly destroyed (e.g: when another node is selected)
2018-07-27 19:05:53 +02:00
Yann Lanthony
c3464fa4e8 [ui] GraphEditor: trigger fit on project opening
* fit when the underlying graph has changed (new/open project)
* add 'F' shortcut to fit
* trigger fit after UI has been fully initialized (correct sizes)
2018-07-27 19:05:53 +02:00
Yann Lanthony
53be806019 [ui] GraphEditor: improve Edge UI
* increase EdgeMouseArea thickness for easier picking
* EdgeMouseArea: propagate modifiers on pressed
* increase edge visual thickness when hovered
* add edge contextual menu on right click
* Alt+RighClick shortcut to delete an edge
2018-07-27 19:05:53 +02:00
Yann Lanthony
e6e2c18aa8 [ui] Node: add selected property + selection border
* use more efficient selection border instead of slightly changing header's color
* require activeFocus when selected
2018-07-26 22:50:42 +02:00
Yann Lanthony
06f3d140df [ui] GraphEditor: faster animation for node movement 2018-07-26 22:48:30 +02:00
Yann Lanthony
f415745a4a [ui] make Nodes moves undoable
Handle nodes move and auto-layout on Python side by using GraphLayout and MoveNodeCommand.

* Node QML component relies on underlying core.Node object's position
* MoveNodeCommand is called after a Node has been dragged
* partial/full auto-layout for specific graph operations (Duplication, Augmentation...) are now part of those operations
* serialized position in node data allows to properly restore nodes coordinates on undo/redo
* remove all layout/node moving code from QML
2018-07-26 22:46:22 +02:00
Fabien Castan
bb0155ba42
Merge pull request #150 from alicevision/dev_versionCompatibility
Introduce version compatibility handling
2018-07-26 12:50:15 +02:00
Yann Lanthony
3615f641fd [ui][dialogs] improve wording
+ use MessageDialog for unsaved project dialog
2018-07-25 20:05:37 +02:00
Yann Lanthony
99167b7152 [ui] CompatibilityManager: issues summary in clipboard message copying
override MessageDialog.getAsString to add compatibility report
2018-07-25 16:52:51 +02:00
Yann Lanthony
d3885331b2 [ui] AttributeEditor: fix value setting by slider + avoid scientific notation
* fix reference to non-existing slider.value 
* convert values to string to avoid e+XX notation on large numbers
* fix number of decimals based on stepSize to avoid floating point approximations
2018-07-24 15:14:31 +02:00
Fabien Castan
10026e3281 [ui] mouse: add "Ctrl+Left click" as an alternative to Middle click 2018-07-21 14:54:28 +02:00
Yann Lanthony
fd8c275203 [ui] add CompatibilityManager component
* display and allow to upgrade incompatible nodes after project loading
* add a ToolButton in main toolbar to open CompatibilityManager in case of compatibility issues
2018-07-20 17:57:53 +02:00
Yann Lanthony
7dfb750407 [ui] move node menu to GraphEditor + ensure computability of node
use core.graph.canCompute on current node to check if node can be computed; enable computation related MenuItem accordingly
2018-07-19 14:50:58 +02:00
Yann Lanthony
0128cd56f0 [ui] add CompatibilityBadge on CompatibilityNodes
* add badge icon on nodes in GraphEditor
* add badge banner in AttributeEditor with upgrade button when available
2018-07-19 13:50:45 +02:00
Yann Lanthony
ca712ef2aa [ui] AttributeEditor: don't instantiate slider if no range is defined 2018-07-19 13:50:45 +02:00
Yann Lanthony
fc8a3f5f0b [ui] GraphEditor: add helper functions to move and select nodes 2018-07-19 13:50:45 +02:00
Yann Lanthony
2952e11691 [core] move duplicateNode methods to core.graph
handle this low-level operation engine side

* fix ListAttribute children links duplication
* handle CompatibilityNode duplication
* move corresponding unit test in test_graph.py
* [ui] add DuplicateNodeCommand
2018-07-19 13:50:45 +02:00
Yann Lanthony
d5d8fa77dc [ui] graph: better ListAttribute connections filtering
* fix ListAttribute => ListAttribute with children (was breaking multiple simple connections to a ListAttribute)
* add missing case ListAttribute => Attribute
2018-06-26 12:29:55 +02:00
Yann Lanthony
99d6068250 [graph] make ListAttribute connectable at root level
ListAttribute can now be connected :
 * at root level to another ListAttribute (new)
 * at child level to basic Attributes
2018-06-18 14:58:35 +02:00
Yann Lanthony
20ef9b5a05 [ui] GraphEditor: unregister AttributePins when destroyed 2018-06-18 14:43:18 +02:00
Yann Lanthony
2f2390e465 [ui] fix Palette propagation
* bugfix: in latest PySide2 versions, application palette is not properly applied to all QtQuick Controls 2 components. Force this by exposing QApplication palette and bind it to the root ApplicationWindow.
* rename all "palette" ids to "activePalette" to avoid clashes with "palette" property on QtQuick Controls 2
* use parent component palette when it makes sense to propagate active/disabled style (instead of always using Active SystemPalette)
2018-05-28 15:30:09 +02:00
Yann Lanthony
1634555bf0 [ui] replace anchors by alignments inside Layouts 2018-05-03 16:52:00 +02:00
Yann Lanthony
014c1fe25f [ui] specify keys for DropAreas 2018-04-13 22:48:46 +02:00
Yann Lanthony
029d4f2e7b [ui] GraphEditor: clamp zoom 2018-04-13 22:44:09 +02:00
Yann Lanthony
adf59e56fa [ui] GraphEditor: fix typo 2018-04-05 21:56:36 +02:00
Yann Lanthony
0249706018 [ui] add missing string paths to url conversions 2018-03-21 17:24:19 +01:00
Yann Lanthony
2e4d9b85e6 [ui] UIGraph: rename 'addNode' to 'addNewNode' to match core.graph API 2018-03-21 15:53:34 +01:00
Yann Lanthony
e0b72863ee [ui] GraphEditor: improve auto-layout related functions
* move graph boundingBox computation in a separate method
* perform autoLayout from "from" to "to" index (instead of "to"-1)
2018-03-21 15:53:34 +01:00
Yann Lanthony
f1b42acc14 [ui] add FilepathHelper Python class to manipulate paths and QUrls
* avoid non-cross platform hacks to convert string path to urls
* use standard python API
2018-03-06 15:32:33 +01:00
Yann Lanthony
0c071d03d1 [ui] remove ASCII icons
won't render correctly on some platforms
2018-02-26 17:01:41 +01:00
Yann Lanthony
b9a1e57b79 [ui][log] reload file when auto-reload timer stops
useful to reload the file when status goes from RUNNING to ERROR/SUCCESS
2018-02-26 17:00:20 +01:00
Yann Lanthony
2cdc83f06f [ui] add string <--> file representation convertors
* convenient methods to conform strings to Qt file reprensentation using the "file:/" protocol prefix
* use those methodes when manipulating files
2018-02-26 16:59:25 +01:00
Yann Lanthony
d91601ca8e [ui] move filepath.js to Utils module 2018-02-15 15:12:07 +01:00
Yann Lanthony
06851f0357 [ui] GraphEditor: use Node name as objectName
* ease debugging
2018-02-12 18:50:54 +01:00
Yann Lanthony
53791cb7d8 [ui] GraphEditor: nodes duplication
* allow duplication of one node/all nodes following a node
* actions available from Node contextual menu and Alt+Click on node for multi-nodes duplication
2018-02-12 18:49:13 +01:00