[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qsignalmapper.cpp:66 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QSignalMapper Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QSignalMapper Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QSignalMapper class bundles signals from identifiable senders.
|
---|
| 35 | <a href="#details">More...</a>
|
---|
| 36 | <p><tt>#include <<a href="qsignalmapper-h.html">qsignalmapper.h</a>></tt>
|
---|
| 37 | <p>Inherits <a href="qobject.html">QObject</a>.
|
---|
| 38 | <p><a href="qsignalmapper-members.html">List of all member functions.</a>
|
---|
| 39 | <h2>Public Members</h2>
|
---|
| 40 | <ul>
|
---|
| 41 | <li class=fn><a href="#QSignalMapper"><b>QSignalMapper</b></a> ( QObject * parent, const char * name = 0 )</li>
|
---|
| 42 | <li class=fn><a href="#~QSignalMapper"><b>~QSignalMapper</b></a> ()</li>
|
---|
| 43 | <li class=fn>virtual void <a href="#setMapping"><b>setMapping</b></a> ( const QObject * sender, int identifier )</li>
|
---|
| 44 | <li class=fn>virtual void <a href="#setMapping-2"><b>setMapping</b></a> ( const QObject * sender, const QString & identifier )</li>
|
---|
| 45 | <li class=fn>void <a href="#removeMappings"><b>removeMappings</b></a> ( const QObject * sender )</li>
|
---|
| 46 | </ul>
|
---|
| 47 | <h2>Public Slots</h2>
|
---|
| 48 | <ul>
|
---|
| 49 | <li class=fn>void <a href="#map"><b>map</b></a> ()</li>
|
---|
| 50 | </ul>
|
---|
| 51 | <h2>Signals</h2>
|
---|
| 52 | <ul>
|
---|
| 53 | <li class=fn>void <a href="#mapped"><b>mapped</b></a> ( int )</li>
|
---|
| 54 | <li class=fn>void <a href="#mapped-2"><b>mapped</b></a> ( const QString & )</li>
|
---|
| 55 | </ul>
|
---|
| 56 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | The QSignalMapper class bundles signals from identifiable senders.
|
---|
| 60 | <p>
|
---|
| 61 | <p> This class collects a set of parameterless signals, and re-emits
|
---|
| 62 | them with integer or string parameters corresponding to the object
|
---|
| 63 | that sent the signal.
|
---|
| 64 | <p>See also <a href="io.html">Input/Output and Networking</a>.
|
---|
| 65 |
|
---|
| 66 | <hr><h2>Member Function Documentation</h2>
|
---|
| 67 | <h3 class=fn><a name="QSignalMapper"></a>QSignalMapper::QSignalMapper ( <a href="qobject.html">QObject</a> * parent, const char * name = 0 )
|
---|
| 68 | </h3>
|
---|
| 69 | Constructs a QSignalMapper called <em>name</em>, with parent <em>parent</em>.
|
---|
| 70 | Like all QObjects, it will be deleted when the parent is deleted.
|
---|
| 71 |
|
---|
| 72 | <h3 class=fn><a name="~QSignalMapper"></a>QSignalMapper::~QSignalMapper ()
|
---|
| 73 | </h3>
|
---|
| 74 | Destroys the QSignalMapper.
|
---|
| 75 |
|
---|
| 76 | <h3 class=fn>void <a name="map"></a>QSignalMapper::map ()<tt> [slot]</tt>
|
---|
| 77 | </h3>
|
---|
| 78 | This slot emits signals based on which object sends signals to it.
|
---|
| 79 |
|
---|
| 80 | <p>Examples: <a href="i18n-example.html#x1945">i18n/main.cpp</a> and <a href="themes-example.html#x334">themes/themes.cpp</a>.
|
---|
| 81 | <h3 class=fn>void <a name="mapped"></a>QSignalMapper::mapped ( int )<tt> [signal]</tt>
|
---|
| 82 | </h3>
|
---|
| 83 |
|
---|
| 84 | <p> This signal is emitted when <a href="#map">map</a>() is signaled from an object that
|
---|
| 85 | has an integer mapping set.
|
---|
| 86 | <p> <p>See also <a href="#setMapping">setMapping</a>().
|
---|
| 87 |
|
---|
| 88 | <p>Examples: <a href="i18n-example.html#x1946">i18n/main.cpp</a> and <a href="themes-example.html#x335">themes/themes.cpp</a>.
|
---|
| 89 | <h3 class=fn>void <a name="mapped-2"></a>QSignalMapper::mapped ( const <a href="qstring.html">QString</a> & )<tt> [signal]</tt>
|
---|
| 90 | </h3>
|
---|
| 91 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 92 | <p> This signal is emitted when <a href="#map">map</a>() is signaled from an object that
|
---|
| 93 | has a string mapping set.
|
---|
| 94 | <p> <p>See also <a href="#setMapping">setMapping</a>().
|
---|
| 95 |
|
---|
| 96 | <h3 class=fn>void <a name="removeMappings"></a>QSignalMapper::removeMappings ( const <a href="qobject.html">QObject</a> * sender )
|
---|
| 97 | </h3>
|
---|
| 98 | Removes all mappings for <em>sender</em>. This is done automatically
|
---|
| 99 | when mapped objects are destroyed.
|
---|
| 100 |
|
---|
| 101 | <h3 class=fn>void <a name="setMapping"></a>QSignalMapper::setMapping ( const <a href="qobject.html">QObject</a> * sender, int identifier )<tt> [virtual]</tt>
|
---|
| 102 | </h3>
|
---|
| 103 | Adds a mapping so that when <a href="#map">map</a>() is signaled from the given <em>sender</em>, the signal <a href="#mapped">mapped</a>(<em>identifier</em>) is emitted.
|
---|
| 104 | <p> There may be at most one integer identifier for each object.
|
---|
| 105 |
|
---|
| 106 | <p>Examples: <a href="i18n-example.html#x1947">i18n/main.cpp</a> and <a href="themes-example.html#x336">themes/themes.cpp</a>.
|
---|
| 107 | <h3 class=fn>void <a name="setMapping-2"></a>QSignalMapper::setMapping ( const <a href="qobject.html">QObject</a> * sender, const <a href="qstring.html">QString</a> & identifier )<tt> [virtual]</tt>
|
---|
| 108 | </h3>
|
---|
| 109 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 110 | <p> Adds a mapping so that when <a href="#map">map</a>() is signaled from the given <em>sender</em>, the signal mapper(<em>identifier</em>) is emitted.
|
---|
| 111 | <p> There may be at most one string identifier for each object, and it
|
---|
| 112 | may not be empty.
|
---|
| 113 |
|
---|
| 114 | <!-- eof -->
|
---|
| 115 | <hr><p>
|
---|
| 116 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 117 | Copyright © 1995-2007
|
---|
| 118 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 119 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 120 | <td>Copyright © 2007
|
---|
| 121 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 122 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 123 | </table></div></address></body>
|
---|
| 124 | </html>
|
---|