diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-15 14:51:05 +0200 |
commit | bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9 (patch) | |
tree | e6497e304b7b9368367565fbc7c06efab1124b1c /application/pages/modplatform/FtbListModel.h | |
parent | 03280cc62e75f8073f8d3d9e9e3952acf21fa77d (diff) | |
download | MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.gz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.lz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.tar.xz MultiMC-bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9.zip |
NOISSUE tabs -> spaces
Diffstat (limited to 'application/pages/modplatform/FtbListModel.h')
-rw-r--r-- | application/pages/modplatform/FtbListModel.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/application/pages/modplatform/FtbListModel.h b/application/pages/modplatform/FtbListModel.h index d3a82b73..c85c04fa 100644 --- a/application/pages/modplatform/FtbListModel.h +++ b/application/pages/modplatform/FtbListModel.h @@ -16,53 +16,53 @@ typedef std::function<void(QString)> LogoCallback; class FtbFilterModel : public QSortFilterProxyModel { public: - FtbFilterModel(QObject* parent = Q_NULLPTR); - enum Sorting { - ByName, - ByGameVersion - }; - const QMap<QString, Sorting> getAvailableSortings(); - QString translateCurrentSorting(); - void setSorting(Sorting sorting); - Sorting getCurrentSorting(); + FtbFilterModel(QObject* parent = Q_NULLPTR); + enum Sorting { + ByName, + ByGameVersion + }; + const QMap<QString, Sorting> getAvailableSortings(); + QString translateCurrentSorting(); + void setSorting(Sorting sorting); + Sorting getCurrentSorting(); protected: - bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; - bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; + bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; private: - QMap<QString, Sorting> sortings; - Sorting currentSorting; + QMap<QString, Sorting> sortings; + Sorting currentSorting; }; class FtbListModel : public QAbstractListModel { - Q_OBJECT + Q_OBJECT private: - FtbModpackList modpacks; - QStringList m_failedLogos; - QStringList m_loadingLogos; - FtbLogoMap m_logoMap; - QMap<QString, LogoCallback> waitingCallbacks; + FtbModpackList modpacks; + QStringList m_failedLogos; + QStringList m_loadingLogos; + FtbLogoMap m_logoMap; + QMap<QString, LogoCallback> waitingCallbacks; - void requestLogo(QString file); - QString translatePackType(FtbPackType type) const; + void requestLogo(QString file); + QString translatePackType(FtbPackType type) const; private slots: - void logoFailed(QString logo); - void logoLoaded(QString logo, QIcon out); + void logoFailed(QString logo); + void logoLoaded(QString logo, QIcon out); public: - FtbListModel(QObject *parent); - ~FtbListModel(); - int rowCount(const QModelIndex &parent) const override; - int columnCount(const QModelIndex &parent) const override; - QVariant data(const QModelIndex &index, int role) const override; + FtbListModel(QObject *parent); + ~FtbListModel(); + int rowCount(const QModelIndex &parent) const override; + int columnCount(const QModelIndex &parent) const override; + QVariant data(const QModelIndex &index, int role) const override; - void fill(FtbModpackList modpacks); + void fill(FtbModpackList modpacks); - FtbModpack at(int row); - void getLogo(const QString &logo, LogoCallback callback); + FtbModpack at(int row); + void getLogo(const QString &logo, LogoCallback callback); }; |