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

Various GUI logic fixes and improvements

This commit is contained in:
Jack Andersen
2018-01-01 14:58:38 -10:00
parent 4f888becdf
commit 8c9ad43a60
7 changed files with 377 additions and 97 deletions

View File

@@ -19,6 +19,7 @@ class DownloadManager : public QObject
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;
void resetError()
{
@@ -43,12 +44,14 @@ 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)>&& completionHandler,
std::function<void(const QString& file)>&& failedHandler)
{
m_progBar = progBar;
m_errorLabel = errorLabel;
m_indexCompletionHandler = std::move(indexCompletionHandler);
m_completionHandler = std::move(completionHandler);
m_failedHandler = std::move(failedHandler);
}
void fetchIndex();
void fetchBinary(const QString& str, const QString& outPath);