summaryrefslogtreecommitdiff
path: root/src/modlistsortproxy.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-29 19:36:17 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:16 +0100
commit7e2c52133960b7d1bbb0fe72a37cee1c2b67c0ec (patch)
tree686e359ad1576ddc7bff6d4177029dd1a760c5fd /src/modlistsortproxy.cpp
parent68c9ae8592a51b87dc3228b8ebd13737bf2dc7f5 (diff)
Refactoring and fixes.
- Move codes from MainWindow to ModListView. - Fix enable/disable all visible. - Fix changing style of the mod list.
Diffstat (limited to 'src/modlistsortproxy.cpp')
-rw-r--r--src/modlistsortproxy.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp
index daa1478d..a7d0b27a 100644
--- a/src/modlistsortproxy.cpp
+++ b/src/modlistsortproxy.cpp
@@ -80,32 +80,6 @@ Qt::ItemFlags ModListSortProxy::flags(const QModelIndex &modelIndex) const
return flags;
}
-void ModListSortProxy::enableAllVisible()
-{
- if (m_Profile == nullptr) return;
-
- QList<unsigned int> modsToEnable;
- for (int i = 0; i < this->rowCount(); ++i) {
- int modID = mapToSource(index(i, 0)).data(Qt::UserRole + 1).toInt();
- modsToEnable.append(modID);
- }
- m_Profile->setModsEnabled(modsToEnable, QList<unsigned int>());
- invalidate();
-}
-
-void ModListSortProxy::disableAllVisible()
-{
- if (m_Profile == nullptr) return;
-
- QList<unsigned int> modsToDisable;
- for (int i = 0; i < this->rowCount(); ++i) {
- int modID = mapToSource(index(i, 0)).data(Qt::UserRole + 1).toInt();
- modsToDisable.append(modID);
- }
- m_Profile->setModsEnabled(QList<unsigned int>(), modsToDisable);
- invalidate();
-}
-
unsigned long ModListSortProxy::flagsId(const std::vector<ModInfo::EFlag> &flags) const
{
unsigned long result = 0;