aboutsummaryrefslogtreecommitdiff
path: root/launcher/pages/modplatform/atlauncher/AtlListModel.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-11-22 03:55:16 +0100
committerPetr Mrázek <peterix@gmail.com>2021-11-22 03:55:16 +0100
commitb258eac215c791b2a8eed10cecbbf9551c87f0b9 (patch)
tree1ae72f62d344f6a9c982b9dc5d598d32fc742acc /launcher/pages/modplatform/atlauncher/AtlListModel.h
parent5040231f8d6ca865ea50250509c3315ea0c7400e (diff)
downloadPrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.tar.gz
PrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.tar.bz2
PrismLauncher-b258eac215c791b2a8eed10cecbbf9551c87f0b9.zip
NOISSUE continue reshuffling the codebase
Diffstat (limited to 'launcher/pages/modplatform/atlauncher/AtlListModel.h')
-rw-r--r--launcher/pages/modplatform/atlauncher/AtlListModel.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/launcher/pages/modplatform/atlauncher/AtlListModel.h b/launcher/pages/modplatform/atlauncher/AtlListModel.h
deleted file mode 100644
index 79aa8180..00000000
--- a/launcher/pages/modplatform/atlauncher/AtlListModel.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-
-#include <QAbstractListModel>
-
-#include "net/NetJob.h"
-#include <QIcon>
-#include <modplatform/atlauncher/ATLPackIndex.h>
-
-namespace Atl {
-
-typedef QMap<QString, QIcon> LogoMap;
-typedef std::function<void(QString)> LogoCallback;
-
-class ListModel : public QAbstractListModel
-{
- Q_OBJECT
-
-public:
- ListModel(QObject *parent);
- virtual ~ListModel();
-
- int rowCount(const QModelIndex &parent) const override;
- int columnCount(const QModelIndex &parent) const override;
- QVariant data(const QModelIndex &index, int role) const override;
-
- void request();
-
- void getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback);
-
-private slots:
- void requestFinished();
- void requestFailed(QString reason);
-
- void logoFailed(QString logo);
- void logoLoaded(QString logo, QIcon out);
-
-private:
- void requestLogo(QString file, QString url);
-
-private:
- QList<ATLauncher::IndexedPack> modpacks;
-
- QStringList m_failedLogos;
- QStringList m_loadingLogos;
- LogoMap m_logoMap;
- QMap<QString, LogoCallback> waitingCallbacks;
-
- NetJob::Ptr jobPtr;
- QByteArray response;
-};
-
-}