The QX11Info class provides information about the X display configuration. 更多...
| 頭: | #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 ) |
The QX11Info 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.
警告: This class is only available on X11. For querying per-screen information in a portable way, use QDesktopWidget .
另請參閱 QWidget::x11Info (), QPixmap::x11Info (),和 QDesktopWidget .
構造空的 QX11Info 對象。
構造副本為 other .
銷毀 QX11Info 對象。
[static]
int
QX11Info::
appCells
(
int
screen
= -1)
Returns the number of cells used by the application 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.
另請參閱 cells ().
[static]
const
char
* QX11Info::
appClass
()
Returns the X11 application class.
另請參閱 display ().
[static]
Qt::HANDLE
QX11Info::
appColormap
(
int
screen
= -1)
Returns a handle for the application's color map 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.
另請參閱 colormap () 和 defaultColormap ().
[static]
bool
QX11Info::
appDefaultColormap
(
int
screen
= -1)
Returns true if the application has a default color map on the given screen ;否則返迴 false。
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.
[static]
bool
QX11Info::
appDefaultVisual
(
int
screen
= -1)
Returns true if the application has a default visual on the given screen ;否則返迴 false。
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.
[static]
int
QX11Info::
appDepth
(
int
screen
= -1)
Returns the color depth (bits per pixel) used by the application 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.
另請參閱 depth ().
[static]
int
QX11Info::
appDpiX
(
int
screen
= -1)
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.
另請參閱 setAppDpiX () 和 appDpiY ().
[static]
int
QX11Info::
appDpiY
(
int
screen
= -1)
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.
另請參閱 setAppDpiY () 和 appDpiX ().
[static]
Qt::HANDLE
QX11Info::
appRootWindow
(
int
screen
= -1)
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.
另請參閱 QApplication::desktop ().
[static]
int
QX11Info::
appScreen
()
Returns the number of the screen where the application is being displayed.
[static]
unsigned
long
QX11Info::
appTime
()
返迴 X11 時間。
另請參閱 setAppTime () 和 appUserTime ().
[static]
unsigned
long
QX11Info::
appUserTime
()
返迴 X11 用戶時間。
另請參閱 setAppUserTime () 和 appTime ().
[static]
void
* QX11Info::
appVisual
(
int
screen
= -1)
Returns the current visual used by the application 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.
另請參閱 visual () 和 defaultVisual ().
Returns the number of cells.
另請參閱 appCells ().
Returns a handle for the color map.
另請參閱 defaultColormap ().
Returns true if there is a default color map; otherwise returns false.
另請參閱 colormap ().
Returns true if there is a default visual; otherwise returns false.
另請參閱 visual () 和 appVisual ().
Returns the color depth (bits per pixel) of the X display.
另請參閱 appDepth ().
[static]
顯示
* QX11Info::
display
()
返迴應用程序的默認顯示。
另請參閱 appScreen ().
[static]
bool
QX11Info::
isCompositingManagerRunning
()
Returns true if there is a compositing manager running.
該函數在 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. Use QDesktopWidget to query for information about Xinerama screens.
另請參閱 appScreen ().
[static]
void
QX11Info::
setAppDpiX
(
int
screen
,
int
xdpi
)
Sets the horizontal resolution of the given screen to the number of dots per inch specified by xdpi .
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.
另請參閱 appDpiX () 和 setAppDpiY ().
[static]
void
QX11Info::
setAppDpiY
(
int
screen
,
int
ydpi
)
Sets the vertical resolution of the given screen to the number of dots per inch specified by ydpi .
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.
另請參閱 appDpiY () 和 setAppDpiX ().
[static]
void
QX11Info::
setAppTime
(
unsigned
long
time
)
Sets the X11 time to the value specified by time .
另請參閱 appTime () 和 setAppUserTime ().
[static]
void
QX11Info::
setAppUserTime
(
unsigned
long
time
)
Sets the X11 user time as specified by time .
另請參閱 appUserTime () 和 setAppTime ().
Returns the current visual.
另請參閱 appVisual () 和 defaultVisual ().
賦值 other 到此對象並返迴此對象的引用。