Skip to content

Commit

Permalink
More modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 20, 2021
1 parent 32f4a9f commit 504802a
Show file tree
Hide file tree
Showing 51 changed files with 360 additions and 50 deletions.
6 changes: 5 additions & 1 deletion qtpy/Qt3DCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"""Provides Qt3DCore classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.Qt3DCore import *
elif PYQT6:
from PyQt6.Qt3DCore import *
elif PYSIDE6:
from PySide6.Qt3DCore.Qt3DCore import *
elif PYSIDE2:
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
import PySide2.Qt3DCore as __temp
Expand Down
6 changes: 5 additions & 1 deletion qtpy/Qt3DExtras.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"""Provides Qt3DExtras classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.Qt3DExtras import *
elif PYQT6:
from PyQt6.Qt3DExtras import *
elif PYSIDE6:
from PySide6.Qt3DExtras.Qt3DExtras import *
elif PYSIDE2:
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
import PySide2.Qt3DExtras as __temp
Expand Down
6 changes: 5 additions & 1 deletion qtpy/Qt3DInput.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"""Provides Qt3DInput classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.Qt3DInput import *
elif PYQT6:
from PyQt6.Qt3DInput import *
elif PYSIDE6:
from PySide6.Qt3DInput.Qt3DInput import *
elif PYSIDE2:
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
import PySide2.Qt3DInput as __temp
Expand Down
6 changes: 5 additions & 1 deletion qtpy/Qt3DLogic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"""Provides Qt3DLogic classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.Qt3DLogic import *
elif PYQT6:
from PyQt6.Qt3DLogic import *
elif PYSIDE6:
from PySide6.Qt3DLogic.Qt3DLogic import *
elif PYSIDE2:
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
import PySide2.Qt3DLogic as __temp
Expand Down
6 changes: 5 additions & 1 deletion qtpy/Qt3DRender.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
"""Provides Qt3DRender classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.Qt3DRender import *
elif PYSIDE6:
from PySide6.Qt3DRender.Qt3DRender import *
elif PYQT6:
from PyQt6.Qt3DCore import QAttribute
elif PYSIDE2:
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-1026
import PySide2.Qt3DRender as __temp
Expand Down
6 changes: 5 additions & 1 deletion qtpy/QtCharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
"""Provides QtChart classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
try:
from PyQt5 import QtChart as QtCharts
except ImportError:
raise PythonQtError('The QtChart module was not found. '
'It needs to be installed separately for PyQt5.')
elif PYQT6:
from PyQt6 import QtCharts
elif PYSIDE6:
from PySide6 import QtCharts
elif PYSIDE2:
from PySide2.QtCharts import *
else:
Expand Down
19 changes: 19 additions & 0 deletions qtpy/QtDBus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provides QtDBus classes and functions."""

# Local imports
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.QtDBus import *
elif PYQT6:
from PyQt6.QtDBus import *
elif PYSIDE6:
from PySide6.QtDBus import *
else:
raise PythonQtError('No Qt bindings could be found')
4 changes: 3 additions & 1 deletion qtpy/QtDesigner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
Provides QtDesigner classes and functions.
"""

from . import PYQT5, PythonQtError
from . import PYQT5, PYQT6, PythonQtError


if PYQT5:
from PyQt5.QtDesigner import *
elif PYQT6:
from PyQt6.QtDesigner import *
else:
raise PythonQtError('No Qt bindings could be found')
6 changes: 5 additions & 1 deletion qtpy/QtHelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

import warnings

from . import PYQT5, PYSIDE6, PYSIDE2
from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2, PythonQtError

if PYQT5:
from PyQt5.QtHelp import *
elif PYQT6:
from PyQt6.QtHelp import *
elif PYSIDE6:
from PySide6.QtHelp import *
elif PYSIDE2:
from PySide2.QtHelp import *
else:
raise PythonQtError('No Qt bindings could be found')
6 changes: 5 additions & 1 deletion qtpy/QtMultimedia.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import warnings

from . import PYQT5
from . import PYQT5, PYQT6
from . import PYSIDE2
from . import PYSIDE6

if PYQT5:
from PyQt5.QtMultimedia import *
elif PYQT6:
from PyQt6.QtMultimedia import *
elif PYSIDE6:
from PySide6.QtMultimedia import *
elif PYSIDE2:
from PySide2.QtMultimedia import *
else:
raise PythonQtError('No Qt bindings could be found')
6 changes: 5 additions & 1 deletion qtpy/QtMultimediaWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
"""Provides QtMultimediaWidgets classes and functions."""

# Local imports
from . import PYSIDE2, PYQT5, PythonQtError
from . import PYSIDE2, PYSIDE6, PYQT5, PYQT6, PythonQtError

if PYQT5:
from PyQt5.QtMultimediaWidgets import *
elif PYQT6:
from PyQt6.QtMultimediaWidgets import *
elif PYSIDE2:
from PySide2.QtMultimediaWidgets import *
elif PYSIDE6:
from PySide6.QtMultimediaWidgets import *
else:
raise PythonQtError('No Qt bindings could be found')
4 changes: 3 additions & 1 deletion qtpy/QtNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
Provides QtNetwork classes and functions.
"""

from . import PYQT5, PYSIDE2, PYSIDE6, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError


if PYQT5:
from PyQt5.QtNetwork import *
elif PYQT6:
from PyQt6.QtNetwork import *
elif PYSIDE6:
from PySide6.QtNetwork import *
elif PYSIDE2:
Expand Down
17 changes: 17 additions & 0 deletions qtpy/QtNetworkAuth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provides QtNetworkAuth classes and functions."""

# Local imports
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT6:
from PyQt6.QtNetworkAuth import *
elif PYSIDE6:
from PySide6.QtNetworkAuth import *
else:
raise PythonQtError('No Qt bindings could be found')
2 changes: 2 additions & 0 deletions qtpy/QtOpenGL.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

if PYQT5:
from PyQt5.QtOpenGL import *
elif PYQT6:
from PyQt6.QtOpenGL import *
elif PYSIDE6:
from PySide6.QtOpenGL import *
elif PYSIDE2:
Expand Down
17 changes: 17 additions & 0 deletions qtpy/QtOpenGLWidgets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provides QtOpenGLWidgets classes and functions."""

# Local imports
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT6:
from PyQt6.QtOpenGLWidgets import *
elif PYSIDE6:
from PySide6.QtOpenGLWidgets import *
else:
raise PythonQtError('No Qt bindings could be found')
4 changes: 3 additions & 1 deletion qtpy/QtPrintSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
Provides QtPrintSupport classes and functions.
"""

from . import PYQT5, PYSIDE6, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2, PythonQtError


if PYQT5:
from PyQt5.QtPrintSupport import *
elif PYQT6:
from PyQt6.QtPrintSupport import *
elif PYSIDE6:
from PySide6.QtPrintSupport import *
elif PYSIDE2:
Expand Down
4 changes: 3 additions & 1 deletion qtpy/QtQml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"""Provides QtQml classes and functions."""

# Local imports
from . import PYQT5, PYSIDE2, PYSIDE6, PythonQtError
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.QtQml import *
elif PYQT6:
from PyQt6.QtQml import *
elif PYSIDE6:
from PySide6.QtQml import *
elif PYSIDE2:
Expand Down
4 changes: 3 additions & 1 deletion qtpy/QtQuick.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"""Provides QtQuick classes and functions."""

# Local imports
from . import PYQT5, PYSIDE6, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2, PythonQtError

if PYQT5:
from PyQt5.QtQuick import *
elif PYQT6:
from PyQt6.QtQuick import *
elif PYSIDE6:
from PySide6.QtQuick import *
elif PYSIDE2:
Expand Down
4 changes: 3 additions & 1 deletion qtpy/QtQuickWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"""Provides QtQuickWidgets classes and functions."""

# Local imports
from . import PYQT5, PYSIDE6, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2, PythonQtError

if PYQT5:
from PyQt5.QtQuickWidgets import *
elif PYQT6:
from PyQt6.QtQuickWidgets import *
elif PYSIDE6:
from PySide6.QtQuickWidgets import *
elif PYSIDE2:
Expand Down
21 changes: 21 additions & 0 deletions qtpy/QtRemoteObjects.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provides QtRemoteObjects classes and functions."""

# Local imports
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.QtRemoteObjects import *
elif PYQT6:
from PyQt6.QtRemoteObjects import *
elif PYSIDE6:
from PySide6.QtRemoteObjects import *
elif PYSIDE2:
from PySide2.QtRemoteObjects import *
else:
raise PythonQtError('No Qt bindings could be found')
21 changes: 21 additions & 0 deletions qtpy/QtSensors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provides QtSensors classes and functions."""

# Local imports
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6, PythonQtError

if PYQT5:
from PyQt5.QtSensors import *
elif PYQT6:
from PyQt6.QtSensors import *
elif PYSIDE6:
from PySide6.QtSensors import *
elif PYSIDE2:
from PySide2.QtSensors import *
else:
raise PythonQtError('No Qt bindings could be found')
4 changes: 3 additions & 1 deletion qtpy/QtSerialPort.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"""Provides QtSerialPort classes and functions."""

# Local imports
from . import PYQT5, PythonQtError
from . import PYQT5, PYQT6, PythonQtError

if PYQT5:
from PyQt5.QtSerialPort import *
elif PYQT6:
from PyQt6.QtSerialPort import *
else:
raise PythonQtError('No Qt bindings could be found')
4 changes: 3 additions & 1 deletion qtpy/QtSql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"""Provides QtSql classes and functions."""

# Local imports
from . import PYQT5, PYSIDE6, PYSIDE2, PythonQtError
from . import PYQT5, PYQT6, PYSIDE6, PYSIDE2, PythonQtError

if PYQT5:
from PyQt5.QtSql import *
elif PYQT6:
from PyQt6.QtSql import *
elif PYSIDE6:
from PySide6.QtSql import *
elif PYSIDE2:
Expand Down
4 changes: 3 additions & 1 deletion qtpy/QtWebChannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"""Provides QtWebChannel classes and functions."""

# Local imports
from . import PYSIDE2, PYSIDE6, PYQT5, PythonQtError
from . import PYSIDE2, PYSIDE6, PYQT5, PYQT6, PythonQtError

if PYQT5:
from PyQt5.QtWebChannel import *
elif PYQT6:
from PyQt6.QtWebChannel import *
elif PYSIDE6:
from PySide6.QtWebChannel import *
elif PYSIDE2:
Expand Down
Loading

0 comments on commit 504802a

Please sign in to comment.