|
| 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') |
0 commit comments