Mercurial > hg > sonic-visualiser
comparison transform/TransformFactory.h @ 34:8ad306d8a568
* Pull transforms out of Layer menu (again) and into a separate Transforms
menu
* Add Recent Transforms submenu
* Add effects and generators to the transforms menu (not yet implemented)
as well as analysis plugins and data-from-effects (control output ports)
* Add a nice dictionary-volume-style alphabetic subdivision of plugin names
in plugins By Name menus
author | Chris Cannam |
---|---|
date | Fri, 22 Sep 2006 16:12:23 +0000 |
parents | 544ab25d2372 |
children | fbd7a497fd89 |
comparison
equal
deleted
inserted
replaced
33:544ab25d2372 | 34:8ad306d8a568 |
---|---|
39 // same (just to avoid user confusion). The friendly name is a | 39 // same (just to avoid user confusion). The friendly name is a |
40 // shorter version of the description. The type is also intended | 40 // shorter version of the description. The type is also intended |
41 // to be user-readable, for use in menus. | 41 // to be user-readable, for use in menus. |
42 | 42 |
43 struct TransformDesc { | 43 struct TransformDesc { |
44 | |
44 TransformDesc() { } | 45 TransformDesc() { } |
45 TransformDesc(QString _type, QString _category, | 46 TransformDesc(QString _type, QString _category, |
46 TransformName _name, QString _description, | 47 TransformName _name, QString _description, |
47 QString _friendlyName, QString _maker, | 48 QString _friendlyName, QString _maker, |
48 QString _units, bool _configurable) : | 49 QString _units, bool _configurable) : |
49 type(_type), category(_category), | 50 type(_type), category(_category), |
50 name(_name), description(_description), | 51 name(_name), description(_description), |
51 friendlyName(_friendlyName), | 52 friendlyName(_friendlyName), |
52 maker(_maker), units(_units), configurable(_configurable) { } | 53 maker(_maker), units(_units), configurable(_configurable) { } |
54 | |
53 QString type; | 55 QString type; |
54 QString category; | 56 QString category; |
55 TransformName name; | 57 TransformName name; |
56 QString description; | 58 QString description; |
57 QString friendlyName; | 59 QString friendlyName; |
58 QString maker; | 60 QString maker; |
59 QString units; | 61 QString units; |
60 bool configurable; | 62 bool configurable; |
63 | |
64 bool operator<(const TransformDesc &od) const { | |
65 return (description < od.description); | |
66 }; | |
61 }; | 67 }; |
62 typedef std::vector<TransformDesc> TransformList; | 68 typedef std::vector<TransformDesc> TransformList; |
63 | 69 |
64 TransformList getAllTransforms(); | 70 TransformList getAllTransforms(); |
65 | 71 |
117 | 123 |
118 /** | 124 /** |
119 * If the transform has a prescribed number or range of channel | 125 * If the transform has a prescribed number or range of channel |
120 * inputs, return true and set minChannels and maxChannels to the | 126 * inputs, return true and set minChannels and maxChannels to the |
121 * minimum and maximum number of channel inputs the transform can | 127 * minimum and maximum number of channel inputs the transform can |
122 * accept. | 128 * accept. Return false if it doesn't care. |
123 */ | 129 */ |
124 bool getTransformChannelRange(TransformName name, | 130 bool getTransformChannelRange(TransformName name, |
125 int &minChannels, int &maxChannels); | 131 int &minChannels, int &maxChannels); |
126 | 132 |
127 //!!! Need some way to indicate that the input model has changed / | 133 //!!! Need some way to indicate that the input model has changed / |