
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQX11Info class provides information about the X display configuration.More...
| Header: | #include <QX11Info> |
| QX11Info() | |
| QX11Info(const QX11Info & other) | |
| ~QX11Info() | |
| int | cells() const |
| Qt::HANDLE | colormap() const |
| bool | defaultColormap() const |
| bool | defaultVisual() const |
| int | depth() const |
| int | screen() const |
| void * | visual() const |
| QX11Info & | operator=(const QX11Info & other) |
| int | appCells(int screen = -1) |
| const char * | appClass() |
| Qt::HANDLE | appColormap(int screen = -1) |
| bool | appDefaultColormap(int screen = -1) |
| bool | appDefaultVisual(int screen = -1) |
| int | appDepth(int screen = -1) |
| int | appDpiX(int screen = -1) |
| int | appDpiY(int screen = -1) |
| Qt::HANDLE | appRootWindow(int screen = -1) |
| int | appScreen() |
| unsigned long | appTime() |
| unsigned long | appUserTime() |
| void * | appVisual(int screen = -1) |
| Display * | display() |
| bool | isCompositingManagerRunning() |
| void | setAppDpiX(int screen, int xdpi) |
| void | setAppDpiY(int screen, int ydpi) |
| void | setAppTime(unsigned long time) |
| void | setAppUserTime(unsigned long time) |
TheQX11Info class provides information about the X display configuration.
The class provides two APIs: a set of non-static functions that provide information about a specific widget or pixmap, and a set of static functions that provide the default information for the application.
Warning: This class is only available on X11. For querying per-screen information in a portable way, useQDesktopWidget.
See alsoQWidget::x11Info(),QPixmap::x11Info(), andQDesktopWidget.
Constructs an emptyQX11Info object.
Constructs a copy ofother.
Destroys theQX11Info object.
[static]int QX11Info::appCells(int screen = -1)Returns the number of cells used by the application on the givenscreen.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsocells().
[static]constchar * QX11Info::appClass()Returns the X11 application class.
See alsodisplay().
[static]Qt::HANDLE QX11Info::appColormap(int screen = -1)Returns a handle for the application's color map on the givenscreen.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsocolormap() anddefaultColormap().
[static]bool QX11Info::appDefaultColormap(int screen = -1)Returns true if the application has a default color map on the givenscreen; otherwise returns false.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
[static]bool QX11Info::appDefaultVisual(int screen = -1)Returns true if the application has a default visual on the givenscreen; otherwise returns false.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
[static]int QX11Info::appDepth(int screen = -1)Returns the color depth (bits per pixel) used by the application on the givenscreen.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsodepth().
[static]int QX11Info::appDpiX(int screen = -1)Returns the horizontal resolution of the givenscreen in terms of the number of dots per inch.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsosetAppDpiX() andappDpiY().
[static]int QX11Info::appDpiY(int screen = -1)Returns the vertical resolution of the givenscreen in terms of the number of dots per inch.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsosetAppDpiY() andappDpiX().
[static]Qt::HANDLE QX11Info::appRootWindow(int screen = -1)Returns a handle for the applications root window on the givenscreen.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsoQApplication::desktop().
[static]int QX11Info::appScreen()Returns the number of the screen where the application is being displayed.
See alsodisplay() andscreen().
[static]unsignedlong QX11Info::appTime()Returns the X11 time.
See alsosetAppTime() andappUserTime().
[static]unsignedlong QX11Info::appUserTime()Returns the X11 user time.
See alsosetAppUserTime() andappTime().
[static]void * QX11Info::appVisual(int screen = -1)Returns the current visual used by the application on the givenscreen.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsovisual() anddefaultVisual().
Returns the number of cells.
See alsoappCells().
Returns a handle for the color map.
See alsodefaultColormap().
Returns true if there is a default color map; otherwise returns false.
See alsocolormap().
Returns true if there is a default visual; otherwise returns false.
See alsovisual() andappVisual().
Returns the color depth (bits per pixel) of the X display.
See alsoappDepth().
[static]Display * QX11Info::display()Returns the default display for the application.
See alsoappScreen().
[static]bool QX11Info::isCompositingManagerRunning()Returns true if there is a compositing manager running.
This function was introduced in Qt 4.4.
Returns the number of the screen currently in use.
The return value is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsoappScreen().
[static]void QX11Info::setAppDpiX(int screen,int xdpi)Sets the horizontal resolution of the givenscreen to the number of dots per inch specified byxdpi.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsoappDpiX() andsetAppDpiY().
[static]void QX11Info::setAppDpiY(int screen,int ydpi)Sets the vertical resolution of the givenscreen to the number of dots per inch specified byydpi.
Thescreen argument is an X screen number. Be aware that if the user's system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. UseQDesktopWidget to query for information about Xinerama screens.
See alsoappDpiY() andsetAppDpiX().
[static]void QX11Info::setAppTime(unsignedlong time)Sets the X11 time to the value specified bytime.
See alsoappTime() andsetAppUserTime().
[static]void QX11Info::setAppUserTime(unsignedlong time)Sets the X11 user time as specified bytime.
See alsoappUserTime() andsetAppTime().
Returns the current visual.
See alsoappVisual() anddefaultVisual().
Assignsother to this object and returns a reference to this object.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.