index.lxp@lxpwrap=x9684_252ehtm.htm
来自「GUI Programming with Python」· HTM 代码 · 共 402 行
HTM
402 行
<table border="0" cellspacing="0" cellpadding="3" width="100%"><tr><td> <div align="center" id="bldcontent"> <a href="../default.htm"><img src="../images/opendocs.png" width="63" height="76" border="0"></a> <br> <div class="symbol">Your OpenSource Publisher™</div> </div> </td></tr></table> <div align="center" class="author"> <a href="../products.lxp">Products</a> | <a href="../wheretobuy.lxp">Where to buy</a> | <a href="../bookstore.lxp">Retailers</a> | <a href="../faq.lxp">FAQ</a> | <a href="../writeforus.lxp">Write for Us.</a> | <a href="#contact">Contact Us.</a> </div> <table border="0" cellspacing="3" cellpadding="0" width="100%"><tr><td width="100%"> <div class="content"> <table border="0" cellspacing="2" cellpadding="0" width="100%"><tr><td width="100%"> <div align="center"><H4 CLASS="AUTHOR"><A NAME="AEN5">Boudewijn Rempt</A><br><a href="../../https@secure.linuxports.com/opendocs/default.htm"><img src=odpyqt125.png></a><br>ISBN: 0-97003300-4-4<br><a href="../../https@secure.linuxports.com/opendocs/default.htm">Available from bookstores everywhere or you can order it here.</a><p>You can download the source files for the book <a href="pyqtsrc.tgz">(code / eps) here.</a><hr></div> <HTML><HEAD><TITLE>SIPLIB Functions</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.72"><LINKREL="HOME"TITLE="GUI Programming with Python: QT Edition"HREF="book1.htm"><LINKREL="UP"TITLE="First Steps with Sip"HREF="a8834.htm"><LINKREL="PREVIOUS"TITLE="Accepted C++ / Qt constructs"HREF="x9571.htm"><LINKREL="NEXT"TITLE="Bibliography"HREF="b10472.htm"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">GUI Programming with Python: QT Edition</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><A accesskey="P" href="index.lxp@lxpwrap=x9571_252ehtm.htm">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix C. First Steps with Sip</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><A accesskey="N" href="index.lxp@lxpwrap=b10472_252ehtm.htm">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1">SIPLIB Functions</A></H1><DIVCLASS="SECT2"><H2CLASS="SECT2">Public Support Functions</A></H2><P>To use the <SPANCLASS="APPLICATION">SIPLIB</SPAN> functions described here, include <TTCLASS="FILENAME">sip.h</TT>. The source of these functions is in <TTCLASS="FILENAME">siplib.c</TT>.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Information functions</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><A href="index.lxp@lxpwrap=r9694_252ehtm">sipGetCppPtr</A> -- Get the C/C++ pointer from a wrapper and cast it to the required type</DT><DT><A href="index.lxp@lxpwrap=r9718_252ehtm">sipGetComplexCppPtr</A> -- Get the C/C++ pointer for a complex object</DT><DT><A href="index.lxp@lxpwrap=r9738_252ehtm">sipGetThisWrapper</A> -- Convert a C/C++ pointer to the object that wraps it</DT><DT><A href="index.lxp@lxpwrap=r9763_252ehtm">sipIsSubClassInstance</A> -- See if a Python object is an instance of a sub-class of a given base class</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Conversions and argument parsing</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><A href="index.lxp@lxpwrap=r9791_252ehtm.htm">sipParseArgs</A> -- Parse the arguments to a C/C++ function without any side effects</DT><DT><A href="index.lxp@lxpwrap=r9932_252ehtm">sipConvertToCpp</A> -- Convert a Python instance of a class to a C/C++ object pointer</DT><DT><A href="index.lxp@lxpwrap=r9962_252ehtm">sipMapCppToSelf</A> -- Convert a C/C++ pointer to a Python instance</DT><DT><A href="index.lxp@lxpwrap=r9987_252ehtm">sipConvertToVoidPtr</A> -- A convenience function to convert a C/C++ void pointer from a Python object</DT><DT><A href="index.lxp@lxpwrap=r10006_252ehtm">sipConvertFromVoidPtr</A> -- A convenience function to convert a C/C++ void pointer to a Python object</DT><DT><A href="index.lxp@lxpwrap=r10026_252ehtm">sipConvertFromBool</A> -- A convenience function to convert a C/C++ boolean to a Python object</DT><DT><A href="index.lxp@lxpwrap=r10046_252ehtm">sipCheckNone</A> -- Check a None argument for a class pointer that we might dereference</DT><DT><A href="index.lxp@lxpwrap=r10076_252ehtm">sipBadVirtualResultType</A> -- Report a Python member function with an unexpected return type</DT><DT><A href="index.lxp@lxpwrap=r10102_252ehtm">sipBadSetType</A> -- Report a Python class variable with an unexpected type</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Ressource handling</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><A href="index.lxp@lxpwrap=r10130_252ehtm">sipReleaseLock</A> -- Release the interpreter lock and save the current Python thread state</DT><DT><A href="index.lxp@lxpwrap=r10143_252ehtm">sipAcquireLock</A> -- Acquire the interpreter lock and restore the Python thread state</DT><DT><A href="index.lxp@lxpwrap=r10156_252ehtm">sipCondReleaseLock</A> -- Release the interpreter lock, if previously acquired, and save Python thread state</DT><DT><A href="index.lxp@lxpwrap=r10174_252ehtm">sipCondAcquireLock</A> -- Acquire the interpreter lock, if not already acquired, and restore Python thread state</DT><DT><A href="index.lxp@lxpwrap=r10190_252ehtm">sipMalloc</A> -- A Python 1.5 style memory allocator that supports Python 1.5 and 1.6</DT><DT><A href="index.lxp@lxpwrap=r10209_252ehtm">sipFree</A> -- A Python 1.5 style memory de-allocator that supports Python 1.5 and 1.6</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Calling Python</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><A href="index.lxp@lxpwrap=r10229_252ehtm">sipEvalMethod</A> -- Call a Python method</DT><DT><A href="index.lxp@lxpwrap=r10253_252ehtm">sipCallHook</A> -- Call a hook</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Functions specifically for signals/slots</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><A href="index.lxp@lxpwrap=r10275_252ehtm">sipEmitSignal</A> -- Emit a Python or Qt signal</DT><DT><A href="index.lxp@lxpwrap=r10304_252ehtm">sipConvertRx</A> -- Convert a Python receiver to a Qt receiver</DT><DT><A href="index.lxp@lxpwrap=r10355_252ehtm">sipConnectRx</A> -- Connect a Qt or a Python signal</DT><DT><A href="index.lxp@lxpwrap=r10390_252ehtm">sipGetRx</A> -- Convert a valid Python signal or slot to an existing proxy Qt slot</DT><DT><A href="index.lxp@lxpwrap=r10434_252ehtm">sipDisconnectRx</A> -- Disconnect a Qt or Python signal from a Python slot</DT></DL></DIV><P> These functions are specific for the Qt support. They are in the separate files <A href="index.lxp@lxpwrap=_252e_252e_2f_252e_252e_2fsiplib_2fsipqt_252eh" target="_top">sipqt.h</A> and <A href="index.lxp@lxpwrap=_252e_252e_2f_252e_252e_2fsiplib_2fqtlib_252ecpp" target="_top">qtlib.cpp</A>. </P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2">Private Functions</A></H2><P>The private functions, which should only be called by generated code, are not documented here. For further information see the headerfile <TTCLASS="FILENAME">sip.h</TT>).</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><A accesskey="P" href="index.lxp@lxpwrap=x9571_252ehtm.htm">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="H" href="index.lxp@lxpwrap=book1_252ehtm">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><A accesskey="N" href="index.lxp@lxpwrap=b10472_252ehtm.htm">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Accepted C++ / Qt constructs</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="U" href="index.lxp@lxpwrap=a8834_252ehtm.htm">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Bibliography</TD></TR></TABLE></DIV></BODY></HTML> </td> </tr> </table> </td> </tr> </table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?