diff base/PropertyContainer.h @ 1751:77543124651b by-id

Overhaul PlayParameters bits
author Chris Cannam
date Thu, 04 Jul 2019 18:04:21 +0100
parents c01cbe41aeb5
children
line wrap: on
line diff
--- a/base/PropertyContainer.h	Thu Jul 04 14:30:48 2019 +0100
+++ b/base/PropertyContainer.h	Thu Jul 04 18:04:21 2019 +0100
@@ -21,6 +21,7 @@
 #include <QString>
 #include <QObject>
 #include <vector>
+#include <memory>
 
 class PlayParameters;
 class RangeMapper;
@@ -111,7 +112,13 @@
     virtual QString getPropertyContainerName() const = 0;
     virtual QString getPropertyContainerIconName() const = 0;
 
-    virtual PlayParameters *getPlayParameters() { return 0; }
+    /**
+     * Return the play parameters for this layer, if any. The return
+     * value is a shared_ptr that, if not null, can be passed to
+     * e.g. PlayParameterRepository::EditCommand to change the
+     * parameters.
+     */
+    virtual std::shared_ptr<PlayParameters> getPlayParameters() { return {}; }
 
 signals:
     void propertyChanged(PropertyContainer::PropertyName);