summaryrefslogtreecommitdiff
path: root/src/pluginlistcontextmenu.h
diff options
context:
space:
mode:
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