splitted ladspaControl-class, made ladspa-effect-plugin work again

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms-mv@665 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-01-17 22:02:56 +00:00
parent 382d7d44b0
commit 3e93586a66
13 changed files with 541 additions and 335 deletions

View File

@@ -1,7 +1,7 @@
/*
* ladspa_control.h - widget for controlling a LADSPA port
* ladspa_control.h - model for controlling a LADSPA port
*
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -25,9 +25,6 @@
#ifndef _LADSPA_CONTROL_H
#define _LADSPA_CONTROL_H
#include <QtGui/QWidget>
#include <QtGui/QLayout>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -43,25 +40,24 @@
#include "knob.h"
class ledCheckBox;
class track;
typedef struct portDescription port_desc_t;
class ladspaControl : public QWidget, public journallingObject
class ladspaControl : public model, public journallingObject
{
Q_OBJECT
public:
ladspaControl( QWidget * _parent, port_desc_t * _port, track * _track,
ladspaControl( model * _parent, port_desc_t * _port, track * _track,
bool _link = FALSE );
~ladspaControl();
LADSPA_Data getValue( void );
void FASTCALL setValue( LADSPA_Data _value );
void FASTCALL setLink( bool _state );
void FASTCALL linkControls( ladspaControl * _control );
void FASTCALL unlinkControls( ladspaControl * _control );
@@ -69,12 +65,12 @@ public:
{
return( &m_toggledModel );
}
inline knobModel * getKnobModel( void )
{
return( &m_knobModel );
}
inline port_desc_t * getPort( void )
{
return( m_port );
@@ -102,17 +98,16 @@ protected slots:
private:
bool m_link;
port_desc_t * m_port;
track * m_track;
QHBoxLayout * m_layout;
ledCheckBox * m_link;
ledCheckBox * m_toggle;
knob * m_knob;
boolModel m_linkEnabledModel;
boolModel m_toggledModel;
knobModel m_knobModel;
friend class ladspaControlView;
} ;
#endif

View File

@@ -0,0 +1,47 @@
/*
* ladspa_control_view.h - widget for controlling a LADSPA port
*
* Copyright (c) 2006-2008 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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _LADSPA_CONTROL_VIEW_H
#define _LADSPA_CONTROL_VIEW_H
#include <QtGui/QWidget>
#include "mv_base.h"
class ladspaControl;
class ladspaControlView : public QWidget, public modelView
{
public:
ladspaControlView( QWidget * _parent, ladspaControl * _ctl );
virtual ~ladspaControlView();
private:
ladspaControl * m_ctl;
} ;
#endif