summaryrefslogtreecommitdiff
path: root/src/modlistcontextmenu.h
blob: 3bc15c57014a23fba7fa05b01ec2b9494986a86f (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
52
#ifndef MODLISTCONTEXTMENU_H
#define MODLISTCONTEXTMENU_H

#include <vector>

#include <QMenu>
#include <QModelIndex>
#include <QTreeView>

class ModListView;
class OrganizerCore;

class ModListGlobalContextMenu : public QMenu
{
  Q_OBJECT
public:

  ModListGlobalContextMenu(OrganizerCore& core, ModListView* modListView, QWidget* parent = nullptr);

};

class ModListContextMenu : public QMenu
{
  Q_OBJECT

public:

  // creates a new context menu, the given index is the one for the click and should be valid
  //
  ModListContextMenu(OrganizerCore& core, const QModelIndex& index, ModListView* modListView);

public: // TODO: Move this to private when all is done

  // create the "Send to... " context menu
  //
  QMenu* createSendToContextMenu();

  // add actions/menus to this menu for each type of mod
  //
  void addOverwriteActions();
  void addSeparatorActions();
  void addForeignActions();
  void addBackupActions();
  void addRegularActions();

  OrganizerCore& m_core;
  QModelIndexList m_index;
  ModListView* m_view;

};

#endif