summaryrefslogtreecommitdiff
path: root/src/pluginlistcontextmenu.h
blob: f7d9757fea7108f0c5ec30091fd111f8672fb720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#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