![]() ![]() This will flip the x and y dimensions of the rectangle rect if the orientation a is Qt::PortraitOrientation or Qt::InvertedPortraitOrientation and orientation b is Qt::LandscapeOrientation or Qt::InvertedLandscapeOrientation, or vice versa. Maps the rect between two screen orientations. QRect QScreen:: mapBetween( Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect & rect) const Qt::PrimaryOrientation is interpreted as the screen's primaryOrientation(). bool QScreen:: isPortrait( Qt::ScreenOrientation o) constĬonvenience function that returns true if o is either portrait or inverted portrait otherwise returns false. bool QScreen:: isLandscape( Qt::ScreenOrientation o) constĬonvenience function that returns true if o is either landscape or inverted landscape otherwise returns false. QPlatformScreen *QScreen:: handle() const This depends on the underlying window system. Warning: In general, grabbing an area outside the screen is not safe. The rationale for using a window identifier and not a QWidget, is to enable grabbing of windows that are not part of the application, window system frames, and so on. The window system identifier ( WId) can be retrieved using the QWidget::winId() function. Call QPixmap::devicePixelRatio() to determine if this is the case. The returned pixmap may be larger than the requested size when grabbing from a high-DPI screen. The offset and size arguments are specified in device independent pixels. If height is negative, the function copies everything to the bottom of the window. If width is negative, the function copies everything to the right border of the window. The arguments ( x, y) specify the offset in the window, whereas ( width, height) specify the area to be copied. If window is 0, then the entire screen will be grabbed. QPixmap QScreen:: grabWindow( WId window = 0, int x = 0, int y = 0, int width = -1, int height = -1)Ĭreates and returns a pixmap constructed by grabbing the contents of the given window restricted by QRect( x, y, width, height). int QScreen:: angleBetween( Qt::ScreenOrientation a, Qt::ScreenOrientation b) constĬonvenience function to compute the angle of rotation to get from rotation a to rotation b. Member Function Documentation QScreen:: ~QScreen()ĭestroys the screen. TransformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect & target) const MapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect & rect) const IsPortrait(Qt::ScreenOrientation o) const IsLandscape(Qt::ScreenOrientation o) const GrabWindow(WId window = 0, int x = 0, int y = 0, int width = -1, int height = -1) AngleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |