8000 include vendored library qtpy · secondmover/winpython@5bbb139 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5bbb139

Browse files
author
stonebig
committed
include vendored library qtpy
1 parent 7ffca4d commit 5bbb139

28 files changed

+1968
-0
lines changed

winpython/_vendor/qtpy/QtCore.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtCore classes and functions.
11+
"""
12+
13+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
if PYQT5:
17+
from PyQt5.QtCore import *
18+
from PyQt5.QtCore import pyqtSignal as Signal
19+
from PyQt5.QtCore import pyqtSlot as Slot
20+
from PyQt5.QtCore import pyqtProperty as Property
21+
from PyQt5.QtCore import QT_VERSION_STR as __version__
22+
23+
# Those are imported from `import *`
24+
del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
25+
elif PYQT4:
26+
from PyQt4.QtCore import *
27+
# Those are things we inherited from Spyder that fix crazy crashes under
28+
# some specific situations. (See #34)
29+
from PyQt4.QtCore import QCoreApplication
30+
from PyQt4.QtCore import Qt
31+
from PyQt4.QtCore import pyqtSignal as Signal
32+
from PyQt4.QtCore import pyqtSlot as Slot
33+
from PyQt4.QtCore import pyqtProperty as Property
34+
from PyQt4.QtGui import (QItemSelection, QItemSelectionModel,
35+
QItemSelectionRange, QSortFilterProxyModel,
36+
QStringListModel)
37+
from PyQt4.QtCore import QT_VERSION_STR as __version__
38+
39+
# Those are imported from `import *`
40+
del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
41+
elif PYSIDE:
42+
from PySide.QtCore import *
43+
from PySide.QtGui import (QItemSelection, QItemSelectionModel,
44+
QItemSelectionRange, QSortFilterProxyModel,
45+
QStringListModel)
46+
import PySide.QtCore
47+
__version__ = PySide.QtCore.__version__
48+
else:
49+
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/QtDesigner.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
#
5+
# Licensed under the terms of the MIT License
6+
# (see LICENSE.txt for details)
7+
8+
"""
9+
Provides QtDesigner classes and functions.
10+
"""
11+
12+
from . import PYQT5, PYQT4, PythonQtError
13+
14+
15+
if PYQT5:
16+
from PyQt5.QtDesigner import *
17+
elif PYQT4:
18+
from PyQt4.QtDesigner import *
19+
else:
20+
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/QtGui.py

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtGui classes and functions.
11+
.. warning:: Only PyQt4/PySide QtGui classes compatible with PyQt5.QtGui are
12+
exposed here. Therefore, you need to treat/use this package as if it were
13+
the ``PyQt5.QtGui`` module.
14+
"""
15+
16+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
17+
18+
19+
if PYQT5:
20+
from PyQt5.QtGui import *
21+
elif PYQT4:
22+
from PyQt4.Qt import QKeySequence, QTextCursor
23+
from PyQt4.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap,
24+
QBrush, QClipboard, QCloseEvent, QColor,
25+
QConicalGradient, QContextMenuEvent, QCursor,
26+
QDesktopServices, QDoubleValidator, QDrag,
27+
QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent,
28+
QDropEvent, QFileOpenEvent, QFocusEvent, QFont,
29+
QFontDatabase, QFontInfo, QFontMetrics,
30+
QFontMetricsF, QGlyphRun, QGradient, QHelpEvent,
31+
QHideEvent, QHoverEvent, QIcon, QIconDragEvent,
32+
QIconEngine, QImage, QImageIOHandler, QImageReader,
33+
QImageWriter, QInputEvent, QInputMethodEvent,
34+
QKeyEvent, QLinearGradient,
35+
QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2,
36+
QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3,
37+
QMatrix4x4, QMouseEvent, QMoveEvent, QMovie,
38+
QPaintDevice, QPaintEngine, QPaintEngineState,
39+
QPaintEvent, QPainter, QPainterPath,
40+
QPainterPathStroker, QPalette, QPen, QPicture,
41+
QPictureIO, QPixmap, QPixmapCache, QPolygon,
42+
QPolygonF, QQuaternion, QRadialGradient, QRawFont,
43+
QRegExpValidator, QRegion, QResizeEvent,
44+
QSessionManager, QShortcutEvent, QShowEvent,
45+
QStandardItem, QStandardItemModel, QStaticText,
46+
QStatusTipEvent, QSyntaxHighlighter, QTabletEvent,
47+
QTextBlock, QTextBlockFormat, QTextBlockGroup,
48+
QTextBlockUserData, QTextCharFormat,
49+
QTextDocument, QTextDocumentFragment,
50+
QTextDocumentWriter, QTextFormat, QTextFragment,
51+
QTextFrame, QTextFrameFormat, QTextImageFormat,
52+
QTextInlineObject, QTextItem, QTextLayout,
53+
QTextLength, QTextLine, QTextList, QTextListFormat,
54+
QTextObject, QTextObjectInterface, QTextOption,
55+
QTextTable, QTextTableCell, QTextTableCellFormat,
56+
QTextTableFormat, QTouchEvent, QTransform,
57+
QValidator, QVector2D, QVector3D, QVector4D,
58+
QWhatsThisClickedEvent, QWheelEvent,
59+
QWindowStateChangeEvent, qAlpha, qBlue,
60+
qFuzzyCompare, qGray, qGreen, qIsGray, qRed, qRgb,
61+
qRgba, QIntValidator)
62+
elif PYSIDE:
63+
from PySide.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap,
64+
QBrush, QClipboard, QCloseEvent, QColor,
65+
QConicalGradient, QContextMenuEvent, QCursor,
66+
QDesktopServices, QDoubleValidator, QDrag,
67+
QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent,
68+
QDropEvent, QFileOpenEvent, QFocusEvent, QFont,
69+
QFontDatabase, QFontInfo, QFontMetrics,
70+
QFontMetricsF, QGradient, QHelpEvent,
71+
QHideEvent, QHoverEvent, QIcon, QIconDragEvent,
72+
QIconEngine, QImage, QImageIOHandler, QImageReader,
73+
QImageWriter, QInputEvent, QInputMethodEvent,
74+
QKeyEvent, QKeySequence, QLinearGradient,
75+
QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2,
76+
QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3,
77+
QMatrix4x4, QMouseEvent, QMoveEvent, QMovie,
78+
QPaintDevice, QPaintEngine, QPaintEngineState,
79+
QPaintEvent, QPainter, QPainterPath,
80+
QPainterPathStroker, QPalette, QPen, QPicture,
81+
QPictureIO, QPixmap, QPixmapCache, QPolygon,
82+
QPolygonF, QQuaternion, QRadialGradient,
83+
QRegExpValidator, QRegion, QResizeEvent,
84+
QSessionManager, QShortcutEvent, QShowEvent,
85+
QStandardItem, QStandardItemModel,
86+
QStatusTipEvent, QSyntaxHighlighter, QTabletEvent,
87+
QTextBlock, QTextBlockFormat, QTextBlockGroup,
88+
QTextBlockUserData, QTextCharFormat, QTextCursor,
89+
QTextDocument, QTextDocumentFragment,
90+
QTextFormat, QTextFragment,
91+
QTextFrame, QTextFrameFormat, QTextImageFormat,
92+
QTextInlineObject, QTextItem, QTextLayout,
93+
QTextLength, QTextLine, QTextList, QTextListFormat,
94+
QTextObject, QTextObjectInterface, QTextOption,
95+
QTextTable, QTextTableCell, QTextTableCellFormat,
96+
QTextTableFormat, QTouchEvent, QTransform,
97+
QValidator, QVector2D, QVector3D, QVector4D,
98+
QWhatsThisClickedEvent, QWheelEvent,
99+
QWindowStateChangeEvent, qAlpha, qBlue,
100+
qGray, qGreen, qIsGray, qRed, qRgb, qRgba,
101+
QIntValidator)
102+
else:
103+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 13 additions & 0 deletions
< 8000 /tr>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from . import PYQT5
2+
from . import PYQT4
3+
from . import PYSIDE
4+
5+
6+
if PYQT5:
7+
from PyQt5.QtMultimedia import *
8+
elif PYQT4:
9+
from PyQt4.QtMultimedia import *
10+
from PyQt4.QtGui import QSound
11+
elif PYSIDE:
12+
from PySide.QtMultimedia import *
13+
from PySide.QtGui import QSound

winpython/_vendor/qtpy/QtNetwork.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtNetwork classes and functions.
11+
"""
12+
13+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
if PYQT5:
17+
from PyQt5.QtNetwork import *
18+
elif PYQT4:
19+
from PyQt4.QtNetwork import *
20+
elif PYSIDE:
21+
from PySide.QtNetwork import *
22+
else:
23+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2009- The Spyder Development Team
4+
#
5+
# Licensed under the terms of the MIT License
6+
# (see LICENSE.txt for details)
7+
8+
"""
9+
Provides QtPrintSupport classes and functions.
10+
"""
11+
12+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
13+
14+
15+
if PYQT5:
16+
from PyQt5.QtPrintSupport import *
17+
elif PYQT4:
18+
from PyQt4.QtGui import (QAbstractPrintDialog, QPageSetupDialog,
19+
QPrintDialog, QPrintEngine, QPrintPreviewDialog,
20+
QPrintPreviewWidget, QPrinter, QPrinterInfo)
21+
elif PYSIDE:
22+
from PySide.QtGui import (QAbstractPrintDialog, QPageSetupDialog,
23+
QPrintDialog, QPrintEngine, QPrintPreviewDialog,
24+
QPrintPreviewWidget, QPrinter, QPrinterInfo)
25+
else:
26+
raise PythonQtError('No Qt bindings could be found')

winpython/_vendor/qtpy/QtSvg.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# -----------------------------------------------------------------------------
3+
# Copyright © 2009- The Spyder Development Team
4+
#
5+
# Licensed under the terms of the MIT License
6+
# (see LICENSE.txt for details)
7+
# -----------------------------------------------------------------------------
8+
"""Provides QtSvg classes and functions."""
9+
10+
# Local imports
11+
from . import PYQT4, PYQT5, PYSIDE, PythonQtError
12+
13+
if PYQT5:
14+
from PyQt5.QtSvg import *
15+
elif PYQT4:
16+
from PyQt4.QtSvg import *
17+
elif PYSIDE:
18+
from PySide.QtSvg import *
19+
else:
20+
raise PythonQtError('No Qt bindings could be found')
21+
22+
del PYQT4, PYQT5, PYSIDE

winpython/_vendor/qtpy/QtTest.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder Developmet Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtTest and functions
11+
"""
12+
13+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
if PYQT5:
17+
from PyQt5.QtTest import QTest
18+
elif PYQT4:
19+
from PyQt4.QtTest import QTest as OldQTest
20+
21+
class QTest(OldQTest):
22+
@staticmethod
23+
def qWaitForWindowActive(QWidget):
24+
OldQTest.qWaitForWindowShown(QWidget)
25+
elif PYSIDE:
26+
from PySide.QtTest import QTest
27+
else:
28+
raise PythonQtError('No Qt bindings could be found')
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright © 2014-2015 Colin Duquesnoy
4+
# Copyright © 2009- The Spyder development Team
5+
#
6+
# Licensed under the terms of the MIT License
7+
# (see LICENSE.txt for details)
8+
9+
"""
10+
Provides QtWebEngineWidgets classes and functions.
11+
"""
12+
13+
from . import PYQT5, PYQT4, PYSIDE, PythonQtError
14+
15+
16+
# To test if we are using WebEngine or WebKit
17+
WEBENGINE = True
18+
19+
20+
if PYQT5:
21+
try:
22+
from PyQt5.QtWebEngineWidgets import QWebEnginePage
23+
from PyQt5.QtWebEngineWidgets import QWebEngineView
24+
from PyQt5.QtWebEngineWidgets import QWebEngineSettings
25+
except ImportError:
26+
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
27+
from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView
28+
from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings
29+
WEBENGINE = False
30+
elif PYQT4:
31+
from PyQt4.QtWebKit import QWebPage as QWebEnginePage
32+
from PyQt4.QtWebKit import QWebView as QWebEngineView
33+
from PyQt4.QtWebKit import QWebSettings as QWebEngineSettings
34+
WEBENGINE = False
35+
elif PYSIDE:
36+
from PySide.QtWebKit import QWebPage as QWebEnginePage
37+
from PySide.QtWebKit import QWebView as QWebEngineView
38+
from PySide.QtWebKit import QWebSettings as QWebEngineSettings
39+
WEBENGINE = False
40+
else:
41+
raise PythonQtError('No Qt bindings could be found')

0 commit comments

Comments
 (0)
0