Commit Graph

59 Commits

Author SHA1 Message Date
Ogi Moore d455da9aec Use Qt6 Enum Namespace
This namespace appears to be valid in PySide2/PyQt5 5.12+ so we may as
well migrate to the newer namespace ourselves.
2021-06-08 21:23:49 -07:00
3DAlgoLab 28b1499f09
Force cameraPosition() to return Vector class. (#1799)
* Update GLViewWidget.py

Fix the wrong conversion of QVector3D to numpy array.

* new way to fix the conversion error

* Recover prev. version of pixelSize

Co-authored-by: Jaeyoon Jeong <diem389@gmail.com>
2021-06-01 22:21:50 -07:00
Ogi Moore 6a708dc203
Merge pull request #1724 from j9ac9k/use-math-module-for-single-values
Use math module methods for scalars
2021-04-23 23:10:17 -07:00
Ogi Moore 03ea368454 Clean up Errors for CodeQL analyzer
CodeQL identified some errors and warnings, which this commit cleans up.
2021-04-23 22:44:29 -07:00
Ogi Moore b0769f4be9 Use math.radians and math.degrees
Many places in the library were doing radian to degree conversion
via the manual calculation.  Doing timeit benchmarks on my system, I
am able to get a 4x speedup by using math.degrees or math.radians
instead
2021-04-23 22:43:51 -07:00
Ogi Moore 1138c67d45 Use math module trig functions for scalars
This commit replaces the use of np.sin/np.cos/np.tan uses throughout
the library with math.sin/math.cos/math.tan for scalar values
2021-04-23 22:42:46 -07:00
Ogi Moore c4a1cf11a1 Use clip_array or clip_scalar instead of np.clip
Significant performance issues have been identified with np.clip
and thus clip_array was created to speed up the operation.  In addition
clip_scalar was created to clip a scalar value between two other values
this commit replaces many uses of np.clip from operating on scalars to
using clip_scalar instead
2021-04-23 11:53:00 -07:00
KIU Shueng Chuan f4ed46773f unify _dpiRatio() and devicePixelRatio() 2021-04-22 11:51:10 +08:00
Ogi Moore ff71b6be6b Add actual deprecation warnings 2021-02-11 21:34:02 -08:00
Ogi Moore 309195ceea
Fix windows hidpi (#1516)
* set environment variables before starting QApp

* fix-422

* Better support of hidpi

* Fix Typo in App-Name

* Remove fontScaleFactor bits

* Add documenation for hidpi displays

* Fix pg not defined
2021-01-27 10:59:07 -08:00
Ogi Moore 85773e4530
Revert "have mkQApp configure QApplication such that it handles HIDPI displays on Windows (#1509)" (#1515)
This reverts commit 98f6b2f1a5.
2021-01-27 10:42:38 -08:00
Ogi Moore 98f6b2f1a5
have mkQApp configure QApplication such that it handles HIDPI displays on Windows (#1509)
* set environment variables before starting QApp

* fix-422

* Better support of hidpi

* Fix Typo in App-Name

* Remove fontScaleFactor bits

* Add documenation for hidpi displays
2021-01-27 10:05:56 -08:00
KIU Shueng Chuan 13d652c794 convert to QPointF mouse event position
DockDrop.py : use QPointF mouse coords
2021-01-23 08:29:45 +08:00
Ogi Moore 4e070f40bc Fixed typo 2021-01-21 08:48:54 -08:00
KIU Shueng Chuan 9145d7f24d switch to usage of QOpenGLWidget
this drops support for Qt4
2021-01-15 08:25:09 +08:00
KIU Shueng Chuan f863390409 change MidButton to MiddleButton
the former is no longer present in Qt 6 as an alias
2021-01-15 08:25:05 +08:00
Yoonyoung (Jamie) Cho d8e4911fcd
Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization (#909)
* Fixed GLViewWidget Gimbal Lock with Quaternion Parametrization

* fixed rotation name

* fixes extraneous pos argument and restore compatibility

* remove redundant getAxisAngle() in rotation (for Qt4 compatibility)

* GLViewWidget takes rotationMethod parameter

* Avoid merge conflict

* Fix docstring

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-12-24 21:45:02 -08:00
Allard Hendriksen 9d99a3e7b0
Fix incorrect rendering of overlapping object in renderToArray() (#1306)
This commit adds a depth buffer in renderToArray().

This fixes the issue that overlapping objects are rendered incorrectly
when using renderToArray() on a GLViewWidget.

This might be related to issue #743.
2020-10-13 19:47:49 -07:00
Dominik Kutra 5842f42632
fix typo in documentation
found a tiny typo when reading the docs...

thank you guys for this awesome library 🚀
2020-09-29 17:29:52 +02:00
Ogi Moore 91ee83ab36
Merge pull request #402 from vladimir-kraus/develop
added method clear() to GLViewWidget
2020-06-22 20:58:04 -07:00
jeremysee2 f81768ac59
Issue #1260: Added exception to checkOpenGLVersion to highlight OpenGL ES incompatibility on Raspberry Pi (#1264)
* checkOpenGLVersion exception for OpenGL ES

* checkOpenGLVersion exception

* checkOpenGLVersion exception

* python 2/3 compatibility

* Refactoring checkOpenGLVersion

Since the original goal of `checkOpenGLVersion` is to re-throw an exception or notify the user about a wrong OpenGL version in another exception, this commit unifies the two exception messages from `checkOpenGLVersion`.
Further, it corrects ">" to ">=" in the error message (originally my fault).
And it corrects verNumber to be an integer and not a boolean (there was a " < 2" too much at the end of the line).
Finally, since the opportunity was there, the method is further refactored, comments and a docstring are added.

Co-authored-by: 2xB <2xb@users.noreply.github.com>
2020-06-21 13:59:44 -07:00
Ogi Moore b9a0fac815
devicePixelRatio is only accessible in __init__ 2020-06-11 21:32:12 -07:00
Ogi Moore 308bb8d1ff
Merge branch 'master' into develop 2020-06-11 21:11:51 -07:00
Paul Debus fd11e1352d fix encoding error in checkOpenGLVersion (#787) 2019-08-18 12:16:31 -07:00
Ogi Moore 4a33f24582
Merge pull request #770 from cklb/develop
Fix issue #481 - `setCameraPosition` in `GLViewWiedget` ignored `pos` argument
2019-06-04 13:29:26 -07:00
Tran Duy Hoa 16616c77b7
Fix bug in GLViewWidget.py
call debug.printExc() instead of pyqtgraph.debug.printExc()
2018-10-26 23:06:23 +02:00
Stefan Ecklebe fc5e0cd9f4 Fixed issue #481 2018-10-12 15:32:23 +02:00
Luke Campagnola c20022580d move panning code from mouse handler to pan() 2018-06-07 17:49:42 -07:00
Luke Campagnola 741e65c72e Merge branch 'panning' of https://github.com/dvj/pyqtgraph into dvj-panning 2018-06-05 15:25:52 -07:00
Luke Campagnola 66dcfc7c67 Merge branch 'develop' into pyside2 2018-05-22 15:22:54 -07:00
Doug Johnston 87efc2418a fix whitespace changes 2018-04-26 09:17:00 -07:00
Doug Johnston 972f6205b5 Allow for panning in the plane of the camera
Accessed via <CTRL>-[left click]
2018-04-25 20:06:40 -07:00
Luke Campagnola 063e9c91a9 Make high-dpi handling conditional on Qt version 2018-04-24 08:59:33 -07:00
Matthew Shun-Shin c8833e1d18
Merge pull request #1 from pyqtgraph/develop
Update to latest
2018-03-12 14:59:57 +00:00
Luke Campagnola 82afad8366 Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
Fekete Imre 8d9cb79da4 Fix issue # 366
Set the right texture for rendering, otherwise a previously set texture is overwritten.
2018-01-31 23:35:18 +01:00
Matthew Shun-Shin 82b666e2ee Fix GL Views being half size on hidpi monitors 2017-07-28 11:30:19 +01:00
vladimir-kraus 30864df76d added method reset() to GLViewWidget to initialize or reset the current state 2016-11-18 15:03:19 +01:00
vladimir-kraus 051dfe0d31 added method clear() to GLViewWidget 2016-11-18 14:55:39 +01:00
Kenneth Lyons 9ea38a1270 Use glColor instead of mkColor to set GLViewWidget background color. 2015-07-22 13:13:26 -07:00
Luke Campagnola 1fe5976e19 Merge branch 'pyqt5' into develop
Conflicts:
	examples/parametertree.py
	pyqtgraph/Qt.py
	pyqtgraph/graphicsItems/FillBetweenItem.py
	pyqtgraph/graphicsItems/InfiniteLine.py
	pyqtgraph/imageview/ImageView.py
2015-02-28 11:46:41 -05:00
compass 478a3b1aa4 Fix some bugs in PyQt5 2015-01-17 00:21:33 +08:00
Luke Campagnola 41fa2f64d3 Fixed GL picking bug 2014-12-04 21:24:09 -05:00
John David Reaver 70d9f1eeed Fix OpenGL shader/texture sharing on PySide 2014-09-28 08:26:13 -07:00
Luke Campagnola 5b6bc6715c Added GLViewWidget.setBackgroundColor() 2014-02-28 08:54:33 -05:00
Luke Campagnola 032c6c625d GLViewWidget.itemsAt() now measures y from top of widget. 2014-02-10 20:51:17 -05:00
Luke Campagnola bccbc29940 Bugfixes:
- isosurface works for arrays with shapes > 255
 - Fixed ImageItem exception building histogram when image has only one value
 - Fixed MeshData exception caused when vertexes have no matching faces
 - Fixed GLViewWidget exception handler
2014-02-03 22:24:45 -05:00
Luke Campagnola 7777240d89 exporters, multiprocess, opengl 2013-12-23 09:46:54 -05:00
Guillaume Poulin c02e6184ef merge inp 2013-09-05 00:28:03 +08:00
Luke Campagnola 160b1ee45f Python3 bugfixes 2013-08-21 10:40:19 -06:00