📄 qtutils.html
字号:
convertKeyValue</H3><PRE>public static int <B>convertKeyValue</B>(int javaKeyValue)</PRE><DL><DD>Convert the key values in java KeyEvents to those expected by QT.<DD><DL></DL></DD></DL><HR><A NAME="X2Fix(float)"><!-- --></A><H3>X2Fix</H3><PRE>public static int <B>X2Fix</B>(float x)</PRE><DL><DD>Convert a float to a 16.16 Fixed format<DD><DL></DL></DD></DL><HR><A NAME="Fix2X(int)"><!-- --></A><H3>Fix2X</H3><PRE>public static float <B>Fix2X</B>(int fix)</PRE><DL><DD>Convert a float to a 16.16 Fixed format<DD><DL></DL></DD></DL><HR><A NAME="X2UFix(float)"><!-- --></A><H3>X2UFix</H3><PRE>public static int <B>X2UFix</B>(float x)</PRE><DL><DD>Convert a 16.16 Unsigned Fixed format to a float<DD><DL></DL></DD></DL><HR><A NAME="UFix2X(int)"><!-- --></A><H3>UFix2X</H3><PRE>public static float <B>UFix2X</B>(int fix)</PRE><DL><DD>Convert a 16.16 Unsigned Fixed format to a float<DD><DL></DL></DD></DL><HR><A NAME="X2Fract(float)"><!-- --></A><H3>X2Fract</H3><PRE>public static int <B>X2Fract</B>(float x)</PRE><DL><DD>Converts a float to a 2.30 Fract format<DD><DL></DL></DD></DL><HR><A NAME="Fract2X(int)"><!-- --></A><H3>Fract2X</H3><PRE>public static float <B>Fract2X</B>(int fract)</PRE><DL><DD>Convert a 2.30 Fract format to a float<DD><DL></DL></DD></DL><HR><A NAME="X2ShortFix(float)"><!-- --></A><H3>X2ShortFix</H3><PRE>public static short <B>X2ShortFix</B>(float x)</PRE><DL><DD>Convert a float to a 8.8 Fixed format<DD><DL></DL></DD></DL><HR><A NAME="ShortFix2X(short)"><!-- --></A><H3>ShortFix2X</H3><PRE>public static float <B>ShortFix2X</B>(short fix)</PRE><DL><DD>Convert a 8.8 Fixed format to a float<DD><DL></DL></DD></DL><HR><A NAME="UByte2Int(byte)"><!-- --></A><H3>UByte2Int</H3><PRE>public static int <B>UByte2Int</B>(byte b)</PRE><DL><DD>converts an unsigned byte to int.<DD><DL></DL></DD></DL><HR><A NAME="UShort2Int(short)"><!-- --></A><H3>UShort2Int</H3><PRE>public static int <B>UShort2Int</B>(short s)</PRE><DL><DD>converts an unsigned short to int.<DD><DL></DL></DD></DL><HR><A NAME="UInt2Long(int)"><!-- --></A><H3>UInt2Long</H3><PRE>public static long <B>UInt2Long</B>(int i)</PRE><DL><DD>converts an unsigned int to long.<DD><DL></DL></DD></DL><HR><A NAME="String2CString(java.lang.String)"><!-- --></A><H3>String2CString</H3><PRE>public static byte[] <B>String2CString</B>(java.lang.String str)</PRE><DL><DD>Convert a java.lang.String to a CString byte array.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to convert</DL></DD></DL><HR><A NAME="String2PString(java.lang.String, int)"><!-- --></A><H3>String2PString</H3><PRE>public static byte[] <B>String2PString</B>(java.lang.String str, int len)</PRE><DL><DD>Convert a java.lang.String to a PString byte array.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to convert<DD><CODE>len</CODE> - the maximum length of the Pstring, max length is 255.</DL></DD></DL><HR><A NAME="CString2String(byte[], int)"><!-- --></A><H3>CString2String</H3><PRE>public static java.lang.String <B>CString2String</B>(byte[] str, int offset)</PRE><DL><DD>Converts a CString into a java.lang.String. The offset specifies where the C string begins and it terminates at the first 0 value that it finds.<DD><DL></DL></DD></DL><HR><A NAME="PString2String(byte[], int)"><!-- --></A><H3>PString2String</H3><PRE>public static java.lang.String <B>PString2String</B>(byte[] pString, int offset)</PRE><DL><DD>Converts a PString into a java.lang.String. The offset specifies where the count byte is within the byte array that is passed in - typically 0.<DD><DL></DL></DD></DL><HR><A NAME="toOSType(java.lang.String)"><!-- --></A><H3>toOSType</H3><PRE>public static final int <B>toOSType</B>(java.lang.String str)</PRE><DL><DD>Converts an OSType (4 character) string into an int.<DD><DL></DL></DD></DL><HR><A NAME="toOSType(char, char, char, char)"><!-- --></A><H3>toOSType</H3><PRE>public static final int <B>toOSType</B>(char a, char b, char c, char d)</PRE><DL><DD>Converts four characters into an OSType int<DD><DL></DL></DD></DL><HR><A NAME="fromOSType(int)"><!-- --></A><H3>fromOSType</H3><PRE>public static java.lang.String <B>fromOSType</B>(int osType)</PRE><DL><DD>Converts an int into a 4 character string representing an OSType. The OSType int is presumed to be the right endian layout.<DD><DL></DL></DD></DL><HR><A NAME="reclaimMemory()"><!-- --></A><H3>reclaimMemory</H3><PRE>public static void <B>reclaimMemory</B>()</PRE><DL><DD>Reclaim as much memory as possible and ensure that all finalize methods are called on objects which have been collected.<DD><DL></DL></DD></DL><HR><A NAME="checkFreeMemory()"><!-- --></A><H3>checkFreeMemory</H3><PRE>public static void <B>checkFreeMemory</B>() throws <A HREF="../../quicktime/util/UtilException.html">UtilException</A></PRE><DL><DD>This call will ensure that a reserved amount of application heap memory on the MacOS is free. If this amount of memory is not free a memFullErr will be thrown.<DD><DL></DL></DD></DL><HR><A NAME="endianFlip16(short)"><!-- --></A><H3>endianFlip16</H3><PRE>public static short <B>endianFlip16</B>(short s)</PRE><DL><DD>This will flip the endian order of a 16bit value<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the value to flip<DT><B>Returns:</B><DD>the flipped value<DT><B>See Also: </B><DD><A HREF="../../quicktime/util/EndianOrder.html"><CODE>EndianOrder</CODE></A></DL></DD></DL><HR><A NAME="endianFlip32(int)"><!-- --></A><H3>endianFlip32</H3><PRE>public static int <B>endianFlip32</B>(int i)</PRE><DL><DD>This will flip the endian order of a 32bit value<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the value to flip<DT><B>Returns:</B><DD>the flipped value<DT><B>See Also: </B><DD><A HREF="../../quicktime/util/EndianOrder.html"><CODE>EndianOrder</CODE></A></DL></DD></DL><HR><A NAME="endianFlip64(long)"><!-- --></A><H3>endianFlip64</H3><PRE>public static long <B>endianFlip64</B>(long l)</PRE><DL><DD>This will flip the endian order of a 64bit value<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the value to flip<DT><B>Returns:</B><DD>the flipped value<DT><B>See Also: </B><DD><A HREF="../../quicktime/util/EndianOrder.html"><CODE>EndianOrder</CODE></A></DL></DD></DL><HR><A NAME="endianFlip(java.lang.Object, int, quicktime.util.EndianDescriptor)"><!-- --></A><H3>endianFlip</H3><PRE>public static void <B>endianFlip</B>(java.lang.Object src, int srcOffset, <A HREF="../../quicktime/util/EndianDescriptor.html">EndianDescriptor</A> ed) throws <A HREF="../../quicktime/util/UtilException.html">UtilException</A></PRE><DL><DD>This will flip the supplied src object's fields according to the characteristics of the supplied EndianDescriptor. The EndianDescriptor will be applied to the src object at the specified (srcOffset) number of bytes from the beginning of the src object. The flipping is done in place, so the srcObject will be flipped upon the completion of this method. Any fields that are not described or accounted for by the EndianDescriptor will not be flipped.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - the object to flip<DD><CODE>srcOffset</CODE> - the number of bytes from the start of the src object that the supplied endian descriptor will be applied.<DD><CODE>ed</CODE> - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.<DT><B>See Also: </B><DD><A HREF="../../quicktime/util/EndianOrder.html"><CODE>EndianOrder</CODE></A></DL></DD></DL><HR><A NAME="endianFlip(java.lang.Object, int, java.lang.Object, int, quicktime.util.EndianDescriptor)"><!-- --></A><H3>endianFlip</H3><PRE>public static void <B>endianFlip</B>(java.lang.Object src, int srcOffset, java.lang.Object dest, int destOffset, <A HREF="../../quicktime/util/EndianDescriptor.html">EndianDescriptor</A> ed) throws <A HREF="../../quicktime/util/UtilException.html">UtilException</A></PRE><DL><DD>This will flip the supplied src object's fields according to the characteristics of the supplied EndianDescriptor and copy these flipped values to the destination object. The EndianDescriptor will be applied to the src object at the specified (srcOffset) number of bytes from the beginning of the src object and the flipped values will be copied to the specified (destOffset) number of bytes into the destination object. Any fields that are not described or accounted for by the EndianDescriptor will not be flipped or copied.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - the object to flip<DD><CODE>srcOffset</CODE> - the number of bytes from the start of the src object that the supplied endian descriptor will be applied.<DD><CODE>dest</CODE> - the object that will be the flipped version of the source object.<DD><CODE>destOffset</CODE> - the number of bytes from the start of the dest object that the flipped values will be copied too.<DD><CODE>ed</CODE> - the EndianDescriptor that will describe how the object should be flipped. This may NOT be null.<DT><B>See Also: </B><DD><A HREF="../../quicktime/util/EndianOrder.html"><CODE>EndianOrder</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/QTUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../quicktime/util/QTPointerRef.html"><B>PREV CLASS</B></A> <A HREF="../../quicktime/util/QTVector.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="QTUtils.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -