Mercurial > hg > svcore
comparison transform/TransformFactory.h @ 64:4d59dc469b0f
* Ensure plugin parameters for a transform are saved in the .sv file and
restored in case the plugin has to be run again
* Make plugin dialog offer options for mixdown/single-channel use if the
file has more than one channels but the plugin only accepts one
* Fix incorrect samplerate playback for second file loaded if its samplerate
differed from first
* Add Zoom to Fit and Select Visible Range menu options, split out Import
Audio into main model and secondary model options
* Add stubs for cut, copy and paste operations (not implemented yet)
author | Chris Cannam |
---|---|
date | Thu, 30 Mar 2006 13:18:11 +0000 |
parents | ba405e5e69d3 |
children | 9e027aa5b5c3 |
comparison
equal
deleted
inserted
replaced
63:ba405e5e69d3 | 64:4d59dc469b0f |
---|---|
63 * Get a configuration XML string for the given transform (by | 63 * Get a configuration XML string for the given transform (by |
64 * asking the user, most likely). Returns true if the transform | 64 * asking the user, most likely). Returns true if the transform |
65 * is acceptable, false if the operation should be cancelled. | 65 * is acceptable, false if the operation should be cancelled. |
66 */ | 66 */ |
67 bool getConfigurationForTransform(TransformName name, Model *inputModel, | 67 bool getConfigurationForTransform(TransformName name, Model *inputModel, |
68 int &channel, | |
68 QString &configurationXml); | 69 QString &configurationXml); |
69 | 70 |
70 /** | 71 /** |
71 * Return the output model resulting from applying the named | 72 * Return the output model resulting from applying the named |
72 * transform to the given input model. The transform may still be | 73 * transform to the given input model. The transform may still be |
79 * | 80 * |
80 * The returned model is owned by the caller and must be deleted | 81 * The returned model is owned by the caller and must be deleted |
81 * when no longer needed. | 82 * when no longer needed. |
82 */ | 83 */ |
83 Model *transform(TransformName name, Model *inputModel, | 84 Model *transform(TransformName name, Model *inputModel, |
84 QString configurationXml = ""); | 85 int channel, QString configurationXml = ""); |
85 | 86 |
86 /** | 87 /** |
87 * Full description of a transform, suitable for putting on a menu. | 88 * Full description of a transform, suitable for putting on a menu. |
88 */ | 89 */ |
89 QString getTransformDescription(TransformName name); | 90 QString getTransformDescription(TransformName name); |
101 * i.e. if getConfigurationForTransform can ever return a non-trivial | 102 * i.e. if getConfigurationForTransform can ever return a non-trivial |
102 * (not equivalent to empty) configuration string. | 103 * (not equivalent to empty) configuration string. |
103 */ | 104 */ |
104 bool isTransformConfigurable(TransformName name); | 105 bool isTransformConfigurable(TransformName name); |
105 | 106 |
107 /** | |
108 * If the transform has a prescribed number or range of channel | |
109 * inputs, return true and set minChannels and maxChannels to the | |
110 * minimum and maximum number of channel inputs the transform can | |
111 * accept. | |
112 */ | |
113 bool getTransformChannelRange(TransformName name, | |
114 int &minChannels, int &maxChannels); | |
115 | |
106 //!!! Need some way to indicate that the input model has changed / | 116 //!!! Need some way to indicate that the input model has changed / |
107 //been deleted so as not to blow up backgrounded transform! -- Or | 117 //been deleted so as not to blow up backgrounded transform! -- Or |
108 //indeed, if the output model has been deleted -- could equally | 118 //indeed, if the output model has been deleted -- could equally |
109 //well happen! | 119 //well happen! |
110 | 120 |
113 protected slots: | 123 protected slots: |
114 void transformFinished(); | 124 void transformFinished(); |
115 | 125 |
116 protected: | 126 protected: |
117 Transform *createTransform(TransformName name, Model *inputModel, | 127 Transform *createTransform(TransformName name, Model *inputModel, |
118 QString configurationXml, bool start); | 128 int channel, QString configurationXml, bool start); |
119 | 129 |
120 struct TransformIdent | 130 struct TransformIdent |
121 { | 131 { |
122 TransformName name; | 132 TransformName name; |
123 QString configurationXml; | 133 QString configurationXml; |