summaryrefslogtreecommitdiff
path: root/src/pluginlistcontextmenu.h
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-10 10:25:37 +0100
committerGitHub <noreply@github.com>2021-01-10 10:25:37 +0100
commit80e44a9e3ade61695b4807a3a900d2866138ecac (patch)
tree1ef9904664d8d34dba6692bbf5325aea8c199d08 /src/pluginlistcontextmenu.h
parenteaec140f7c823012c09536175d8917dddcacdb7c (diff)
parent4a0ce804ea486744e5f6140a0ce4538d99e21ce3 (diff)
Merge pull request #1338 from Holt59/collapsible-separators
Collapsible separators (and refactoring).
Diffstat (limited to 'src/pluginlistcontextmenu.h')
-rw-r--r--src/pluginlistcontextmenu.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/pluginlistcontextmenu.h b/src/pluginlistcontextmenu.h
new file mode 100644
index 00000000..0a9a01fe
--- /dev/null
+++ b/src/pluginlistcontextmenu.h
@@ -0,0 +1,54 @@
+#ifndef PLUGINLISTCONTEXTMENU_H
+#define PLUGINLISTCONTEXTMENU_H
+
+#include <QMenu>
+#include <QModelIndex>
+#include <QTreeView>
+
+#include "modinfo.h"
+
+class PluginListView;
+class OrganizerCore;
+
+class PluginListContextMenu : public QMenu
+{
+ Q_OBJECT
+
+public:
+
+ // creates a new context menu, the given index is the one for the click and should be valid
+ //
+ PluginListContextMenu(
+ const QModelIndex& index, OrganizerCore& core, PluginListView* modListView);
+
+signals:
+
+ // emitted to open a mod information
+ //
+ void openModInformation(unsigned int modIndex);
+
+public:
+
+ // create the "Send to... " context menu
+ //
+ QMenu* createSendToContextMenu();
+ void sendPluginsToPriority(const QModelIndexList& indices);
+
+ // set ESP lock on the given plugins
+ //
+ void setESPLock(const QModelIndexList& indices, bool locked);
+
+ // open explorer or mod information for the origin of the plugins
+ //
+ void openOriginExplorer(const QModelIndexList& indices);
+ void openOriginInformation(const QModelIndex& index);
+
+
+ OrganizerCore& m_core;
+ QModelIndex m_index;
+ QModelIndexList m_selected;
+ PluginListView* m_view;
+
+};
+
+#endif