Commit graph

144 commits

Author SHA1 Message Date
waaake
c2c32c8c14 [ui] ImageGallery: Implementation of Toggle based Search. 2024-11-30 20:20:32 +05:30
Candice Bentéjac
2699bffcda [qt6][ImageGallery] IntrinsicDisplayDelegate: Support File attributes 2024-11-07 18:19:14 +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
ec139defb7 [qt6][ImageGallery] IntrinsicDisplay: Harmonize naming of components 2024-11-07 18:13:28 +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
Aurore LAFAURIE
f8d963e0b0 [ui] Add MScrollBar for better visibility
Always visible if height or width need it, with specific colors for hovered and pressed behaviors.
2024-09-11 17:33:29 +02:00
Fabien Castan
958f2edc99
Merge pull request #2395 from alicevision/dev/updateIntrinsicsWhileRemovingImages
[ui] Remove intrinsic if not used by any viewpoint
2024-05-23 14:28:13 +02:00
Aurore LAFAURIE
c50d3cc9e7 [ui] Add removeImage function in Python to check for intrinsic still used 2024-05-13 09:48:24 +02:00
Aurore LAFAURIE
561e9b806c [ui] Remove intrinsic if not used by any viewpoint 2024-04-29 15:58:15 +02:00
Aurore LAFAURIE
59650d54b3 [ImageGallery] Display camera initialization label with default label if it differs 2024-04-24 16:59:36 +02:00
Aurore LAFAURIE
f43b6e3461 [ui] Fix drag and drop of heavy number of frames 2024-04-19 12:20:55 +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
9f96f68a95 [ui] Cosmetic modifications
Cosmetic modifications such as missing spaces.
2024-03-28 11:28:31 +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
2bdf061d2e [ImageGallery] Clean-up: Harmonize syntax across all files 2023-11-06 16:28:22 +01:00
Fabien Castan
c02aa1f229
Merge pull request #2145 from alicevision/fix/cameraInitIdx
[ui] Preserve last `CameraInit` index when updating the CameraInits list
2023-10-19 10:58:33 +02:00
Fabien Castan
5ccbfe408a
Merge pull request #2221 from alicevision/dev/clearImagesGallery
[ui] ImageGallery: Add "Remove All Images" menu to clear all images
2023-10-11 19:45:46 +02:00
Candice Bentéjac
66ffe017a4 [ui] Rename "Clear Images" actions into "Remove All Images"
Update the names of the commands that remove images in the "File"
menu to match with those in the Image Gallery menu.

"Clear Images" becomes "Remove All Images" and "Clear All Images" becomes
"Remove Images From All CameraInit Nodes".
2023-10-11 18:07:18 +02:00
Candice Bentéjac
557a5bd956 [ui] ImageGallery: Use commands to set SfM attributes through the gallery
Prior to this commit, the `StructureFromMotion` and `SfMTransform` nodes'
were directly set without using the dedicated command. This meant that
the actions to set those attributes through the Image Gallery menu were
not added to the stack of commands, and could not be undone.
2023-10-10 15:13:17 +02:00
Candice Bentéjac
d2dc78dd5a [ui] ImageGallery: Add "Remove All Images" menu to clear all images
In addition to the existing "Remove" menu action in the Image Gallery that
deletes the currently selected image, add a "Remove All Images" menu
action that performs the same action as "Clear Images" from the "File"
menu.

The "Del" key was used as a shortcut to remove the currently selected
image when the Image Gallery has the focus, "Shift+Del" can now also be
used to remove all the images at once.
2023-10-09 18:54:06 +02:00
Candice Bentéjac
a606a8f83c [ui] Only update active CameraInit and its index when they are changed
Prior to this commit, when a `CameraInit` node was added to or removed
from the list of `CameraInit` nodes, the active `CameraInit` was always
reset to the first one in the list, independently from its previous
value.

This commit changes that behaviour by only modifying the active
`CameraInit` if no `CameraInit` node has been assigned yet, or if the
active `CameraInit` does not exist anymore (meaning it has been removed).

This requires to emit the `cameraInitChanged` signal every single time
the list of existing `CameraInit` nodes is modified even if the active one
is not changed, and to connect it to the ImageGallery in order to ensure
the index from the combo box always corresponds to the currently active
`CameraInit` node. Indeed, when the list of CameraInits is updated, the
model for the combo box is reset, and it needs to be re-updated with the
correct non-default value.
2023-10-03 18:11:55 +02:00
Candice Bentéjac
f570b37b09 [ui] ImageGallery: Disable "Visualize HDR" button after clearing images
When all the images in the gallery are cleared using the "Clear Images" or
"Clear All Images" menu action while the "Visualize HDR images" option is
turned on, the gallery is correctly emptied and the viewer correctly reset
but the button remains turned on even though there is nothing left to show.

As it is turned on (although with a "0" count), the gallery remains in
read-only mode and no more image can be dropped until the button is
manually clicked to be turned off. Even after that, it remains clickable
instead of being disabled.

This commit ensures that the button gets disabled if the number of
viewpoints is 0 (meaning the gallery is empty). That way, the button
correctly reflects the current situation, and the gallery is ready to have
images dropped.
2023-09-04 19:00:05 +02:00
Candice Bentéjac
db7fdefacb [ImageGallery] Check the intrinsics model is not null before using it 2023-07-04 11:59:35 +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
Loïc Vital
e81e3371cc [ui] ImageGallery: use CameraInit label instead of name 2023-06-09 17:24:33 +02:00
Candice Bentéjac
30c3e08f48 [ui] ImageGallery: Display the name of the active CameraInit group
Add the name of the currently active `CameraInit` group in the Image
Gallery, as well as the name of the previous / next group in the tooltip
of the buttons to switch between groups.
2023-06-09 17:06:53 +02:00
Candice Bentéjac
e8990a6fc7 [ui] ImageGallery: Reset viewpoints and intrinsics when removing the last image
When the last image from the active group has been manually removed from
the Image Gallery (meaning it has been removed either with the "Del" key
or the "Remove" option), the list of viewpoints and intrinsics should
both be reset, like they are when "Clear Images" is used.

Prior to this commit, the list of viewpoints was emptied (but not reset)
and the list of intrinsics remained untouched. Removing all the images
manually did not affect the list of intrinsics, which could cause issues
later on.
2023-05-30 12:20:54 +02:00
Candice Bentéjac
7488ee2f7e [ui] ImageGallery: Allow image drop if the active group is not computing
The Image Gallery should only switch to read-only if the currently active
group is being computed. The behaviour prior to this commit was to lock it
as soon as any node in the entire graph was being computed, even if it did
not involve the active CameraInit node.
2023-03-21 12:47:46 +01:00
Fabien Castan
ba0541c791
Merge pull request #1934 from alicevision/fix/intrinsicsTmpCamInit
[ui] Image Gallery: Fix the display of the intrinsics table with temporary CameraInit nodes
2023-03-18 14:50:37 +01:00
Candice Bentéjac
790ede0b89 [ui] ImageGallery: Add an option in the menu to set the SfM initial pair
Add a "SfM: Define Initial Pair" sub-menu in the Image Gallery menu that is
only enabled if the currently active group contains a StructureFromMotion
node. Clicking "A" or "B" will automatically set the selected image's view
ID as a part of the initial pair.
2023-03-15 16:19:45 +01:00
Candice Bentéjac
21500bec96 [ui] ImageGallery: Fix QML syntax warnings 2023-03-15 10:55:26 +01:00
Candice Bentéjac
2e31ecaea7 [ui] ImageGallery: Harmonize functions and indentation 2023-03-15 10:36:16 +01:00
Candice Bentéjac
59be396244 [ui] Prevent editing the intrinsics of temporary CameraInit nodes
As the temporary CameraInit nodes are not really part of the graph, their
attributes cannot be edited. By default, the intrinsics can be edited for
any CameraInit node from the intrinsics table.

For temporary CameraInit nodes, we want the intrinsics to be displayed in
read-only mode to ensure that the user cannot attempt to edit them, which
would cause errors.

Upon its creation, the temporary CameraInit node is locked (as if it were
computed), and the intrinsics table's component are updated to be displayed
as read-only if the CameraInit node is locked.
2023-03-15 10:00:19 +01:00
Candice Bentéjac
ac592f4cb2 [ui] ImageGallery: Re-parse intrinsics as soon as they are updated
When setting a temporary CameraInit node, the intrinsics of the actual
CameraInit node are used, meaning that the temporary CameraInit has all
the intrinsics information we need to fill the intrinsics table.

However, when a temporary CameraInit node is set, the parsing of the
intrinsics and the model update are not performed. If the active CameraInit
group does not change, this is not directly visible as the table keeps on
displaying the intrinsics from the actual CameraInit node.

If the active group changes, we attempt to fill the table with the
intrinsics of the temporary CameraInit node, which is being re-set for the
active group. The intrinsics are thus not available, leading to an empty
table, and the parsing is never retriggered once the temporary CameraInit
has been fully set.

Instead of re-parsing the intrinsics when the CameraInitIndex is updated,
the parsing is triggered when the intrinsics are updated, since this
ensures they will be available and its covers all the cases we could
be facing.
2023-03-15 10:00:08 +01:00
Candice Bentéjac
3e8e568bba [ui] ImageGallery: Update columns' width for the intrinsics table 2023-03-14 18:36:05 +01:00
Candice Bentéjac
5e61a1da5a [ui] ImageGallery: Force index to -1 before setting it if there's a tempCameraInit
When there is a temporary CameraInit, it means that either the "Visualize
HDR images" or "Preprocessed images" options are enabled.

If several CameraInit groups are available, and if the currently selected
image in the GridView is the first one (index = 0), there is a possibility,
depending on the input images, that the first images in two different
groups are not identical but have the same view ID. If that happens, there
will be no update of the Viewer2D, as the selectedViewId property will not
have been modified.

By setting the selectedViewId property to -1 when there is a temporary
CameraInit and the current index in the GridView is 0, we trigger an
update of the viewer even when there is no apparent change in the view ID.
2023-03-13 15:57:24 +01:00
Fabien Castan
95218570f1 [ui] ImageGallery: fix variable name distortionInitializationMode 2023-03-13 14:00:58 +01:00
Loïc Vital
14381fb42b [ui] display distoInitMode in image gallery tooltip 2023-03-10 07:58:45 +01:00
Fabien Castan
69d45fde1b
Merge pull request #1898 from alicevision/fix/intrinsicsWarnings
[ui] Intrinsics: Fix warnings and exceptions
2023-02-16 19:17:31 +01:00
Fabien Castan
35954a7088
Merge pull request #1893 from alicevision/mug/fixThumbnailCache
[ui] fix thumbnail cache bugs
2023-02-16 12:19:57 +01:00
Candice Bentéjac
8e00a5be8c [ImageGallery] Match the filter selection with the gallery's display
Selecting any filter in the Image Gallery changes the displayed content of
the gallery according to the filter. Unselecting any filter automatically
switches the displayed content back to the "input images" filter (which
simply displays all the input images), but the "input images" button is
never reselected, meaning that there can be a display corresponding to a
filter without any filter being selected.

This commit prevents unselecting a filter without reselecting the one
corresponding to the display. Since the "input images" is always the
display that is reverted to, unselecting any filter automatically selects
its button.
2023-02-15 18:20:20 +01:00
Candice Bentéjac
7bdd7cf9d6 [ImageGallery] Initialize and use "attribute" properly for the intrinsics table
This commit fixes an "Unable to assign QJSValue to QObject*".

In IntrinsicDisplayDelegate, initialize the "attribute" variant to null
and set it as a parameter during the instantiation in ImageGallery.
All references to "model.display" in IntrinsicDisplayDelegate have been
replaced with a correct use of "attribute".
2023-02-15 17:32:22 +01:00
Loïc Vital
b4851d7a50 [ui] thumbnail request: stop timer after 1st trigger to avoid running endlessly in background 2023-02-15 09:39:47 +01:00
Fabien Castan
334bfc8b00
Merge pull request #1861 from alicevision/mug/thumbnailCache
[ui] Thumbnail cache
2023-02-09 11:08:09 +00:00