Warning, file /include/QtGui/qscreen.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QSCREEN_H
0005 #define QSCREEN_H
0006
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtCore/QList>
0009 #include <QtCore/QObject>
0010 #include <QtCore/QRect>
0011 #include <QtCore/QSize>
0012 #include <QtCore/QSizeF>
0013
0014 #include <QtGui/QTransform>
0015
0016 #include <QtCore/qnamespace.h>
0017 #include <QtCore/qnativeinterface.h>
0018
0019 QT_BEGIN_NAMESPACE
0020
0021
0022 class QPlatformScreen;
0023 class QScreenPrivate;
0024 class QWindow;
0025 class QRect;
0026 class QPixmap;
0027 #ifndef QT_NO_DEBUG_STREAM
0028 class QDebug;
0029 #endif
0030
0031 class Q_GUI_EXPORT QScreen : public QObject
0032 {
0033 Q_OBJECT
0034 Q_DECLARE_PRIVATE(QScreen)
0035
0036 Q_PROPERTY(QString name READ name CONSTANT)
0037 Q_PROPERTY(QString manufacturer READ manufacturer CONSTANT)
0038 Q_PROPERTY(QString model READ model CONSTANT)
0039 Q_PROPERTY(QString serialNumber READ serialNumber CONSTANT)
0040 Q_PROPERTY(int depth READ depth CONSTANT)
0041 Q_PROPERTY(QSize size READ size NOTIFY geometryChanged)
0042 Q_PROPERTY(QSize availableSize READ availableSize NOTIFY availableGeometryChanged)
0043 Q_PROPERTY(QSize virtualSize READ virtualSize NOTIFY virtualGeometryChanged)
0044 Q_PROPERTY(QSize availableVirtualSize READ availableVirtualSize NOTIFY virtualGeometryChanged)
0045 Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged)
0046 Q_PROPERTY(QRect availableGeometry READ availableGeometry NOTIFY availableGeometryChanged)
0047 Q_PROPERTY(QRect virtualGeometry READ virtualGeometry NOTIFY virtualGeometryChanged)
0048 Q_PROPERTY(QRect availableVirtualGeometry READ availableVirtualGeometry
0049 NOTIFY virtualGeometryChanged)
0050 Q_PROPERTY(QSizeF physicalSize READ physicalSize NOTIFY physicalSizeChanged)
0051 Q_PROPERTY(qreal physicalDotsPerInchX READ physicalDotsPerInchX
0052 NOTIFY physicalDotsPerInchChanged)
0053 Q_PROPERTY(qreal physicalDotsPerInchY READ physicalDotsPerInchY
0054 NOTIFY physicalDotsPerInchChanged)
0055 Q_PROPERTY(qreal physicalDotsPerInch READ physicalDotsPerInch NOTIFY physicalDotsPerInchChanged)
0056 Q_PROPERTY(qreal logicalDotsPerInchX READ logicalDotsPerInchX NOTIFY logicalDotsPerInchChanged)
0057 Q_PROPERTY(qreal logicalDotsPerInchY READ logicalDotsPerInchY NOTIFY logicalDotsPerInchChanged)
0058 Q_PROPERTY(qreal logicalDotsPerInch READ logicalDotsPerInch NOTIFY logicalDotsPerInchChanged)
0059 Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY physicalDotsPerInchChanged)
0060 Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation
0061 NOTIFY primaryOrientationChanged)
0062 Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged)
0063 Q_PROPERTY(Qt::ScreenOrientation nativeOrientation READ nativeOrientation)
0064 Q_PROPERTY(qreal refreshRate READ refreshRate NOTIFY refreshRateChanged)
0065
0066 public:
0067 ~QScreen();
0068 QPlatformScreen *handle() const;
0069
0070 QString name() const;
0071
0072 QString manufacturer() const;
0073 QString model() const;
0074 QString serialNumber() const;
0075
0076 int depth() const;
0077
0078 QSize size() const;
0079 QRect geometry() const;
0080
0081 QSizeF physicalSize() const;
0082
0083 qreal physicalDotsPerInchX() const;
0084 qreal physicalDotsPerInchY() const;
0085 qreal physicalDotsPerInch() const;
0086
0087 qreal logicalDotsPerInchX() const;
0088 qreal logicalDotsPerInchY() const;
0089 qreal logicalDotsPerInch() const;
0090
0091 qreal devicePixelRatio() const;
0092
0093 QSize availableSize() const;
0094 QRect availableGeometry() const;
0095
0096 QList<QScreen *> virtualSiblings() const;
0097 QScreen *virtualSiblingAt(QPoint point);
0098
0099 QSize virtualSize() const;
0100 QRect virtualGeometry() const;
0101
0102 QSize availableVirtualSize() const;
0103 QRect availableVirtualGeometry() const;
0104
0105 Qt::ScreenOrientation primaryOrientation() const;
0106 Qt::ScreenOrientation orientation() const;
0107 Qt::ScreenOrientation nativeOrientation() const;
0108
0109 int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const;
0110 QTransform transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target) const;
0111 QRect mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect) const;
0112
0113 bool isPortrait(Qt::ScreenOrientation orientation) const;
0114 bool isLandscape(Qt::ScreenOrientation orientation) const;
0115
0116 QPixmap grabWindow(WId window = 0, int x = 0, int y = 0, int w = -1, int h = -1);
0117
0118 qreal refreshRate() const;
0119
0120 QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QScreen)
0121
0122 Q_SIGNALS:
0123 void geometryChanged(const QRect &geometry);
0124 void availableGeometryChanged(const QRect &geometry);
0125 void physicalSizeChanged(const QSizeF &size);
0126 void physicalDotsPerInchChanged(qreal dpi);
0127 void logicalDotsPerInchChanged(qreal dpi);
0128 void virtualGeometryChanged(const QRect &rect);
0129 void primaryOrientationChanged(Qt::ScreenOrientation orientation);
0130 void orientationChanged(Qt::ScreenOrientation orientation);
0131 void refreshRateChanged(qreal refreshRate);
0132
0133 private:
0134 explicit QScreen(QPlatformScreen *screen);
0135
0136 Q_DISABLE_COPY(QScreen)
0137 friend class QGuiApplicationPrivate;
0138 friend class QPlatformIntegration;
0139 friend class QPlatformScreen;
0140 friend class QHighDpiScaling;
0141 friend class QWindowSystemInterface;
0142 };
0143
0144 #ifndef QT_NO_DEBUG_STREAM
0145 Q_GUI_EXPORT QDebug operator<<(QDebug, const QScreen *);
0146 #endif
0147
0148 QT_END_NAMESPACE
0149
0150 #include <QtGui/qscreen_platform.h>
0151
0152 #endif
0153