svcore
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. See the file 00012 COPYING included with this distribution for more information. 00013 */ 00014 00015 #ifndef _TEMP_WRITE_FILE_H_ 00016 #define _TEMP_WRITE_FILE_H_ 00017 00018 #include <QTemporaryFile> 00019 00027 class TempWriteFile 00028 { 00029 public: 00030 TempWriteFile(QString targetFileName); // may throw FileOperationFailed 00031 00037 ~TempWriteFile(); 00038 00047 QString getTemporaryFilename(); 00048 00052 void moveToTarget(); 00053 00054 protected: 00055 QString m_target; 00056 QString m_temp; 00057 }; 00058 00059 00060 #endif