* removed volumeKnob-class and added volumeKnob-property to knob-class instead
* reduced header-dependencies and various cleanups * removed obsolete settings git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1158 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -31,13 +31,8 @@
|
||||
#include "journalling_object.h"
|
||||
#include "mv_base.h"
|
||||
#include "controller_connection.h"
|
||||
#include "automation_pattern.h"
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
|
||||
|
||||
class automationPattern;
|
||||
class track;
|
||||
|
||||
|
||||
@@ -121,17 +116,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
inline void setControllerConnection( controllerConnection * _c )
|
||||
{
|
||||
m_controllerConnection = _c;
|
||||
if( _c )
|
||||
{
|
||||
QObject::connect( m_controllerConnection,
|
||||
SIGNAL( valueChanged() ),
|
||||
this, SIGNAL( dataChanged() ) );
|
||||
emit dataChanged();
|
||||
}
|
||||
}
|
||||
void setControllerConnection( controllerConnection * _c );
|
||||
|
||||
|
||||
template<class T>
|
||||
@@ -296,7 +281,7 @@ private:
|
||||
|
||||
|
||||
controllerConnection * m_controllerConnection;
|
||||
QPointer<automationPattern> m_automationPattern;
|
||||
automationPattern * m_automationPattern;
|
||||
track * m_track;
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
//const int MOOG_VOLTAGE = 40000;
|
||||
|
||||
template<ch_cnt_t CHANNELS = DEFAULT_CHANNELS>
|
||||
template<ch_cnt_t CHANNELS/* = DEFAULT_CHANNELS*/>
|
||||
class basicFilters
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -27,13 +27,9 @@
|
||||
#ifndef _CONTROLLER_H
|
||||
#define _CONTROLLER_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "engine.h"
|
||||
#include "mixer.h"
|
||||
#include "mv_base.h"
|
||||
#include "templates.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
class controllerDialog;
|
||||
@@ -41,6 +37,7 @@ class controller;
|
||||
|
||||
typedef QVector<controller *> controllerVector;
|
||||
|
||||
|
||||
class controller : public model, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -32,16 +32,14 @@
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "engine.h"
|
||||
#include "controller.h"
|
||||
#include "mv_base.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
class controllerConnection;
|
||||
class QString;
|
||||
|
||||
typedef QVector<controllerConnection *> controllerConnectionVector;
|
||||
|
||||
|
||||
class controllerConnection : public QObject, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "types.h"
|
||||
#include "automatable_model.h"
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "combobox.h"
|
||||
#include "combobox_model.h"
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
#define _INSTRUMENT_SOUND_SHAPING_H
|
||||
|
||||
#include "mixer.h"
|
||||
#include "automatable_model.h"
|
||||
#include "combobox.h"
|
||||
#include "combobox_model.h"
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
|
||||
@@ -30,16 +30,11 @@
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
#include "audio_port.h"
|
||||
#include "automatable_model.h"
|
||||
#include "instrument_functions.h"
|
||||
#include "instrument_sound_shaping.h"
|
||||
#include "lcd_spinbox.h"
|
||||
#include "midi_event_processor.h"
|
||||
#include "midi_port.h"
|
||||
#include "mixer.h"
|
||||
#include "piano.h"
|
||||
#include "effect_chain.h"
|
||||
#include "tab_widget.h"
|
||||
#include "track.h"
|
||||
|
||||
|
||||
@@ -54,11 +49,12 @@ class instrument;
|
||||
class instrumentTrackButton;
|
||||
class instrumentTrackWindow;
|
||||
class instrumentMidiIOView;
|
||||
class lcdSpinBox;
|
||||
class midiPortMenu;
|
||||
class notePlayHandle;
|
||||
class pluginView;
|
||||
class presetPreviewPlayHandle;
|
||||
class volumeKnob;
|
||||
class tabWidget;
|
||||
|
||||
|
||||
class EXPORT instrumentTrack : public track, public midiEventProcessor
|
||||
@@ -181,7 +177,7 @@ private:
|
||||
floatModel m_volumeModel;
|
||||
floatModel m_panningModel;
|
||||
floatModel m_pitchModel;
|
||||
lcdSpinBoxModel m_effectChannelModel;
|
||||
intModel m_effectChannelModel;
|
||||
|
||||
|
||||
instrument * m_instrument;
|
||||
@@ -244,7 +240,7 @@ private:
|
||||
static QQueue<instrumentTrackWindow *> s_windows;
|
||||
|
||||
// widgets in track-settings-widget
|
||||
volumeKnob * m_tswVolumeKnob;
|
||||
knob * m_tswVolumeKnob;
|
||||
fadeButton * m_tswActivityIndicator;
|
||||
instrumentTrackButton * m_tswInstrumentTrackButton;
|
||||
|
||||
@@ -271,7 +267,7 @@ public:
|
||||
virtual ~instrumentTrackWindow();
|
||||
|
||||
// parent for all internal tab-widgets
|
||||
QWidget * tabWidgetParent( void )
|
||||
tabWidget * tabWidgetParent( void )
|
||||
{
|
||||
return( m_tabWidget );
|
||||
}
|
||||
@@ -323,7 +319,7 @@ private:
|
||||
// widgets on the top of an instrument-track-window
|
||||
tabWidget * m_generalSettingsWidget;
|
||||
QLineEdit * m_instrumentNameLE;
|
||||
volumeKnob * m_volumeKnob;
|
||||
knob * m_volumeKnob;
|
||||
knob * m_panningKnob;
|
||||
knob * m_pitchKnob;
|
||||
lcdSpinBox * m_effectChannelNumber;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/*
|
||||
* knob.h - powerful knob-widget
|
||||
*
|
||||
* This file is based on the knob-widget of the Qwt Widget Library by
|
||||
* Josef Wilgen
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -61,7 +58,7 @@ class EXPORT knob : public QWidget, public floatModelView
|
||||
// Unfortunately, the gradient syntax doesn't create our gradient
|
||||
// correctly so we need to do this:
|
||||
Q_PROPERTY(QColor outerColor READ outerColor WRITE setOuterColor)
|
||||
|
||||
mapPropertyFromModel(bool,isVolumeKnob,setVolumeKnob,m_volumeKnob);
|
||||
public:
|
||||
knob( int _knob_num, QWidget * _parent, const QString & _name = QString::null );
|
||||
virtual ~knob();
|
||||
@@ -97,12 +94,6 @@ public:
|
||||
void setOuterColor( const QColor & _c );
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void enterValue( void );
|
||||
void displayHelp( void );
|
||||
void friendlyUpdate( void );
|
||||
|
||||
|
||||
signals:
|
||||
void sliderPressed( void );
|
||||
void sliderReleased( void );
|
||||
@@ -110,21 +101,6 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
static textFloat * s_textFloat;
|
||||
|
||||
float m_mouseOffset;
|
||||
QPoint m_origMousePos;
|
||||
bool m_buttonPressed;
|
||||
|
||||
QPixmap * m_knobPixmap;
|
||||
|
||||
// Styled knob stuff, could break out
|
||||
QPointF m_centerPoint;
|
||||
float m_innerRadius;
|
||||
float m_outerRadius;
|
||||
float m_lineWidth;
|
||||
QColor * m_outerColor;
|
||||
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
@@ -135,15 +111,23 @@ protected:
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
|
||||
void drawKnob( QPainter * _p );
|
||||
void setPosition( const QPoint & _p );
|
||||
private slots:
|
||||
virtual void enterValue( void );
|
||||
void displayHelp( void );
|
||||
void friendlyUpdate( void );
|
||||
|
||||
float getValue( const QPoint & _p );
|
||||
|
||||
private:
|
||||
QString displayValue( void ) const;
|
||||
|
||||
virtual void doConnections( void );
|
||||
|
||||
QLineF calculateLine( const QPointF & _mid, float _radius,
|
||||
float _innerRadius = 1) const;
|
||||
|
||||
private:
|
||||
void drawKnob( QPainter * _p );
|
||||
void setPosition( const QPoint & _p );
|
||||
float getValue( const QPoint & _p );
|
||||
bool updateAngle( void );
|
||||
|
||||
inline float pageSize( void ) const
|
||||
@@ -153,19 +137,29 @@ private:
|
||||
modelUntyped()->step<float>() ) );
|
||||
}
|
||||
|
||||
virtual void doConnections( void );
|
||||
|
||||
static textFloat * s_textFloat;
|
||||
|
||||
int m_knobNum;
|
||||
QString m_label;
|
||||
|
||||
void valueChange( void );
|
||||
void buttonReleased( void );
|
||||
QPixmap * m_knobPixmap;
|
||||
boolModel m_volumeKnob;
|
||||
|
||||
float m_mouseOffset;
|
||||
QPoint m_origMousePos;
|
||||
bool m_buttonPressed;
|
||||
|
||||
float m_totalAngle;
|
||||
int m_angle;
|
||||
QImage m_cache;
|
||||
|
||||
int m_knobNum;
|
||||
QString m_label;
|
||||
// Styled knob stuff, could break out
|
||||
QPointF m_centerPoint;
|
||||
float m_innerRadius;
|
||||
float m_outerRadius;
|
||||
float m_lineWidth;
|
||||
QColor * m_outerColor;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -27,14 +27,11 @@
|
||||
#define _LCD_SPINBOX_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QLCDNumber>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "automatable_model_view.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
|
||||
class EXPORT lcdSpinBox : public QWidget, public intModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#define _NOTE_PLAY_HANDLE_H
|
||||
|
||||
#include "mixer.h"
|
||||
#include "basic_filters.h"
|
||||
#include "bb_track.h"
|
||||
#include "note.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_track.h"
|
||||
@@ -38,6 +36,7 @@
|
||||
|
||||
class notePlayHandle;
|
||||
|
||||
template<ch_cnt_t=DEFAULT_CHANNELS> class basicFilters;
|
||||
typedef QVector<notePlayHandle *> notePlayHandleVector;
|
||||
typedef QVector<const notePlayHandle *> constNotePlayHandleVector;
|
||||
|
||||
@@ -223,7 +222,7 @@ public:
|
||||
{
|
||||
return( m_bbTrack && m_bbTrack->isMuted() );
|
||||
}
|
||||
void setBBTrack( bbTrack * _bb_track )
|
||||
void setBBTrack( track * _bb_track )
|
||||
{
|
||||
m_bbTrack = _bb_track;
|
||||
}
|
||||
@@ -308,7 +307,7 @@ private:
|
||||
// an arpeggio (either base-note or
|
||||
// sub-note)
|
||||
bool m_muted; // indicates whether note is muted
|
||||
bbTrack * m_bbTrack; // related BB track
|
||||
track * m_bbTrack; // related BB track
|
||||
#if SINGERBOT_SUPPORT
|
||||
int m_patternIndex; // position among relevant notes
|
||||
#endif
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
|
||||
#include "audio_port.h"
|
||||
#include "track.h"
|
||||
#include "volume_knob.h"
|
||||
|
||||
class QLabel;
|
||||
class effectLabel;
|
||||
class sampleBuffer;
|
||||
class knob;
|
||||
|
||||
//class sampleTCOSettingsDialog;
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
private:
|
||||
audioPort m_audioPort;
|
||||
knobModel m_volumeModel;
|
||||
floatModel m_volumeModel;
|
||||
|
||||
|
||||
friend class sampleTrackView;
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
private:
|
||||
effectLabel * m_trackLabel;
|
||||
|
||||
volumeKnob * m_volumeKnob;
|
||||
knob * m_volumeKnob;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -87,9 +87,6 @@ private slots:
|
||||
|
||||
|
||||
void toggleToolTips( bool _enabled );
|
||||
void toggleKnobUsability( bool _classical );
|
||||
void toggleMdiWindows( bool _enabled );
|
||||
void toggleWizard( bool _enabled );
|
||||
void toggleWarnAfterSetup( bool _enabled );
|
||||
void toggleDisplaydBV( bool _enabled );
|
||||
void toggleMMPZ( bool _enabled );
|
||||
@@ -114,9 +111,6 @@ private:
|
||||
int m_bufferSize;
|
||||
|
||||
bool m_toolTips;
|
||||
bool m_classicalKnobUsability;
|
||||
bool m_MDI;
|
||||
bool m_wizard;
|
||||
bool m_warnAfterSetup;
|
||||
bool m_displaydBV;
|
||||
bool m_MMPZ;
|
||||
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
class surroundArea : public QWidget, public modelView
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
static QPixmap * s_backgroundArtwork;
|
||||
|
||||
} ;
|
||||
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -79,6 +79,10 @@ signals:
|
||||
|
||||
|
||||
public slots:
|
||||
inline void disableSync( void )
|
||||
{
|
||||
setTempoSync( SyncNone );
|
||||
}
|
||||
void setTempoSync( int _note_type );
|
||||
void setTempoSync( QAction * _item );
|
||||
|
||||
@@ -130,9 +134,7 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
|
||||
|
||||
protected slots:
|
||||
@@ -144,7 +146,7 @@ private:
|
||||
QPixmap m_tempoSyncIcon;
|
||||
QString m_tempoSyncDescription;
|
||||
|
||||
QPointer<meterDialog> m_custom;
|
||||
meterDialog * m_custom;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* volume_knob.h - defines a knob that display it's value as either a
|
||||
* percentage or in dBV.
|
||||
*
|
||||
* 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 _VOLUME_KNOB_H
|
||||
#define _VOLUME_KNOB_H
|
||||
|
||||
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
class EXPORT volumeKnob : public knob
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
volumeKnob( int _knob_num, QWidget * _parent, const QString & _name = QString::null );
|
||||
virtual ~volumeKnob();
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void enterValue( void );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user