Files
lmms/include/rack_plugin.h
Danny McRae 4cb0d266a3 save and load effects
effects on sample tracks
no more ladspa knob segfaults


git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@298 0778d3d1-df1d-0410-868b-ea421aaaa00d
2006-08-10 01:03:54 +00:00

115 lines
2.8 KiB
C++

/*
* effect_tab_widget.h - tab-widget in channel-track-window for setting up
* effects
*
* Copyright (c) 2006 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
#ifndef _RACK_PLUGIN_H
#define _RACK_PLUGIN_H
#include "ladspa_manager.h"
#ifdef LADSPA_SUPPORT
#include <qwidget.h>
#include <qgroupbox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include "journalling_object.h"
#include "led_checkbox.h"
#include "track.h"
#include "effect.h"
#include "ladspa_control_dialog.h"
#include "audio_port.h"
class knob;
class tempoSyncKnob;
class rackPlugin: public QWidget, public journallingObject
{
Q_OBJECT
public:
rackPlugin( QWidget * _parent, ladspa_key_t _key, track * _track, engine * _engine, audioPort * _port );
~rackPlugin();
inline effect * getEffect()
{
return( m_effect );
}
inline const ladspa_key_t & getKey( void )
{
return( m_key );
}
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
virtual void FASTCALL loadSettings( const QDomElement & _this );
inline virtual QString nodeName( void ) const
{
return( "effect" );
}
public slots:
void editControls( void );
void bypassed( bool _state );
void setWetDry( float _value );
void setAutoQuit( float _value );
void setGate( float _value );
void moveUp( void );
void moveDown( void );
void deletePlugin( void );
void displayHelp( void );
void closeEffects( void );
signals:
void moveUp( rackPlugin * _plugin );
void moveDown( rackPlugin * _plugin );
void deletePlugin( rackPlugin * _plugin );
protected:
void contextMenuEvent( QContextMenuEvent * _me );
private:
ledCheckBox * m_bypass;
knob * m_wetDry;
tempoSyncKnob * m_autoQuit;
knob * m_gate;
QGroupBox * m_grouper;
QGroupBox * m_controls;
QLabel * m_label;
QPushButton * m_editButton;
effect * m_effect;
ladspaControlDialog * m_controlView;
track * m_track;
audioPort * m_port;
QMenu * m_contextMenu;
ladspa_key_t m_key;
QString m_name;
bool m_show;
};
#endif
#endif