diff options
author | Tim E. Real <termtech@rogers.com> | 2010-01-18 00:50:02 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-01-18 00:50:02 +0000 |
commit | 655965854f108caefe9a65490591d27b43240960 (patch) | |
tree | ec6028d59c5107e2c6e413d135012aa3dc5c2703 | |
parent | 1507da114e608c39afeddb1c28978c6dc36ad010 (diff) |
Fixed freeverb and TAP ladspa plugin (and custom user) GUIs not showing controls.
-rw-r--r-- | muse/ChangeLog | 4 | ||||
-rw-r--r-- | muse/muse/app.cpp | 3 | ||||
-rw-r--r-- | muse/muse/mixer/amixer.cpp | 2 | ||||
-rw-r--r-- | muse/muse/plugin.cpp | 17 | ||||
-rw-r--r-- | muse/muse/plugin.h | 11 |
5 files changed, 34 insertions, 3 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index 3815497f..d9a69b91 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,6 +1,10 @@ 17.01.2010 * Feature: MusE now has two mixers, with selectable track type display. (T356) - Changes to .med file were needed. Tested OK so far with old and new song files. + * Fixed: Builtin freeverb and TAP reverb ladspa GUIs, or custom user GUIs not showing controls. (T356) + - Broken since removal of musewidgetsplugin library months ago. + Added PluginWidgetFactory class to handle local creation of controls. + (Custom user GUIs must be done by hand since the removal of musewidgetsplugin library). 12.01.2010 * Release: 1.0.1 (rj) 10.01.2010 diff --git a/muse/muse/app.cpp b/muse/muse/app.cpp index ea294823..9c9d5aa5 100644 --- a/muse/muse/app.cpp +++ b/muse/muse/app.cpp @@ -764,6 +764,9 @@ void populateAddTrack(QPopupMenu* addTrack) MusE::MusE(int argc, char** argv) : QMainWindow(0, "mainwindow") { + // By T356. For LADSPA plugins in plugin.cpp + QWidgetFactory::addWidgetFactory( new PluginWidgetFactory ); + setFocusPolicy(WheelFocus); muse = this; // hack clipListEdit = 0; diff --git a/muse/muse/mixer/amixer.cpp b/muse/muse/mixer/amixer.cpp index 9393f1c4..18361376 100644 --- a/muse/muse/mixer/amixer.cpp +++ b/muse/muse/mixer/amixer.cpp @@ -500,8 +500,6 @@ void AudioMixerApp::showTracksChanged(QAction* id) void AudioMixerApp::showMidiTracksChanged(bool v) { - // p3.2.24 - printf("AudioMixerApp::showMidiTracksChanged v:%d\n", v); cfg->showMidiTracks = v; updateMixer(UPDATE_ALL); } diff --git a/muse/muse/plugin.cpp b/muse/muse/plugin.cpp index 41915226..ad9a7ce9 100644 --- a/muse/muse/plugin.cpp +++ b/muse/muse/plugin.cpp @@ -24,7 +24,7 @@ #include <qwhatsthis.h> #include <qcheckbox.h> #include <qtooltip.h> -#include <qwidgetfactory.h> +//#include <qwidgetfactory.h> #include <qfile.h> #include <qobjectlist.h> #include <qcombobox.h> @@ -2051,6 +2051,7 @@ PluginGui::PluginGui(PluginI* p) if (LADSPA_IS_HINT_TOGGLED(range.HintDescriptor)) { params[i].type = GuiParam::GUI_SWITCH; CheckBox* cb = new CheckBox(mw, i, "param"); + cb->setId(i); cb->setText(QString(plugin->paramName(i))); cb->setChecked(plugin->param(i) != 0.0); cb->setFixedHeight(h); @@ -2872,3 +2873,17 @@ void PluginGui::guiSliderRightClicked(const QPoint &p, int idx) if(id != -1) song->execAutomationCtlPopup((AudioTrack*)plugin->track(), p, genACnum(id, param)); } + +//--------------------------------------------------------- +// PluginWidgetFactory +//--------------------------------------------------------- + +QWidget* PluginWidgetFactory::createWidget(const QString& className, QWidget* parent, const char* name) const +{ + if(className == "DoubleLabel") + return new DoubleLabel(parent, name); + if(className == "Slider") + return new Slider(parent, name); + return 0; +}; + diff --git a/muse/muse/plugin.h b/muse/muse/plugin.h index 84b144cc..0e3763b6 100644 --- a/muse/muse/plugin.h +++ b/muse/muse/plugin.h @@ -15,6 +15,7 @@ #include <qmainwindow.h> #include <qstring.h> #include <qwidget.h> +#include <qwidgetfactory.h> #include <qdialog.h> #include <qfileinfo.h> #include <qcombobox.h> @@ -35,6 +36,16 @@ class AudioTrack; class MidiController; //--------------------------------------------------------- +// PluginWidgetFactory +//--------------------------------------------------------- + +class PluginWidgetFactory : public QWidgetFactory +{ + public: + virtual QWidget* createWidget(const QString& className, QWidget* parent, const char* name) const; +}; + +//--------------------------------------------------------- // Plugin //--------------------------------------------------------- |