blob: 184d08775dfe1f7aca2799bbc366f1defb88463c (
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
56
57
58
59
60
|
#ifndef MOPANELINTERFACE_H
#define MOPANELINTERFACE_H
#include "IPanelInterface.h"
#include <imoinfo.h>
#include <boost/signals2.hpp>
#include <QMainWindow>
#include <QTreeView>
class MOPanelInterface final : public QObject, public IPanelInterface
{
Q_OBJECT
public:
using SignalPanelActivated = boost::signals2::signal<void()>;
using SignalSelectedOriginsChanged =
boost::signals2::signal<void(const QList<QString>&)>;
MOPanelInterface(MOBase::IOrganizer* organizer, QMainWindow* mainWindow);
MOPanelInterface(const MOPanelInterface&) = delete;
MOPanelInterface(MOPanelInterface&&) = delete;
~MOPanelInterface() noexcept;
MOPanelInterface& operator=(const MOPanelInterface&) = delete;
MOPanelInterface& operator=(MOPanelInterface&&) = delete;
void assignWidget(QTabWidget* tabWidget, QWidget* panel);
void setSelectedFiles(const QList<QString>& selectedFiles) override;
void displayOriginInformation(const QString& file) override;
bool onPanelActivated(const std::function<void()>& func) override;
bool onSelectedOriginsChanged(
const std::function<void(const QList<QString>&)>& func) override;
void setPluginState(const QString& name, bool enable) override;
private slots:
void onModSeparatorCollapsed(const QModelIndex& index);
void onModSeparatorExpanded(const QModelIndex& index);
void onModSelectionChanged();
private:
MOBase::IModList* m_ModList;
MOBase::IPluginList* m_PluginList;
QTreeView* m_ModListView;
QTreeView* m_PluginListView;
SignalPanelActivated m_PanelActivated;
SignalSelectedOriginsChanged m_SelectedOriginsChanged;
};
#endif // MOPANELINTERFACE_H
|