1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Add extracting stuff

This commit is contained in:
kelteseth 2017-05-21 19:17:01 +02:00
parent 391f58f822
commit 2311ca54f2
2 changed files with 23 additions and 2 deletions

View File

@ -16,7 +16,7 @@ int PackageFileHandler::loadPackageFromLocalZip(QList<QUrl> url, QString extract
}
}
for(int i = 0; i < url.length(); i++){
QStringList list = JlCompress::extractDir(url.at(i).toString(), extractDir);
//QStringList list = JlCompress::extractDir(url.at(i).toString(), extractDir);
}

View File

@ -1,7 +1,6 @@
#ifndef PACKAGEFILEHANDLER_H
#define PACKAGEFILEHANDLER_H
#include "quazip/quazip/JlCompress.h"
#include <QFile>
#include <QList>
#include <QObject>
@ -12,6 +11,7 @@
class PackageFileHandler : public QObject {
Q_OBJECT
Q_PROPERTY(LoaderStatus currentLoaderStatus READ currentLoaderStatus WRITE setCurrentLoaderStatus NOTIFY currentLoaderStatusChanged)
public:
explicit PackageFileHandler(QObject* parent = nullptr);
@ -27,6 +27,27 @@ public:
};
Q_ENUM(LoaderStatus)
LoaderStatus currentLoaderStatus() const
{
return m_currentLoaderStatus;
}
public slots:
void setCurrentLoaderStatus(LoaderStatus currentLoaderStatus)
{
if (m_currentLoaderStatus == currentLoaderStatus)
return;
m_currentLoaderStatus = currentLoaderStatus;
emit currentLoaderStatusChanged(currentLoaderStatus);
}
signals:
void currentLoaderStatusChanged(LoaderStatus currentLoaderStatus);
private:
LoaderStatus m_currentLoaderStatus = LoaderStatus::Idle;
};
#endif // PACKAGEFILEHANDLER_H