<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- qx11info_x11.cpp --> <head> <title>Qt 4.6: QX11Info Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <a name="//apple_ref/cpp/cl//QX11Info"></a> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QX11Info Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span> </h1> <p>The QX11Info class provides information about the X display configuration. <a href="#details">More...</a></p> <pre> #include <QX11Info></pre><ul> <li><a href="qx11info-members.html">List of all members, including inherited members</a></li> </ul> <hr /> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#QX11Info">QX11Info</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#QX11Info-2">QX11Info</a></b> ( const QX11Info & <i>other</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#dtor.QX11Info">~QX11Info</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#cells">cells</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#colormap">colormap</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#defaultColormap">defaultColormap</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#defaultVisual">defaultVisual</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#depth">depth</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#screen">screen</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#visual">visual</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QX11Info & </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#operator-eq">operator=</a></b> ( const QX11Info & <i>other</i> )</td></tr> </table> <hr /> <a name="static-public-members"></a> <h2>Static Public Members</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appCells">appCells</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appClass">appClass</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appColormap">appColormap</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appDefaultColormap">appDefaultColormap</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appDefaultVisual">appDefaultVisual</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appDepth">appDepth</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appDpiX">appDpiX</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appDpiY">appDpiY</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appRootWindow">appRootWindow</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appScreen">appScreen</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appTime">appTime</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appUserTime">appUserTime</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#appVisual">appVisual</a></b> ( int <i>screen</i> = -1 )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">Display * </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#display">display</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#isCompositingManagerRunning">isCompositingManagerRunning</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#setAppDpiX">setAppDpiX</a></b> ( int <i>screen</i>, int <i>xdpi</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#setAppDpiY">setAppDpiY</a></b> ( int <i>screen</i>, int <i>ydpi</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#setAppTime">setAppTime</a></b> ( unsigned long <i>time</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11info.html#setAppUserTime">setAppUserTime</a></b> ( unsigned long <i>time</i> )</td></tr> </table> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The QX11Info class provides information about the X display configuration.</p> <p>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.</p> <p><b>Warning:</b> This class is only available on X11. For querying per-screen information in a portable way, use <a href="qdesktopwidget.html">QDesktopWidget</a>.</p> <p>See also <a href="qwidget.html#x11Info">QWidget::x11Info</a>(), <a href="qpixmap.html#x11Info">QPixmap::x11Info</a>(), and <a href="qdesktopwidget.html">QDesktopWidget</a>.</p> <hr /> <h2>Member Function Documentation</h2> <a name="//apple_ref/cpp/instm/QX11Info/QX11Info"></a> <h3 class="fn"><a name="QX11Info"></a>QX11Info::QX11Info ()</h3> <p>Constructs an empty <a href="qx11info.html">QX11Info</a> object.</p> <h3 class="fn"><a name="QX11Info-2"></a>QX11Info::QX11Info ( const QX11Info & <i>other</i> )</h3> <p>Constructs a copy of <i>other</i>.</p> <a name="//apple_ref/cpp/instm/QX11Info/~QX11Info"></a> <h3 class="fn"><a name="dtor.QX11Info"></a>QX11Info::~QX11Info ()</h3> <p>Destroys the <a href="qx11info.html">QX11Info</a> object.</p> <a name="//apple_ref/cpp/clm/QX11Info/appCells"></a> <h3 class="fn"><a name="appCells"></a>int QX11Info::appCells ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns the number of cells used by the application on the given <i>screen</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#cells">cells</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appClass"></a> <h3 class="fn"><a name="appClass"></a>const char * QX11Info::appClass () <tt> [static]</tt></h3> <p>Returns the X11 application class.</p> <p>See also <a href="qx11info.html#display">display</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appColormap"></a> <h3 class="fn"><a name="appColormap"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QX11Info::appColormap ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns a handle for the application's color map on the given <i>screen</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#colormap">colormap</a>() and <a href="qx11info.html#defaultColormap">defaultColormap</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appDefaultColormap"></a> <h3 class="fn"><a name="appDefaultColormap"></a>bool QX11Info::appDefaultColormap ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns true if the application has a default color map on the given <i>screen</i>; otherwise returns false.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <a name="//apple_ref/cpp/clm/QX11Info/appDefaultVisual"></a> <h3 class="fn"><a name="appDefaultVisual"></a>bool QX11Info::appDefaultVisual ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns true if the application has a default visual on the given <i>screen</i>; otherwise returns false.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <a name="//apple_ref/cpp/clm/QX11Info/appDepth"></a> <h3 class="fn"><a name="appDepth"></a>int QX11Info::appDepth ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns the color depth (bits per pixel) used by the application on the given <i>screen</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#depth">depth</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appDpiX"></a> <h3 class="fn"><a name="appDpiX"></a>int QX11Info::appDpiX ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns the horizontal resolution of the given <i>screen</i> in terms of the number of dots per inch.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#setAppDpiX">setAppDpiX</a>() and <a href="qx11info.html#appDpiY">appDpiY</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appDpiY"></a> <h3 class="fn"><a name="appDpiY"></a>int QX11Info::appDpiY ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns the vertical resolution of the given <i>screen</i> in terms of the number of dots per inch.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#setAppDpiY">setAppDpiY</a>() and <a href="qx11info.html#appDpiX">appDpiX</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appRootWindow"></a> <h3 class="fn"><a name="appRootWindow"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QX11Info::appRootWindow ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns a handle for the applications root window on the given <i>screen</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qapplication.html#desktop">QApplication::desktop</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appScreen"></a> <h3 class="fn"><a name="appScreen"></a>int QX11Info::appScreen () <tt> [static]</tt></h3> <p>Returns the number of the screen where the application is being displayed.</p> <p>See also <a href="qx11info.html#display">display</a>() and <a href="qx11info.html#screen">screen</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appTime"></a> <h3 class="fn"><a name="appTime"></a>unsigned long QX11Info::appTime () <tt> [static]</tt></h3> <p>Returns the X11 time.</p> <p>See also <a href="qx11info.html#setAppTime">setAppTime</a>() and <a href="qx11info.html#appUserTime">appUserTime</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appUserTime"></a> <h3 class="fn"><a name="appUserTime"></a>unsigned long QX11Info::appUserTime () <tt> [static]</tt></h3> <p>Returns the X11 user time.</p> <p>See also <a href="qx11info.html#setAppUserTime">setAppUserTime</a>() and <a href="qx11info.html#appTime">appTime</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/appVisual"></a> <h3 class="fn"><a name="appVisual"></a>void * QX11Info::appVisual ( int <i>screen</i> = -1 ) <tt> [static]</tt></h3> <p>Returns the current visual used by the application on the given <i>screen</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#visual">visual</a>() and <a href="qx11info.html#defaultVisual">defaultVisual</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/cells"></a> <h3 class="fn"><a name="cells"></a>int QX11Info::cells () const</h3> <p>Returns the number of cells.</p> <p>See also <a href="qx11info.html#appCells">appCells</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/colormap"></a> <h3 class="fn"><a name="colormap"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QX11Info::colormap () const</h3> <p>Returns a handle for the color map.</p> <p>See also <a href="qx11info.html#defaultColormap">defaultColormap</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/defaultColormap"></a> <h3 class="fn"><a name="defaultColormap"></a>bool QX11Info::defaultColormap () const</h3> <p>Returns true if there is a default color map; otherwise returns false.</p> <p>See also <a href="qx11info.html#colormap">colormap</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/defaultVisual"></a> <h3 class="fn"><a name="defaultVisual"></a>bool QX11Info::defaultVisual () const</h3> <p>Returns true if there is a default visual; otherwise returns false.</p> <p>See also <a href="qx11info.html#visual">visual</a>() and <a href="qx11info.html#appVisual">appVisual</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/depth"></a> <h3 class="fn"><a name="depth"></a>int QX11Info::depth () const</h3> <p>Returns the color depth (bits per pixel) of the X display.</p> <p>See also <a href="qx11info.html#appDepth">appDepth</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/display"></a> <h3 class="fn"><a name="display"></a>Display * QX11Info::display () <tt> [static]</tt></h3> <p>Returns the default display for the application.</p> <p>See also <a href="qx11info.html#appScreen">appScreen</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/isCompositingManagerRunning"></a> <h3 class="fn"><a name="isCompositingManagerRunning"></a>bool QX11Info::isCompositingManagerRunning () <tt> [static]</tt></h3> <p>Returns true if there is a compositing manager running.</p> <p>This function was introduced in Qt 4.4.</p> <a name="//apple_ref/cpp/instm/QX11Info/screen"></a> <h3 class="fn"><a name="screen"></a>int QX11Info::screen () const</h3> <p>Returns the number of the screen currently in use.</p> <p>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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#appScreen">appScreen</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/setAppDpiX"></a> <h3 class="fn"><a name="setAppDpiX"></a>void QX11Info::setAppDpiX ( int <i>screen</i>, int <i>xdpi</i> ) <tt> [static]</tt></h3> <p>Sets the horizontal resolution of the given <i>screen</i> to the number of dots per inch specified by <i>xdpi</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#appDpiX">appDpiX</a>() and <a href="qx11info.html#setAppDpiY">setAppDpiY</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/setAppDpiY"></a> <h3 class="fn"><a name="setAppDpiY"></a>void QX11Info::setAppDpiY ( int <i>screen</i>, int <i>ydpi</i> ) <tt> [static]</tt></h3> <p>Sets the vertical resolution of the given <i>screen</i> to the number of dots per inch specified by <i>ydpi</i>.</p> <p>The <i>screen</i> 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 <a href="qdesktopwidget.html">QDesktopWidget</a> to query for information about Xinerama screens.</p> <p>See also <a href="qx11info.html#appDpiY">appDpiY</a>() and <a href="qx11info.html#setAppDpiX">setAppDpiX</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/setAppTime"></a> <h3 class="fn"><a name="setAppTime"></a>void QX11Info::setAppTime ( unsigned long <i>time</i> ) <tt> [static]</tt></h3> <p>Sets the X11 time to the value specified by <i>time</i>.</p> <p>See also <a href="qx11info.html#appTime">appTime</a>() and <a href="qx11info.html#setAppUserTime">setAppUserTime</a>().</p> <a name="//apple_ref/cpp/clm/QX11Info/setAppUserTime"></a> <h3 class="fn"><a name="setAppUserTime"></a>void QX11Info::setAppUserTime ( unsigned long <i>time</i> ) <tt> [static]</tt></h3> <p>Sets the X11 user time as specified by <i>time</i>.</p> <p>See also <a href="qx11info.html#appUserTime">appUserTime</a>() and <a href="qx11info.html#setAppTime">setAppTime</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/visual"></a> <h3 class="fn"><a name="visual"></a>void * QX11Info::visual () const</h3> <p>Returns the current visual.</p> <p>See also <a href="qx11info.html#appVisual">appVisual</a>() and <a href="qx11info.html#defaultVisual">defaultVisual</a>().</p> <a name="//apple_ref/cpp/instm/QX11Info/operator="></a> <h3 class="fn"><a name="operator-eq"></a>QX11Info & QX11Info::operator= ( const QX11Info & <i>other</i> )</h3> <p>Assigns <i>other</i> to this object and returns a reference to this object.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td> <td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="40%" align="right"><div align="right">Qt 4.6.3</div></td> </tr></table></div></address></body> </html>