ff7tk 0.80.25
Work with Final Fantasy 7 game data
QLockedFile.h
Go to the documentation of this file.
1/****************************************************************************/
2// copyright 2009 - 2021 Jérôme Arzel <myst6re@gmail.com> //
3// //
4// This file is part of FF7tk //
5// //
6// FF7tk is free software: you can redistribute it and/or modify //
7// it under the terms of the GNU General Public License as published by //
8// the Free Software Foundation, either version 3 of the License, or //
9// (at your option) any later version. //
10// //
11// FF7tk is distributed in the hope that it will be useful, //
12// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14// GNU General Public License for more details. //
15/****************************************************************************/
16#pragma once
17
18#include <QtCore>
19#ifdef Q_OS_WIN
20#include <windows.h>
21#include <winbase.h>
22#else
23#include <sys/stat.h>
24#include <sys/types.h>
25#include <sys/file.h>
26#include <fcntl.h>
27#include <unistd.h>
28#endif
29#include "ff7tkutils_export.h"
30class FF7TKUTILS_EXPORT QLockedFile : public QFile
31{
32 Q_OBJECT
33public:
35 explicit QLockedFile(const QString &name);
36 explicit QLockedFile(QObject *parent);
37 QLockedFile(const QString &name, QObject *parent);
38 virtual ~QLockedFile();
39 virtual void close();
40 virtual bool open(OpenMode mode);
41signals:
42
43public slots:
44private:
45#ifdef Q_OS_WIN
46 HANDLE handle;
47#endif
48};
Definition: QLockedFile.h:31