aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_bsplugins/src/MOPlugin/IPanelInterface.h
blob: 2904e8e1a69c7d7df04be32b13a6289c3a961065 (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
#ifndef IPANELINTERFACE_H
#define IPANELINTERFACE_H

#include <QList>
#include <QString>
#include <functional>

class IPanelInterface
{
public:
  // user selected files in the panel whose origins should be highlighted
  //
  virtual void setSelectedFiles(const QList<QString>& selectedFiles) = 0;

  // request mod info dialog for origin of file
  //
  virtual void displayOriginInformation(const QString& file) = 0;

  virtual bool onPanelActivated(const std::function<void()>& func) = 0;

  virtual bool
  onSelectedOriginsChanged(const std::function<void(const QList<QString>&)>& func) = 0;

  // HACK: this shouldn't be here, but the MOBase::IPluginList::setState function does
  // not cause the list to notify its onPluginStateChanged listeners, so this will work
  // around that
  virtual void setPluginState(const QString& name, bool enable) = 0;
};

#endif  // IPANELINTERFACE_H