Commit Graph

2351 Commits

Author SHA1 Message Date
KIU Shueng Chuan
d0a7ceea2d relax image tolerance for PySide6 2021-01-16 14:37:21 +08:00
KIU Shueng Chuan
28c0ea4b33 test_ref_cycles.py : change skip criteria
test_ImageView()
- PySide6 fails the same as PySide2

test_PlotWidget() and test_GraphicsWindow()
- PySide6 succeeds.
- PySide2 also succeeds. (at least on Linux and on version 5.15.2)
2021-01-16 14:37:21 +08:00
Ogi Moore
901f772b5f Skip matplotlib qt6 tests 2021-01-16 14:37:21 +08:00
Ogi Moore
21c5627282 Adding PySide6 to CI
Install package for libopengl.so
Mandate the use of ubuntu 20.04
2021-01-16 14:36:38 +08:00
KIU Shueng Chuan
e03d4be767 fix: QComboBox::AdjustToMinimumContentsLength is no longer available
documentation for Qt 4.8 and Qt 5.12 have advised to "Use
AdjustToContents or AdjustToContentsOnFirstShow instead"

documentation in Qt 5.15 no longer shows AdjustToMinimumContentsLength.
2021-01-16 14:33:47 +08:00
KIU Shueng Chuan
f21dfd9d95 fix get_resolution.py to use QScreen
QDesktopWidget is deprecated in Qt5 and removed in Qt6
2021-01-16 14:33:47 +08:00
KIU Shueng Chuan
4b1a8fe6b4 call GraphicsView.enterEvent() with QEnterEvent
Qt5 prototype is QWidget::enterEvent(QEvent*)
Qt6 prototype is QWidget::enterEvent(QEnterEvent*)
where QEnterEvent inherits from QEvent

RemoteGraphicsView.enterEvent() is actually already called with a
QEnterEvent instance, so all we need to do is to be able to reconstruct
it in Renderer.enterEvent()
2021-01-16 00:16:28 +08:00
KIU Shueng Chuan
74683be68b GraphicsScene.py : check for C++ item live-ness
this gets triggered in PySide6 but not in PyQt5, PySide2.
2021-01-15 13:12:36 +08:00
KIU Shueng Chuan
10530568f0 ScatterPlotItem.py: use non _USE_QRECT codepath for PySide6
verified by using ScatterPlotSpeedTest.py that PySide6 benefits from this.
2021-01-15 12:47:13 +08:00
KIU Shueng Chuan
6c9b910c5c RemoteGraphicsView.py : include PySide6 in PySide family
this is only sufficient to make remote rendering work.

various errors still get triggered under PySide6 when we try remote plotting.
2021-01-15 10:25:24 +08:00
KIU Shueng Chuan
4f619bbb4c update glinfo.py to use QOpenGLWidget 2021-01-15 08:25:09 +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
dc46812e5a Qt.py : provide QOpenGLWidget (Qt5,6) instead of QGLWidget (Qt4,5) 2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
44da583511 bootstrap.py: use importlib to generically support all bindings 2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
71e1ea34fd MatplotlibWidget.py: drop Qt4 support
PR for adding Qt6 support to matplotlib indicates that both Qt5 and Qt6
will use backend_qt5agg
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
cc2b811ed1 drop usage of QDesktopWidget
this drops support for Qt4
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
283e9eb563 drop lack of palette compatibility with Qt4 2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
966ae7a3df import template files using importlib
this lets us support the various bindings w/o having to add binding
specific code.

it breaks PyQt4 support since PyQt4 template files are suffixed as
"_pyqt" rather than "_pyqt4"
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan
5732ca8213 initExample.py: add PySide6 and PyQt6
drop PyQt4 and PySide
2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
359f441973 ExampleApp.py : remove Qt4 paletteChanged signal compatibility 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
ca9f3f2d92 fix: glViewPort() takes integral arguments 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
3584736155 generate template files for pyside6 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
aa1f4e7547 add PySide6 and PyQt6 to rebuildUi.py 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
1a6918a241 replace QDesktopWidget() with QGuiApplication.primaryScreen()
the "try, except" could be dropped if we drop Qt4 support.

however, primaryScreen() may not be the right screen.
2021-01-15 08:25:07 +08:00
KIU Shueng Chuan
92016d3d5a add imports of _pyside6 files 2021-01-15 08:25:06 +08:00
KIU Shueng Chuan
6e2a28260a add QImage support for PySide6
also update for PySide2.QImage to take in ndarray directly.
2021-01-15 08:25:06 +08:00
KIU Shueng Chuan
6dc6cda0fc add PySide6 to Qt.py 2021-01-15 08:25:06 +08:00
KIU Shueng Chuan
da0a94643c change QPalette.Background to QPalette.Window
the former is obsolete in 5.15 and is removed in 6.0
2021-01-15 08:25:06 +08:00
KIU Shueng Chuan
c4addbeaea workaround missing setStops binding 2021-01-15 08:25:05 +08:00
KIU Shueng Chuan
b0f7dda102 QFont.setWeight(75) is redundant
QFont.setBold(True) calls QFont.setWeight(QFont.Weight.Bold)

in Qt 5, QFont.Weight.Bold == 75
in Qt 6, QFont.Weight.Bold == 700

in PySide6, QFont.setWeight() no longer accepts an integer value.
2021-01-15 08:25:05 +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
KIU Shueng Chuan
119c5fa3d0 convert QTreeWidget.setFirstItemColumnSpanned
convert QTreeWidget.setFirstItemColumnSpanned(item, True) to
item.setFirstColumnSpanned(True)

the former is deprecated since Qt 5.15.2 and removed in Qt 6.
2021-01-15 08:25:05 +08:00
Ogi Moore
4abbc2d5cd
Merge pull request #1498 from jjuod/scrollingplotfix
PlotDataItem now signals on setPos (fix #1494)
2021-01-13 13:16:31 -08:00
jjuod
3cb1128bc2 PlotDataItem now signals on setPos (fix #1494) 2021-01-13 21:57:40 +13:00
Ogi Moore
45e0464163
Merge pull request #1493 from pijyoi/fastinv
invert QTransform using adjoint() and determinant()
2021-01-12 21:05:46 -08:00
KIU Shueng Chuan
3a342b50e2 Revert "Add cache for mapRectFromView"
This reverts commit 55e1f2c520.
2021-01-13 12:43:51 +08:00
Dennis Göries
2affe322ec
PlotItem: Fix enableMenu setting when passing a viewbox (#1496)
* PlotItem: enableMenu setting when passing a viewbox
2021-01-12 20:34:14 -08:00
KIU Shueng Chuan
fd85076bb6 invert QTransform using adjoint() and determinant() 2021-01-10 13:58:31 +08:00
Julius Juodakis
386dcf8180
setSpan broke LinearRegionItem (#1488) (#1491) 2021-01-06 14:54:33 -08:00
Nils Nemitz
85719fd8df
Colormap extension (#1424)
* extend ColorMap functionality for palette management

* manual merge with changes in master branch

* extend ColorMap functionality for palette management

* manual merge with changes in master branch

* light mode / dark mode swapping demo

* color map updates

* added ColorCET and Matplotlib import for color maps

* minor cleanup

* restored lost indent

* Code cleanup

* Add colorcet as optional dependency

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-01-04 22:01:30 -08:00
Dennis Göries
b622e22877
LegendItem: Make ItemSample customizable (#1404)
* LegendItem: Introduce itemStyles and provide ToggleItem

Show example

* Minor cleanup of the legend item and test

* Make ItemSample customizable

* Remove example modifications

* Changes for sampleType according to review
2021-01-04 21:02:08 -08:00
Hanwant
e209be20e5
Use log modulus transform for y axis log scaling (#1476)
* Use log modulus transform for y axis log scaling

* Update log modulus to use eps and retain behaviour around -1 < x < 1

* Update setLogMode Dosctring

* Update setLogMode docString

Co-authored-by: Hanwant <admin@madigan.tech>
2021-01-04 19:27:03 -08:00
Martin Chase
1a71bb53c4
add unicode units (#1471)
* adds unicode units

* keep "u" and "Ohm" for compatibility
* add c, d, da and h
* lint

* py2 compatible u"" strings
2021-01-03 14:28:56 -08:00
Lee Tirrell
64e04e3120
Fix #798 (#1487) 2021-01-03 14:28:40 -08:00
Ogi Moore
e94f53ac20
minor adjustment on when test runs (#1479)
* minor adjustment on when test runs

* Remove pytest publish results, add sphinx nitpicky

* Deal with nit-picky mode later

* why bother w/ those artifacts...
2021-01-03 12:31:53 -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
Ogi Moore
0356a358b3
Remove linting check, add pytest test publishing (#1477) 2020-12-23 23:04:30 -08:00
Kyle Sunden
d3049e41d7
Merge pull request #1474 from j9ac9k/migrate-to-github-actions
Migrate To Github Actions
2020-12-23 00:32:55 -06:00
Ogi Moore
5d33ccff8d Cleanup ExamplesApp 2020-12-22 22:10:59 -08:00
Ogi Moore
e5f123deb2 Add more badges 2020-12-22 22:08:31 -08:00