00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _KSAVEFILE_H_
00021 #define _KSAVEFILE_H_
00022
00023 #include <qstring.h>
00024 #include <stdio.h>
00025 #include <errno.h>
00026 #include <ktempfile.h>
00027
00028 class KSaveFilePrivate;
00029
00041 class KSaveFile
00042 {
00043 public:
00049 KSaveFile(const QString &filename, int mode = 0666 );
00050
00054 ~KSaveFile();
00055
00067 int status() const
00068 { return mTempFile.status(); }
00069
00075 QString name() const;
00076
00082 int handle() const
00083 { return mTempFile.handle(); }
00084
00090 FILE *fstream()
00091 { return mTempFile.fstream(); }
00092
00098 QFile *file()
00099 { return mTempFile.file(); }
00100
00106 QTextStream *textStream()
00107 { return mTempFile.textStream(); }
00108
00114 QDataStream *dataStream()
00115 { return mTempFile.dataStream(); }
00116
00121 void abort();
00122
00129 bool close();
00130 private:
00131 QString mFileName;
00132 KTempFile mTempFile;
00133
00134 KSaveFilePrivate *d;
00135 };
00136
00137 #endif