1
0

SourceToolbar.hpp 624 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <obs.hpp>
  3. #include <QWidget>
  4. class SourceToolbar : public QWidget {
  5. Q_OBJECT
  6. OBSWeakSource weakSource;
  7. protected:
  8. using properties_delete_t = decltype(&obs_properties_destroy);
  9. using properties_t = std::unique_ptr<obs_properties_t, properties_delete_t>;
  10. properties_t props;
  11. OBSDataAutoRelease oldData;
  12. void SaveOldProperties(obs_source_t *source);
  13. void SetUndoProperties(obs_source_t *source, bool repeatable = false);
  14. public:
  15. SourceToolbar(QWidget *parent, OBSSource source);
  16. OBSSource GetSource() { return OBSGetStrongRef(weakSource); }
  17. public slots:
  18. virtual void Update() {}
  19. };