Commit Graph

1405 Commits

Author SHA1 Message Date
Magne Sjaastad
b10ff4607c Cleanup 2024-03-08 23:08:29 +01:00
Magne Sjaastad
f8aac4bfbc avoid proxy field 2024-03-08 23:01:49 +01:00
Magne Sjaastad
91999f28a0 avoid appenumfield 2024-03-08 23:01:37 +01:00
Magne Sjaastad
5d36655ace add missing includes 2024-03-08 22:51:01 +01:00
Magne Sjaastad
26227dbcfc Compiling and working test application 2024-03-08 16:53:27 +01:00
Magne Sjaastad
2f86743b44 Add unit test and implement most functions 2024-03-08 15:13:36 +01:00
Magne Sjaastad
3e734737ae Add type name helper 2024-03-08 15:13:12 +01:00
Magne Sjaastad
b5be3cd87b add app enum mapper 2024-03-08 13:20:37 +01:00
Magne Sjaastad
a1bada1f64 Use AppEnumField in test application 2024-03-07 19:46:15 +01:00
Magne Sjaastad
e080fa55e0 Add AppEnumField 2024-03-07 19:46:15 +01: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
Eirik Marthinsen
ea27e952f5
Prepare building with Qt6
* Fwk: Switch from delta to angleDelta for QWheelEvent
* Fwk: Add option to build more libraries with Qt6
* Fwk: Remove unused includes of QtOpenGL
* Fwk: Don't forward declare QStringList
* Fwk: Store cursor position in QPoint variable
* Fwk: Use QWheelEvent::position in Qt6
2024-03-06 08:32:27 +01:00
Magne Sjaastad
818c5c0f9c
Add polygon file readers and make sure UI items are in sync
* Add polygon reader for POL file format
* Add CSV import
* Add helper function to create tag with color and text
* Show polygon color as tag, allow color edit by clicking on tag
* Support optional header in csv file
* Add Reload on polygon file
* Show warning icon if no polygons
* Improve logging text
* Do not show file polygon in view if no polygons are imported
* Use appendMenuItems
* Set default polygon color to orange
* Enter edit state when creating a new polygon
* Fix missing UI text in menu builder
2024-03-01 14:59:14 +01:00
jonjenssen
86c33c1b46
Fault activation: node adjustments along fault (#11235)
Make sure same thickness vectors and fault lines are used for both parts.
2024-02-27 17:05:48 +01:00
Magne Sjaastad
28d281e1d6
Use polygon as data source for intersection
- Use polygon as data source for intersection
- Add padlock icon
- Show padlock icon on read only polygons
- Add Fwk function appendMenuItems() to make it possible to define context menu content in a PdmObject
- Context menu "Create Polygon Intersection"
- Updates to make visualization consistent with object and object collection enabled state
2024-02-25 09:21:48 +01:00
Magne Sjaastad
6fe997b3c9 Add and use caf::PdmUiPushButtonEditor::configureEditorLabelHidden 2024-02-23 08:47:52 +01:00
Magne Sjaastad
d0a9b7cd0b Modify the the background color of table using stylesheets 2024-02-16 15:51:19 +01:00
Eirik Marthinsen
5cfabbb8b8 Use correct qt version check for SkipEmptyParts
Qt::SkipEmptyParts was introduced in Qt 5.14 and QString::SkipEmptyParts
was deprecated in Qt 5.15. This will avoid warnings when compiling with
Qt 5.15.
2024-02-15 09:48:34 +01:00
Magne Sjaastad
8e13d6c528 Use modern OpenGL Qt widget
Use cvfqt::OpenGLWidget and make required changes
- move code from paintEvent to paintGL to make grabFrambuffer work
- remove obsolete sharedWidget
- implement onWidgetOpenGLReady and initialize rendering in this function as OpenGL capabilities is required
- simplify snapshotImage to use grabFramebuffer

Fix missing include
2024-02-07 10:07:18 +01:00
Magne Sjaastad
2250084176 Always link shader program if OglId is zero
The OpenGL resources can be invalidated at any time. Make sure that the shader program is linked if this happens.
2024-02-07 10:07:18 +01:00
Magne Sjaastad
01a082f9fc #11161 Change default tree visibility state for childField and childArrayField 2024-02-05 10:15:36 +01:00
Eirik Marthinsen
4c77090d8b Add missing Qt component to silence CMake warnings
The project cafProjectDataModel_UnitTests was triggering multiple
CMake warnings saying that the Widget component was missing when trying
to collect dependencies.
2024-02-04 15:59:09 +01:00
Magne Sjaastad
d10254933c #11140 Fix filtering based on text in tree selection editor 2024-01-30 14:34:33 +01:00
Sigurd Pettersen
10a579fac5
Add support in VizFwk for using QOpenGLWidget derived view widget (#11091)
* Refactor to deprecate existing QGLWidget derived widget

Renamed cvfqt::OpenGLWidget to cvfqt::GLWidget_deprecated
Renamed cvfqt::CvfBoundQGLContext to cvfqt::CvfBoundQGLContext_deprecated
Renamed cvfqt::OpenGLContext to cvfqt::OpenGLContext_QGLContextAdapter_deprecated
Added cvf::OpenGLUtils

* Marked existing QtMinimal and QtMultiView as deprecated

* Additional deprecated renaming

* Added missing type

* Added missing include

* Fixes to get snippets up and running before introducing new OpenGL widgets

* Added class for OpenGLInfo

* Refactored cvf::OpenGLContext and cvf::OpenGLContextGroup, and added first cut impl of cvfqt::GLWidget and cvfqt::OpenGLWidget

* Removed unused TriggerTBBCopy.txt

* Initial support for compilation on Qt6

* Added QtMinimal and QtMinimal_GLWidget

* Refactored SnippetRunner to handle utilize cvfqt::OpenGLWidget

* Removed unused code

* Fixes and workarounds from compiling on linux

* Fixes by clang-format (#11056)

Co-authored-by: sigurdp <sigurdp@users.noreply.github.com>

* Added QTMultiView test app based on cvfqt::OpenGLWidget

* Removed includes of QOpenGLFunctions

* Modifications for compile with Qt6

* Added test bench for cvfqt::OpenGLWidget

* Minor fixes

* Force to use Qt5

* Fixes by cmake-format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: sigurdp <sigurdp@users.noreply.github.com>
2024-01-23 08:48:05 +01:00
Magne Sjaastad
833a0e8584 Performance: Cellcount functions are used in many loops, and must be as fast as possible
cellCountIJK was computed based on the value of griPointDimensions. These converstion turned up during profiling. Change implementation to have cellcount as a member variable instead of being computed every time.
2024-01-22 14:52:49 +01:00
Magne Sjaastad
12ca418ef0 Add fixes to handle missing data correctly 2024-01-19 11:53:06 +01:00
Sigurd Pettersen
ce9a65ee41
VizFwk housekeeping (#11026)
Housekeeping in VizFwk in preparation for introducing support for QOpenGLWidget and Qt6

* Adjusted unit tests to changes in source code
* Use Qt5 as default and removed copying of Qt DLLs
* Removed support for Qt4
* Removed the CVF_OPENGL_ES define. If we ever want to re-introduce support fro OpenGLES/Angle it should be handled differently.
*Added include of <locale.h>
* Added target for running Glsl2Include in order to build cvfShaderSourceStrings.h
* Removed all usage of CVF_USING_CMAKE
* Removed visual studio project files
2024-01-09 14:38:57 +01:00
Magne Sjaastad
edf44cb4c0 Prepare CMake to support both Qt5 andf Qt6
CEE_USE_QT6 controls if Qt6 is used.
Improved install and package for Qt6, target version Qt 6.5.3
Added Qt6 to github action for AppFwkUnitTest
2024-01-09 11:02:41 +01:00
Magne Sjaastad
8424c77167 Remove norwegian characters
On Qt6, text with norwegian characters causes build failure.
2024-01-09 11:02:41 +01:00
Magne Sjaastad
d1b3445bef gcc10: add missing include 2024-01-09 11:02:41 +01:00
Magne Sjaastad
118d88b973 Create singleton before displaying window 2024-01-09 11:02:41 +01:00
Magne Sjaastad
f6be434b85 Remove Qt version checking for old Qt version 2024-01-07 18:28:36 +01:00
Magne Sjaastad
b5616561c2 Support use of of std::pair<T, QString> 2024-01-07 18:28:36 +01:00
Magne Sjaastad
d38ebf68f4 Check for Qt5 when using removed class QDesktopWidget 2024-01-07 18:28:36 +01:00
Magne Sjaastad
870bcf0a46 Test for Qt5 when using obsolete OpenGL functions 2024-01-07 18:28:36 +01:00
Magne Sjaastad
2c02d61846 Use QRegularExpression instead of QRegExp 2024-01-07 18:28:36 +01:00
Magne Sjaastad
e23560d9a0 Use setContentsMargins instead of setMargin 2024-01-07 18:28:36 +01:00
Magne Sjaastad
50234f0ea8 Add missing includes 2024-01-07 18:28:36 +01:00
Eirik Marthinsen
1f1904d72b Add dependency on QtSvg for project cafUserInterface
The project cafUserInterface requires the library QtSvg because of the
use of QSvgRenderer in cafUiIconFactory.cpp. The library has to be
linked into the final executable. The target introdicing the dependency
should also be the one specifying it.

This allows us to remove the dependency from targets that doesn't
directly use QtSvg at all.

Closes #10955
2023-12-16 17:39:09 +01:00
Eirik Marthinsen
9701866736 CMake: Update/Remove old minimum version check
- Update the minimum required CMake version to 3.15 for Fwk folders
  that might be used as top level projects.
- Remove the minimum required CMake version from projects that is just
  included from other top level projects.

Since version 3.19 CMake has been warning that CMake versions below 3.5
is deprecated and support will be removed in the future. This will
silence those warning.

By removing the minimum required version check from projects that is not
intended as top level projects we avoid redundant checks and simplifies
future maintenance.

Closes #10957
2023-12-16 17:35:54 +01:00
Eirik Marthinsen
77e5d642e9 Fix insufficient forward declaration
It is not sufficient with a forward declaration of QString here. Since
the vector is created in PdmFieldCapability::attributes() the size of
QString must be known at that point.

closes #10950
2023-12-13 18:40:09 +01:00
Jon Jenssen
9a78e69d52 Only show clear button/icon in tree search if user has entered text 2023-11-27 15:34:20 +01:00
Magne Sjaastad
8fbc532149 Guard missing field for combo box editor
This can happen if all summary plots are deleted. The toolbar is still visible, and interaction with toolbar causes crash.
2023-11-27 13:14:16 +01:00
Magne Sjaastad
f092f18614 Make sure toolbar is updated for when a single plot is present
We try to update the content of the toolbar only when required, as this can take some time to produce the combo box content for large cases. Return false to make sure the UI is rebuild if any invalid text is present.
2023-11-20 14:13:24 +01:00
Magne Sjaastad
9e65eb3be9 Add helper functions to convert from cellIndex to cafVecIjk 2023-11-13 11:08:36 +01:00
Magne Sjaastad
678a368361
Refactor LayoutOptions to improve readability
* Make it possible to use designated initializer list
- remove default constructor
- move static member to outer scope

* Add helper function to add field on same row
2023-11-10 14:48:56 +01:00
Magne Sjaastad
319dc2ab9b
Adjust build settings to c++20
Adjust build settings to c++20
Add ifdef for code related to CeeViz, so it is possible to compile AppFwk without CeeViz
2023-11-09 14:17:43 +01:00
Magne Sjaastad
d8b842147b Use action with icon instead of push button
Add action with an icon inside the line edit to clear the content of the line edit.
2023-11-02 15:19:42 +01:00
Magne Sjaastad
43c5705c8b Define and use a common set of content margin sizes 2023-11-01 09:37:52 +01:00
Magne Sjaastad
718d40de56 Fix hang when editing regression curve degree
Disable editingFinsished() signal when read-only. Using tab after change of Degree in a regression curve object causes the application to hang.
2023-10-30 11:20:21 +01:00