?? x9684.htm
字號(hào):
<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"><AHREF="x9571.htm"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix C. First Steps with Sip</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="b10472.htm"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN9684">SIPLIB Functions</A></H1><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="PUBSUPPORT">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"><ANAME="INFOFUNCS">Information functions</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="r9694.htm">sipGetCppPtr</A> -- Get the C/C++ pointer from a wrapper and cast it to the required type</DT><DT><AHREF="r9718.htm">sipGetComplexCppPtr</A> -- Get the C/C++ pointer for a complex object</DT><DT><AHREF="r9738.htm">sipGetThisWrapper</A> -- Convert a C/C++ pointer to the object that wraps it</DT><DT><AHREF="r9763.htm">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"><ANAME="CONVFUNCS">Conversions and argument parsing</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="r9791.htm">sipParseArgs</A> -- Parse the arguments to a C/C++ function without any side effects</DT><DT><AHREF="r9932.htm">sipConvertToCpp</A> -- Convert a Python instance of a class to a C/C++ object pointer</DT><DT><AHREF="r9962.htm">sipMapCppToSelf</A> -- Convert a C/C++ pointer to a Python instance</DT><DT><AHREF="r9987.htm">sipConvertToVoidPtr</A> -- A convenience function to convert a C/C++ void pointer from a Python object</DT><DT><AHREF="r10006.htm">sipConvertFromVoidPtr</A> -- A convenience function to convert a C/C++ void pointer to a Python object</DT><DT><AHREF="r10026.htm">sipConvertFromBool</A> -- A convenience function to convert a C/C++ boolean to a Python object</DT><DT><AHREF="r10046.htm">sipCheckNone</A> -- Check a None argument for a class pointer that we might dereference</DT><DT><AHREF="r10076.htm">sipBadVirtualResultType</A> -- Report a Python member function with an unexpected return type</DT><DT><AHREF="r10102.htm">sipBadSetType</A> -- Report a Python class variable with an unexpected type</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="RSCFUNCS">Ressource handling</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="r10130.htm">sipReleaseLock</A> -- Release the interpreter lock and save the current Python thread state</DT><DT><AHREF="r10143.htm">sipAcquireLock</A> -- Acquire the interpreter lock and restore the Python thread state</DT><DT><AHREF="r10156.htm">sipCondReleaseLock</A> -- Release the interpreter lock, if previously acquired, and save Python thread state</DT><DT><AHREF="r10174.htm">sipCondAcquireLock</A> -- Acquire the interpreter lock, if not already acquired, and restore Python thread state</DT><DT><AHREF="r10190.htm">sipMalloc</A> -- A Python 1.5 style memory allocator that supports Python 1.5 and 1.6</DT><DT><AHREF="r10209.htm">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"><ANAME="CALLFUNCS">Calling Python</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="r10229.htm">sipEvalMethod</A> -- Call a Python method</DT><DT><AHREF="r10253.htm">sipCallHook</A> -- Call a hook</DT></DL></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="QTFUNCS">Functions specifically for signals/slots</A></H2><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="r10275.htm">sipEmitSignal</A> -- Emit a Python or Qt signal</DT><DT><AHREF="r10304.htm">sipConvertRx</A> -- Convert a Python receiver to a Qt receiver</DT><DT><AHREF="r10355.htm">sipConnectRx</A> -- Connect a Qt or a Python signal</DT><DT><AHREF="r10390.htm">sipGetRx</A> -- Convert a valid Python signal or slot to an existing proxy Qt slot</DT><DT><AHREF="r10434.htm">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 <AHREF="../siplib/sipqt.h"TARGET="_top">sipqt.h</A> and <AHREF="../siplib/qtlib.cpp"TARGET="_top">qtlib.cpp</A>. </P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="PRIVATFUNCS">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"><AHREF="x9571.htm"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.htm"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="b10472.htm"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Accepted C++ / Qt constructs</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="a8834.htm"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Bibliography</TD></TR></TABLE></DIV></BODY></HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -