Commit Graph

46 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
2814b92055
Qt6: Adjustments (#11804)
* Qt6: Avoid insertWidget, use addWidget
In Qt6, the insertWidget function checks if the index parameter is valid based on current widgets present in the layout. This is error prone, and use addWidget to avoid manual counting of index.

* Disable use of Qt keyword foreach

* Replace use of QRegExp with QRegularExpression
Replace use of QRegExp with QRegularExpression
Remove dependency on qt5compat module
Simplify an expression based on review

* Remove Qt5 ifdefs

* Guard access out of bounds seen in debug build

* Avoid reuse of string variable

* Disconnect all signals from the QOpenGLContext
The call stack when this assert happens indicates that there are more signals to be disconnected from the object. Crash is fixed by disconnecting all signals.

Assert seen in debug build:

ASSERT failure in caf::Viewer: "Called object is not of the correct type (class destructor may have already run)", file C:\Qt\6.6.3\msvc2019_64\include\QtCore/qobjectdefs_impl.h, line 130

* Fix issue related to delete of a linked view
Guard null pointer use in view linker. Remove complicated cleanup in destructor in Rim3dVew.
2024-10-28 13:09:18 +01:00
Magne Sjaastad
fcec67e95e Use gray background for read only line edit 2024-09-14 15:08:15 +02:00
Magne Sjaastad
bfda6519db
Cleanup includes
Use new tools in Visual Studio to help cleaning up includes and remove redundant includes.
2024-03-07 19:45:43 +01:00
Magne Sjaastad
f6be434b85 Remove Qt version checking for old Qt version 2024-01-07 18:28:36 +01:00
Kristian Bendiksen
98796b0dd9 #10649 Fwk: Use collection.empty() instead of comparing with size 2023-09-27 10:16:37 +02:00
Magne Sjaastad
6f845f0d42 Add flag to constructor of LineEditor 2023-09-22 09:30:08 +02:00
Magne Sjaastad
91762aaeb1
RC3 adjustments
* Update icons for summary and ensemble templates

* Icons for regression and decline

* #10374 LineEditor: Hide the placeholder widget when not used

* #10376 Assign a case ID to delta summary case

* Do not show decline range text in plot
2023-06-10 16:30:34 +02:00
Magne Sjaastad
9db4d03a5f
RegressionTests: Fix performance issues related to DockManager::restoreState
* Performance: Disable DockManager::restoreState when running regression tests
* Set parent to Qt widgets to avoid memory leak
* Change singleton pattern to avoid memory leak
2022-12-22 15:35:45 +01:00
Magne Sjaastad
f155da0179 #9312 Return line edit instead of placeholder widget if auto value is not supported 2022-10-06 10:32:44 +02:00
Magne Sjaastad
c734a22bd6
Improve user interface for axis linking
Several adjustments to UI as discussed with Håkon and Alireza.

* add link/unlink command to right-click menu of axis
* select curve in project tree when clicking on legend item
* make sure internal legend is always visible when toggling plot
* fix issue when using sub plot as data source for axis range
2022-09-09 16:06:56 +02:00
Magne Sjaastad
945f1b1902
Use field auto values for summary plots
Use auto value concept in summary plot configuration. Default behavior is unchanged, but it is now possible to unlink a field to specify a custom value for this field.

Other changes:
* Add missing requirement for Svg in test application
* Use calculator icon and rename panel text
Use icon and relevant text to make it clear that the content in Calculator Data can be used for Grid Property Calculator and nothing else.
* Add example with scoped enum and auto value
* Use enum value starting av 10 to make sure enum values (not option item index) are working as expected
2022-09-05 14:12:49 +02:00
Magne Sjaastad
e97a476d85
Add framework support for editor auto values
Add support for a field to be linked to a value updated by code outside the object itself. Mark the linked field by using a background color and icons for linked/unlinked state.
The auto value states is set as attributes in the project xml file. 
Add reference implementation in cafTestApplication, see Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp

* Tree View Editor: Avoid sending notification if selection is unchanged
* Use std++17 in test solution
* Move icons to icon factory
* add support for creating QIcon from SVG text string
2022-09-02 13:20:52 +02:00
Magne Sjaastad
f0ce04597d
Merge pull request #8985 from OPM/8926-remove-useoptionsonly
AppFwk : Remove obsolete useOptionsOnly
2022-05-29 13:01:27 +02:00
Magne Sjaastad
7dfa84b0d9 AppFwk : Support notification when key is pressed in Line/ComboBox editors 2021-11-17 16:26:47 +01:00
Ruben Thoms
440767d876 New checkbox icons as svgs and adjusted background colors. 2020-09-29 02:32:01 -07:00
Magne Sjaastad
bd8afb1f69 AppFwk : Allow copy of text from a file path line edit when read only 2020-08-13 14:17:08 +02:00
Magne Sjaastad
bdc536dfc4 #6106 Apply clang-format on AppFwk 2020-06-19 08:00:01 +02:00
Magne Sjaastad
1935451242 AppFwk : Add placeholder text to line edit 2019-10-24 09:44:51 +02:00
Magne Sjaastad
1671fe44b2 #4775 Summary : Add max width to line edit 2019-10-21 16:36:28 +02:00
Jacob Støren
cd1f312c34 #4583 Added Completer functionality to LineEditor 2019-08-28 10:12:54 +02:00
Magne Sjaastad
a5a70dd83c #4356 Qt5 : Conversion of float value to text string does not work for all values 2019-04-25 06:52:40 +02:00
Gaute Lindkvist
4e92a7e44a More consistent naming for Qt-derived classes in CAF 2019-04-08 14:24:43 +02:00
Gaute Lindkvist
a8e14e9f9a Fix copyright header and namespace for cafShortenedQLabel 2019-04-05 17:31:07 +02:00
Gaute Lindkvist
6a2e81ca4b #4282 Add a new cafShortenedQLabel class that provides a label that shortens itself when space is limited 2019-04-05 13:05:14 +02:00
Magne Sjaastad
020146bead Cotire : Move macro definition to avoid duplicate symbols 2018-12-10 09:31:10 +01:00
Gaute Lindkvist
29c3e10617 #3779 Implement AICD ui and settings 2018-12-05 15:47:16 +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
Jacob Støren
3cd9c6123c Remove compiler warning 2018-09-19 10:25:57 +02:00
Jacob Støren
296854d749 caf: Rename of SelectionRole to SelectionLevel and
CURRENT to FIRST_LEVEL
Replace use of SelectionLevel enum as argument with int
2018-08-21 16:44:19 +02:00
Gaute Lindkvist
9e7dd7d4ea #3076 Stop key press event in time step interval causing filtered dialog to close. 2018-06-21 15:39:44 +02:00
Magne Sjaastad
17ee25d0b2 AppFwk : Rename to uiField() and setUiField() 2018-06-15 14:22:03 +02:00
Magne Sjaastad
3239c66f54 AppFwk (clang-tidy) : modernize-use-nullptr 2018-02-18 18:05:08 +01:00
Rebecca Cox
7be8227efa AppFwk: Line Editor: Guard for index out of range 2017-11-07 10:00:10 +01:00
Magne Sjaastad
a0a28fee36 #1867 AppFwk : Use updateLabelFromField from field editors 2017-09-07 14:56:10 +02:00
Magne Sjaastad
5e6547c0c5 #1830 AppFwk : Move members to private and use getter functions 2017-09-07 09:33:33 +02:00
Magne Sjaastad
6791600d03 #1260 Replaced assert() with CAF_ASSERT() in AppFwk 2017-03-08 08:19:51 +01:00
Magne Sjaastad
749ce8e8af #1292 Fixed CppCheck Issues in AppFwk/cafUserInterface 2017-03-06 19:15:33 +01:00
Magne Sjaastad
23ec61192c #1093 Enable copy of text from read only fields 2017-02-20 15:32:23 +01:00
Jacob Støren
2ccabc4589 Caf: Added asserts to make it clearer that "useOptionsOnly" == false is unsupported yet. 2017-02-09 13:31:25 +01:00
Magne Sjaastad
0383c35be6 System : Improved performance when converting from enum value to ui text 2015-10-23 09:19:17 +02:00
Jacob Storen
47819812bf Fix of Linux compile errors and warnings 2015-08-13 06:23:51 -07:00
Magne Sjaastad
58149cbdb9 Copied in RPM/Fwk/AppFwk
Commented out use of stipple line, as VizFwk is not update yet
2015-07-29 14:19:43 +02:00
Jacob Støren
bef1d8ce7e caf: Enabled the Tooltips. Seems to have been forgotten. 2013-09-26 10:41:08 +02:00
sigurdp
f64d9b7e64 Moved CAF to Fwk/AppFwk and moved/renamed VisualizationModules to Fwk/VizFwk 2013-09-20 16:01:20 +02:00