QX11Info Class
Provides information about the X display configuration. More...
#include <QX11Info>
This class was introduced in QtX11Extras 5.1.
Static Public Members
int | appDpiX(int screen = -1) |
int | appDpiY(int screen = -1) |
unsigned long | appRootWindow(int screen = -1) |
int | appScreen() |
unsigned long | appTime() |
unsigned long | appUserTime() |
xcb_connection_t * | connection() |
Display * | display() |
void | setAppTime(unsigned long time) |
void | setAppUserTime(unsigned long time) |
Detailed Description
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, use QDesktopWidget.
Member Function Documentation
int QX11Info::appDpiX(int screen = -1) [static]
Returns the horizontal resolution of the given screen in terms of the number of dots per inch.
The screen 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. Use QDesktopWidget to query for information about Xinerama screens.
See also setAppDpiX() and appDpiY().
int QX11Info::appDpiY(int screen = -1) [static]
Returns the vertical resolution of the given screen in terms of the number of dots per inch.
The screen 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. Use QDesktopWidget to query for information about Xinerama screens.
See also setAppDpiY() and appDpiX().
unsigned long QX11Info::appRootWindow(int screen = -1) [static]
Returns a handle for the applications root window on the given screen.
The screen 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. Use QDesktopWidget to query for information about Xinerama screens.
See also QApplication::desktop().
int QX11Info::appScreen() [static]
Returns the number of the screen where the application is being displayed.
See also display() and screen().
unsigned long QX11Info::appTime() [static]
Returns the X11 time.
See also setAppTime() and appUserTime().
unsigned long QX11Info::appUserTime() [static]
Returns the X11 user time.
See also setAppUserTime() and appTime().
xcb_connection_t * QX11Info::connection() [static]
Returns the default XCB connection for the application.
See also display().
Display * QX11Info::display() [static]
Returns the default display for the application.
See also appScreen().
void QX11Info::setAppTime(unsigned long time) [static]
Sets the X11 time to the value specified by time.
See also appTime() and setAppUserTime().
void QX11Info::setAppUserTime(unsigned long time) [static]
Sets the X11 user time as specified by time.
See also appUserTime() and setAppTime().