| 7 | class Variable; |
| 8 | |
| 9 | class SourceSelection { |
| 10 | public: |
| 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 | |
| 27 | private: |
| 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 | |
| 38 | class ADVSS_EXPORT SourceSelectionWidget : public FilterComboBox { |
| 39 | Q_OBJECT |
nothing calls this directly
no test coverage detected