comparison transform/TransformFactory.h @ 63:ba405e5e69d3

* Add auto-normalize option to waveform layer * Various fixes to display of dB/metered levels in waveform layer. Still need to fix to ensure they don't waste half the display * Add mix channels option to waveform layer * Use multiple transforms menus, one per transform type -- not sure about this * Give centroid plugin two outputs, for log and linear frequency weightings * Show scale units from plugin in time-value display
author Chris Cannam
date Wed, 29 Mar 2006 12:35:17 +0000
parents 3086ff194ea0
children 4d59dc469b0f
comparison
equal deleted inserted replaced
62:33285f426852 63:ba405e5e69d3
32 // The name is intended to be computer-referenceable, and unique 32 // The name is intended to be computer-referenceable, and unique
33 // within the application. The description is intended to be 33 // within the application. The description is intended to be
34 // human readable. In principle it doesn't have to be unique, but 34 // human readable. In principle it doesn't have to be unique, but
35 // the factory will add suffixes to ensure that it is, all the 35 // the factory will add suffixes to ensure that it is, all the
36 // same (just to avoid user confusion). The friendly name is a 36 // same (just to avoid user confusion). The friendly name is a
37 // shorter version of the description. 37 // shorter version of the description. The type is also intended
38 // to be user-readable, for use in menus.
38 39
39 struct TransformDesc { 40 struct TransformDesc {
40 TransformDesc() { } 41 TransformDesc() { }
41 TransformDesc(TransformName _name, QString _description, 42 TransformDesc(QString _type, TransformName _name, QString _description,
42 QString _friendlyName, QString _maker, 43 QString _friendlyName, QString _maker,
43 bool _configurable) : 44 QString _units, bool _configurable) :
44 name(_name), description(_description), friendlyName(_friendlyName), 45 type(_type), name(_name), description(_description),
45 maker(_maker), configurable(_configurable) { } 46 friendlyName(_friendlyName),
47 maker(_maker), units(_units), configurable(_configurable) { }
48 QString type;
46 TransformName name; 49 TransformName name;
47 QString description; 50 QString description;
48 QString friendlyName; 51 QString friendlyName;
49 QString maker; 52 QString maker;
53 QString units;
50 bool configurable; 54 bool configurable;
51 }; 55 };
52 typedef std::vector<TransformDesc> TransformList; 56 typedef std::vector<TransformDesc> TransformList;
53 57
54 TransformList getAllTransforms(); 58 TransformList getAllTransforms();
59
60 std::vector<QString> getAllTransformTypes();
55 61
56 /** 62 /**
57 * Get a configuration XML string for the given transform (by 63 * Get a configuration XML string for the given transform (by
58 * asking the user, most likely). Returns true if the transform 64 * asking the user, most likely). Returns true if the transform
59 * is acceptable, false if the operation should be cancelled. 65 * is acceptable, false if the operation should be cancelled.
85 /** 91 /**
86 * Brief but friendly description of a transform, suitable for use 92 * Brief but friendly description of a transform, suitable for use
87 * as the name of the output layer. 93 * as the name of the output layer.
88 */ 94 */
89 QString getTransformFriendlyName(TransformName name); 95 QString getTransformFriendlyName(TransformName name);
96
97 QString getTransformUnits(TransformName name);
90 98
91 /** 99 /**
92 * Return true if the transform has any configurable parameters, 100 * Return true if the transform has any configurable parameters,
93 * i.e. if getConfigurationForTransform can ever return a non-trivial 101 * i.e. if getConfigurationForTransform can ever return a non-trivial
94 * (not equivalent to empty) configuration string. 102 * (not equivalent to empty) configuration string.