summaryrefslogtreecommitdiff
path: root/src/modlistviewactions.h
blob: 49cffaef8f9d8f6eccd81b742f4328ebc7705898 (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
53
54
55
#ifndef MODLISTVIEWACTIONS_H
#define MODLISTVIEWACTIONS_H

#include <QObject>
#include <QString>

class CategoryFactory;
class FilterList;
class ModListView;
class OrganizerCore;

class ModListViewActions : public QObject
{
  Q_OBJECT

public:

  // the nxmReceiver is a (hopefully temporary) "hack" because it would require a lots of change
  // to do otherwise since NXM is mostly based on the old Qt signal-slot system
  //
  ModListViewActions(
    OrganizerCore& core,
    FilterList& filters,
    CategoryFactory& categoryFactory,
    QObject* nxmReceiver,
    ModListView* view);

  // install the mod from the given archive
  //
  void installMod(const QString& archivePath = "") const;

  // create an empty mod/a separator before the given mod or at
  // the end of the list if the index is -1
  //
  void createEmptyMod(int modIndex) const;
  void createSeparator(int modIndex) const;

  // check all mods for update
  //
  void checkModsForUpdates() const;

  // start the "Export Mod List" dialog
  //
  void exportModListCSV() const;

private:

  OrganizerCore& m_core;
  FilterList& m_filters;
  CategoryFactory& m_categories;
  QObject* m_receiver;  // receiver for NXM signals (temporary)
  ModListView* m_view;
};

#endif