Loading...
Searching...
No Matches
ProcessWidget.hpp
1#pragma once
2#include <Process/Preset.hpp>
3
4#include <Library/LibraryInterface.hpp>
5#include <Library/PresetListView.hpp>
6#include <Library/ProcessTreeView.hpp>
7
8#include <score/tools/std/Optional.hpp>
9
10#include <QSplitter>
11#include <QTreeView>
12
13#include <score_plugin_library_export.h>
14namespace score
15{
16struct GUIApplicationContext;
17}
18namespace Process
19{
20class ApplicationPlugin;
21}
22namespace Library
23{
24class ProcessesItemModel;
25class PresetItemModel;
26
28 : public QObject
30{
31 SCORE_CONCRETE("7fc3a366-7792-489f-aca9-79d9f6d4415d")
32
33public:
34 QSet<QString> acceptedFiles() const noexcept override;
35 QSet<QString> acceptedMimeTypes() const noexcept override;
36
38 override;
39
40 void addPath(std::string_view path) override;
41
42 bool onDrop(const QMimeData& mime, int row, int column, const QDir& parent) override;
43
44private:
45 Process::ApplicationPlugin* presetLib{};
46 const Process::ProcessFactoryList* processes{};
47};
48
49class SCORE_PLUGIN_LIBRARY_EXPORT ProcessWidget : public QWidget
50{
51public:
52 ProcessWidget(const score::GUIApplicationContext& ctx, QWidget* parent);
54
55 ProcessesItemModel& processModel() const noexcept { return *m_processModel; }
56 PresetItemModel& presetModel() const noexcept { return *m_presetModel; }
57
58 const ProcessTreeView& processView() const noexcept { return m_tv; }
59 ProcessTreeView& processView() noexcept { return m_tv; }
60
61 const PresetListView& presetView() const noexcept { return m_lv; }
62 PresetListView& presetView() noexcept { return m_lv; }
63
64private:
65 ProcessesItemModel* m_processModel{};
66 PresetItemModel* m_presetModel{};
67 ProcessTreeView m_tv;
68 PresetListView m_lv;
69
70 QWidget m_preview;
71 QWidget* m_previewChild{};
72};
73}
Definition LibraryInterface.hpp:22
Definition PresetItemModel.hpp:16
Definition ProcessWidget.hpp:30
Definition PresetListView.hpp:13
Definition ProcessTreeView.hpp:14
Definition ProcessWidget.hpp:50
Definition ProcessesItemModel.hpp:45
Definition score-lib-process/Process/ApplicationPlugin.hpp:13
Definition ProcessList.hpp:10
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition Application.cpp:90
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15