QTemporaryFile Class Reference

#include <qtemporaryfile.h>

Class Description

Definition at line 62 of file qtemporaryfile.h.

+ Inheritance diagram for QTemporaryFile:

Public Member Functions

 QTemporaryFile ()
 
 QTemporaryFile (const QString &templateName)
 
 QTemporaryFile (QObject *parent)
 
 QTemporaryFile (const QString &templateName, QObject *parent)
 
 ~QTemporaryFile ()
 
bool autoRemove () const
 
void setAutoRemove (bool b)
 
bool open ()
 
QString fileName () const
 
QString fileTemplate () const
 
void setFileTemplate (const QString &name)
 
virtual QAbstractFileEnginefileEngine () const
 
- Public Member Functions inherited from QFile
 QFile ()
 
 QFile (const QString &name)
 
 QFile (QObject *parent)
 
 QFile (const QString &name, QObject *parent)
 
 ~QFile ()
 
FileError error () const
 
void unsetError ()
 
QString fileName () const
 
void setFileName (const QString &name)
 
bool exists () const
 
QString readLink () const
 
QString symLinkTarget () const
 
bool remove ()
 
bool rename (const QString &newName)
 
bool link (const QString &newName)
 
bool copy (const QString &newName)
 
bool isSequential () const
 
bool open (FILE *f, OpenMode flags)
 
bool open (int fd, OpenMode flags)
 
bool open (FILE *f, OpenMode ioFlags, FileHandleFlags handleFlags)
 
bool open (int fd, OpenMode ioFlags, FileHandleFlags handleFlags)
 
virtual void close ()
 
qint64 size () const
 
qint64 pos () const
 
bool seek (qint64 offset)
 
bool atEnd () const
 
bool flush ()
 
bool resize (qint64 sz)
 
Permissions permissions () const
 
bool setPermissions (Permissions permissionSpec)
 
int handle () const
 
uchar * map (qint64 offset, qint64 size, MemoryMapFlags flags=NoOptions)
 
bool unmap (uchar *address)
 
- Public Member Functions inherited from QIODevice
 QIODevice ()
 
 QIODevice (QObject *parent)
 
virtual ~QIODevice ()
 
OpenMode openMode () const
 
void setTextModeEnabled (bool enabled)
 
bool isTextModeEnabled () const
 
bool isOpen () const
 
bool isReadable () const
 
bool isWritable () const
 
virtual bool reset ()
 
virtual qint64 bytesAvailable () const
 
virtual qint64 bytesToWrite () const
 
qint64 read (char *data, qint64 maxlen)
 
QByteArray read (qint64 maxlen)
 
QByteArray readAll ()
 
qint64 readLine (char *data, qint64 maxlen)
 
QByteArray readLine (qint64 maxlen=0)
 
virtual bool canReadLine () const
 
qint64 write (const char *data, qint64 len)
 
qint64 write (const char *data)
 
qint64 write (const QByteArray &data)
 
qint64 peek (char *data, qint64 maxlen)
 
QByteArray peek (qint64 maxlen)
 
virtual bool waitForReadyRead (int msecs)
 
virtual bool waitForBytesWritten (int msecs)
 
void ungetChar (char c)
 
bool putChar (char c)
 
bool getChar (char *c)
 
QString errorString () const
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=0)
 
virtual ~QObject ()
 
virtual bool event (QEvent *)
 
virtual bool eventFilter (QObject *, QEvent *)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool b)
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
template<typename T >
findChild (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
const QObjectListchildren () const
 
void setParent (QObject *)
 
void installEventFilter (QObject *)
 
void removeEventFilter (QObject *)
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void setUserData (uint id, QObjectUserData *data)
 
QObjectUserDatauserData (uint id) const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 

Static Public Member Functions

static QTemporaryFilecreateLocalFile (const QString &fileName)
 
static QTemporaryFilecreateLocalFile (QFile &file)
 
- Static Public Member Functions inherited from QFile
static QByteArray encodeName (const QString &fileName)
 
static QString decodeName (const QByteArray &localFileName)
 
static QString decodeName (const char *localFileName)
 
static void setEncodingFunction (EncoderFn)
 
static void setDecodingFunction (DecoderFn)
 
static bool exists (const QString &fileName)
 
static QString readLink (const QString &fileName)
 
static QString symLinkTarget (const QString &fileName)
 
static bool remove (const QString &fileName)
 
static bool rename (const QString &oldName, const QString &newName)
 
static bool link (const QString &oldname, const QString &newName)
 
static bool copy (const QString &fileName, const QString &newName)
 
static bool resize (const QString &filename, qint64 sz)
 
static Permissions permissions (const QString &filename)
 
static bool setPermissions (const QString &filename, Permissions permissionSpec)
 
- Static Public Member Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 

Protected Member Functions

bool open (OpenMode flags)
 
- Protected Member Functions inherited from QFile
 QFile (QFilePrivate &dd, QObject *parent=0)
 
qint64 readData (char *data, qint64 maxlen)
 
qint64 writeData (const char *data, qint64 len)
 
qint64 readLineData (char *data, qint64 maxlen)
 
- Protected Member Functions inherited from QIODevice
 QIODevice (QIODevicePrivate &dd, QObject *parent=0)
 
void setOpenMode (OpenMode openMode)
 
void setErrorString (const QString &errorString)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *)
 
virtual void childEvent (QChildEvent *)
 
virtual void customEvent (QEvent *)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 

Friends

class QFile
 

Additional Inherited Members

- Public Types inherited from QFile
enum  FileError {
  NoError = 0, ReadError = 1, WriteError = 2, FatalError = 3,
  ResourceError = 4, OpenError = 5, AbortError = 6, TimeOutError = 7,
  UnspecifiedError = 8, RemoveError = 9, RenameError = 10, PositionError = 11,
  ResizeError = 12, PermissionsError = 13, CopyError = 14
}
 
enum  Permission {
  ReadOwner = 0x4000, WriteOwner = 0x2000, ExeOwner = 0x1000, ReadUser = 0x0400,
  WriteUser = 0x0200, ExeUser = 0x0100, ReadGroup = 0x0040, WriteGroup = 0x0020,
  ExeGroup = 0x0010, ReadOther = 0x0004, WriteOther = 0x0002, ExeOther = 0x0001
}
 
enum  FileHandleFlag { AutoCloseHandle = 0x0001, DontCloseHandle = 0 }
 
enum  MemoryMapFlags { NoOptions = 0 }
 
typedef QByteArray(* EncoderFn) (const QString &fileName)
 
typedef QString(* DecoderFn) (const QByteArray &localfileName)
 
- Public Types inherited from QIODevice
enum  OpenModeFlag {
  NotOpen = 0x0000, ReadOnly = 0x0001, WriteOnly = 0x0002, ReadWrite = ReadOnly | WriteOnly,
  Append = 0x0004, Truncate = 0x0008, Text = 0x0010, Unbuffered = 0x0020
}
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Signals inherited from QIODevice
void readyRead ()
 
void bytesWritten (qint64 bytes)
 
void aboutToClose ()
 
void readChannelFinished ()
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Attributes inherited from QObject
static const QMetaObject staticQtMetaObject
 
- Properties inherited from QObject
QString objectName
 

Constructor & Destructor Documentation

QTemporaryFile ( const QString templateName)
explicit
QTemporaryFile ( QObject parent)
explicit
QTemporaryFile ( const QString templateName,
QObject parent 
)

Member Function Documentation

bool autoRemove ( ) const
void setAutoRemove ( bool  b)
bool open ( )
inline

Definition at line 82 of file qtemporaryfile.h.

QString fileName ( ) const
QString fileTemplate ( ) const
void setFileTemplate ( const QString name)
static QTemporaryFile* createLocalFile ( const QString fileName)
inlinestatic

Definition at line 88 of file qtemporaryfile.h.

89  { QFile file(fileName); return createLocalFile(file); }
static QTemporaryFile * createLocalFile(const QString &fileName)
Definition: qfile.h:65
static QTemporaryFile* createLocalFile ( QFile file)
static
virtual QAbstractFileEngine* fileEngine ( ) const
virtual

Reimplemented from QFile.

bool open ( OpenMode  flags)
protectedvirtual

Reimplemented from QFile.

Friends And Related Function Documentation

friend class QFile
friend

Definition at line 98 of file qtemporaryfile.h.


The documentation for this class was generated from the following file: