Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6607

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsystemtrayicon.cpp -->
  <title>Qt 4.8: QSystemTrayIcon Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QSystemTrayIcon</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QSystemTrayIcon Class Reference</h1>
<!-- $$$QSystemTrayIcon-brief -->
<p>The QSystemTrayIcon class provides an icon for an application in the system tray. <a href="#details">More...</a></p>
<!-- @@@QSystemTrayIcon -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSystemTrayIcon&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qsystemtrayicon-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#ActivationReason-enum">ActivationReason</a></b> { Unknown, Context, DoubleClick, Trigger, MiddleClick }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#MessageIcon-enum">MessageIcon</a></b> { NoIcon, Information, Warning, Critical }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qsystemtrayicon.html#icon-prop">icon</a></b> : QIcon</li>
<li class="fn"><b><a href="qsystemtrayicon.html#toolTip-prop">toolTip</a></b> : QString</li>
<li class="fn"><b><a href="qsystemtrayicon.html#visible-prop">visible</a></b> : bool</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#QSystemTrayIcon">QSystemTrayIcon</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#QSystemTrayIcon-2">QSystemTrayIcon</a></b> ( const QIcon &amp; <i>icon</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#dtor.QSystemTrayIcon">~QSystemTrayIcon</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenu * </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#contextMenu">contextMenu</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#geometry">geometry</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#icon-prop">icon</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#visible-prop">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#setContextMenu">setContextMenu</a></b> ( QMenu * <i>menu</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#icon-prop">setIcon</a></b> ( const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#toolTip-prop">setToolTip</a></b> ( const QString &amp; <i>tip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#showMessage">showMessage</a></b> ( const QString &amp; <i>title</i>, const QString &amp; <i>message</i>, MessageIcon <i>icon</i> = Information, int <i>millisecondsTimeoutHint</i> = 10000 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#toolTip-prop">toolTip</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#hide">hide</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#visible-prop">setVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#show">show</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#activated">activated</a></b> ( QSystemTrayIcon::ActivationReason <i>reason</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#messageClicked">messageClicked</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#isSystemTrayAvailable">isSystemTrayAvailable</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#supportsMessages">supportsMessages</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qsystemtrayicon.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QSystemTrayIcon-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSystemTrayIcon class provides an icon for an application in the system tray.</p>
<p>Modern operating systems usually provide a special area on the desktop, called the <i>system tray</i> or <i>notification area</i>, where long-running applications can display icons and short messages.</p>
<p class="centerAlign"><img src="images/system-tray.png" alt="The system tray on Windows XP." /></p><p>The QSystemTrayIcon class can be used on the following platforms:</p>
<ul>
<li>All supported versions of Windows.</li>
<li>All window managers for X11 that implement the <a href="http://www.freedesktop.org/">freedesktop.org</a> system tray specification, including recent versions of KDE and GNOME.</li>
<li>All supported versions of Mac OS X. Note that the Growl notification system must be installed for <a href="qsystemtrayicon.html#showMessage">QSystemTrayIcon::showMessage</a>() to display messages.</li>
</ul>
<p>To check whether a system tray is present on the user's desktop, call the <a href="qsystemtrayicon.html#isSystemTrayAvailable">QSystemTrayIcon::isSystemTrayAvailable</a>() static function.</p>
<p>To add a system tray entry, create a QSystemTrayIcon object, call <a href="qsystemtrayicon.html#setContextMenu">setContextMenu</a>() to provide a context menu for the icon, and call <a href="qsystemtrayicon.html#show">show</a>() to make it visible in the system tray. Status notification messages (&quot;balloon messages&quot;) can be displayed at any time using <a href="qsystemtrayicon.html#showMessage">showMessage</a>().</p>
<p>If the system tray is unavailable when a system tray icon is constructed, but becomes available later, QSystemTrayIcon will automatically add an entry for the application in the system tray if the icon is <a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<p>The <a href="qsystemtrayicon.html#activated">activated</a>() signal is emitted when the user activates the icon.</p>
<p>Only on X11, when a tooltip is requested, the QSystemTrayIcon receives a <a href="qhelpevent.html">QHelpEvent</a> of type <a href="qevent.html#Type-enum">QEvent::ToolTip</a>. Additionally, the QSystemTrayIcon receives wheel events of type <a href="qevent.html#Type-enum">QEvent::Wheel</a>. These are not supported on any other platform.</p>
</div>
<p><b>See also </b><a href="qdesktopservices.html">QDesktopServices</a>, <a href="qdesktopwidget.html">QDesktopWidget</a>, <a href="desktop-integration.html">Desktop Integration</a>, and <a href="desktop-systray.html">System Tray Icon Example</a>.</p>
<!-- @@@QSystemTrayIcon -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ActivationReason$$$Unknown$$$Context$$$DoubleClick$$$Trigger$$$MiddleClick -->
<h3 class="fn"><a name="ActivationReason-enum"></a>enum QSystemTrayIcon::<span class="name">ActivationReason</span></h3>
<p>This enum describes the reason the system tray was activated.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Unknown</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Unknown reason</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Context</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The context menu for the system tray entry was requested</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::DoubleClick</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The system tray entry was double clicked</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Trigger</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The system tray entry was clicked</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::MiddleClick</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The system tray entry was clicked with the middle mouse button</td></tr>
</table>
<p><b>See also </b><a href="qsystemtrayicon.html#activated">activated</a>().</p>
<!-- @@@ActivationReason -->
<!-- $$$MessageIcon$$$NoIcon$$$Information$$$Warning$$$Critical -->
<h3 class="fn"><a name="MessageIcon-enum"></a>enum QSystemTrayIcon::<span class="name">MessageIcon</span></h3>
<p>This enum describes the icon that is shown when a balloon message is displayed.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::NoIcon</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No icon is shown.</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Information</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">An information icon is shown.</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Warning</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">A standard warning icon is shown.</td></tr>
<tr><td class="topAlign"><tt>QSystemTrayIcon::Critical</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">A critical warning icon is shown.</td></tr>
</table>
<p><b>See also </b><a href="qmessagebox.html">QMessageBox</a>.</p>
<!-- @@@MessageIcon -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$icon-prop$$$icon$$$setIconconstQIcon& -->
<h3 class="fn"><a name="icon-prop"></a><span class="name">icon</span> : <span class="type"><a href="qicon.html">QIcon</a></span></h3>
<p>This property holds the system tray icon.</p>
<p>On Windows, the system tray icon size is 16x16; on X11, the preferred size is 22x22. The icon will be scaled to the appropriate size as necessary.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QIcon </td><td class="memItemRight bottomAlign"><span class="name"><b>icon</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIcon</b></span> ( const QIcon &amp; <i>icon</i> )</td></tr>
</table>
<!-- @@@icon -->
<!-- $$$toolTip-prop$$$toolTip$$$setToolTipconstQString& -->
<h3 class="fn"><a name="toolTip-prop"></a><span class="name">toolTip</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the tooltip for the system tray entry.</p>
<p>On some systems, the tooltip's length is limited. The tooltip will be truncated if necessary.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>toolTip</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setToolTip</b></span> ( const QString &amp; <i>tip</i> )</td></tr>
</table>
<!-- @@@toolTip -->
<!-- $$$visible-prop$$$isVisible$$$setVisiblebool -->
<h3 class="fn"><a name="visible-prop"></a><span class="name">visible</span> : <span class="type">bool</span></h3>
<p>This property holds whether the system tray entry is visible.</p>
<p>Setting this property to true or calling <a href="qsystemtrayicon.html#show">show</a>() makes the system tray icon visible; setting this property to false or calling <a href="qsystemtrayicon.html#hide">hide</a>() hides it.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isVisible</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVisible</b></span> ( bool <i>visible</i> )</td></tr>
</table>
<!-- @@@visible -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSystemTrayIcon[overload1]$$$QSystemTrayIconQObject* -->
<h3 class="fn"><a name="QSystemTrayIcon"></a>QSystemTrayIcon::<span class="name">QSystemTrayIcon</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsystemtrayicon.html">QSystemTrayIcon</a> object with the given <i>parent</i>.</p>
<p>The icon is initially invisible.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@QSystemTrayIcon -->
<!-- $$$QSystemTrayIcon$$$QSystemTrayIconconstQIcon&QObject* -->
<h3 class="fn"><a name="QSystemTrayIcon-2"></a>QSystemTrayIcon::<span class="name">QSystemTrayIcon</span> ( const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qsystemtrayicon.html">QSystemTrayIcon</a> object with the given <i>icon</i> and <i>parent</i>.</p>
<p>The icon is initially invisible.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@QSystemTrayIcon -->
<!-- $$$~QSystemTrayIcon[overload1]$$$~QSystemTrayIcon -->
<h3 class="fn"><a name="dtor.QSystemTrayIcon"></a>QSystemTrayIcon::<span class="name">~QSystemTrayIcon</span> ()</h3>
<p>Removes the icon from the system tray and frees all allocated resources.</p>
<!-- @@@~QSystemTrayIcon -->
<!-- $$$activated[overload1]$$$activatedQSystemTrayIcon::ActivationReason -->
<h3 class="fn"><a name="activated"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">activated</span> ( <span class="type"><a href="qsystemtrayicon.html#ActivationReason-enum">QSystemTrayIcon::ActivationReason</a></span> <i>reason</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user activates the system tray icon. <i>reason</i> specifies the reason for activation. <a href="qsystemtrayicon.html#ActivationReason-enum">QSystemTrayIcon::ActivationReason</a> enumerates the various reasons.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#ActivationReason-enum">QSystemTrayIcon::ActivationReason</a>.</p>
<!-- @@@activated -->
<!-- $$$contextMenu[overload1]$$$contextMenu -->
<h3 class="fn"><a name="contextMenu"></a><span class="type"><a href="qmenu.html">QMenu</a></span> * QSystemTrayIcon::<span class="name">contextMenu</span> () const</h3>
<p>Returns the current context menu for the system tray entry.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#setContextMenu">setContextMenu</a>().</p>
<!-- @@@contextMenu -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QSystemTrayIcon::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$geometry[overload1]$$$geometry -->
<h3 class="fn"><a name="geometry"></a><span class="type"><a href="qrect.html">QRect</a></span> QSystemTrayIcon::<span class="name">geometry</span> () const</h3>
<p>Returns the geometry of the system tray icon in screen coordinates.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@geometry -->
<!-- $$$hide[overload1]$$$hide -->
<h3 class="fn"><a name="hide"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">hide</span> ()<tt> [slot]</tt></h3>
<p>Hides the system tray entry.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#show">show</a>() and <a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@hide -->
<!-- $$$isSystemTrayAvailable[overload1]$$$isSystemTrayAvailable -->
<h3 class="fn"><a name="isSystemTrayAvailable"></a><span class="type">bool</span> QSystemTrayIcon::<span class="name">isSystemTrayAvailable</span> ()<tt> [static]</tt></h3>
<p>Returns true if the system tray is available; otherwise returns false.</p>
<p>If the system tray is currently unavailable but becomes available later, <a href="qsystemtrayicon.html">QSystemTrayIcon</a> will automatically add an entry in the system tray if it is <a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@isSystemTrayAvailable -->
<!-- $$$messageClicked[overload1]$$$messageClicked -->
<h3 class="fn"><a name="messageClicked"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">messageClicked</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the message displayed using <a href="qsystemtrayicon.html#showMessage">showMessage</a>() was clicked by the user.</p>
<p>Currently this signal is not sent on Mac OS X.</p>
<p><b>Note:</b> We follow Microsoft Windows XP/Vista behavior, so the signal is also emitted when the user clicks on a tray icon with a balloon message displayed.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#activated">activated</a>().</p>
<!-- @@@messageClicked -->
<!-- $$$setContextMenu[overload1]$$$setContextMenuQMenu* -->
<h3 class="fn"><a name="setContextMenu"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">setContextMenu</span> ( <span class="type"><a href="qmenu.html">QMenu</a></span> * <i>menu</i> )</h3>
<p>Sets the specified <i>menu</i> to be the context menu for the system tray icon.</p>
<p>The menu will pop up when the user requests the context menu for the system tray icon by clicking the mouse button.</p>
<p>On Mac OS X, this is currenly converted to a NSMenu, so the aboutToHide() signal is not emitted.</p>
<p><b>Note:</b> The system tray icon does not take ownership of the menu. You must ensure that it is deleted at the appropriate time by, for example, creating the menu with a suitable parent object.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#contextMenu">contextMenu</a>().</p>
<!-- @@@setContextMenu -->
<!-- $$$show[overload1]$$$show -->
<h3 class="fn"><a name="show"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">show</span> ()<tt> [slot]</tt></h3>
<p>Shows the icon in the system tray.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#hide">hide</a>() and <a href="qsystemtrayicon.html#visible-prop">visible</a>.</p>
<!-- @@@show -->
<!-- $$$showMessage[overload1]$$$showMessageconstQString&constQString&MessageIconint -->
<h3 class="fn"><a name="showMessage"></a><span class="type">void</span> QSystemTrayIcon::<span class="name">showMessage</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>title</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>message</i>, <span class="type"><a href="qsystemtrayicon.html#MessageIcon-enum">MessageIcon</a></span> <i>icon</i> = Information, <span class="type">int</span> <i>millisecondsTimeoutHint</i> = 10000 )</h3>
<p>Shows a balloon message for the entry with the given <i>title</i>, <i>message</i> and <i>icon</i> for the time specified in <i>millisecondsTimeoutHint</i>. <i>title</i> and <i>message</i> must be plain text strings.</p>
<p>Message can be clicked by the user; the <a href="qsystemtrayicon.html#messageClicked">messageClicked</a>() signal will emitted when this occurs.</p>
<p>Note that display of messages are dependent on the system configuration and user preferences, and that messages may not appear at all. Hence, it should not be relied upon as the sole means for providing critical information.</p>
<p>On Windows, the <i>millisecondsTimeoutHint</i> is usually ignored by the system when the application has focus.</p>
<p>On Mac OS X, the Growl notification system must be installed for this function to display messages.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#show">show</a>() and <a href="qsystemtrayicon.html#supportsMessages">supportsMessages</a>().</p>
<!-- @@@showMessage -->
<!-- $$$supportsMessages[overload1]$$$supportsMessages -->
<h3 class="fn"><a name="supportsMessages"></a><span class="type">bool</span> QSystemTrayIcon::<span class="name">supportsMessages</span> ()<tt> [static]</tt></h3>
<p>Returns true if the system tray supports balloon messages; otherwise returns false.</p>
<p><b>See also </b><a href="qsystemtrayicon.html#showMessage">showMessage</a>().</p>
<!-- @@@supportsMessages -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>