diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-09-15 12:14:55 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-09-15 12:14:55 +0000 |
commit | b0546e5e7f7044019892543c6c82029db8d564a7 (patch) | |
tree | 1b96a6260900f3fbf3513fb48a5a72aa89052dc8 /attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h | |
parent | 583c73d1a07154d3d2672d65d8cce6495f490454 (diff) |
moved attic to a branch of it's own
Diffstat (limited to 'attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h')
-rw-r--r-- | attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h | 204 |
1 files changed, 0 insertions, 204 deletions
diff --git a/attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h b/attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h deleted file mode 100644 index 3d77ecf0..00000000 --- a/attic/muse2-oom/muse2/synti/simpledrums2/ssplugingui.h +++ /dev/null @@ -1,204 +0,0 @@ -// -// C++ Interface: ssplugingui -// -// Description: -// -// -// Author: Mathias Lundgren <lunar_shuttle@users.sf.net>, (C) 2004 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef __SS_PLUGINGUI_H__ -#define __SS_PLUGINGUI_H__ -#include <QDialog> -#include <QSlider> -#include <QButtonGroup> -#include <QtGui> -//#include <QHBoxLayout> -//#include <QVBoxLayout> - -#include "ui_sspluginchooserbase.h" -#include "common.h" -#include "ssplugin.h" - -class SS_ParameterWidget - { - protected: - int fxid; - int parameter; - - LadspaPlugin* plugin; - - public: - SS_ParameterWidget() { } - virtual ~SS_ParameterWidget() { } - int getFxId() { SS_TRACE_IN SS_TRACE_OUT return fxid; } - bool isBool() { SS_TRACE_IN SS_TRACE_OUT return plugin->isBool(parameter); } - bool isLog() { SS_TRACE_IN SS_TRACE_OUT return plugin->isLog(parameter); } - bool isInt() { SS_TRACE_IN SS_TRACE_OUT return plugin->isInt(parameter); } - virtual void setParamValue(int) { printf("Virtual function - should not be called!"); }; - }; - -class SS_ParameterCheckBox : public QCheckBox, public SS_ParameterWidget - { - Q_OBJECT - - public: - SS_ParameterCheckBox(QWidget* parent, LadspaPlugin* in_plugin, int in_id, int in_parameter) - : QCheckBox(parent) , SS_ParameterWidget() - { - SS_TRACE_IN - plugin = in_plugin; - fxid = in_id; - parameter = in_parameter; - connect(this, SIGNAL(clicked()), SLOT(isClicked())); - SS_TRACE_OUT - } - - virtual void setParamValue(int val) { SS_TRACE_IN setChecked(val); SS_TRACE_OUT} - - private slots: - void isClicked() { SS_TRACE_IN emit valueChanged(fxid, parameter, (int)this->isChecked()); SS_TRACE_OUT} - - signals: - void valueChanged(int id, int param, int val); - }; - -class SS_ParameterSlider : public QSlider, public SS_ParameterWidget - { - Q_OBJECT - - public: - SS_ParameterSlider(QWidget* parent, LadspaPlugin* in_plugin, int in_id, int in_parameter) - : QSlider(Qt::Horizontal, parent), SS_ParameterWidget() - { - SS_TRACE_IN - plugin = in_plugin; - fxid = in_id; - parameter = in_parameter; - SS_TRACE_OUT - } - - virtual void setParamValue(int val) { SS_TRACE_IN setValue(val); SS_TRACE_OUT} - - public slots: - virtual void setValue(int val) { SS_TRACE_IN QSlider::setValue(val); emit valueChanged(fxid, parameter, val); SS_TRACE_OUT } - - signals: - void valueChanged(int id, int param, int val); - }; - -typedef std::list<SS_ParameterWidget*> SS_ParameterWidgetList; -typedef std::list<SS_ParameterWidget*>::iterator SS_iParameterWidgetList ; - -//------------------------------- -// SS_PluginChooser -//------------------------------- -class SS_PluginChooser : public QDialog, Ui::SS_PluginChooserBase -{ - Q_OBJECT - private: - LadspaPlugin* selectedPlugin; - protected: - - public: - SS_PluginChooser(QWidget* parent); - LadspaPlugin* getSelectedPlugin() { SS_TRACE_IN SS_TRACE_OUT return selectedPlugin; } - - private slots: - void okPressed(); - void cancelPressed(); - void selectionChanged(QTreeWidgetItem* item); - void doubleClicked(QTreeWidgetItem* item); - - private: - QTreeWidgetItem* selectedItem; - LadspaPlugin* findSelectedPlugin(); - -}; - -//------------------------------- -// SS_PluginGuiFront -//------------------------------- -class SS_PluginFront : public QGroupBox - { - Q_OBJECT - private: - QHBoxLayout* layout; - QVBoxLayout* expLayout; - QLineEdit* pluginName; - QCheckBox* onOff; - QPushButton* loadFxButton; - QPushButton* clearFxButton; - QPushButton* expandButton; - QSlider* outGainSlider; - SS_PluginChooser* pluginChooser; - LadspaPlugin* plugin; - QGroupBox* expGroup; - - int fxid; - bool expanded; - - //For effect parameters: - SS_ParameterWidgetList paramWidgets; - - protected: - - public: - SS_PluginFront(QWidget* parent, int id); - void setPluginName(QString name); - ~SS_PluginFront(); - void updatePluginValue(unsigned i); - void clearPluginDisplay(); - void setParameterValue(int param, int val); - void setRetGain(int val); - - protected: - virtual QSize sizeHint() const; - virtual QSizePolicy sizePolicy() const; - - private slots: - void loadButton(); - void returnSliderMoved(int val); - void onOffToggled(bool state); - void clearButtonPressed(); - void expandButtonPressed(); - void parameterValueChanged(int fxid, int parameter, int val); - - signals: - void loadPlugin(int fxid, QString lib, QString name); - void returnLevelChanged(int fxid, int val); - void fxToggled(int fxid, int state); - void clearPlugin(int fxid); - void sizeChanged(int fxid, int val); - void effectParameterChanged(int fxid, int param, int val); - - private: - void createPluginParameters(); - }; - - -//------------------------------- -// SS_PluginGui -// Main plugin class, dialog -//------------------------------- -class SS_PluginGui : public QDialog - { - Q_OBJECT - private: - QVBoxLayout* layout; - SS_PluginFront* pluginFronts[4]; - - public: - SS_PluginGui(QWidget* parent); - SS_PluginFront* getPluginFront(unsigned i); - ~SS_PluginGui() {} -private slots: - void pluginFrontSizeChanged(int fxid, int val); - }; - - -#endif - |