Loading...
Searching...
No Matches
UIPlacement.hpp
1#pragma once
2#include <QObject>
3#include <QPointer>
4#include <QString>
5
6#include <score_lib_process_export.h>
7
8#include <functional>
9
10namespace Process
11{
20enum class UIPlacement
21{
23 Window,
29};
30
32enum class PreviewSource
33{
38 None
39};
40
46struct SCORE_LIB_PROCESS_EXPORT UIPlacementSettings
47{
48 static constexpr const char* scriptEditorKey = "Skin/ScriptEditorPlacement";
49 static constexpr const char* processUIKey = "Skin/ProcessUIPlacement";
50 static constexpr UIPlacement defaultScriptEditorPlacement = UIPlacement::SidePanel;
51 static constexpr UIPlacement defaultProcessUIPlacement = UIPlacement::Central;
52
54 static constexpr const char* scriptEditorPreviewKey = "Skin/ScriptEditorPreview";
55 static constexpr PreviewSource defaultScriptEditorPreview = PreviewSource::Background;
56
58 static const QStringList& names();
59 static QString toString(UIPlacement p);
60 static UIPlacement fromString(const QString& s, UIPlacement fallback);
61
62 static UIPlacement scriptEditorPlacement();
63 static UIPlacement processUIPlacement();
64
66 static const QStringList& previewNames();
67 static QString toString(PreviewSource p);
68 static PreviewSource previewFromString(const QString& s, PreviewSource fallback);
69 static PreviewSource scriptEditorPreview();
70 static void setScriptEditorPreview(PreviewSource p);
71
74 static void setScriptEditorPlacement(UIPlacement p);
75 static void setProcessUIPlacement(UIPlacement p);
77 static void addChangeListener(QObject* context, std::function<void()> f);
78};
79}
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
PreviewSource
How a script editor looks in the central view.
Definition UIPlacement.hpp:33
@ None
A plain editor.
UIPlacement
Where the UIs attached to a process get shown.
Definition UIPlacement.hpp:21
@ SidePanel
A tab of the right pane, next to the inspector.
@ Window
A separate top-level window.
Definition UIPlacement.hpp:47