11 #include <QStringList>
21 MFile(QObject *parent=0);
28 virtual bool open(QIODevice::OpenMode m=QIODevice::WriteOnly);
virtual void close()
compares the old (if it exists) and new version of the file and overwrites the old one if there are d...
Definition: mfile.cpp:20
overwrites QFile to only generate a file if its new version differs from an existing one...
Definition: mfile.h:15
static bool touchedFile(QString)
returns true if that file name has been touched yet
Definition: mfile.cpp:71
MFile(QString name, QObject *parent=0)
creates a new file (tentatively) with the given name (temporarily with ",new" appended) ...
Definition: mfile.cpp:13
virtual bool open(QIODevice::OpenMode m=QIODevice::WriteOnly)
opens the file, WriteOnly is assumed as mode
Definition: mfile.cpp:57
static QMap< QString, QStringList > touched
Definition: mfile.h:44
~MFile()
implicitly closes the file
Definition: mfile.cpp:15
void setFileName(QString n)
sets the file name for the file to be written; must be called before it is opened ...
Definition: mfile.cpp:51
QString fileName() const
returns the name of the file (without ",new")
Definition: mfile.h:31
QString name
Definition: mfile.h:41
bool isopen
Definition: mfile.h:39