QX11Info 类

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:: QX11Info ()

构造空的 QX11Info 对象。

QX11Info:: QX11Info (const QX11Info & other )

构造副本为 other .

QX11Info:: ~QX11Info ()

销毁 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.

另请参阅 display () 和 screen ().

[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 ().

int QX11Info:: cells () const

Returns the number of cells.

另请参阅 appCells ().

Qt::HANDLE QX11Info:: colormap () const

Returns a handle for the color map.

另请参阅 defaultColormap ().

bool QX11Info:: defaultColormap () const

Returns true if there is a default color map; otherwise returns false.

另请参阅 colormap ().

bool QX11Info:: defaultVisual () const

Returns true if there is a default visual; otherwise returns false.

另请参阅 visual () 和 appVisual ().

int QX11Info:: depth () const

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 引入。

int QX11Info:: screen () const

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 ().

void * QX11Info:: visual () const

Returns the current visual.

另请参阅 appVisual () 和 defaultVisual ().

QX11Info & QX11Info:: operator= (const QX11Info & other )

赋值 other 到此对象并返回此对象的引用。