MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SourceSelection

Class SourceSelection

lib/utils/source-selection.hpp:9–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7class Variable;
8
9class SourceSelection {
10public:
11 EXPORT void Save(obs_data_t *obj, const char *name = "source") const;
12 EXPORT void Load(obs_data_t *obj, const char *name = "source");
13
14 enum class Type {
15 SOURCE,
16 VARIABLE,
17 };
18
19 EXPORT Type GetType() const { return _type; }
20 EXPORT OBSWeakSource GetSource() const;
21 EXPORT void SetSource(OBSWeakSource);
22 EXPORT void ResolveVariables();
23 EXPORT std::string ToString(bool resolve = false) const;
24
25 EXPORT bool operator==(const SourceSelection &) const;
26
27private:
28 // TODO: Remove in future version
29 // Used for backwards compatibility to older settings versions
30 void LoadFallback(obs_data_t *obj, const char *name);
31
32 OBSWeakSource _source;
33 std::weak_ptr<Variable> _variable;
34 Type _type = Type::SOURCE;
35 friend class SourceSelectionWidget;
36};
37
38class ADVSS_EXPORT SourceSelectionWidget : public FilterComboBox {
39 Q_OBJECT

Callers

nothing calls this directly

Calls 1

ToStringFunction · 0.85

Tested by

no test coverage detected