-
Notifications
You must be signed in to change notification settings - Fork 0
/
folderimage.h
executable file
·45 lines (38 loc) · 1.06 KB
/
folderimage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef FOLDERIMAGE_H
#define FOLDERIMAGE_H
#include <QDir>
#include "diskimage.h"
class AtariFile
{
public:
bool exists;
QFileInfo original;
QString atariName;
QString atariExt;
QString longName;
int lastSector;
quint64 pos;
int sectPass;
};
class FolderImage : public SimpleDiskImage
{
Q_OBJECT
protected:
QDir dir;
bool mReadOnly;
void buildDirectory();
AtariFile atariFiles[64];
int atariFileNo; //
public:
FolderImage(SioWorker *worker): SimpleDiskImage(worker) {}
~FolderImage();
void close();
bool open(const QString &fileName, FileTypes::FileType /* type */);
bool readSector(quint16 sector, QByteArray &data);
bool writeSector(quint16 sector, const QByteArray &data);
bool format(quint16 aSectorCount, quint16 aSectorSize);
QString longName (QString &lastMountedFolder, QString &atariFileName); //
QString description() const {return tr("Folder image");}
};
extern FolderImage *folderImage;
#endif // FOLDERIMAGE_H