QtOpenGLWidgets.pyi 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # The PEP 484 type hints stub file for the QtOpenGLWidgets module.
  2. #
  3. # Generated by SIP 6.15.3
  4. #
  5. # Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. #
  7. # This file is part of PyQt6.
  8. #
  9. # This file may be used under the terms of the GNU General Public License
  10. # version 3.0 as published by the Free Software Foundation and appearing in
  11. # the file LICENSE included in the packaging of this file. Please review the
  12. # following information to ensure the GNU General Public License version 3.0
  13. # requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. #
  15. # If you do not wish to use this file under the terms of the GPL version 3.0
  16. # then you may purchase a commercial license. For more information contact
  17. # info@riverbankcomputing.com.
  18. #
  19. # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. import collections, re, typing, enum
  22. try:
  23. from warnings import deprecated
  24. except ImportError:
  25. pass
  26. import PyQt6.sip
  27. from PyQt6 import QtCore
  28. from PyQt6 import QtGui
  29. from PyQt6 import QtOpenGL
  30. from PyQt6 import QtWidgets
  31. # Support for QDate, QDateTime and QTime.
  32. import datetime
  33. # Convenient type aliases.
  34. PYQT_SIGNAL = typing.Union[QtCore.pyqtSignal, QtCore.pyqtBoundSignal]
  35. PYQT_SLOT = typing.Union[collections.abc.Callable[..., Any], QtCore.pyqtBoundSignal]
  36. class QOpenGLWidget(QtWidgets.QWidget):
  37. class TargetBuffer(enum.Enum):
  38. LeftBuffer = ... # type: QOpenGLWidget.TargetBuffer
  39. RightBuffer = ... # type: QOpenGLWidget.TargetBuffer
  40. class UpdateBehavior(enum.Enum):
  41. NoPartialUpdate = ... # type: QOpenGLWidget.UpdateBehavior
  42. PartialUpdate = ... # type: QOpenGLWidget.UpdateBehavior
  43. def __init__(self, parent: QtWidgets.QWidget|None = ..., flags: QtCore.Qt.WindowType = ...) -> None: ...
  44. def currentTargetBuffer(self) -> 'QOpenGLWidget.TargetBuffer': ...
  45. def setTextureFormat(self, texFormat: int) -> None: ...
  46. def textureFormat(self) -> int: ...
  47. def updateBehavior(self) -> 'QOpenGLWidget.UpdateBehavior': ...
  48. def setUpdateBehavior(self, updateBehavior: 'QOpenGLWidget.UpdateBehavior') -> None: ...
  49. def paintEngine(self) -> QtGui.QPaintEngine|None: ...
  50. def metric(self, metric: QtGui.QPaintDevice.PaintDeviceMetric) -> int: ...
  51. def event(self, e: QtCore.QEvent|None) -> bool: ...
  52. def resizeEvent(self, e: QtGui.QResizeEvent|None) -> None: ...
  53. def paintEvent(self, e: QtGui.QPaintEvent|None) -> None: ...
  54. def paintGL(self) -> None: ...
  55. def resizeGL(self, w: int, h: int) -> None: ...
  56. def initializeGL(self) -> None: ...
  57. resized: typing.ClassVar[QtCore.pyqtSignal]
  58. aboutToResize: typing.ClassVar[QtCore.pyqtSignal]
  59. frameSwapped: typing.ClassVar[QtCore.pyqtSignal]
  60. aboutToCompose: typing.ClassVar[QtCore.pyqtSignal]
  61. @typing.overload
  62. def grabFramebuffer(self) -> QtGui.QImage: ...
  63. @typing.overload
  64. def grabFramebuffer(self, targetBuffer: 'QOpenGLWidget.TargetBuffer') -> QtGui.QImage: ...
  65. @typing.overload
  66. def defaultFramebufferObject(self) -> int: ...
  67. @typing.overload
  68. def defaultFramebufferObject(self, targetBuffer: 'QOpenGLWidget.TargetBuffer') -> int: ...
  69. def context(self) -> QtGui.QOpenGLContext|None: ...
  70. def doneCurrent(self) -> None: ...
  71. @typing.overload
  72. def makeCurrent(self) -> None: ...
  73. @typing.overload
  74. def makeCurrent(self, targetBuffer: 'QOpenGLWidget.TargetBuffer') -> None: ...
  75. def isValid(self) -> bool: ...
  76. def format(self) -> QtGui.QSurfaceFormat: ...
  77. def setFormat(self, format: QtGui.QSurfaceFormat) -> None: ...