summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/AudioPluginDialog.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 18:37:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 18:37:05 +0000
commit145364a8af6a1fec06556221e66d4b724a62fc9a (patch)
tree53bd71a544008c518034f208d64c932dc2883f50 /src/gui/dialogs/AudioPluginDialog.h
downloadrosegarden-145364a8af6a1fec06556221e66d4b724a62fc9a.tar.gz
rosegarden-145364a8af6a1fec06556221e66d4b724a62fc9a.zip
Added old abandoned KDE3 version of the RoseGarden MIDI tool
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1097595 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/dialogs/AudioPluginDialog.h')
-rw-r--r--src/gui/dialogs/AudioPluginDialog.h167
1 files changed, 167 insertions, 0 deletions
diff --git a/src/gui/dialogs/AudioPluginDialog.h b/src/gui/dialogs/AudioPluginDialog.h
new file mode 100644
index 0000000..bc8a38b
--- /dev/null
+++ b/src/gui/dialogs/AudioPluginDialog.h
@@ -0,0 +1,167 @@
+
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
+
+/*
+ Rosegarden
+ A MIDI and audio sequencer and musical notation editor.
+
+ This program is Copyright 2000-2008
+ Guillaume Laurent <[email protected]>,
+ Chris Cannam <[email protected]>,
+ Richard Bown <[email protected]>
+
+ The moral rights of Guillaume Laurent, Chris Cannam, and Richard
+ Bown to claim authorship of this work have been asserted.
+
+ Other copyrights also apply to some parts of this work. Please
+ see the AUTHORS file and individual file headers for details.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version. See the file
+ COPYING included with this distribution for more information.
+*/
+
+#ifndef _RG_AUDIOPLUGINDIALOG_H_
+#define _RG_AUDIOPLUGINDIALOG_H_
+
+#include "base/Instrument.h"
+#include "base/MidiProgram.h"
+#include <kdialogbase.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <vector>
+
+
+class QWidget;
+class QPushButton;
+class QLabel;
+class QGridLayout;
+class QFrame;
+class QCloseEvent;
+class QCheckBox;
+class QAccel;
+class KComboBox;
+
+
+namespace Rosegarden
+{
+
+class PluginControl;
+class PluginContainer;
+class AudioPluginOSCGUIManager;
+class AudioPluginManager;
+class AudioPluginInstance;
+
+
+class AudioPluginDialog : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ AudioPluginDialog(QWidget *parent,
+ AudioPluginManager *aPM,
+#ifdef HAVE_LIBLO
+ AudioPluginOSCGUIManager *aGM,
+#endif
+ PluginContainer *instrument,
+ int index);
+
+ PluginContainer* getPluginContainer() const { return m_pluginContainer; }
+
+ QAccel* getAccelerators() { return m_accelerators; }
+
+ bool isSynth() { return m_index == int(Instrument::SYNTH_PLUGIN_POSITION); }
+
+ void updatePlugin(int number);
+ void updatePluginPortControl(int port);
+ void updatePluginProgramControl();
+ void updatePluginProgramList();
+ void guiExited() { m_guiShown = false; }
+
+public slots:
+ void slotCategorySelected(int);
+ void slotPluginSelected(int index);
+ void slotPluginPortChanged(float value);
+ void slotPluginProgramChanged(const QString &value);
+ void slotBypassChanged(bool);
+ void slotCopy();
+ void slotPaste();
+ void slotDefault();
+ void slotShowGUI();
+
+#ifdef HAVE_LIBLO
+ virtual void slotDetails();
+#endif
+
+signals:
+ void pluginSelected(InstrumentId, int pluginIndex, int plugin);
+ void pluginPortChanged(InstrumentId, int pluginIndex, int portIndex);
+ void pluginProgramChanged(InstrumentId, int pluginIndex);
+ void changePluginConfiguration(InstrumentId, int pluginIndex,
+ bool global, QString key, QString value);
+ void showPluginGUI(InstrumentId, int pluginIndex);
+ void stopPluginGUI(InstrumentId, int pluginIndex);
+
+ // is the plugin being bypassed
+ void bypassed(InstrumentId, int pluginIndex, bool bp);
+ void destroyed(InstrumentId, int index);
+
+ void windowActivated();
+
+protected slots:
+ virtual void slotClose();
+
+protected:
+ virtual void closeEvent(QCloseEvent *e);
+ virtual void windowActivationChange(bool);
+
+ void makePluginParamsBox(QWidget*, int portCount, int tooManyPorts);
+ QStringList getProgramsForInstance(AudioPluginInstance *inst, int &current);
+
+ //--------------- Data members ---------------------------------
+
+ AudioPluginManager *m_pluginManager;
+#ifdef HAVE_LIBLO
+ AudioPluginOSCGUIManager *m_pluginGUIManager;
+#endif
+ PluginContainer *m_pluginContainer;
+ InstrumentId m_containerId;
+
+ QFrame *m_pluginParamsBox;
+ QWidget *m_pluginCategoryBox;
+ KComboBox *m_pluginCategoryList;
+ QLabel *m_pluginLabel;
+ KComboBox *m_pluginList;
+ std::vector<int> m_pluginsInList;
+ QLabel *m_insOuts;
+ QLabel *m_pluginId;
+ QCheckBox *m_bypass;
+ QPushButton *m_copyButton;
+ QPushButton *m_pasteButton;
+ QPushButton *m_defaultButton;
+ QPushButton *m_guiButton;
+
+ QLabel *m_programLabel;
+ KComboBox *m_programCombo;
+ std::vector<PluginControl*> m_pluginWidgets;
+ QGridLayout *m_gridLayout;
+
+ int m_index;
+
+ bool m_generating;
+ bool m_guiShown;
+
+ QAccel *m_accelerators;
+
+ void populatePluginCategoryList();
+ void populatePluginList();
+};
+
+
+} // end of namespace
+
+
+
+#endif