Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2297

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QTemporaryFile" doc="/**
&lt;p&gt;The &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; class is an I/O device that operates on temporary files.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; is used to create unique temporary files safely. The file itself is created by calling &lt;a href=&quot;QTemporaryFile.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;. The name of the temporary file is guaranteed to be unique (i.e&amp;#x2e;, you are guaranteed to not overwrite an existing file), and the file will subsequently be removed upon destruction of the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; object. This is an important technique that avoids data corruption for applications that store data in temporary files. The file name is either auto-generated, or created based on a template, which is passed to &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt;'s constructor.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    {
        QTemporaryFile file;
        if (file.open()) {
            &lt;span class=&quot;comment&quot;&gt;// file.fileName() returns the unique file name&lt;/span&gt;
        }

        &lt;span class=&quot;comment&quot;&gt;// the QTemporaryFile destructor removes the temporary file&lt;/span&gt;
    }&lt;/pre&gt;
&lt;p&gt;Reopening a &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; after calling &lt;a href=&quot;QFile.html#close()&quot;&gt;&lt;tt&gt;close&lt;/tt&gt;&lt;/a&gt; is safe. For as long as the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; object itself is not destroyed, the unique temporary file will exist and be kept open internally by &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A temporary file will have some static part of the name and some part that is calculated to be unique. The default filename qt_temp will be placed into the temporary path as returned by QDir::tempPath().&lt;/p&gt;

@see &lt;tt&gt;QDir::tempPath&lt;/tt&gt;
@see &lt;a href=&quot;QFile.html#QFile(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; */">
    <signal name="protected final void aboutToClose()" doc="/**
&lt;p&gt;This signal is emitted when the device is about to close. Connect this signal if you have operations that need to be performed before the device closes (e.g&amp;#x2e;, if you have data in a separate buffer that needs to be written to the device).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void bytesWritten(long bytes)" doc="/**
&lt;p&gt;This signal is emitted every time a payload of data has been written to the device. The &lt;tt&gt;bytes&lt;/tt&gt; argument is set to the number of bytes that were written in this payload.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QTemporaryFile.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; is not emitted recursively; if you reenter the event loop or call &lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; inside a slot connected to the &lt;a href=&quot;QTemporaryFile.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; signal, the signal will not be reemitted (although &lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; may still return true).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(long bytes)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QTemporaryFile.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void readyRead()" doc="/**
&lt;p&gt;This signal is emitted once every time new data is available for reading from the device. It will only be emitted again once new data is available, such as when a new payload of network data has arrived on your network socket, or when a new block of data has been appended to your device.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QTemporaryFile.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; is not emitted recursively; if you reenter the event loop or call &lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; inside a slot connected to the &lt;a href=&quot;QTemporaryFile.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal, the signal will not be reemitted (although &lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; may still return true).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QTemporaryFile.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QTemporaryFile()" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; in QDir::tempPath(), using the file template &amp;quot;qt_temp.XXXXXX&amp;quot;. The file is stored in the system's temporary directory.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#setFileTemplate(java.lang.String)&quot;&gt;&lt;tt&gt;setFileTemplate&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QDir::tempPath&lt;/tt&gt; */"/>
    <method name="public QTemporaryFile(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; (with the given &lt;tt&gt;parent&lt;/tt&gt;) in QDir::tempPath(), using the file template &amp;quot;qt_temp.XXXXXX&amp;quot;.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#setFileTemplate(java.lang.String)&quot;&gt;&lt;tt&gt;setFileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QTemporaryFile(java.lang.String templateName, com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; with a template filename of &lt;tt&gt;templateName&lt;/tt&gt; and the specified &lt;tt&gt;parent&lt;/tt&gt;. Upon opening the temporary file this will be used to create a unique filename. If the &lt;tt&gt;templateName&lt;/tt&gt; does end in XXXXXX it will automatically be appended and used as the dynamic portion of the filename.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;templateName&lt;/tt&gt; is a relative path, the path will be relative to the current working directory. You can use QDir::tempPath() to construct &lt;tt&gt;templateName&lt;/tt&gt; if you want use the system's temporary directory.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTemporaryFile.html#fileTemplate()&quot;&gt;&lt;tt&gt;fileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QTemporaryFile(java.lang.String templateName)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; with a template filename of &lt;tt&gt;templateName&lt;/tt&gt;. Upon opening the temporary file this will be used to create a unique filename. If the &lt;tt&gt;templateName&lt;/tt&gt; does not contain XXXXXX it will automatically be appended and used as the dynamic portion of the filename.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;templateName&lt;/tt&gt; is a relative path, the path will be relative to the current working directory. You can use QDir::tempPath() to construct &lt;tt&gt;templateName&lt;/tt&gt; if you want use the system's temporary directory.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTemporaryFile.html#fileTemplate()&quot;&gt;&lt;tt&gt;fileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean autoRemove()" doc="/**
&lt;p&gt;Returns true if the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; is in auto remove mode. Auto-remove mode will automatically delete the filename from disk upon destruction. This makes it very easy to create your &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; object on the stack, fill it with data, read from it, and finally on function return it will automatically clean up after itself.&lt;/p&gt;
&lt;p&gt;Auto-remove is on by default.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#setAutoRemove(boolean)&quot;&gt;&lt;tt&gt;setAutoRemove&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QFile.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String uniqueFilename()" doc="/**
&lt;p&gt;Returns the complete unique filename backing the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; object. This string is null before the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; is opened, afterwards it will contain the &lt;a href=&quot;QTemporaryFile.html#fileTemplate()&quot;&gt;&lt;tt&gt;fileTemplate&lt;/tt&gt;&lt;/a&gt; plus additional characters to make it unique.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#fileTemplate()&quot;&gt;&lt;tt&gt;fileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String fileTemplate()" doc="/**
&lt;p&gt;Returns the set file template. The default file template will be called qt_temp and be placed in QDir::tempPath().&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#setFileTemplate(java.lang.String)&quot;&gt;&lt;tt&gt;setFileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean open()" doc="/**
&lt;p&gt;A &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; will always be opened in QIODevice::ReadWrite mode, this allows easy access to the data in the file. This function will return true upon success and will set the &lt;a href=&quot;QFile.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt; to the unique filename used.&lt;/p&gt;

@see &lt;a href=&quot;QFile.html#fileName()&quot;&gt;&lt;tt&gt;fileName&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setAutoRemove(boolean b)" doc="/**
&lt;p&gt;Sets the &lt;a href=&quot;QTemporaryFile.html#QTemporaryFile(java.lang.String)&quot;&gt;&lt;tt&gt;QTemporaryFile&lt;/tt&gt;&lt;/a&gt; into auto-remove mode if &lt;tt&gt;b&lt;/tt&gt; is true.&lt;/p&gt;
&lt;p&gt;Auto-remove is on by default.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#autoRemove()&quot;&gt;&lt;tt&gt;autoRemove&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QFile.html#remove(java.lang.String)&quot;&gt;&lt;tt&gt;remove&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setFileTemplate(java.lang.String name)" doc="/**
&lt;p&gt;Sets the static portion of the file name to &lt;tt&gt;name&lt;/tt&gt;. If the file template ends in XXXXXX that will automatically be replaced with the unique part of the filename, otherwise a filename will be determined automatically based on the static portion specified.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;name&lt;/tt&gt; contains a relative file path, the path will be relative to the current working directory. You can use QDir::tempPath() to construct &lt;tt&gt;name&lt;/tt&gt; if you want use the system's temporary directory.&lt;/p&gt;

@see &lt;a href=&quot;QTemporaryFile.html#fileTemplate()&quot;&gt;&lt;tt&gt;fileTemplate&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.core.QAbstractFileEngine fileEngine()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public boolean open(com.trolltech.qt.core.QIODevice.OpenMode flags)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public static com.trolltech.qt.core.QTemporaryFile createLocalFile(com.trolltech.qt.core.QFile file)" doc="/**
&lt;p&gt;Creates and returns a local temporary file whose contents are a copy of the contents of the given &lt;tt&gt;file&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public native static com.trolltech.qt.core.QTemporaryFile createLocalFile(java.lang.String fileName)" doc="/**
&lt;p&gt;Works on the given &lt;tt&gt;fileName&lt;/tt&gt; rather than an existing &lt;a href=&quot;QFile.html#QFile(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
 */"/>
</class>