summaryrefslogtreecommitdiff
path: root/src/modlistview.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-30 22:56:34 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:17 +0100
commit8a88421fd9748f64163f18d8b89ea9d651402014 (patch)
treec4720283a1d246cc5054fdbbcff7780bb17a1b28 /src/modlistview.cpp
parent07c2badd174059f7cc4ca404c22c6741b679cc7f (diff)
Start moving modlist context menu actions to separate structures.
Diffstat (limited to 'src/modlistview.cpp')
-rw-r--r--src/modlistview.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp
index b36a77d9..f8192758 100644
--- a/src/modlistview.cpp
+++ b/src/modlistview.cpp
@@ -17,6 +17,7 @@
#include "log.h"
#include "modflagicondelegate.h"
#include "modconflicticondelegate.h"
+#include "modlistviewactions.h"
#include "modlistdropinfo.h"
#include "genericicondelegate.h"
#include "shared/directoryentry.h"
@@ -118,6 +119,11 @@ int ModListView::sortColumn() const
return m_sortProxy ? m_sortProxy->sortColumn() : -1;
}
+ModListViewActions& ModListView::actions() const
+{
+ return *m_actions;
+}
+
int ModListView::nextMod(int modIndex) const
{
const QModelIndex start = indexModelToView(m_core->modList()->index(modIndex, 0));
@@ -634,10 +640,11 @@ void ModListView::updateGroupByProxy(int groupIndex)
}
}
-void ModListView::setup(OrganizerCore& core, Ui::MainWindow* mwui)
+void ModListView::setup(OrganizerCore& core, ModListViewActions* actions, Ui::MainWindow* mwui)
{
// attributes
m_core = &core;
+ m_actions = actions;
ui = { mwui->groupCombo, mwui->activeModsCounter, mwui->modFilterEdit, mwui->clearFiltersButton };
connect(m_core, &OrganizerCore::modInstalled, this, &ModListView::onModInstalled);