2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 08:27:43 +00:00

Additional usability features

This commit is contained in:
Jack Andersen
2018-01-09 20:19:48 -10:00
parent 00da24a134
commit f6195a64a6
22 changed files with 834 additions and 176 deletions

View File

@@ -7,6 +7,8 @@
#include <QProgressBar>
#include <QLabel>
class QuaZip;
class DownloadManager : public QObject
{
Q_OBJECT
@@ -18,8 +20,8 @@ class DownloadManager : public QObject
QProgressBar* m_progBar = nullptr;
QLabel* m_errorLabel = nullptr;
std::function<void(const QStringList& index)> m_indexCompletionHandler;
std::function<void(const QString& file)> m_completionHandler;
std::function<void(const QString& file)> m_failedHandler;
std::function<void(QuaZip& file)> m_completionHandler;
std::function<void()> m_failedHandler;
void resetError()
{
@@ -44,8 +46,8 @@ public:
: QObject(parent), m_netManager(this) {}
void connectWidgets(QProgressBar* progBar, QLabel* errorLabel,
std::function<void(const QStringList& index)>&& indexCompletionHandler,
std::function<void(const QString& file)>&& completionHandler,
std::function<void(const QString& file)>&& failedHandler)
std::function<void(QuaZip& file)>&& completionHandler,
std::function<void()>&& failedHandler)
{
m_progBar = progBar;
m_errorLabel = errorLabel;