Commit Graph

26 Commits

Author SHA1 Message Date
Magne Sjaastad
494175d1e6 Extract creation of QShortenedLabel and add context menu
Create an intermediate class used to create a QShortenedLabel. If field is scriptable, add a context menu to support copy of the Python field name to clipboard.
2024-11-25 09:42:12 +01:00
Magne Sjaastad
d751ce4ce0 Add flag to control display of check boxes 2024-07-05 12:47:54 +02:00
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
Magne Sjaastad
daf4132dec #4744 AppFwk : Auto scroll to first checked item 2019-09-20 14:19:26 +02:00
Magne Sjaastad
a9080e14c3 #4722 AppFwk: Rename 2019-09-20 09:54:10 +02:00
Gaute Lindkvist
c0f3258f19 Work in progress 2019-04-09 10:30:15 +02:00
Gaute Lindkvist
038d7a7676 #4097 Implement stretch factors for editors 2019-04-04 11:19:35 +02:00
Gaute Lindkvist
01e4454d85 Revert "#3751 Fix keyboard selection in Summary Plot Editor"
This reverts commit ab0fa2fb19.

* This change should never have been merged back into the repo.
2018-11-30 09:22:01 +01:00
Gaute Lindkvist
ab0fa2fb19 #3751 Fix keyboard selection in Summary Plot Editor 2018-11-23 15:36:33 +01:00
Gaute Lindkvist
2cf5357a47 #3738 Active correct item when clicking in Summary Plot Editor 2018-11-23 15:11:23 +01:00
Magne Sjaastad
764fb65e8e clang-tidy : Remove redundant 'virtual' and add 'override'
clang-tidy : Remove redundant 'virtual' and add 'override'
2018-10-18 16:35:51 +02:00
Gaute Lindkvist
8c5e538f01 Implement a way for editors to fit the label to the field. 2018-09-27 16:07:35 +02:00
Magne Sjaastad
81129302f3 #2266 AppFwk : Add editor attribute setCurrentIndexWhenItemIsChecked
Fix bug when a selection is active
2017-12-14 16:03:14 +01:00
Jacob Støren
6ee03340a5 #2112 First step in improved performance: When toggling several at once, avoid update for each. 2017-11-10 23:34:22 +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
b3b0a7ba9b #1895 Curve Creator : Use PdmFieldHandle instead of PdmUiFieldHandle 2017-09-20 10:43:19 +02:00
Magne Sjaastad
f61122ce0e #1895 Curve Creator : Added documentation 2017-09-20 10:06:57 +02:00
Magne Sjaastad
1bb1c87058 #1895 Curve Creator : Add support for single value fields 2017-09-20 10:06:57 +02:00
Magne Sjaastad
b60758a0f3 #1896 Curve Creator : Add editor attributes to control search and toggle 2017-09-19 10:40:22 +02:00
Magne Sjaastad
424c4b18a3 #1898 Curve Creator: Use tree structure internally in QModel 2017-09-19 10:08:32 +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
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