comparison base/PropertyContainer.h @ 29:8460b3bf8f04

* Implement play mute, level and pan controls and a layer visibility control * Handle swapping the buffers in AudioCallbackPlaySource more gracefully, so that in many cases it can be done inaudibly. Still gets it wrong when playing in a noncontiguous selection. * Fix to SV file save for non-2d sparse models * Fixes to LED button drawing and AudioDial mouse functionality * Add progress bar for Ogg file import * Reshuffle PropertyContainer and its subclasses so it can be a QObject * Add layer dormancy (invisible layer permitted to free its cache space) * Optimisations to SpectrogramLayer, removing locks when reading/writing individual pixels in the cache (should be unnecessary there) -- there's still an issue here as we need a lock when reading from the model in case the model is replaced, and we don't currently have one * Several munlock() calls to make it harder to exhaust real memory if running in an RT mode with mlockall() active
author Chris Cannam
date Fri, 17 Feb 2006 18:04:26 +0000
parents 4b16526b011b
children 5364a9d338a2
comparison
equal deleted inserted replaced
28:4b16526b011b 29:8460b3bf8f04
14 #include <QObject> 14 #include <QObject>
15 #include <vector> 15 #include <vector>
16 16
17 class PlayParameters; 17 class PlayParameters;
18 18
19 class PropertyContainer 19 class PropertyContainer : public QObject
20 { 20 {
21 Q_OBJECT
22
21 public: 23 public:
22 virtual ~PropertyContainer() { } 24 virtual ~PropertyContainer() { }
23 25
24 typedef QString PropertyName; 26 typedef QString PropertyName;
25 typedef std::vector<PropertyName> PropertyList; 27 typedef std::vector<PropertyName> PropertyList;
70 * label to be used for the given value for that property. 72 * label to be used for the given value for that property.
71 */ 73 */
72 virtual QString getPropertyValueLabel(const PropertyName &, 74 virtual QString getPropertyValueLabel(const PropertyName &,
73 int value) const; 75 int value) const;
74 76
77 virtual QString getPropertyContainerName() const = 0;
78 virtual QString getPropertyContainerIconName() const = 0;
79
80 virtual PlayParameters *getPlayParameters() { return 0; }
81
82 signals:
83 void propertyChanged(PropertyName);
84
85 public slots:
75 /** 86 /**
76 * Set a property. This is used for all property types. For 87 * Set a property. This is used for all property types. For
77 * boolean properties, zero is false and non-zero true; for 88 * boolean properties, zero is false and non-zero true; for
78 * colours, the integer value should be treated as a qRgb. 89 * colours, the integer value should be treated as a qRgb.
79 */ 90 */
80 virtual void setProperty(const PropertyName &, int value); 91 virtual void setProperty(const PropertyName &, int value);
81
82 virtual QString getPropertyContainerName() const = 0;
83 virtual QString getPropertyContainerIconName() const = 0;
84
85 virtual PlayParameters *getPlayParameters() const { return 0; }
86 }; 92 };
87 93
88 #endif 94 #endif