Commit Graph

33 Commits

Author SHA1 Message Date
Magne Sjaastad
1d57b9032b Custom vfp plot (#11450)
* AppFwk: When clearing a tree selection, make sure all values are cleared
* Fix deprecated implicit lambda
* Add support for using the closest value in addition to exact match
* Add table data source object and add plot with multiple data sources
Delete the temporary RimVfpDeck class
Add RimVfpTable to represent a table in a data source
Add plot able to show data from multiple tables

* AppFwk: Make it possible to call resolveReferences multiple times
Use case: Vfp tables are stored in files. Multiple tables can be present in one file. Pdm table objects are created after resolve references is done as part of parsing file. When the Pdm object are created, resolveReferences can be called once more.

* Call resolveReferencesRecursively() after RimVfpTable objects are created
2024-05-29 12:55:45 +02:00
Magne Sjaastad
40080a99de 9978 Improve UI for long drop-down lists, use tree selection more
* Improve tree selection editor
- always call defineEditorAttributes
- use heightHint in editor attributes 
- use tree selection editor as default editor for std::vector

* Use tree selection editor instead of list selection editor
List selection editor must be used when editing std::vector<cvf::vec3d> and similar. Replace other use of list selection editor with tree selection editor.

* Set checked state based on text string for integer only models
For models with only integer values, use text string to define the items to be selected. The full list will always be visible, and the checked state will be updated when editing the filter text.

Example: "1, 5-7" will set items 1, 5, 6, 7 checked and all other items unchecked

* Minor fixes
- Set placeholder text after content is added (to ensure correct data type)
- Fix check of integers. `canConvert<int>()`returns true for both QString and int. Thus convert to string and then check for int conversion.

* Activate filtering when unchecking all items in list with only integers
- Reactivate filtering when uncheck of all items for a list with only integer values (to keep consistency between filter and list)
- Update function name for clarity

---------

Co-authored-by: Jørgen Herje <jorgen.herje@ceetronsolutions.com>
2023-05-22 15:44:37 +02:00
Jørgen Herje
342f191288 Add filtering/exclude of rows in SummaryTable (#10193)
- Add selector for excluding rows in table
- Row selection is based on category, vector, threshold
- Move data containers to utils class
- TreeSelectionEditor: Add context menu to invert selection
- Improved naming of menu items
- Guard plotDefinition before connect signal/slots

---------

Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2023-05-02 11:18:45 +02:00
Magne Sjaastad
bdc536dfc4 #6106 Apply clang-format on AppFwk 2020-06-19 08:00:01 +02:00
Gaute Lindkvist
2e79cf614f Refactor and rename QIconProvider -> IconProvider (#5893)
* Refactor and rename QIconProvider -> IconProvider
* Generate icons on demand as unique_ptrs
2020-05-09 11:25:11 +02:00
Magne Sjaastad
b15f58b560 #4083 Summary : Do not change selected summary type when unticking a checkbox 2019-02-17 10:49:47 +01:00
Gaute Lindkvist
2cf5357a47 #3738 Active correct item when clicking in Summary Plot Editor 2018-11-23 15:11:23 +01:00
Gaute Lindkvist
fcda0b9755 Remove padding to the left in TreeSelectionEditor if the tree doesn't have grand children. 2018-10-02 08:46:24 +02:00
Gaute Lindkvist
d13a52a8b4 #3058 Implement a memory cleanup dialog for GeoMech data. 2018-06-19 12:20:21 +02:00
Magne Sjaastad
17ee25d0b2 AppFwk : Rename to uiField() and setUiField() 2018-06-15 14:22:03 +02:00
Magne Sjaastad
e370dee3b0 #3037 Rename using Q for table view model and tree view model 2018-06-11 11:16:39 +02:00
Magne Sjaastad
2ed7d74bbd #2286 AppFwk TreeSelection Editor : Always cache option items, rebuild tree when count changes 2017-12-21 11:58:26 +01:00
Magne Sjaastad
4e20723650 #2131 AppFwk : Tree List Selector : Allow header items to be selected 2017-11-14 09:48:01 +01:00
Jacob Støren
9853c15ec6 Code adjustments 2017-11-13 15:23:38 +01:00
Jacob Støren
9070a97815 #2112 Step two of performance fixing: Avoid unneccessary calls to uiValue from the treeSelectionQMode by caching it temporarily 2017-11-11 02:38:52 +01:00
Magne Sjaastad
d02274a897 #1969 Curve Calculator : Support single select in tree selection editor 2017-10-13 08:54:06 +02:00
Magne Sjaastad
e8d04618af #1935 AppFwk : Update model indices when configureAndUpdateUI is called 2017-09-26 15:09:27 +02:00
Magne Sjaastad
1bb1c87058 #1895 Curve Creator : Add support for single value fields 2017-09-20 10:06:57 +02:00
Magne Sjaastad
31cbd35862 Added more tests and guard for null pointer access 2017-09-19 12:01:16 +02:00
Magne Sjaastad
b078feb736 AppFwk : Add missing include 2017-09-19 11:14:08 +02:00
Magne Sjaastad
424c4b18a3 #1898 Curve Creator: Use tree structure internally in QModel 2017-09-19 10:08:32 +02:00
Magne Sjaastad
6989f69b64 Guard for null pointer access 2017-09-15 10:49:01 +02:00
Bjørn Erik Jensen
f1948c9ce6 AppFwk: Fix index out of bounds error 2017-09-11 12:46:44 +02:00
Magne Sjaastad
33e94c447b #1830 AppFwk : Rename to isReadOnly and disable these items in tree view 2017-09-08 07:47:23 +02:00
Magne Sjaastad
8e8c735fe6 #1830 AppFwk : Use bold on header items 2017-09-08 07:31:32 +02:00
Magne Sjaastad
de7c4617d8 #1830 AppFwk : Add support for icons 2017-09-07 14:56:11 +02:00
Magne Sjaastad
5994ef1393 #1830 AppFwk : Add context menu to control state for multiple items 2017-09-07 14:56:10 +02:00
Magne Sjaastad
3633474dc2 #1830 AppFwk : Expand tree if item count has changed 2017-09-07 14:56:10 +02:00
Magne Sjaastad
aef886a26e #1830 AppFwk : Add heading concept 2017-09-07 14:56:09 +02:00
Magne Sjaastad
71db603e11 #1830 AppFwk : Invalidate only relevant QModelIndex when selecting items 2017-09-07 14:56:09 +02:00
Magne Sjaastad
55bdf4701e #1830 AppFwk : Cache data to speed up model queries 2017-09-07 14:56:09 +02:00
Magne Sjaastad
e7351179c3 #1830 AppFwk : Add unit test for tree selection QModel 2017-09-07 14:56:09 +02:00
Magne Sjaastad
841faf022b #1830 AppFwk : Add TreeSelectionEditor and TreeSelectionQModel 2017-09-07 14:56:09 +02:00