aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourceFolderModel.h
diff options
context:
space:
mode:
authorAlexandru Ionut Tripon <alexandru.tripon97@gmail.com>2023-08-12 12:42:30 +0300
committerGitHub <noreply@github.com>2023-08-12 12:42:30 +0300
commitb3b2e9df35222209b4920202d86091eeeb87f03f (patch)
treece44c3877ee36c21279d142b2af1c393e7b87780 /launcher/minecraft/mod/ResourceFolderModel.h
parentca061080c13042642fb3bd49a29a863756f45866 (diff)
parent3aba7f8fec45c7c87be486d8f6b5c96f69facf93 (diff)
downloadPrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.gz
PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.bz2
PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.zip
Merge branch 'develop' into feat/acknowledge_release_type
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/minecraft/mod/ResourceFolderModel.h')
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h
index eb1d7c4f..595b9762 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.h
+++ b/launcher/minecraft/mod/ResourceFolderModel.h
@@ -1,21 +1,21 @@
#pragma once
-#include <QHeaderView>
-#include <QAction>
-#include <QTreeView>
#include <QAbstractListModel>
+#include <QAction>
#include <QDir>
#include <QFileSystemWatcher>
+#include <QHeaderView>
#include <QMutex>
#include <QSet>
#include <QSortFilterProxyModel>
+#include <QTreeView>
#include "Resource.h"
#include "BaseInstance.h"
-#include "tasks/Task.h"
#include "tasks/ConcurrentTask.h"
+#include "tasks/Task.h"
class QSortFilterProxyModel;
@@ -120,7 +120,7 @@ class ResourceFolderModel : public QAbstractListModel {
void saveHiddenColumn(int column, bool hidden);
void loadHiddenColumns(QTreeView* tree);
QMenu* createHeaderContextMenu(QTreeView* tree);
-
+
/** This creates a proxy model to filter / sort the model for a UI.
*
* The actual comparisons and filtering are done directly by the Resource, so to modify behavior go there instead!
@@ -141,10 +141,6 @@ class ResourceFolderModel : public QAbstractListModel {
QString instDirPath() const;
- public slots:
- void enableInteraction(bool enabled);
- void disableInteraction(bool disabled) { enableInteraction(!disabled); }
-
signals:
void updateFinished();
@@ -193,17 +189,20 @@ class ResourceFolderModel : public QAbstractListModel {
* if the resource is complex and has more stuff to parse.
*/
virtual void onParseSucceeded(int ticket, QString resource_id);
- virtual void onParseFailed(int ticket, QString resource_id) { Q_UNUSED(ticket); Q_UNUSED(resource_id); }
+ virtual void onParseFailed(int ticket, QString resource_id)
+ {
+ Q_UNUSED(ticket);
+ Q_UNUSED(resource_id);
+ }
protected:
// Represents the relationship between a column's index (represented by the list index), and it's sorting key.
// As such, the order in with they appear is very important!
QList<SortType> m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::DATE };
- QStringList m_column_names = {"Enable", "Name", "Last Modified"};
- QStringList m_column_names_translated = {tr("Enable"), tr("Name"), tr("Last Modified")};
- QList<QHeaderView::ResizeMode> m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::Stretch, QHeaderView::ResizeToContents };
-
- bool m_can_interact = true;
+ QStringList m_column_names = { "Enable", "Name", "Last Modified" };
+ QStringList m_column_names_translated = { tr("Enable"), tr("Name"), tr("Last Modified") };
+ QList<QHeaderView::ResizeMode> m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::Stretch,
+ QHeaderView::ResizeToContents };
QDir m_dir;
BaseInstance* m_instance;