21 #ifndef SCLOCKEDFILE_H
22 #define SCLOCKEDFILE_H
25 #include "scribusapi.h"
29 #include <QTemporaryFile>
42 void setName(
const QString & name);
43 const QString & name()
const {
return m_fileName; }
44 bool createPath()
const;
48 bool locked()
const {
return m_isLocked; }
53 virtual bool open() = 0;
54 virtual bool commit() = 0;
56 virtual QIODevice *io() = 0;
58 static const QString lockSuffix;
70 QString lockName()
const;
84 virtual bool commit();
86 virtual QIODevice *io() {
return &m_file; }
103 virtual bool commit();
105 virtual QIODevice *io() {
return &m_file; }
108 QTemporaryFile m_file;
110 static QString templateName(
const QFileInfo & info);
Read-only locked file access.
Definition: sclockedfile.h:77
Base class for locked file access.
Definition: sclockedfile.h:37
Read/write locked file access.
Definition: sclockedfile.h:96