mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-04 14:23:27 -04:00
Rename all Controller-family classes to new style
Adjust capitialization on all Controller-related classes to new standards and update all calling code
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* controller.h - declaration of class controller, which provides a
|
||||
* Controller.h - declaration of class controller, which provides a
|
||||
* standard for all controllers and controller plugins
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <pgllama/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <pgllama/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -32,13 +32,13 @@
|
||||
#include "mv_base.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
class controllerDialog;
|
||||
class controller;
|
||||
class ControllerDialog;
|
||||
class Controller;
|
||||
|
||||
typedef QVector<controller *> controllerVector;
|
||||
typedef QVector<Controller *> ControllerVector;
|
||||
|
||||
|
||||
class controller : public model, public journallingObject
|
||||
class Controller : public model, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -55,10 +55,10 @@ public:
|
||||
NumControllerTypes
|
||||
} ;
|
||||
|
||||
controller( ControllerTypes _type, model * _parent,
|
||||
Controller( ControllerTypes _type, model * _parent,
|
||||
const QString & _display_name );
|
||||
|
||||
virtual ~controller();
|
||||
virtual ~Controller();
|
||||
|
||||
virtual float currentValue( int _offset );
|
||||
|
||||
@@ -103,8 +103,8 @@ public:
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName( void ) const;
|
||||
|
||||
static controller * create( ControllerTypes _tt, model * _parent );
|
||||
static controller * create( const QDomElement & _this,
|
||||
static Controller * create( ControllerTypes _tt, model * _parent );
|
||||
static Controller * create( const QDomElement & _this,
|
||||
model * _parent );
|
||||
|
||||
inline static float fittedValue( float _val )
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
virtual void setName( const QString & _new_name )
|
||||
{
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
QString m_name;
|
||||
ControllerTypes m_type;
|
||||
|
||||
static controllerVector s_controllers;
|
||||
static ControllerVector s_controllers;
|
||||
|
||||
static unsigned int s_frames;
|
||||
|
||||
@@ -149,7 +149,7 @@ signals:
|
||||
// The value changed while the mixer isn't running (i.e: MIDI CC)
|
||||
void valueChanged( void );
|
||||
|
||||
friend class controllerDialog;
|
||||
friend class ControllerDialog;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_connection.h - declaration of a controller connect, which
|
||||
* ControllerConnection.h - declaration of a controller connect, which
|
||||
* provides a definition of the link between a controller and
|
||||
* model, also handles deferred creation of links while
|
||||
* loading project
|
||||
@@ -32,30 +32,30 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
class controllerConnection;
|
||||
class ControllerConnection;
|
||||
|
||||
typedef QVector<controllerConnection *> controllerConnectionVector;
|
||||
typedef QVector<ControllerConnection *> ControllerConnectionVector;
|
||||
|
||||
|
||||
class EXPORT controllerConnection : public QObject, public journallingObject
|
||||
class EXPORT ControllerConnection : public QObject, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
controllerConnection( controller * _controller );
|
||||
controllerConnection( int _controllerId );
|
||||
ControllerConnection( Controller * _controller );
|
||||
ControllerConnection( int _controllerId );
|
||||
|
||||
virtual ~controllerConnection();
|
||||
virtual ~ControllerConnection();
|
||||
|
||||
inline controller * getController( void )
|
||||
inline Controller * getController( void )
|
||||
{
|
||||
return m_controller;
|
||||
}
|
||||
|
||||
void setController( controller * _controller );
|
||||
void setController( Controller * _controller );
|
||||
|
||||
inline void setController( int _controllerId );
|
||||
|
||||
@@ -87,19 +87,19 @@ public slots:
|
||||
|
||||
protected:
|
||||
//virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
controller * m_controller;
|
||||
Controller * m_controller;
|
||||
QString m_targetName;
|
||||
int m_controllerId;
|
||||
|
||||
bool m_ownsController;
|
||||
|
||||
static controllerConnectionVector s_connections;
|
||||
static ControllerConnectionVector s_connections;
|
||||
|
||||
signals:
|
||||
// The value changed while the mixer isn't running (i.e: MIDI CC)
|
||||
void valueChanged( void );
|
||||
|
||||
friend class controllerConnectionDialog;
|
||||
friend class ControllerConnectionDialog;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_connection_dialog.h - dialog allowing the user to create and
|
||||
* ControllerConnectionDialog.h - dialog allowing the user to create and
|
||||
* modify links between controllers and models
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -31,14 +31,14 @@
|
||||
#include <QtGui/QSortFilterProxyModel>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "automatable_model.h"
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
class QListView;
|
||||
class QScrollArea;
|
||||
class autoDetectMidiController;
|
||||
class AutoDetectMidiController;
|
||||
class comboBox;
|
||||
class groupBox;
|
||||
class tabWidget;
|
||||
@@ -48,15 +48,15 @@ class midiPortMenu;
|
||||
|
||||
|
||||
|
||||
class controllerConnectionDialog : public QDialog
|
||||
class ControllerConnectionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
controllerConnectionDialog( QWidget * _parent,
|
||||
ControllerConnectionDialog( QWidget * _parent,
|
||||
const automatableModel * _target_model );
|
||||
virtual ~controllerConnectionDialog();
|
||||
virtual ~ControllerConnectionDialog();
|
||||
|
||||
controller * chosenController( void )
|
||||
Controller * chosenController( void )
|
||||
{
|
||||
return m_controller;
|
||||
}
|
||||
@@ -91,11 +91,11 @@ private:
|
||||
tabWidget * m_mappingBox;
|
||||
QLineEdit * m_mappingFunction;
|
||||
|
||||
controller * m_controller;
|
||||
Controller * m_controller;
|
||||
const automatableModel * m_targetModel;
|
||||
|
||||
// Temporary midiController
|
||||
autoDetectMidiController * m_midiController;
|
||||
AutoDetectMidiController * m_midiController;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* controller_dialog.h - per-controller-specific view for changing a
|
||||
* ControllerDialog.h - per-controller-specific view for changing a
|
||||
* controller's settings
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -30,25 +30,22 @@
|
||||
|
||||
#include "mv_base.h"
|
||||
|
||||
class controller;
|
||||
class Controller;
|
||||
|
||||
|
||||
class controllerDialog : public QWidget, public modelView
|
||||
class ControllerDialog : public QWidget, public modelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
controllerDialog( controller * _controller, QWidget * _parent );
|
||||
ControllerDialog( Controller * _controller, QWidget * _parent );
|
||||
|
||||
virtual ~controllerDialog();
|
||||
virtual ~ControllerDialog();
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
||||
|
||||
protected:
|
||||
/* virtual void contextMenuEvent( QContextMenuEvent * _me ) {};
|
||||
virtual void paintEvent( QPaintEvent * _pe ) {};
|
||||
virtual void modelChanged( void ) {};*/
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
} ;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_rack_view.h - view for song's controllers
|
||||
* ControllerRackView.h - view for song's controllers
|
||||
*
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
@@ -33,29 +33,28 @@
|
||||
|
||||
class QPushButton;
|
||||
class QScrollArea;
|
||||
//class QVBoxLayout;
|
||||
|
||||
class controllerView;
|
||||
class ControllerView;
|
||||
|
||||
|
||||
class controllerRackView : public QWidget, public serializingObject
|
||||
class ControllerRackView : public QWidget, public serializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
controllerRackView();
|
||||
virtual ~controllerRackView();
|
||||
ControllerRackView();
|
||||
virtual ~ControllerRackView();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "controllerrackview" );
|
||||
return( "ControllerRackView" );
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
void deleteController( controllerView * _view );
|
||||
void deleteController( ControllerView * _view );
|
||||
|
||||
|
||||
private slots:
|
||||
@@ -64,7 +63,7 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
QVector<controllerView *> m_controllerViews;
|
||||
QVector<ControllerView *> m_controllerViews;
|
||||
|
||||
QVBoxLayout * m_mainLayout;
|
||||
QScrollArea * m_scrollArea;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_view.h - view-component for an control
|
||||
* ControllerView.h - view-component for an control
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "automatable_model.h"
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "mv_base.h"
|
||||
|
||||
class QGroupBox;
|
||||
@@ -39,21 +39,21 @@ class QMdiSubWindow;
|
||||
class ledCheckBox;
|
||||
|
||||
|
||||
class controllerView : public QWidget, public modelView
|
||||
class ControllerView : public QWidget, public modelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
controllerView( controller * _controller, QWidget * _parent );
|
||||
virtual ~controllerView();
|
||||
ControllerView( Controller * _controller, QWidget * _parent );
|
||||
virtual ~ControllerView();
|
||||
|
||||
inline controller * getController( void )
|
||||
inline Controller * getController( void )
|
||||
{
|
||||
return( castModel<controller>() );
|
||||
return( castModel<Controller>() );
|
||||
}
|
||||
|
||||
inline const controller * getController( void ) const
|
||||
inline const Controller * getController( void ) const
|
||||
{
|
||||
return( castModel<controller>() );
|
||||
return( castModel<Controller>() );
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public slots:
|
||||
|
||||
|
||||
signals:
|
||||
void deleteController( controllerView * _view );
|
||||
void deleteController( ControllerView * _view );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
QPixmap m_bg;
|
||||
ledCheckBox * m_bypass;
|
||||
QMdiSubWindow * m_subWindow;
|
||||
controllerDialog * m_controllerDlg;
|
||||
ControllerDialog * m_controllerDlg;
|
||||
bool m_show;
|
||||
|
||||
} ;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* lfo_controller.h - A LFO-based controller and dialog
|
||||
* LfoController.h - A LFO-based controller and dialog
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "mv_base.h"
|
||||
#include "automatable_model.h"
|
||||
#include "controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "Controller.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "oscillator.h"
|
||||
|
||||
@@ -42,13 +42,13 @@ class tempoSyncKnob;
|
||||
class pixmapButton;
|
||||
class oscillator;
|
||||
|
||||
class lfoController : public controller
|
||||
class LfoController : public Controller
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lfoController( model * _parent );
|
||||
LfoController( model * _parent );
|
||||
|
||||
virtual ~lfoController();
|
||||
virtual ~LfoController();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -80,24 +80,24 @@ protected:
|
||||
protected slots:
|
||||
void updateSampleFunction( void );
|
||||
|
||||
friend class lfoControllerDialog;
|
||||
friend class LfoControllerDialog;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class lfoControllerDialog : public controllerDialog
|
||||
class LfoControllerDialog : public ControllerDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
lfoControllerDialog( controller * _controller, QWidget * _parent );
|
||||
virtual ~lfoControllerDialog();
|
||||
LfoControllerDialog( Controller * _controller, QWidget * _parent );
|
||||
virtual ~LfoControllerDialog();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void modelChanged( void );
|
||||
|
||||
lfoController * m_lfo;
|
||||
LfoController * m_lfo;
|
||||
|
||||
knob * m_baseKnob;
|
||||
tempoSyncKnob * m_speedKnob;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* midi_controller.h - A controller to receive MIDI control-changes
|
||||
* MidiController.h - A controller to receive MIDI control-changes
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "automatable_model.h"
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "midi_event_processor.h"
|
||||
#include "midi_port.h"
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
class midiPort;
|
||||
|
||||
|
||||
class midiController : public controller, public MidiEventProcessor
|
||||
class MidiController : public Controller, public MidiEventProcessor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
midiController( model * _parent );
|
||||
virtual ~midiController();
|
||||
MidiController( model * _parent );
|
||||
virtual ~MidiController();
|
||||
|
||||
virtual void processInEvent( const midiEvent & _me,
|
||||
const midiTime & _time );
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
void updateName( void );
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@ protected:
|
||||
|
||||
float m_lastValue;
|
||||
|
||||
friend class controllerConnectionDialog;
|
||||
friend class autoDetectMidiController;
|
||||
friend class ControllerConnectionDialog;
|
||||
friend class AutoDetectMidiController;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* peak_controller.h - peak-controller class
|
||||
* PeakController.h - peak-controller class
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "mv_base.h"
|
||||
#include "automatable_model.h"
|
||||
#include "controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "Controller.h"
|
||||
#include "ControllerDialog.h"
|
||||
|
||||
class automatableButtonGroup;
|
||||
class knob;
|
||||
@@ -39,15 +39,15 @@ class peakControllerEffect;
|
||||
typedef QVector<peakControllerEffect *> peakControllerEffectVector;
|
||||
|
||||
|
||||
class EXPORT peakController : public controller
|
||||
class EXPORT PeakController : public Controller
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
peakController( model * _parent,
|
||||
PeakController( model * _parent,
|
||||
peakControllerEffect *_peak_effect = NULL );
|
||||
|
||||
|
||||
virtual ~peakController();
|
||||
virtual ~PeakController();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
void handleDestroyedEffect( );
|
||||
|
||||
protected:
|
||||
@@ -67,24 +67,24 @@ protected:
|
||||
|
||||
peakControllerEffect * m_peakEffect;
|
||||
|
||||
friend class peakControllerDialog;
|
||||
friend class PeakControllerDialog;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
class peakControllerDialog : public controllerDialog
|
||||
class PeakControllerDialog : public ControllerDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
peakControllerDialog( controller * _controller, QWidget * _parent );
|
||||
virtual ~peakControllerDialog();
|
||||
PeakControllerDialog( Controller * _controller, QWidget * _parent );
|
||||
virtual ~PeakControllerDialog();
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void modelChanged( void );
|
||||
|
||||
peakController * m_peakController;
|
||||
PeakController * m_peakController;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
|
||||
class controllerConnection;
|
||||
class ControllerConnection;
|
||||
|
||||
|
||||
class EXPORT automatableModel : public model, public journallingObject
|
||||
@@ -94,13 +94,13 @@ public:
|
||||
|
||||
bool isAutomated( void ) const;
|
||||
|
||||
inline controllerConnection * getControllerConnection( void ) const
|
||||
inline ControllerConnection * getControllerConnection( void ) const
|
||||
{
|
||||
return m_controllerConnection;
|
||||
}
|
||||
|
||||
|
||||
void setControllerConnection( controllerConnection * _c );
|
||||
void setControllerConnection( ControllerConnection * _c );
|
||||
|
||||
|
||||
template<class T>
|
||||
@@ -253,7 +253,7 @@ private:
|
||||
bool m_hasLinkedModels;
|
||||
|
||||
|
||||
controllerConnection * m_controllerConnection;
|
||||
ControllerConnection * m_controllerConnection;
|
||||
|
||||
bool m_armed; // record this model during automation recording?
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "controller.h"
|
||||
#include "automation_track.h"
|
||||
#include "automation_pattern.h"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class UnifiedResourceProvider;
|
||||
class song;
|
||||
class songEditor;
|
||||
class ladspa2LMMS;
|
||||
class controllerRackView;
|
||||
class ControllerRackView;
|
||||
class MidiControlListener;
|
||||
class QDomDocument;
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
return s_dummyTC;
|
||||
}
|
||||
|
||||
static controllerRackView * getControllerRackView( void )
|
||||
static ControllerRackView * getControllerRackView( void )
|
||||
{
|
||||
return s_controllerRackView;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ private:
|
||||
static bbTrackContainer * s_bbTrackContainer;
|
||||
static projectJournal * s_projectJournal;
|
||||
static dummyTrackContainer * s_dummyTC;
|
||||
static controllerRackView * s_controllerRackView;
|
||||
static ControllerRackView * s_controllerRackView;
|
||||
static MidiControlListener * s_midiControlListener;
|
||||
|
||||
// GUI
|
||||
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
map m_writablePorts;
|
||||
|
||||
|
||||
friend class controllerConnectionDialog;
|
||||
friend class ControllerConnectionDialog;
|
||||
friend class instrumentMidiIOView;
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "track_container.h"
|
||||
#include "automatable_model.h"
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "meter_model.h"
|
||||
|
||||
|
||||
@@ -177,11 +177,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void addController( controller * _c );
|
||||
void removeController( controller * _c );
|
||||
void addController( Controller * _c );
|
||||
void removeController( Controller * _c );
|
||||
|
||||
|
||||
const controllerVector & controllers( void ) const
|
||||
const ControllerVector & controllers( void ) const
|
||||
{
|
||||
return m_controllers;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ private:
|
||||
intModel m_masterVolumeModel;
|
||||
intModel m_masterPitchModel;
|
||||
|
||||
controllerVector m_controllers;
|
||||
ControllerVector m_controllers;
|
||||
|
||||
|
||||
QString m_fileName;
|
||||
@@ -313,7 +313,7 @@ private:
|
||||
friend class engine;
|
||||
friend class songEditor;
|
||||
friend class mainWindow;
|
||||
friend class controllerRackView;
|
||||
friend class ControllerRackView;
|
||||
|
||||
signals:
|
||||
void lengthChanged( int _tacts );
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "effect_chain.h"
|
||||
#include "Cpu.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
|
||||
@@ -125,7 +125,7 @@ void ladspaEffect::changeSampleRate()
|
||||
automationPattern::resolveAllIDs();
|
||||
|
||||
// make sure, connections are ok
|
||||
controllerConnection::finalizeConnections();
|
||||
ControllerConnection::finalizeConnections();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "song.h"
|
||||
#include "peak_controller.h"
|
||||
#include "PeakController.h"
|
||||
#include "peak_controller_effect.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
@@ -60,13 +60,13 @@ peakControllerEffect::peakControllerEffect(
|
||||
model * _parent,
|
||||
const descriptor::subPluginFeatures::key * _key ) :
|
||||
effect( &peakcontrollereffect_plugin_descriptor, _parent, _key ),
|
||||
m_effectId( ++peakController::s_lastEffectId ),
|
||||
m_effectId( ++PeakController::s_lastEffectId ),
|
||||
m_peakControls( this ),
|
||||
m_autoController( NULL )
|
||||
{
|
||||
m_autoController = new peakController( engine::getSong(), this );
|
||||
m_autoController = new PeakController( engine::getSong(), this );
|
||||
engine::getSong()->addController( m_autoController );
|
||||
peakController::s_effects.append( this );
|
||||
PeakController::s_effects.append( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ peakControllerEffect::peakControllerEffect(
|
||||
|
||||
peakControllerEffect::~peakControllerEffect()
|
||||
{
|
||||
int idx = peakController::s_effects.indexOf( this );
|
||||
int idx = PeakController::s_effects.indexOf( this );
|
||||
if( idx >= 0 )
|
||||
{
|
||||
peakController::s_effects.remove( idx );
|
||||
PeakController::s_effects.remove( idx );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
|
||||
float m_lastSample;
|
||||
|
||||
controller * m_autoController;
|
||||
Controller * m_autoController;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "peak_controller.h"
|
||||
#include "PeakController.h"
|
||||
#include "peak_controller_effect_controls.h"
|
||||
#include "peak_controller_effect.h"
|
||||
|
||||
@@ -50,9 +50,9 @@ void peakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
m_muteModel.setValue( _this.attribute( "mute" ).toFloat() );
|
||||
|
||||
int effectId = _this.attribute( "effectId" ).toInt();
|
||||
if( effectId > peakController::s_lastEffectId )
|
||||
if( effectId > PeakController::s_lastEffectId )
|
||||
{
|
||||
peakController::s_lastEffectId = effectId;
|
||||
PeakController::s_lastEffectId = effectId;
|
||||
}
|
||||
m_effect->m_effectId = effectId;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller.cpp - implementation of class controller which handles
|
||||
* Controller.cpp - implementation of class controller which handles
|
||||
* remote-control of automatableModels
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -31,20 +31,20 @@
|
||||
#include "song.h"
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "controller.h"
|
||||
#include "controller_connection.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "lfo_controller.h"
|
||||
#include "midi_controller.h"
|
||||
#include "peak_controller.h"
|
||||
#include "Controller.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "LfoController.h"
|
||||
#include "MidiController.h"
|
||||
#include "PeakController.h"
|
||||
|
||||
|
||||
unsigned int controller::s_frames = 0;
|
||||
QVector<controller *> controller::s_controllers;
|
||||
unsigned int Controller::s_frames = 0;
|
||||
QVector<Controller *> Controller::s_controllers;
|
||||
|
||||
|
||||
|
||||
controller::controller( ControllerTypes _type, model * _parent,
|
||||
Controller::Controller( ControllerTypes _type, model * _parent,
|
||||
const QString & _display_name ) :
|
||||
model( _parent, _display_name ),
|
||||
journallingObject(),
|
||||
@@ -60,7 +60,7 @@ controller::controller( ControllerTypes _type, model * _parent,
|
||||
|
||||
|
||||
|
||||
controller::~controller()
|
||||
Controller::~Controller()
|
||||
{
|
||||
int idx = s_controllers.indexOf( this );
|
||||
if( idx >= 0 )
|
||||
@@ -79,7 +79,7 @@ controller::~controller()
|
||||
|
||||
|
||||
// Get current value, with an offset into the current buffer for sample exactness
|
||||
float controller::currentValue( int _offset )
|
||||
float Controller::currentValue( int _offset )
|
||||
{
|
||||
if( _offset == 0 || isSampleExact() )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ float controller::currentValue( int _offset )
|
||||
|
||||
|
||||
|
||||
float controller::value( int _offset )
|
||||
float Controller::value( int _offset )
|
||||
{
|
||||
return 0.5f;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ float controller::value( int _offset )
|
||||
|
||||
|
||||
// Get position in frames
|
||||
unsigned int controller::runningFrames()
|
||||
unsigned int Controller::runningFrames()
|
||||
{
|
||||
return s_frames;
|
||||
}
|
||||
@@ -107,14 +107,14 @@ unsigned int controller::runningFrames()
|
||||
|
||||
|
||||
// Get position in seconds
|
||||
float controller::runningTime()
|
||||
float Controller::runningTime()
|
||||
{
|
||||
return s_frames / engine::getMixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void controller::triggerFrameCounter( void )
|
||||
void Controller::triggerFrameCounter( void )
|
||||
{
|
||||
for( int i = 0; i < s_controllers.size(); ++i )
|
||||
{
|
||||
@@ -131,38 +131,38 @@ void controller::triggerFrameCounter( void )
|
||||
|
||||
|
||||
|
||||
void controller::resetFrameCounter( void )
|
||||
void Controller::resetFrameCounter( void )
|
||||
{
|
||||
s_frames = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
controller * controller::create( ControllerTypes _ct, model * _parent )
|
||||
Controller * Controller::create( ControllerTypes _ct, model * _parent )
|
||||
{
|
||||
static controller * dummy = NULL;
|
||||
controller * c = NULL;
|
||||
static Controller * dummy = NULL;
|
||||
Controller * c = NULL;
|
||||
|
||||
switch( _ct )
|
||||
{
|
||||
case DummyController:
|
||||
case Controller::DummyController:
|
||||
if( dummy )
|
||||
c = dummy;
|
||||
else
|
||||
c = new controller( DummyController, NULL,
|
||||
c = new Controller( DummyController, NULL,
|
||||
QString() );
|
||||
break;
|
||||
|
||||
case LfoController:
|
||||
c = new lfoController( _parent );
|
||||
case Controller::LfoController:
|
||||
c = new ::LfoController( _parent );
|
||||
break;
|
||||
|
||||
case PeakController:
|
||||
c = new peakController( _parent );
|
||||
case Controller::PeakController:
|
||||
c = new ::PeakController( _parent );
|
||||
break;
|
||||
|
||||
case MidiController:
|
||||
c = new midiController( _parent );
|
||||
case Controller::MidiController:
|
||||
c = new ::MidiController( _parent );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -174,9 +174,9 @@ controller * controller::create( ControllerTypes _ct, model * _parent )
|
||||
|
||||
|
||||
|
||||
controller * controller::create( const QDomElement & _this, model * _parent )
|
||||
Controller * Controller::create( const QDomElement & _this, model * _parent )
|
||||
{
|
||||
controller * c = create(
|
||||
Controller * c = create(
|
||||
static_cast<ControllerTypes>( _this.attribute( "type" ).toInt() ),
|
||||
_parent );
|
||||
if( c != NULL )
|
||||
@@ -189,7 +189,7 @@ controller * controller::create( const QDomElement & _this, model * _parent )
|
||||
|
||||
|
||||
|
||||
bool controller::hasModel( const model * m )
|
||||
bool Controller::hasModel( const model * m )
|
||||
{
|
||||
QObjectList chldren = children();
|
||||
for( int i = 0; i < chldren.size(); ++i )
|
||||
@@ -203,7 +203,7 @@ bool controller::hasModel( const model * m )
|
||||
return true;
|
||||
}
|
||||
|
||||
controllerConnection * cc = am->getControllerConnection();
|
||||
ControllerConnection * cc = am->getControllerConnection();
|
||||
if( cc != NULL )
|
||||
{
|
||||
if( cc->getController()->hasModel( m ) )
|
||||
@@ -219,7 +219,7 @@ bool controller::hasModel( const model * m )
|
||||
|
||||
|
||||
|
||||
void controller::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void Controller::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "type", type() );
|
||||
_this.setAttribute( "name", name() );
|
||||
@@ -227,7 +227,7 @@ void controller::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void controller::loadSettings( const QDomElement & _this )
|
||||
void Controller::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( _this.attribute( "type" ).toInt() != type() )
|
||||
{
|
||||
@@ -239,21 +239,21 @@ void controller::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
|
||||
|
||||
QString controller::nodeName( void ) const
|
||||
QString Controller::nodeName( void ) const
|
||||
{
|
||||
return( "controller" );
|
||||
return( "Controller" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
controllerDialog * controller::createDialog( QWidget * _parent )
|
||||
ControllerDialog * Controller::createDialog( QWidget * _parent )
|
||||
{
|
||||
controllerDialog * d = new controllerDialog( this, _parent );
|
||||
ControllerDialog * d = new ControllerDialog( this, _parent );
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
#include "moc_controller.cxx"
|
||||
#include "moc_Controller.cxx"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_connection.cpp - implementation of class controller connection
|
||||
* ControllerConnection.cpp - implementation of class controller connection
|
||||
* which handles the link between automatableModels and controllers
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -31,14 +31,14 @@
|
||||
#include "song.h"
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
|
||||
controllerConnectionVector controllerConnection::s_connections;
|
||||
ControllerConnectionVector ControllerConnection::s_connections;
|
||||
|
||||
|
||||
|
||||
controllerConnection::controllerConnection( controller * _controller ) :
|
||||
ControllerConnection::ControllerConnection( Controller * _controller ) :
|
||||
m_controllerId( -1 ),
|
||||
m_ownsController( FALSE )
|
||||
{
|
||||
@@ -48,7 +48,7 @@ controllerConnection::controllerConnection( controller * _controller ) :
|
||||
}
|
||||
else
|
||||
{
|
||||
m_controller = controller::create( controller::DummyController,
|
||||
m_controller = Controller::create( Controller::DummyController,
|
||||
NULL );
|
||||
}
|
||||
s_connections.append( this );
|
||||
@@ -57,8 +57,8 @@ controllerConnection::controllerConnection( controller * _controller ) :
|
||||
|
||||
|
||||
|
||||
controllerConnection::controllerConnection( int _controllerId ) :
|
||||
m_controller( controller::create( controller::DummyController, NULL ) ),
|
||||
ControllerConnection::ControllerConnection( int _controllerId ) :
|
||||
m_controller( Controller::create( Controller::DummyController, NULL ) ),
|
||||
m_controllerId( _controllerId ),
|
||||
m_ownsController( FALSE )
|
||||
{
|
||||
@@ -68,7 +68,7 @@ controllerConnection::controllerConnection( int _controllerId ) :
|
||||
|
||||
|
||||
|
||||
controllerConnection::~controllerConnection()
|
||||
ControllerConnection::~ControllerConnection()
|
||||
{
|
||||
s_connections.remove( s_connections.indexOf( this ) );
|
||||
if( m_ownsController )
|
||||
@@ -80,14 +80,14 @@ controllerConnection::~controllerConnection()
|
||||
|
||||
|
||||
|
||||
void controllerConnection::setController( int /*_controllerId*/ )
|
||||
void ControllerConnection::setController( int /*_controllerId*/ )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void controllerConnection::setController( controller * _controller )
|
||||
void ControllerConnection::setController( Controller * _controller )
|
||||
{
|
||||
if( m_ownsController && m_controller )
|
||||
{
|
||||
@@ -96,7 +96,7 @@ void controllerConnection::setController( controller * _controller )
|
||||
|
||||
if( !_controller )
|
||||
{
|
||||
m_controller = controller::create( controller::DummyController, NULL );
|
||||
m_controller = Controller::create( Controller::DummyController, NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,14 +104,14 @@ void controllerConnection::setController( controller * _controller )
|
||||
}
|
||||
m_controllerId = -1;
|
||||
|
||||
if( _controller->type() != controller::DummyController )
|
||||
if( _controller->type() != Controller::DummyController )
|
||||
{
|
||||
QObject::connect( _controller, SIGNAL( valueChanged() ),
|
||||
this, SIGNAL( valueChanged() ) );
|
||||
}
|
||||
|
||||
m_ownsController =
|
||||
( _controller->type() == controller::MidiController );
|
||||
( _controller->type() == Controller::MidiController );
|
||||
|
||||
// If we don't own the controller, allow deletion of controller
|
||||
// to delete the connection
|
||||
@@ -123,7 +123,7 @@ void controllerConnection::setController( controller * _controller )
|
||||
|
||||
|
||||
|
||||
inline void controllerConnection::setTargetName( const QString & _name )
|
||||
inline void ControllerConnection::setTargetName( const QString & _name )
|
||||
{
|
||||
m_targetName = _name;
|
||||
if( m_controller )
|
||||
@@ -141,11 +141,11 @@ inline void controllerConnection::setTargetName( const QString & _name )
|
||||
* controllers. So, we remember the controller-ID and use a dummyController
|
||||
* instead. Once the song is loaded, finalizeConnections() connects to the proper controllers
|
||||
*/
|
||||
void controllerConnection::finalizeConnections( void )
|
||||
void ControllerConnection::finalizeConnections( void )
|
||||
{
|
||||
for( int i = 0; i < s_connections.size(); ++i )
|
||||
{
|
||||
controllerConnection * c = s_connections[i];
|
||||
ControllerConnection * c = s_connections[i];
|
||||
if ( !c->isFinalized() && c->m_controllerId <
|
||||
engine::getSong()->controllers().size() )
|
||||
{
|
||||
@@ -158,7 +158,7 @@ void controllerConnection::finalizeConnections( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void ControllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( engine::getSong() )
|
||||
{
|
||||
@@ -180,12 +180,12 @@ void controllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _thi
|
||||
|
||||
|
||||
|
||||
void controllerConnection::loadSettings( const QDomElement & _this )
|
||||
void ControllerConnection::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
QDomNode node = _this.firstChild();
|
||||
if( !node.isNull() )
|
||||
{
|
||||
setController( controller::create( node.toElement(), engine::getSong() ) );
|
||||
setController( Controller::create( node.toElement(), engine::getSong() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -198,31 +198,22 @@ void controllerConnection::loadSettings( const QDomElement & _this )
|
||||
qWarning( "controller index invalid\n" );
|
||||
m_controllerId = -1;
|
||||
}
|
||||
m_controller = controller::create( controller::DummyController, NULL );
|
||||
m_controller = Controller::create( Controller::DummyController, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void controllerConnection::deleteConnection( void )
|
||||
void ControllerConnection::deleteConnection( void )
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
QString controllerConnection::nodeName( void ) const
|
||||
QString ControllerConnection::nodeName( void ) const
|
||||
{
|
||||
return( "connection" );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
controllerDialog * controller::createDialog( QWidget * _parent )
|
||||
{
|
||||
controllerDialog * d = new controllerDialog( this, _parent );
|
||||
|
||||
return d;
|
||||
}
|
||||
*/
|
||||
|
||||
#include "moc_controller_connection.cxx"
|
||||
#include "moc_ControllerConnection.cxx"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* lfo_controller.cpp - implementation of class controller which handles
|
||||
* LfoController.cpp - implementation of class controller which handles
|
||||
* remote-control of automatableModels
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -32,13 +32,13 @@
|
||||
#include "song.h"
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "lfo_controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "LfoController.h"
|
||||
#include "ControllerDialog.h"
|
||||
|
||||
//const float TWO_PI = 6.28318531f;
|
||||
|
||||
lfoController::lfoController( model * _parent ) :
|
||||
controller( LfoController, _parent, tr( "LFO Controller" ) ),
|
||||
LfoController::LfoController( model * _parent ) :
|
||||
Controller( Controller::LfoController, _parent, tr( "LFO Controller" ) ),
|
||||
m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
|
||||
m_speedModel( 2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Oscillator speed" ) ),
|
||||
m_amountModel( 1.0, -1.0, 1.0, 0.005, this, tr( "Oscillator amount" ) ),
|
||||
@@ -59,7 +59,7 @@ lfoController::lfoController( model * _parent ) :
|
||||
|
||||
|
||||
|
||||
lfoController::~lfoController()
|
||||
LfoController::~LfoController()
|
||||
{
|
||||
m_baseModel.disconnect( this );
|
||||
m_speedModel.disconnect( this );
|
||||
@@ -77,7 +77,7 @@ lfoController::~lfoController()
|
||||
// The code should probably be integrated with the oscillator class. But I
|
||||
// don't know how to use oscillator because it is so confusing
|
||||
|
||||
float lfoController::value( int _offset )
|
||||
float LfoController::value( int _offset )
|
||||
{
|
||||
int frame = runningFrames() + _offset + m_phaseCorrection;
|
||||
|
||||
@@ -171,7 +171,7 @@ float lfoController::value( int _offset )
|
||||
|
||||
|
||||
|
||||
void lfoController::updateSampleFunction( void )
|
||||
void LfoController::updateSampleFunction( void )
|
||||
{
|
||||
switch( m_waveModel.value() )
|
||||
{
|
||||
@@ -201,9 +201,9 @@ void lfoController::updateSampleFunction( void )
|
||||
|
||||
|
||||
|
||||
void lfoController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void LfoController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
controller::saveSettings( _doc, _this );
|
||||
Controller::saveSettings( _doc, _this );
|
||||
|
||||
m_baseModel.saveSettings( _doc, _this, "base" );
|
||||
m_speedModel.saveSettings( _doc, _this, "speed" );
|
||||
@@ -215,9 +215,9 @@ void lfoController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void lfoController::loadSettings( const QDomElement & _this )
|
||||
void LfoController::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
controller::loadSettings( _this );
|
||||
Controller::loadSettings( _this );
|
||||
|
||||
m_baseModel.loadSettings( _this, "base" );
|
||||
m_speedModel.loadSettings( _this, "speed" );
|
||||
@@ -231,20 +231,19 @@ void lfoController::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString lfoController::nodeName( void ) const
|
||||
QString LfoController::nodeName( void ) const
|
||||
{
|
||||
return( "lfocontroller" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
controllerDialog * lfoController::createDialog( QWidget * _parent )
|
||||
ControllerDialog * LfoController::createDialog( QWidget * _parent )
|
||||
{
|
||||
controllerDialog * d = new lfoControllerDialog( this, _parent );
|
||||
return d;
|
||||
return new LfoControllerDialog( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
#include "moc_lfo_controller.cxx"
|
||||
#include "moc_LfoController.cxx"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* lfo_controller.cpp - implementation of class controller which handles
|
||||
* PeakController.cpp - implementation of class controller which handles
|
||||
* remote-control of automatableModels
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -33,17 +33,17 @@
|
||||
#include "song.h"
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "peak_controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "PeakController.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "plugins/peak_controller_effect/peak_controller_effect.h"
|
||||
|
||||
int peakController::s_lastEffectId = 0;
|
||||
peakControllerEffectVector peakController::s_effects;
|
||||
int PeakController::s_lastEffectId = 0;
|
||||
peakControllerEffectVector PeakController::s_effects;
|
||||
|
||||
|
||||
peakController::peakController( model * _parent,
|
||||
PeakController::PeakController( model * _parent,
|
||||
peakControllerEffect * _peak_effect ) :
|
||||
controller( PeakController, _parent, tr( "Peak Controller" ) ),
|
||||
Controller( Controller::PeakController, _parent, tr( "Peak Controller" ) ),
|
||||
m_peakEffect( _peak_effect )
|
||||
{
|
||||
if( m_peakEffect )
|
||||
@@ -56,14 +56,14 @@ peakController::peakController( model * _parent,
|
||||
|
||||
|
||||
|
||||
peakController::~peakController()
|
||||
PeakController::~PeakController()
|
||||
{
|
||||
// disconnects
|
||||
}
|
||||
|
||||
|
||||
|
||||
float peakController::value( int _offset )
|
||||
float PeakController::value( int _offset )
|
||||
{
|
||||
if( m_peakEffect )
|
||||
{
|
||||
@@ -74,7 +74,7 @@ float peakController::value( int _offset )
|
||||
|
||||
|
||||
|
||||
void peakController::handleDestroyedEffect( )
|
||||
void PeakController::handleDestroyedEffect( )
|
||||
{
|
||||
// possible race condition...
|
||||
printf("disconnecting effect\n");
|
||||
@@ -86,11 +86,11 @@ void peakController::handleDestroyedEffect( )
|
||||
|
||||
|
||||
|
||||
void peakController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void PeakController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( m_peakEffect )
|
||||
{
|
||||
controller::saveSettings( _doc, _this );
|
||||
Controller::saveSettings( _doc, _this );
|
||||
|
||||
_this.setAttribute( "effectId", m_peakEffect->m_effectId );
|
||||
}
|
||||
@@ -98,7 +98,7 @@ void peakController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void peakController::loadSettings( const QDomElement & _this )
|
||||
void PeakController::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
int effectId = _this.attribute( "effectId" ).toInt();
|
||||
|
||||
@@ -116,19 +116,18 @@ void peakController::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString peakController::nodeName( void ) const
|
||||
QString PeakController::nodeName( void ) const
|
||||
{
|
||||
return( "peakcontroller" );
|
||||
return( "Peakcontroller" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
controllerDialog * peakController::createDialog( QWidget * _parent )
|
||||
ControllerDialog * PeakController::createDialog( QWidget * _parent )
|
||||
{
|
||||
controllerDialog * d = new peakControllerDialog( this, _parent );
|
||||
return d;
|
||||
return new PeakControllerDialog( this, _parent );
|
||||
}
|
||||
|
||||
|
||||
#include "moc_peak_controller.cxx"
|
||||
#include "moc_PeakController.cxx"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "automatable_model.h"
|
||||
#include "automation_recorder.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
|
||||
float automatableModel::__copiedValue = 0;
|
||||
@@ -170,7 +170,7 @@ void automatableModel::loadSettings( const QDomElement & _this,
|
||||
node = node.namedItem( _name );
|
||||
if( node.isElement() )
|
||||
{
|
||||
setControllerConnection( new controllerConnection( (controller*)NULL ) );
|
||||
setControllerConnection( new ControllerConnection( (Controller*)NULL ) );
|
||||
m_controllerConnection->loadSettings( node.toElement() );
|
||||
//m_controllerConnection->setTargetName( displayName() );
|
||||
}
|
||||
@@ -417,7 +417,7 @@ void automatableModel::unlinkModels( automatableModel * _model1,
|
||||
|
||||
|
||||
|
||||
void automatableModel::setControllerConnection( controllerConnection * _c )
|
||||
void automatableModel::setControllerConnection( ControllerConnection * _c )
|
||||
{
|
||||
m_controllerConnection = _c;
|
||||
if( _c )
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "automation_recorder.h"
|
||||
#include "controller.h"
|
||||
#include "Controller.h"
|
||||
#include "song.h"
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "bb_editor.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "config_mgr.h"
|
||||
#include "controller_rack_view.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "fx_mixer.h"
|
||||
#include "fx_mixer_view.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -72,7 +72,7 @@ projectNotes * engine::s_projectNotes = NULL;
|
||||
projectJournal * engine::s_projectJournal = NULL;
|
||||
ladspa2LMMS * engine::s_ladspaManager = NULL;
|
||||
dummyTrackContainer * engine::s_dummyTC = NULL;
|
||||
controllerRackView * engine::s_controllerRackView = NULL;
|
||||
ControllerRackView * engine::s_controllerRackView = NULL;
|
||||
MidiControlListener * engine::s_midiControlListener = NULL;
|
||||
QMap<QString, QString> engine::s_pluginFileHandling;
|
||||
LmmsStyle * engine::s_lmmsStyle = NULL;
|
||||
@@ -128,7 +128,7 @@ void engine::init( const bool _has_gui )
|
||||
s_mainWindow = new mainWindow;
|
||||
s_songEditor = new songEditor( s_song, s_songEditor );
|
||||
s_fxMixerView = new fxMixerView;
|
||||
s_controllerRackView = new controllerRackView;
|
||||
s_controllerRackView = new ControllerRackView;
|
||||
s_projectNotes = new projectNotes;
|
||||
s_bbEditor = new bbEditor( s_bbTrackContainer );
|
||||
s_pianoRoll = new pianoRoll;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* midi_controller.cpp - implementation of class midi-controller which handles
|
||||
* MidiController.cpp - implementation of class midi-controller which handles
|
||||
* MIDI control change messages
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -32,12 +32,12 @@
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "midi_client.h"
|
||||
#include "midi_controller.h"
|
||||
#include "MidiController.h"
|
||||
#include "automation_recorder.h"
|
||||
|
||||
|
||||
midiController::midiController( model * _parent ) :
|
||||
controller( MidiController, _parent, tr( "MIDI Controller" ) ),
|
||||
MidiController::MidiController( model * _parent ) :
|
||||
Controller( Controller::MidiController, _parent, tr( "MIDI Controller" ) ),
|
||||
MidiEventProcessor(),
|
||||
m_midiPort( tr( "unnamed_midi_controller" ),
|
||||
engine::getMixer()->getMidiClient(), this, this,
|
||||
@@ -51,14 +51,14 @@ midiController::midiController( model * _parent ) :
|
||||
|
||||
|
||||
|
||||
midiController::~midiController()
|
||||
MidiController::~MidiController()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float midiController::value( int _offset )
|
||||
float MidiController::value( int _offset )
|
||||
{
|
||||
return m_lastValue;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ float midiController::value( int _offset )
|
||||
|
||||
|
||||
|
||||
void midiController::updateName( void )
|
||||
void MidiController::updateName( void )
|
||||
{
|
||||
setName( QString("MIDI ch%1 ctrl%2").
|
||||
arg( m_midiPort.inputChannel() ).
|
||||
@@ -76,7 +76,7 @@ void midiController::updateName( void )
|
||||
|
||||
|
||||
|
||||
void midiController::processInEvent( const midiEvent & _me,
|
||||
void MidiController::processInEvent( const midiEvent & _me,
|
||||
const midiTime & _time )
|
||||
{
|
||||
Uint8 controllerNum;
|
||||
@@ -106,7 +106,7 @@ void midiController::processInEvent( const midiEvent & _me,
|
||||
|
||||
|
||||
|
||||
void midiController::subscribeReadablePorts( const midiPort::map & _map )
|
||||
void MidiController::subscribeReadablePorts( const midiPort::map & _map )
|
||||
{
|
||||
for( midiPort::map::const_iterator it = _map.constBegin();
|
||||
it != _map.constEnd(); ++it )
|
||||
@@ -118,9 +118,9 @@ void midiController::subscribeReadablePorts( const midiPort::map & _map )
|
||||
|
||||
|
||||
|
||||
void midiController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void MidiController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
controller::saveSettings( _doc, _this );
|
||||
Controller::saveSettings( _doc, _this );
|
||||
m_midiPort.saveSettings( _doc, _this );
|
||||
|
||||
}
|
||||
@@ -128,9 +128,9 @@ void midiController::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void midiController::loadSettings( const QDomElement & _this )
|
||||
void MidiController::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
controller::loadSettings( _this );
|
||||
Controller::loadSettings( _this );
|
||||
|
||||
m_midiPort.loadSettings( _this );
|
||||
|
||||
@@ -140,20 +140,20 @@ void midiController::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
QString midiController::nodeName( void ) const
|
||||
QString MidiController::nodeName( void ) const
|
||||
{
|
||||
return( "midicontroller" );
|
||||
return( "Midicontroller" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
controllerDialog * midiController::createDialog( QWidget * _parent )
|
||||
ControllerDialog * MidiController::createDialog( QWidget * _parent )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#include "moc_midi_controller.cxx"
|
||||
#include "moc_MidiController.cxx"
|
||||
|
||||
|
||||
@@ -639,7 +639,7 @@ sampleFrameA * mixer::renderNextBuffer( void )
|
||||
|
||||
// and trigger LFOs
|
||||
envelopeAndLFOParameters::triggerLFO();
|
||||
controller::triggerFrameCounter();
|
||||
Controller::triggerFrameCounter();
|
||||
|
||||
const float new_cpu_load = timer.elapsed() / 10000.0f *
|
||||
processingSampleRate() / m_framesPerPeriod;
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#include "bb_track.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "config_mgr.h"
|
||||
#include "controller_rack_view.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "embed.h"
|
||||
#include "envelope_and_lfo_parameters.h"
|
||||
#include "export_project_dialog.h"
|
||||
@@ -220,7 +220,7 @@ void song::doActions( void )
|
||||
case ActionPlaySong:
|
||||
m_playMode = Mode_PlaySong;
|
||||
m_playing = true;
|
||||
controller::resetFrameCounter();
|
||||
Controller::resetFrameCounter();
|
||||
break;
|
||||
|
||||
case ActionPlayTrack:
|
||||
@@ -970,7 +970,7 @@ void song::loadProject( const QString & _file_name )
|
||||
|
||||
// Connect controller links to their controllers
|
||||
// now that everything is loaded
|
||||
controllerConnection::finalizeConnections();
|
||||
ControllerConnection::finalizeConnections();
|
||||
|
||||
// resolve all IDs so that autoModels are automated
|
||||
automationPattern::resolveAllIDs();
|
||||
@@ -1112,7 +1112,7 @@ void song::restoreControllerStates( const QDomElement & _this )
|
||||
QDomNode node = _this.firstChild();
|
||||
while( !node.isNull() )
|
||||
{
|
||||
addController( controller::create( node.toElement(), this ) );
|
||||
addController( Controller::create( node.toElement(), this ) );
|
||||
|
||||
node = node.nextSibling();
|
||||
}
|
||||
@@ -1198,7 +1198,7 @@ void song::setModified( void )
|
||||
|
||||
|
||||
|
||||
void song::addController( controller * _c )
|
||||
void song::addController( Controller * _c )
|
||||
{
|
||||
if( _c != NULL && !m_controllers.contains( _c ) )
|
||||
{
|
||||
@@ -1210,7 +1210,7 @@ void song::addController( controller * _c )
|
||||
|
||||
|
||||
|
||||
void song::removeController( controller * _controller )
|
||||
void song::removeController( Controller * _controller )
|
||||
{
|
||||
int index = m_controllers.indexOf( _controller );
|
||||
if( index != -1 )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_connection_dialog.cpp - dialog allowing the user to create and
|
||||
* ControllerConnectionDialog.cpp - dialog allowing the user to create and
|
||||
* modify links between controllers and models
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -30,28 +30,28 @@
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#include "controller_connection_dialog.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnectionDialog.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "MidiController.h"
|
||||
#include "midi_client.h"
|
||||
#include "midi_port_menu.h"
|
||||
#include "midi.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "combobox.h"
|
||||
#include "tab_widget.h"
|
||||
#include "group_box.h"
|
||||
#include "midi_controller.h"
|
||||
#include "midi_client.h"
|
||||
#include "midi_port_menu.h"
|
||||
#include "midi.h"
|
||||
#include "song.h"
|
||||
#include "tool_button.h"
|
||||
|
||||
#include "gui_templates.h"
|
||||
#include "embed.h"
|
||||
|
||||
class autoDetectMidiController : public midiController
|
||||
class AutoDetectMidiController : public MidiController
|
||||
{
|
||||
public:
|
||||
autoDetectMidiController( model * _parent ) :
|
||||
midiController( _parent ),
|
||||
AutoDetectMidiController( model * _parent ) :
|
||||
MidiController( _parent ),
|
||||
m_detectedMidiChannel( 0 ),
|
||||
m_detectedMidiController( 0 )
|
||||
{
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual ~autoDetectMidiController()
|
||||
virtual ~AutoDetectMidiController()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@ public:
|
||||
|
||||
// Would be a nice copy ctor, but too hard to add copy ctor because
|
||||
// model has none.
|
||||
midiController * copyToMidiController( model * _parent )
|
||||
MidiController * copyToMidiController( model * _parent )
|
||||
{
|
||||
midiController * c = new midiController( _parent );
|
||||
MidiController * c = new MidiController( _parent );
|
||||
c->m_midiPort.setInputChannel( m_midiPort.inputChannel() );
|
||||
c->m_midiPort.setInputController( m_midiPort.inputController() );
|
||||
c->subscribeReadablePorts( m_midiPort.readablePorts() );
|
||||
@@ -115,7 +115,7 @@ public slots:
|
||||
|
||||
|
||||
|
||||
controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent,
|
||||
const automatableModel * _target_model
|
||||
) :
|
||||
QDialog( _parent ),
|
||||
@@ -184,7 +184,7 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
|
||||
for( int i = 0; i < engine::getSong()->controllers().size(); ++i )
|
||||
{
|
||||
controller * c = engine::getSong()->controllers().at( i );
|
||||
Controller * c = engine::getSong()->controllers().at( i );
|
||||
m_userController->model()->addItem( c->name() );
|
||||
}
|
||||
|
||||
@@ -230,29 +230,29 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
// Crazy MIDI View stuff
|
||||
|
||||
// TODO, handle by making this a model for the Dialog "view"
|
||||
controllerConnection * cc = NULL;
|
||||
ControllerConnection * cc = NULL;
|
||||
if( m_targetModel )
|
||||
{
|
||||
cc = m_targetModel->getControllerConnection();
|
||||
|
||||
if( cc && cc->getController()->type() !=
|
||||
controller::DummyController && engine::getSong() )
|
||||
Controller::DummyController && engine::getSong() )
|
||||
{
|
||||
if ( cc->getController()->type() ==
|
||||
controller::MidiController )
|
||||
Controller::MidiController )
|
||||
{
|
||||
m_midiGroupBox->model()->setValue( TRUE );
|
||||
// ensure controller is created
|
||||
midiToggled();
|
||||
|
||||
midiController * cont =
|
||||
(midiController*)( cc->getController() );
|
||||
MidiController * cont =
|
||||
(MidiController*)( cc->getController() );
|
||||
m_midiChannelSpinBox->model()->setValue(
|
||||
cont->m_midiPort.inputChannel() );
|
||||
m_midiControllerSpinBox->model()->setValue(
|
||||
cont->m_midiPort.inputController() );
|
||||
|
||||
m_midiController->subscribeReadablePorts( static_cast<midiController*>( cc->getController() )->m_midiPort.readablePorts() );
|
||||
m_midiController->subscribeReadablePorts( static_cast<MidiController*>( cc->getController() )->m_midiPort.readablePorts() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -279,7 +279,7 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent,
|
||||
|
||||
|
||||
|
||||
controllerConnectionDialog::~controllerConnectionDialog()
|
||||
ControllerConnectionDialog::~ControllerConnectionDialog()
|
||||
{
|
||||
delete m_readablePorts;
|
||||
|
||||
@@ -290,14 +290,14 @@ controllerConnectionDialog::~controllerConnectionDialog()
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::selectController( void )
|
||||
void ControllerConnectionDialog::selectController( void )
|
||||
{
|
||||
// Midi
|
||||
if( m_midiGroupBox->model()->value() > 0 )
|
||||
{
|
||||
if( m_midiControllerSpinBox->model()->value() > 0 )
|
||||
{
|
||||
midiController * mc;
|
||||
MidiController * mc;
|
||||
mc = m_midiController->copyToMidiController(
|
||||
engine::getSong() );
|
||||
|
||||
@@ -342,7 +342,7 @@ void controllerConnectionDialog::selectController( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::midiToggled( void )
|
||||
void ControllerConnectionDialog::midiToggled( void )
|
||||
{
|
||||
int enabled = m_midiGroupBox->model()->value();
|
||||
if( enabled != 0 )
|
||||
@@ -354,7 +354,7 @@ void controllerConnectionDialog::midiToggled( void )
|
||||
|
||||
if( !m_midiController )
|
||||
{
|
||||
m_midiController = new autoDetectMidiController( engine::getSong() );
|
||||
m_midiController = new AutoDetectMidiController( engine::getSong() );
|
||||
m_midiChannelSpinBox->setModel(
|
||||
&m_midiController->m_midiPort.m_inputChannelModel );
|
||||
m_midiControllerSpinBox->setModel(
|
||||
@@ -382,7 +382,7 @@ void controllerConnectionDialog::midiToggled( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::userToggled( void )
|
||||
void ControllerConnectionDialog::userToggled( void )
|
||||
{
|
||||
int enabled = m_userGroupBox->model()->value();
|
||||
if( enabled != 0 && m_midiGroupBox->model()->value() != 0 )
|
||||
@@ -396,7 +396,7 @@ void controllerConnectionDialog::userToggled( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::autoDetectToggled( void )
|
||||
void ControllerConnectionDialog::autoDetectToggled( void )
|
||||
{
|
||||
if( m_midiAutoDetect.value() )
|
||||
{
|
||||
@@ -407,7 +407,7 @@ void controllerConnectionDialog::autoDetectToggled( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::midiValueChanged( void )
|
||||
void ControllerConnectionDialog::midiValueChanged( void )
|
||||
{
|
||||
if( m_midiAutoDetect.value() )
|
||||
{
|
||||
@@ -419,7 +419,7 @@ void controllerConnectionDialog::midiValueChanged( void )
|
||||
|
||||
|
||||
|
||||
void controllerConnectionDialog::enableAutoDetect( QAction * _a )
|
||||
void ControllerConnectionDialog::enableAutoDetect( QAction * _a )
|
||||
{
|
||||
if( _a->isChecked() )
|
||||
{
|
||||
@@ -429,5 +429,5 @@ void controllerConnectionDialog::enableAutoDetect( QAction * _a )
|
||||
|
||||
|
||||
|
||||
#include "moc_controller_connection_dialog.cxx"
|
||||
#include "moc_ControllerConnectionDialog.cxx"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_dialog.cpp - per-controller-specific view for changing a
|
||||
* ControllerDialog.cpp - per-controller-specific view for changing a
|
||||
* controller's settings
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
#include <QtGui/QCloseEvent>
|
||||
|
||||
#include "controller_dialog.h"
|
||||
#include "controller.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "Controller.h"
|
||||
|
||||
|
||||
controllerDialog::controllerDialog( controller * _controller,
|
||||
ControllerDialog::ControllerDialog( Controller * _controller,
|
||||
QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
modelView( _controller, this )
|
||||
@@ -38,18 +38,18 @@ controllerDialog::controllerDialog( controller * _controller,
|
||||
|
||||
|
||||
|
||||
controllerDialog::~controllerDialog()
|
||||
ControllerDialog::~ControllerDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void controllerDialog::closeEvent( QCloseEvent * _ce )
|
||||
void ControllerDialog::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
_ce->ignore();
|
||||
emit closed();
|
||||
}
|
||||
|
||||
|
||||
#include "moc_controller_dialog.cxx"
|
||||
#include "moc_ControllerDialog.cxx"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* lfo_controller_dialog.cpp - per-controller-specific view for changing a
|
||||
* LfoControllerDialog.cpp - per-controller-specific view for changing a
|
||||
* controller's settings
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -39,8 +39,8 @@
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
#include "lfo_controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "LfoController.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "mv_base.h"
|
||||
#include "knob.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
@@ -61,8 +61,8 @@ const int CD_LFO_AMOUNT_CD_KNOB_X = CD_LFO_SPEED_CD_KNOB_X+CD_KNOB_X_SPACING;
|
||||
const int CD_LFO_PHASE_CD_KNOB_X = CD_LFO_AMOUNT_CD_KNOB_X+CD_KNOB_X_SPACING;
|
||||
const int CD_LFO_MULTIPLIER_X = CD_LFO_PHASE_CD_KNOB_X+CD_KNOB_X_SPACING;
|
||||
|
||||
lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent ) :
|
||||
controllerDialog( _model, _parent )
|
||||
LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent ) :
|
||||
ControllerDialog( _model, _parent )
|
||||
{
|
||||
QString title = tr( "LFO" );
|
||||
title.append( " (" );
|
||||
@@ -240,32 +240,14 @@ lfoControllerDialog::lfoControllerDialog( controller * _model, QWidget * _parent
|
||||
|
||||
|
||||
|
||||
lfoControllerDialog::~lfoControllerDialog()
|
||||
LfoControllerDialog::~LfoControllerDialog()
|
||||
{
|
||||
//delete m_subWindow;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void effectView::displayHelp( void )
|
||||
{
|
||||
QWhatsThis::showText( mapToGlobal( rect().bottomRight() ),
|
||||
whatsThis() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void effectView::closeEffects( void )
|
||||
{
|
||||
m_subWindow->hide();
|
||||
m_show = TRUE;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void lfoControllerDialog::contextMenuEvent( QContextMenuEvent * )
|
||||
void LfoControllerDialog::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
/*
|
||||
QPointer<captionMenu> contextMenu = new captionMenu(
|
||||
@@ -298,9 +280,9 @@ void lfoControllerDialog::paintEvent( QPaintEvent * _pe )
|
||||
*/
|
||||
|
||||
|
||||
void lfoControllerDialog::modelChanged( void )
|
||||
void LfoControllerDialog::modelChanged( void )
|
||||
{
|
||||
m_lfo = castModel<lfoController>();
|
||||
m_lfo = castModel<LfoController>();
|
||||
|
||||
m_baseKnob->setModel( &m_lfo->m_baseModel );
|
||||
m_speedKnob->setModel( &m_lfo->m_speedModel );
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* lfo_controller_dialog.cpp - per-controller-specific view for changing a
|
||||
* PeakController_Dialog.cpp - per-controller-specific view for changing a
|
||||
* controller's settings
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -38,15 +38,15 @@
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
#include "peak_controller.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "PeakController.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "mv_base.h"
|
||||
#include "knob.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
peakControllerDialog::peakControllerDialog( controller * _model, QWidget * _parent ) :
|
||||
controllerDialog( _model, _parent )
|
||||
PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _parent ) :
|
||||
ControllerDialog( _model, _parent )
|
||||
{
|
||||
setWindowTitle( tr( "PEAK" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "controller" ) );
|
||||
@@ -64,7 +64,7 @@ peakControllerDialog::peakControllerDialog( controller * _model, QWidget * _pare
|
||||
|
||||
|
||||
|
||||
peakControllerDialog::~peakControllerDialog()
|
||||
PeakControllerDialog::~PeakControllerDialog()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -88,23 +88,23 @@ void effectView::closeEffects( void )
|
||||
*/
|
||||
|
||||
|
||||
void peakControllerDialog::contextMenuEvent( QContextMenuEvent * )
|
||||
void PeakControllerDialog::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void peakControllerDialog::paintEvent( QPaintEvent * )
|
||||
void PeakControllerDialog::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void peakControllerDialog::modelChanged( void )
|
||||
void PeakControllerDialog::modelChanged( void )
|
||||
{
|
||||
m_peakController = castModel<peakController>();
|
||||
m_peakController = castModel<PeakController>();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
#include "automatable_model_view.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "controller_connection_dialog.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnectionDialog.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "string_pair_drag.h"
|
||||
@@ -94,7 +94,7 @@ void automatableModelView::addDefaultActions( QMenu * _menu )
|
||||
QString controllerTxt;
|
||||
if( _model->getControllerConnection() )
|
||||
{
|
||||
controller * cont = _model->getControllerConnection()->
|
||||
Controller * cont = _model->getControllerConnection()->
|
||||
getController();
|
||||
if( cont )
|
||||
{
|
||||
@@ -199,7 +199,7 @@ void automatableModelViewSlots::execConnectionDialog( void )
|
||||
automatableModel * m = amv->modelUntyped();
|
||||
|
||||
m->displayName();
|
||||
controllerConnectionDialog * d = new controllerConnectionDialog(
|
||||
ControllerConnectionDialog * d = new ControllerConnectionDialog(
|
||||
(QWidget*)engine::getMainWindow(), m );
|
||||
|
||||
if( d->exec() == 1)
|
||||
@@ -216,8 +216,8 @@ void automatableModelViewSlots::execConnectionDialog( void )
|
||||
// New
|
||||
else
|
||||
{
|
||||
controllerConnection * cc =
|
||||
new controllerConnection( d->chosenController() );
|
||||
ControllerConnection * cc =
|
||||
new ControllerConnection( d->chosenController() );
|
||||
m->setControllerConnection( cc );
|
||||
//cc->setTargetName( m->displayName() );
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "engine.h"
|
||||
#include "fx_mixer_view.h"
|
||||
#include "about_dialog.h"
|
||||
#include "controller_rack_view.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "plugin_browser.h"
|
||||
#include "side_bar.h"
|
||||
#include "config_mgr.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* controller_rack_view.cpp - view for song's controllers
|
||||
* ControllerRackView.cpp - view for song's controllers
|
||||
*
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
@@ -35,12 +35,12 @@
|
||||
#include "embed.h"
|
||||
#include "main_window.h"
|
||||
#include "group_box.h"
|
||||
#include "controller_rack_view.h"
|
||||
#include "controller_view.h"
|
||||
#include "lfo_controller.h"
|
||||
#include "ControllerRackView.h"
|
||||
#include "ControllerView.h"
|
||||
#include "LfoController.h"
|
||||
|
||||
|
||||
controllerRackView::controllerRackView( ) :
|
||||
ControllerRackView::ControllerRackView( ) :
|
||||
QWidget(),
|
||||
m_lastY( 0 )
|
||||
{
|
||||
@@ -72,7 +72,7 @@ controllerRackView::controllerRackView( ) :
|
||||
QVBoxLayout * layout = new QVBoxLayout();
|
||||
layout->addWidget( m_scrollArea );
|
||||
layout->addWidget( m_addButton );
|
||||
setLayout( layout );
|
||||
this->setLayout( layout );
|
||||
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
@@ -92,7 +92,7 @@ controllerRackView::controllerRackView( ) :
|
||||
|
||||
|
||||
|
||||
controllerRackView::~controllerRackView()
|
||||
ControllerRackView::~ControllerRackView()
|
||||
{
|
||||
// delete scroll-area with all children
|
||||
delete m_scrollArea;
|
||||
@@ -101,7 +101,7 @@ controllerRackView::~controllerRackView()
|
||||
|
||||
|
||||
|
||||
void controllerRackView::saveSettings( QDomDocument & _doc,
|
||||
void ControllerRackView::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
mainWindow::saveWidgetState( this, _this );
|
||||
@@ -110,7 +110,7 @@ void controllerRackView::saveSettings( QDomDocument & _doc,
|
||||
|
||||
|
||||
|
||||
void controllerRackView::loadSettings( const QDomElement & _this )
|
||||
void ControllerRackView::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
mainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
@@ -118,10 +118,10 @@ void controllerRackView::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void controllerRackView::deleteController( controllerView * _view )
|
||||
void ControllerRackView::deleteController( ControllerView * _view )
|
||||
{
|
||||
|
||||
controller * c = _view->getController();
|
||||
Controller * c = _view->getController();
|
||||
m_controllerViews.erase( qFind( m_controllerViews.begin(),
|
||||
m_controllerViews.end(), _view ) );
|
||||
delete _view;
|
||||
@@ -132,7 +132,7 @@ void controllerRackView::deleteController( controllerView * _view )
|
||||
|
||||
|
||||
|
||||
void controllerRackView::update( void )
|
||||
void ControllerRackView::update( void )
|
||||
{
|
||||
QWidget * w = m_scrollArea->widget();
|
||||
song * s = engine::getSong();
|
||||
@@ -149,10 +149,10 @@ void controllerRackView::update( void )
|
||||
|
||||
for( i = 0; i < s->m_controllers.size(); ++i )
|
||||
{
|
||||
controllerView * v = new controllerView( s->m_controllers[i], w );
|
||||
ControllerView * v = new ControllerView( s->m_controllers[i], w );
|
||||
|
||||
connect( v, SIGNAL( deleteController( controllerView * ) ),
|
||||
this, SLOT( deleteController( controllerView * ) ),
|
||||
connect( v, SIGNAL( deleteController( ControllerView * ) ),
|
||||
this, SLOT( deleteController( ControllerView * ) ),
|
||||
Qt::QueuedConnection );
|
||||
|
||||
m_controllerViews.append( v );
|
||||
@@ -167,15 +167,15 @@ void controllerRackView::update( void )
|
||||
}
|
||||
|
||||
|
||||
void controllerRackView::addController( void )
|
||||
void ControllerRackView::addController( void )
|
||||
{
|
||||
// TODO: Eventually let the user pick from available controller types
|
||||
|
||||
engine::getSong()->addController( new lfoController( engine::getSong() ) );
|
||||
engine::getSong()->addController( new LfoController( engine::getSong() ) );
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "moc_controller_rack_view.cxx"
|
||||
#include "moc_ControllerRackView.cxx"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* controller_view.cpp - view-component for an controller
|
||||
* ControllerView.cpp - view-component for an controller
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail.com>
|
||||
* Copyright (c) 2008-2009 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -23,8 +23,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "controller_view.h"
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QMdiArea>
|
||||
@@ -32,8 +30,10 @@
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QInputDialog>
|
||||
|
||||
#include "ControllerView.h"
|
||||
|
||||
#include "caption_menu.h"
|
||||
#include "controller_dialog.h"
|
||||
#include "ControllerDialog.h"
|
||||
#include "gui_templates.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "mv_base.h"
|
||||
|
||||
|
||||
controllerView::controllerView( controller * _model, QWidget * _parent ) :
|
||||
ControllerView::ControllerView( Controller * _model, QWidget * _parent ) :
|
||||
QWidget( _parent ),
|
||||
modelView( _model, this ),
|
||||
m_bg( embed::getIconPixmap( "controller_bg" ) ),
|
||||
@@ -86,7 +86,7 @@ controllerView::controllerView( controller * _model, QWidget * _parent ) :
|
||||
|
||||
|
||||
|
||||
controllerView::~controllerView()
|
||||
ControllerView::~ControllerView()
|
||||
{
|
||||
delete m_subWindow;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ controllerView::~controllerView()
|
||||
|
||||
|
||||
|
||||
void controllerView::editControls( void )
|
||||
void ControllerView::editControls( void )
|
||||
{
|
||||
if( m_show )
|
||||
{
|
||||
@@ -112,21 +112,21 @@ void controllerView::editControls( void )
|
||||
|
||||
|
||||
|
||||
void controllerView::closeControls( void )
|
||||
void ControllerView::closeControls( void )
|
||||
{
|
||||
m_subWindow->hide();
|
||||
m_show = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void controllerView::deleteController()
|
||||
void ControllerView::deleteController()
|
||||
{
|
||||
emit( deleteController( this ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void controllerView::paintEvent( QPaintEvent * )
|
||||
void ControllerView::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p( this );
|
||||
p.drawPixmap( 0, 0, m_bg );
|
||||
@@ -135,7 +135,7 @@ void controllerView::paintEvent( QPaintEvent * )
|
||||
f.setBold( TRUE );
|
||||
p.setFont( f );
|
||||
|
||||
controller * c = castModel<controller>();
|
||||
Controller * c = castModel<Controller>();
|
||||
|
||||
p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( 7, 13, c->displayName() );
|
||||
@@ -149,10 +149,10 @@ void controllerView::paintEvent( QPaintEvent * )
|
||||
|
||||
|
||||
|
||||
void controllerView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
void ControllerView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
{
|
||||
bool ok;
|
||||
controller * c = castModel<controller>();
|
||||
Controller * c = castModel<Controller>();
|
||||
QString new_name = QInputDialog::getText( this,
|
||||
tr( "Rename controller" ),
|
||||
tr( "Enter the new name for this controller" ),
|
||||
@@ -166,13 +166,13 @@ void controllerView::mouseDoubleClickEvent( QMouseEvent * event )
|
||||
|
||||
|
||||
|
||||
void controllerView::modelChanged( void )
|
||||
void ControllerView::modelChanged( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void controllerView::contextMenuEvent( QContextMenuEvent * )
|
||||
void ControllerView::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
QPointer<captionMenu> contextMenu = new captionMenu(
|
||||
getModel()->displayName() );
|
||||
@@ -198,7 +198,7 @@ void controllerView::contextMenuEvent( QContextMenuEvent * )
|
||||
|
||||
|
||||
|
||||
void controllerView::displayHelp( void )
|
||||
void ControllerView::displayHelp( void )
|
||||
{
|
||||
QWhatsThis::showText( mapToGlobal( rect().center() ),
|
||||
whatsThis() );
|
||||
@@ -206,5 +206,5 @@ void controllerView::displayHelp( void )
|
||||
|
||||
|
||||
|
||||
#include "moc_controller_view.cxx"
|
||||
#include "moc_ControllerView.cxx"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "caption_menu.h"
|
||||
#include "config_mgr.h"
|
||||
#include "controller_connection.h"
|
||||
#include "ControllerConnection.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -639,7 +639,7 @@ void knob::friendlyUpdate( void )
|
||||
if( model()->getControllerConnection() == NULL ||
|
||||
model()->getControllerConnection()->getController()->
|
||||
frequentUpdates() == FALSE ||
|
||||
controller::runningFrames() % (256*4) == 0 )
|
||||
Controller::runningFrames() % (256*4) == 0 )
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user