QtSvgWidgets.pyi 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # The PEP 484 type hints stub file for the QtSvgWidgets 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
  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 QtSvg
  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 QGraphicsSvgItem(QtWidgets.QGraphicsObject):
  37. @typing.overload
  38. def __init__(self, parent: QtWidgets.QGraphicsItem|None = ...) -> None: ...
  39. @typing.overload
  40. def __init__(self, fileName: str|None, parent: QtWidgets.QGraphicsItem|None = ...) -> None: ...
  41. def type(self) -> int: ...
  42. def paint(self, painter: QtGui.QPainter|None, option: QtWidgets.QStyleOptionGraphicsItem|None, widget: QtWidgets.QWidget|None = ...) -> None: ...
  43. def boundingRect(self) -> QtCore.QRectF: ...
  44. def maximumCacheSize(self) -> QtCore.QSize: ...
  45. def setMaximumCacheSize(self, size: QtCore.QSize) -> None: ...
  46. def elementId(self) -> str: ...
  47. def setElementId(self, id: str|None) -> None: ...
  48. def renderer(self) -> QtSvg.QSvgRenderer|None: ...
  49. def setSharedRenderer(self, renderer: QtSvg.QSvgRenderer|None) -> None: ...
  50. class QSvgWidget(QtWidgets.QWidget):
  51. @typing.overload
  52. def __init__(self, parent: QtWidgets.QWidget|None = ...) -> None: ...
  53. @typing.overload
  54. def __init__(self, file: str|None, parent: QtWidgets.QWidget|None = ...) -> None: ...
  55. def setOptions(self, options: QtSvg.QtSvg.Option) -> None: ...
  56. def options(self) -> QtSvg.QtSvg.Option: ...
  57. def paintEvent(self, event: QtGui.QPaintEvent|None) -> None: ...
  58. @typing.overload
  59. def load(self, file: str|None) -> None: ...
  60. @typing.overload
  61. def load(self, contents: QtCore.QByteArray|bytes|bytearray|memoryview) -> None: ...
  62. def sizeHint(self) -> QtCore.QSize: ...
  63. def renderer(self) -> QtSvg.QSvgRenderer|None: ...