diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-03-09 16:49:32 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2015-03-09 16:53:28 +0100 |
commit | 6971b49f85d9ddeb2da968a594d65affec3d2b44 (patch) | |
tree | 620c821e72045b3b547982efb3d068d5354de9ce /heimdall-frontend/source/PackageData.h | |
parent | Completed basic firmware file selection functionality (diff) | |
download | Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.gz Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.bz2 Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.lz Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.xz Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.zst Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.zip |
Diffstat (limited to '')
-rw-r--r-- | heimdall-frontend/source/PackageData.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/heimdall-frontend/source/PackageData.h b/heimdall-frontend/source/PackageData.h index 84f081c..28be679 100644 --- a/heimdall-frontend/source/PackageData.h +++ b/heimdall-frontend/source/PackageData.h @@ -22,7 +22,7 @@ #define PACKAGEDATA_H // Qt -#include <QTemporaryFile> +#include <QDir> // Heimdall Frontend #include "FirmwareInfo.h" @@ -34,15 +34,16 @@ namespace HeimdallFrontend private: FirmwareInfo firmwareInfo; - QList<QTemporaryFile *> files; + QList<QString> filePaths; + QDir packageDirectory; public: PackageData(); ~PackageData(); - void Clear(void); - bool ReadFirmwareInfo(QFile *file); + void Clear(bool deletePackageDirectory = true); + bool ReadFirmwareInfo(const QString& path); bool IsCleared(void) const; @@ -56,20 +57,24 @@ namespace HeimdallFrontend return (firmwareInfo); } - const QList<QTemporaryFile *>& GetFiles(void) const + const QList<QString>& GetFilePaths(void) const { - return (files); + return (filePaths); } - QList<QTemporaryFile *>& GetFiles(void) + QList<QString>& GetFilePaths(void) { - return (files); + return (filePaths); } - // Simply clears the files list, it does delete/close any files. - void RemoveAllFiles(void) + void SetPackagePath(const QString& path) { - files.clear(); + packageDirectory.setPath(path); + } + + QString GetPackagePath() const + { + return packageDirectory.path(); } }; } |