Merge branch 'master' into groove
This commit is contained in:
@@ -80,10 +80,10 @@ public:
|
||||
static DeviceInfoCollection getAvailableDevices();
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
virtual void run();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
void run() override;
|
||||
|
||||
int setHWParams( const ch_cnt_t _channels, snd_pcm_access_t _access );
|
||||
int setSWParams();
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
AudioAlsaSetupWidget( QWidget * _parent );
|
||||
virtual ~AudioAlsaSetupWidget();
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
public slots:
|
||||
void onCurrentIndexChanged(int index);
|
||||
|
||||
@@ -64,11 +64,11 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings()
|
||||
void saveSettings() override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void show()
|
||||
void show() override
|
||||
{
|
||||
parentWidget()->hide();
|
||||
QWidget::show();
|
||||
@@ -78,17 +78,17 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void startProcessing()
|
||||
void startProcessing() override
|
||||
{
|
||||
start();
|
||||
}
|
||||
|
||||
virtual void stopProcessing()
|
||||
void stopProcessing() override
|
||||
{
|
||||
stopProcessingThread( this );
|
||||
}
|
||||
|
||||
virtual void run()
|
||||
void run() override
|
||||
{
|
||||
MicroTimer timer;
|
||||
while( true )
|
||||
|
||||
@@ -56,6 +56,10 @@ protected:
|
||||
return m_outputFile.isOpen();
|
||||
}
|
||||
|
||||
inline int outputFileHandle() const
|
||||
{
|
||||
return m_outputFile.handle();
|
||||
}
|
||||
|
||||
private:
|
||||
QFile m_outputFile;
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
protected:
|
||||
virtual void writeBuffer( const surroundSampleFrame * /* _buf*/,
|
||||
const fpp_t /*_frames*/,
|
||||
const float /*_master_gain*/ );
|
||||
const float /*_master_gain*/ ) override;
|
||||
|
||||
private:
|
||||
void flushRemainingBuffers();
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain );
|
||||
const float _master_gain ) override;
|
||||
|
||||
bool startEncoding();
|
||||
void finishEncoding();
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
float _master_gain );
|
||||
float _master_gain ) override;
|
||||
|
||||
bool startEncoding();
|
||||
void finishEncoding();
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <QMutexLocker>
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
@@ -108,7 +107,6 @@ private:
|
||||
|
||||
bool m_active;
|
||||
bool m_stopped;
|
||||
QMutex m_processingMutex;
|
||||
|
||||
MidiJack *m_midiClient;
|
||||
QVector<jack_port_t *> m_outputPorts;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
@@ -70,10 +70,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
virtual void run();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
void run() override;
|
||||
|
||||
int m_audioFD;
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ public:
|
||||
bool processEffects();
|
||||
|
||||
// ThreadableJob stuff
|
||||
virtual void doProcessing();
|
||||
virtual bool requiresProcessing() const
|
||||
void doProcessing() override;
|
||||
bool requiresProcessing() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ class AudioPortAudioSetupUtil : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void updateBackends();
|
||||
void updateDevices();
|
||||
void updateChannels();
|
||||
|
||||
@@ -87,6 +88,7 @@ public:
|
||||
virtual ~setupWidget();
|
||||
|
||||
virtual void saveSettings();
|
||||
virtual void show();
|
||||
|
||||
private:
|
||||
ComboBox * m_backend;
|
||||
@@ -145,7 +147,6 @@ private:
|
||||
int m_outBufSize;
|
||||
|
||||
bool m_stopped;
|
||||
QSemaphore m_stopSemaphore;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
@@ -80,10 +80,10 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
virtual void run();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
void run() override;
|
||||
|
||||
volatile bool m_quit;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
private:
|
||||
virtual void writeBuffer( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain );
|
||||
const float _master_gain ) override;
|
||||
|
||||
typedef QList<QPair<sampleFrame *, fpp_t> > BufferList;
|
||||
BufferList m_buffers;
|
||||
|
||||
@@ -60,9 +60,9 @@ public:
|
||||
{
|
||||
public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
~setupWidget() override;
|
||||
|
||||
virtual void saveSettings();
|
||||
void saveSettings() override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
@@ -71,24 +71,42 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void startProcessing();
|
||||
virtual void stopProcessing();
|
||||
virtual void applyQualitySettings();
|
||||
void startProcessing() override;
|
||||
void stopProcessing() override;
|
||||
void applyQualitySettings() override;
|
||||
|
||||
static void sdlAudioCallback( void * _udata, Uint8 * _buf, int _len );
|
||||
void sdlAudioCallback( Uint8 * _buf, int _len );
|
||||
|
||||
#ifdef LMMS_HAVE_SDL2
|
||||
static void sdlInputAudioCallback( void * _udata, Uint8 * _buf, int _len );
|
||||
void sdlInputAudioCallback( Uint8 * _buf, int _len );
|
||||
#endif
|
||||
|
||||
SDL_AudioSpec m_audioHandle;
|
||||
|
||||
surroundSampleFrame * m_outBuf;
|
||||
|
||||
#ifdef LMMS_HAVE_SDL2
|
||||
size_t m_currentBufferFramePos;
|
||||
size_t m_currentBufferFramesCount;
|
||||
#else
|
||||
Uint8 * m_convertedBuf;
|
||||
int m_convertedBufPos;
|
||||
int m_convertedBufSize;
|
||||
bool m_outConvertEndian;
|
||||
#endif
|
||||
|
||||
bool m_convertEndian;
|
||||
|
||||
bool m_stopped;
|
||||
|
||||
#ifdef LMMS_HAVE_SDL2
|
||||
SDL_AudioDeviceID m_outputDevice;
|
||||
|
||||
SDL_AudioSpec m_inputAudioHandle;
|
||||
SDL_AudioDeviceID m_inputDevice;
|
||||
#endif
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
setupWidget( QWidget * _parent );
|
||||
virtual ~setupWidget();
|
||||
|
||||
virtual void saveSettings( void );
|
||||
void saveSettings( void ) override;
|
||||
|
||||
private:
|
||||
QLineEdit * m_device;
|
||||
@@ -66,10 +66,10 @@ public:
|
||||
} ;
|
||||
|
||||
private:
|
||||
virtual void startProcessing( void );
|
||||
virtual void stopProcessing( void );
|
||||
virtual void applyQualitySettings( void );
|
||||
virtual void run( void );
|
||||
void startProcessing( void ) override;
|
||||
void stopProcessing( void ) override;
|
||||
void applyQualitySettings( void ) override;
|
||||
void run( void ) override;
|
||||
|
||||
struct sio_hdl *m_hdl;
|
||||
struct sio_par m_par;
|
||||
|
||||
@@ -109,6 +109,8 @@ private:
|
||||
fpp_t m_outBufFramesTotal;
|
||||
fpp_t m_outBufFrameIndex;
|
||||
|
||||
bool m_stopped;
|
||||
|
||||
int m_disconnectErr;
|
||||
void onBackendDisconnect(int err);
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
class automatableButtonGroup;
|
||||
|
||||
|
||||
class EXPORT AutomatableButton : public QPushButton, public BoolModelView
|
||||
class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomatableButton( QWidget * _parent, const QString & _name
|
||||
= QString::null );
|
||||
= QString() );
|
||||
virtual ~AutomatableButton();
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
model()->setJournalling( _on );
|
||||
}
|
||||
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -62,9 +62,9 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -79,12 +79,12 @@ private:
|
||||
|
||||
|
||||
|
||||
class EXPORT automatableButtonGroup : public QWidget, public IntModelView
|
||||
class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
automatableButtonGroup( QWidget * _parent, const QString & _name
|
||||
= QString::null );
|
||||
= QString() );
|
||||
virtual ~automatableButtonGroup();
|
||||
|
||||
void addButton( AutomatableButton * _btn );
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
|
||||
void activateButton( AutomatableButton * _btn );
|
||||
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "MidiTime.h"
|
||||
#include "ValueBuffer.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ModelVisitor.h"
|
||||
|
||||
// simple way to map a property of a view to a model
|
||||
#define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \
|
||||
@@ -59,15 +60,21 @@
|
||||
modelname.setValue( (float) val ); \
|
||||
}
|
||||
|
||||
// use this to make subclasses visitable
|
||||
#define MODEL_IS_VISITABLE \
|
||||
void accept(ModelVisitor& v) override { v.visit(*this); } \
|
||||
void accept(ConstModelVisitor& v) const override { v.visit(*this); }
|
||||
|
||||
|
||||
|
||||
class ControllerConnection;
|
||||
|
||||
class EXPORT AutomatableModel : public Model, public JournallingObject
|
||||
class LMMS_EXPORT AutomatableModel : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
MM_OPERATORS
|
||||
public:
|
||||
|
||||
typedef QVector<AutomatableModel *> AutoModelVector;
|
||||
|
||||
enum ScaleType
|
||||
@@ -80,6 +87,35 @@ public:
|
||||
|
||||
virtual ~AutomatableModel();
|
||||
|
||||
// Implement those by using the MODEL_IS_VISITABLE macro
|
||||
virtual void accept(ModelVisitor& v) = 0;
|
||||
virtual void accept(ConstModelVisitor& v) const = 0;
|
||||
|
||||
public:
|
||||
/**
|
||||
@brief Return this class casted to Target
|
||||
@test AutomatableModelTest.cpp
|
||||
@param doThrow throw an assertion if the cast fails, instead of
|
||||
returning a nullptr
|
||||
@return the casted class if Target is the exact or a base class of
|
||||
*this, nullptr otherwise
|
||||
*/
|
||||
template<class Target>
|
||||
Target* dynamicCast(bool doThrow = false)
|
||||
{
|
||||
DCastVisitor<Target> vis; accept(vis);
|
||||
if (doThrow && !vis.result) { Q_ASSERT(false); }
|
||||
return vis.result;
|
||||
}
|
||||
|
||||
//! const overload, see overloaded function
|
||||
template<class Target>
|
||||
const Target* dynamicCast(bool doThrow = false) const
|
||||
{
|
||||
ConstDCastVisitor<Target> vis; accept(vis);
|
||||
if (doThrow && !vis.result) { Q_ASSERT(false); }
|
||||
return vis.result;
|
||||
}
|
||||
|
||||
bool isAutomated() const;
|
||||
bool isAutomatedOrControlled() const
|
||||
@@ -219,7 +255,7 @@ public:
|
||||
specified DOM element using <name> as attribute/node name */
|
||||
virtual void loadSettings( const QDomElement& element, const QString& name );
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "automatablemodel";
|
||||
}
|
||||
@@ -283,12 +319,30 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
// dynamicCast implementation
|
||||
template<class Target>
|
||||
struct DCastVisitor : public ModelVisitor
|
||||
{
|
||||
Target* result = nullptr;
|
||||
void visit(Target& tar) { result = &tar; }
|
||||
};
|
||||
|
||||
// dynamicCast implementation
|
||||
template<class Target>
|
||||
struct ConstDCastVisitor : public ConstModelVisitor
|
||||
{
|
||||
const Target* result = nullptr;
|
||||
void visit(const Target& tar) { result = &tar; }
|
||||
};
|
||||
|
||||
static bool mustQuoteName(const QString &name);
|
||||
|
||||
void saveSettings( QDomDocument& doc, QDomElement& element ) override
|
||||
{
|
||||
saveSettings( doc, element, "value" );
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
void loadSettings( const QDomElement& element ) override
|
||||
{
|
||||
loadSettings( element, "value" );
|
||||
}
|
||||
@@ -349,7 +403,7 @@ signals:
|
||||
|
||||
|
||||
|
||||
template <typename T> class EXPORT TypedAutomatableModel : public AutomatableModel
|
||||
template <typename T> class LMMS_EXPORT TypedAutomatableModel : public AutomatableModel
|
||||
{
|
||||
public:
|
||||
using AutomatableModel::AutomatableModel;
|
||||
@@ -377,9 +431,10 @@ public:
|
||||
|
||||
// some typed AutomatableModel-definitions
|
||||
|
||||
class EXPORT FloatModel : public TypedAutomatableModel<float>
|
||||
class LMMS_EXPORT FloatModel : public TypedAutomatableModel<float>
|
||||
{
|
||||
Q_OBJECT
|
||||
MODEL_IS_VISITABLE
|
||||
public:
|
||||
FloatModel( float val = 0, float min = 0, float max = 0, float step = 0,
|
||||
Model * parent = NULL,
|
||||
@@ -394,9 +449,10 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
class EXPORT IntModel : public TypedAutomatableModel<int>
|
||||
class LMMS_EXPORT IntModel : public TypedAutomatableModel<int>
|
||||
{
|
||||
Q_OBJECT
|
||||
MODEL_IS_VISITABLE
|
||||
public:
|
||||
IntModel( int val = 0, int min = 0, int max = 0,
|
||||
Model* parent = NULL,
|
||||
@@ -409,9 +465,10 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
class EXPORT BoolModel : public TypedAutomatableModel<bool>
|
||||
class LMMS_EXPORT BoolModel : public TypedAutomatableModel<bool>
|
||||
{
|
||||
Q_OBJECT
|
||||
MODEL_IS_VISITABLE
|
||||
public:
|
||||
BoolModel( const bool val = false,
|
||||
Model* parent = NULL,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
class QMenu;
|
||||
class QMouseEvent;
|
||||
|
||||
class EXPORT AutomatableModelView : public ModelView
|
||||
class LMMS_EXPORT AutomatableModelView : public ModelView
|
||||
{
|
||||
public:
|
||||
AutomatableModelView( Model* model, QWidget* _this );
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
return castModel<AutomatableModel>();
|
||||
}
|
||||
|
||||
virtual void setModel( Model* model, bool isOldModelValid = true );
|
||||
void setModel( Model* model, bool isOldModelValid = true ) override;
|
||||
|
||||
template<typename T>
|
||||
inline T value() const
|
||||
@@ -106,7 +106,7 @@ protected:
|
||||
|
||||
|
||||
|
||||
template <typename ModelType> class EXPORT TypedModelView : public AutomatableModelView
|
||||
template <typename ModelType> class LMMS_EXPORT TypedModelView : public AutomatableModelView
|
||||
{
|
||||
public:
|
||||
TypedModelView( Model* model, QWidget* _this) :
|
||||
@@ -127,6 +127,5 @@ using FloatModelView = TypedModelView<FloatModel>;
|
||||
using IntModelView = TypedModelView<IntModel>;
|
||||
using BoolModelView = TypedModelView<BoolModel>;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class AutomatableSlider : public QSlider, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AutomatableSlider( QWidget * _parent, const QString & _name = QString::null );
|
||||
AutomatableSlider( QWidget * _parent, const QString & _name = QString() );
|
||||
virtual ~AutomatableSlider();
|
||||
|
||||
bool showStatus()
|
||||
@@ -51,12 +51,12 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
void wheelEvent( QWheelEvent * _me ) override;
|
||||
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -73,9 +73,9 @@ public:
|
||||
return m_pattern != nullptr;
|
||||
}
|
||||
|
||||
virtual void saveSettings(QDomDocument & doc, QDomElement & parent);
|
||||
virtual void loadSettings(const QDomElement & parent);
|
||||
QString nodeName() const
|
||||
void saveSettings(QDomDocument & doc, QDomElement & parent) override;
|
||||
void loadSettings(const QDomElement & parent) override;
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "automationeditor";
|
||||
}
|
||||
@@ -114,14 +114,14 @@ public slots:
|
||||
protected:
|
||||
typedef AutomationPattern::timeMap timeMap;
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent * ke);
|
||||
virtual void leaveEvent(QEvent * e);
|
||||
virtual void mousePressEvent(QMouseEvent * mouseEvent);
|
||||
virtual void mouseReleaseEvent(QMouseEvent * mouseEvent);
|
||||
virtual void mouseMoveEvent(QMouseEvent * mouseEvent);
|
||||
virtual void paintEvent(QPaintEvent * pe);
|
||||
virtual void resizeEvent(QResizeEvent * re);
|
||||
virtual void wheelEvent(QWheelEvent * we);
|
||||
void keyPressEvent(QKeyEvent * ke) override;
|
||||
void leaveEvent(QEvent * e) override;
|
||||
void mousePressEvent(QMouseEvent * mouseEvent) override;
|
||||
void mouseReleaseEvent(QMouseEvent * mouseEvent) override;
|
||||
void mouseMoveEvent(QMouseEvent * mouseEvent) override;
|
||||
void paintEvent(QPaintEvent * pe) override;
|
||||
void resizeEvent(QResizeEvent * re) override;
|
||||
void wheelEvent(QWheelEvent * we) override;
|
||||
|
||||
float getLevel( int y );
|
||||
int xCoordOfTick( int tick );
|
||||
@@ -176,8 +176,8 @@ private:
|
||||
static const int TOP_MARGIN = 16;
|
||||
|
||||
static const int DEFAULT_Y_DELTA = 6;
|
||||
static const int DEFAULT_STEPS_PER_TACT = 16;
|
||||
static const int DEFAULT_PPT = 12 * DEFAULT_STEPS_PER_TACT;
|
||||
static const int DEFAULT_STEPS_PER_BAR = 16;
|
||||
static const int DEFAULT_PPB = 12 * DEFAULT_STEPS_PER_BAR;
|
||||
|
||||
static const int VALUES_WIDTH = 64;
|
||||
|
||||
@@ -230,7 +230,7 @@ private:
|
||||
float m_drawLastLevel;
|
||||
tick_t m_drawLastTick;
|
||||
|
||||
int m_ppt;
|
||||
int m_ppb;
|
||||
int m_y_delta;
|
||||
bool m_y_auto;
|
||||
|
||||
@@ -282,14 +282,14 @@ public:
|
||||
void setCurrentPattern(AutomationPattern* pattern);
|
||||
const AutomationPattern* currentPattern();
|
||||
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
|
||||
void open(AutomationPattern* pattern);
|
||||
|
||||
AutomationEditor* m_editor;
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
public slots:
|
||||
void clearCurrentPattern();
|
||||
@@ -297,9 +297,12 @@ public slots:
|
||||
signals:
|
||||
void currentPatternChanged();
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent * event) override;
|
||||
|
||||
protected slots:
|
||||
void play();
|
||||
void stop();
|
||||
void play() override;
|
||||
void stop() override;
|
||||
|
||||
private slots:
|
||||
void updateWindowTitle();
|
||||
|
||||
@@ -38,7 +38,7 @@ class MidiTime;
|
||||
|
||||
|
||||
|
||||
class EXPORT AutomationPattern : public TrackContentObject
|
||||
class LMMS_EXPORT AutomationPattern : public TrackContentObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -140,13 +140,13 @@ public:
|
||||
const QString name() const;
|
||||
|
||||
// settings-management
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
static const QString classNodeName() { return "automationpattern"; }
|
||||
QString nodeName() const { return classNodeName(); }
|
||||
QString nodeName() const override { return classNodeName(); }
|
||||
|
||||
virtual TrackContentObjectView * createView( TrackView * _tv );
|
||||
TrackContentObjectView * createView( TrackView * _tv ) override;
|
||||
|
||||
|
||||
static bool isAutomated( const AutomatableModel * _m );
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
public slots:
|
||||
/// Opens this view's pattern in the global automation editor
|
||||
void openInAutomationEditor();
|
||||
virtual void update();
|
||||
void update() override;
|
||||
|
||||
|
||||
protected slots:
|
||||
@@ -56,11 +56,11 @@ protected slots:
|
||||
void flipX();
|
||||
|
||||
protected:
|
||||
virtual void constructContextMenu( QMenu * );
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent * me );
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
void constructContextMenu( QMenu * ) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent * me ) override;
|
||||
void paintEvent( QPaintEvent * pe ) override;
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -38,19 +38,19 @@ public:
|
||||
virtual ~AutomationTrack() = default;
|
||||
|
||||
virtual bool play( const MidiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "automationtrack";
|
||||
}
|
||||
|
||||
virtual TrackView * createView( TrackContainerView* );
|
||||
virtual TrackContentObject * createTCO( const MidiTime & _pos );
|
||||
TrackView * createView( TrackContainerView* ) override;
|
||||
TrackContentObject * createTCO( const MidiTime & _pos ) override;
|
||||
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void loadTrackSpecificSettings( const QDomElement & _this );
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
private:
|
||||
friend class AutomationTrackView;
|
||||
@@ -65,8 +65,8 @@ public:
|
||||
AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv );
|
||||
virtual ~AutomationTrackView() = default;
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
BBEditor( BBTrackContainer * _tc );
|
||||
~BBEditor();
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
const BBTrackContainerView* trackContainerView() const {
|
||||
return m_trackContainerView;
|
||||
@@ -54,8 +54,8 @@ public:
|
||||
void removeBBView( int bb );
|
||||
|
||||
public slots:
|
||||
void play();
|
||||
void stop();
|
||||
void play() override;
|
||||
void stop() override;
|
||||
|
||||
private:
|
||||
BBTrackContainerView* m_trackContainerView;
|
||||
@@ -70,15 +70,15 @@ class BBTrackContainerView : public TrackContainerView
|
||||
public:
|
||||
BBTrackContainerView(BBTrackContainer* tc);
|
||||
|
||||
bool fixedTCOs() const
|
||||
bool fixedTCOs() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void removeBBView(int bb);
|
||||
|
||||
void saveSettings(QDomDocument& doc, QDomElement& element);
|
||||
void loadSettings(const QDomElement& element);
|
||||
void saveSettings(QDomDocument& doc, QDomElement& element) override;
|
||||
void loadSettings(const QDomElement& element) override;
|
||||
|
||||
public slots:
|
||||
void addSteps();
|
||||
@@ -88,7 +88,7 @@ public slots:
|
||||
void addAutomationTrack();
|
||||
|
||||
protected slots:
|
||||
void dropEvent(QDropEvent * de );
|
||||
void dropEvent(QDropEvent * de ) override;
|
||||
void updatePosition();
|
||||
|
||||
private:
|
||||
|
||||
@@ -43,9 +43,9 @@ public:
|
||||
BBTCO( Track * _track );
|
||||
virtual ~BBTCO() = default;
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName() const
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return( "bbtco" );
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
int bbTrackIndex();
|
||||
|
||||
virtual TrackContentObjectView * createView( TrackView * _tv );
|
||||
TrackContentObjectView * createView( TrackView * _tv ) override;
|
||||
|
||||
private:
|
||||
QColor m_color;
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
void setColor( QColor _new_color );
|
||||
|
||||
public slots:
|
||||
virtual void update();
|
||||
void update() override;
|
||||
|
||||
protected slots:
|
||||
void openInBBEditor();
|
||||
@@ -110,9 +110,9 @@ protected slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
|
||||
virtual void constructContextMenu( QMenu * );
|
||||
void paintEvent( QPaintEvent * pe ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
|
||||
void constructContextMenu( QMenu * ) override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
|
||||
|
||||
|
||||
class EXPORT BBTrack : public Track
|
||||
class LMMS_EXPORT BBTrack : public Track
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -133,13 +133,13 @@ public:
|
||||
virtual ~BBTrack();
|
||||
|
||||
virtual bool play( const MidiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
virtual TrackView * createView( TrackContainerView* tcv );
|
||||
virtual TrackContentObject * createTCO( const MidiTime & _pos );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
|
||||
TrackView * createView( TrackContainerView* tcv ) override;
|
||||
TrackContentObject * createTCO( const MidiTime & _pos ) override;
|
||||
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void loadTrackSpecificSettings( const QDomElement & _this );
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
static BBTrack * findBBTrack( int _bb_num );
|
||||
static void swapBBTracks( Track * _track1, Track * _track2 );
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return( "bbtrack" );
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
BBTrackView( BBTrack* bbt, TrackContainerView* tcv );
|
||||
virtual ~BBTrackView();
|
||||
|
||||
virtual bool close();
|
||||
bool close() override;
|
||||
|
||||
const BBTrack * getBBTrack() const
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "ComboBoxModel.h"
|
||||
|
||||
|
||||
class EXPORT BBTrackContainer : public TrackContainer
|
||||
class LMMS_EXPORT BBTrackContainer : public TrackContainer
|
||||
{
|
||||
Q_OBJECT
|
||||
mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel);
|
||||
@@ -41,15 +41,15 @@ public:
|
||||
virtual bool play( MidiTime _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
|
||||
virtual void updateAfterTrackAdd() override;
|
||||
void updateAfterTrackAdd() override;
|
||||
|
||||
inline virtual QString nodeName() const override
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "bbtrackcontainer";
|
||||
}
|
||||
|
||||
tact_t lengthOfBB( int _bb ) const;
|
||||
inline tact_t lengthOfCurrentBB()
|
||||
bar_t lengthOfBB( int _bb ) const;
|
||||
inline bar_t lengthOfCurrentBB()
|
||||
{
|
||||
return lengthOfBB( currentBB() );
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
class QDataStream;
|
||||
class QString;
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "interpolation.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_math.h"
|
||||
@@ -82,7 +82,7 @@ QDataStream& operator>> ( QDataStream &in, WaveMipMap &waveMipMap );
|
||||
|
||||
|
||||
|
||||
class EXPORT BandLimitedWave
|
||||
class LMMS_EXPORT BandLimitedWave
|
||||
{
|
||||
public:
|
||||
enum Waveforms
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "lmms_basics.h"
|
||||
#include "templates.h"
|
||||
#include "lmms_constants.h"
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#ifndef BUFFER_MANAGER_H
|
||||
#define BUFFER_MANAGER_H
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class EXPORT BufferManager
|
||||
class LMMS_EXPORT BufferManager
|
||||
{
|
||||
public:
|
||||
static void init( fpp_t framesPerPeriod );
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _ev );
|
||||
void paintEvent( QPaintEvent * _ev ) override;
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#include <QMenu>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
///
|
||||
/// \brief A context menu with a caption
|
||||
///
|
||||
class EXPORT CaptionMenu : public QMenu
|
||||
class LMMS_EXPORT CaptionMenu : public QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
|
||||
class EXPORT ComboBox : public QWidget, public IntModelView
|
||||
class LMMS_EXPORT ComboBox : public QWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -57,10 +57,10 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent* event );
|
||||
virtual void mousePressEvent( QMouseEvent* event );
|
||||
virtual void paintEvent( QPaintEvent* event );
|
||||
virtual void wheelEvent( QWheelEvent* event );
|
||||
void contextMenuEvent( QContextMenuEvent* event ) override;
|
||||
void mousePressEvent( QMouseEvent* event ) override;
|
||||
void paintEvent( QPaintEvent* event ) override;
|
||||
void wheelEvent( QWheelEvent* event ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -33,9 +33,10 @@
|
||||
#include "embed.h"
|
||||
|
||||
|
||||
class EXPORT ComboBoxModel : public IntModel
|
||||
class LMMS_EXPORT ComboBoxModel : public IntModel
|
||||
{
|
||||
Q_OBJECT
|
||||
MODEL_IS_VISITABLE
|
||||
public:
|
||||
ComboBoxModel( Model* parent = NULL,
|
||||
const QString& displayName = QString(),
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
|
||||
class LmmsCore;
|
||||
|
||||
@@ -51,67 +52,28 @@ const QString TRACK_ICON_PATH = "track_icons/";
|
||||
const QString LOCALE_PATH = "locale/";
|
||||
|
||||
|
||||
class EXPORT ConfigManager : public QObject
|
||||
class LMMS_EXPORT ConfigManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static inline ConfigManager * inst()
|
||||
{
|
||||
if( s_instanceOfMe == NULL )
|
||||
if(s_instanceOfMe == NULL )
|
||||
{
|
||||
s_instanceOfMe = new ConfigManager();
|
||||
}
|
||||
return s_instanceOfMe;
|
||||
}
|
||||
|
||||
const QString & dataDir() const
|
||||
{
|
||||
return m_dataDir;
|
||||
}
|
||||
|
||||
const QString & workingDir() const
|
||||
{
|
||||
return m_workingDir;
|
||||
}
|
||||
|
||||
QString userProjectsDir() const
|
||||
const QString & dataDir() const
|
||||
{
|
||||
return workingDir() + PROJECTS_PATH;
|
||||
}
|
||||
|
||||
QString userTemplateDir() const
|
||||
{
|
||||
return workingDir() + TEMPLATE_PATH;
|
||||
}
|
||||
|
||||
QString userPresetsDir() const
|
||||
{
|
||||
return workingDir() + PRESETS_PATH;
|
||||
}
|
||||
|
||||
QString userSamplesDir() const
|
||||
{
|
||||
return workingDir() + SAMPLES_PATH;
|
||||
}
|
||||
|
||||
QString userGigDir() const
|
||||
{
|
||||
return workingDir() + GIG_PATH;
|
||||
}
|
||||
|
||||
QString userSf2Dir() const
|
||||
{
|
||||
return workingDir() + SF2_PATH;
|
||||
}
|
||||
|
||||
QString userLadspaDir() const
|
||||
{
|
||||
return workingDir() + LADSPA_PATH;
|
||||
}
|
||||
|
||||
QString userVstDir() const
|
||||
{
|
||||
return m_vstDir;
|
||||
return m_dataDir;
|
||||
}
|
||||
|
||||
QString factoryProjectsDir() const
|
||||
@@ -134,37 +96,27 @@ public:
|
||||
return dataDir() + SAMPLES_PATH;
|
||||
}
|
||||
|
||||
QString defaultVersion() const;
|
||||
|
||||
QString defaultArtworkDir() const
|
||||
QString userProjectsDir() const
|
||||
{
|
||||
return m_dataDir + DEFAULT_THEME_PATH;
|
||||
return workingDir() + PROJECTS_PATH;
|
||||
}
|
||||
|
||||
QString artworkDir() const
|
||||
QString userTemplateDir() const
|
||||
{
|
||||
return m_artworkDir;
|
||||
return workingDir() + TEMPLATE_PATH;
|
||||
}
|
||||
|
||||
QString trackIconsDir() const
|
||||
QString userPresetsDir() const
|
||||
{
|
||||
return m_dataDir + TRACK_ICON_PATH;
|
||||
return workingDir() + PRESETS_PATH;
|
||||
}
|
||||
|
||||
QString localeDir() const
|
||||
QString userSamplesDir() const
|
||||
{
|
||||
return m_dataDir + LOCALE_PATH;
|
||||
return workingDir() + SAMPLES_PATH;
|
||||
}
|
||||
|
||||
const QString & gigDir() const
|
||||
{
|
||||
return m_gigDir;
|
||||
}
|
||||
|
||||
const QString & sf2Dir() const
|
||||
{
|
||||
return m_sf2Dir;
|
||||
}
|
||||
|
||||
const QString & vstDir() const
|
||||
{
|
||||
@@ -173,18 +125,20 @@ public:
|
||||
|
||||
const QString & ladspaDir() const
|
||||
{
|
||||
return m_ladDir;
|
||||
return m_ladspaDir;
|
||||
}
|
||||
|
||||
const QString recoveryFile() const
|
||||
const QString & sf2Dir() const
|
||||
{
|
||||
return m_workingDir + "recover.mmp";
|
||||
return m_sf2Dir;
|
||||
}
|
||||
|
||||
const QString & version() const
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
const QString & sf2File() const
|
||||
{
|
||||
return m_version;
|
||||
return m_sf2File;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_STK
|
||||
const QString & stkDir() const
|
||||
@@ -193,16 +147,55 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
const QString & defaultSoundfont() const
|
||||
const QString & gigDir() const
|
||||
{
|
||||
return m_defaultSoundfont;
|
||||
return m_gigDir;
|
||||
}
|
||||
#endif
|
||||
|
||||
const QString & backgroundArtwork() const
|
||||
|
||||
QString userVstDir() const
|
||||
{
|
||||
return m_backgroundArtwork;
|
||||
return m_vstDir;
|
||||
}
|
||||
|
||||
QString userLadspaDir() const
|
||||
{
|
||||
return workingDir() + LADSPA_PATH;
|
||||
}
|
||||
|
||||
QString userSf2Dir() const
|
||||
{
|
||||
return workingDir() + SF2_PATH;
|
||||
}
|
||||
|
||||
QString userGigDir() const
|
||||
{
|
||||
return workingDir() + GIG_PATH;
|
||||
}
|
||||
|
||||
QString defaultThemeDir() const
|
||||
{
|
||||
return m_dataDir + DEFAULT_THEME_PATH;
|
||||
}
|
||||
|
||||
QString themeDir() const
|
||||
{
|
||||
return m_themeDir;
|
||||
}
|
||||
|
||||
const QString & backgroundPicFile() const
|
||||
{
|
||||
return m_backgroundPicFile;
|
||||
}
|
||||
|
||||
QString trackIconsDir() const
|
||||
{
|
||||
return m_dataDir + TRACK_ICON_PATH;
|
||||
}
|
||||
|
||||
const QString recoveryFile() const
|
||||
{
|
||||
return m_workingDir + "recover.mmp";
|
||||
}
|
||||
|
||||
inline const QStringList & recentlyOpenedProjects() const
|
||||
@@ -210,39 +203,51 @@ public:
|
||||
return m_recentlyOpenedProjects;
|
||||
}
|
||||
|
||||
QString localeDir() const
|
||||
{
|
||||
return m_dataDir + LOCALE_PATH;
|
||||
}
|
||||
|
||||
const QString & version() const
|
||||
{
|
||||
return m_version;
|
||||
}
|
||||
|
||||
QString defaultVersion() const;
|
||||
|
||||
|
||||
static QStringList availabeVstEmbedMethods();
|
||||
QString vstEmbedMethod() const;
|
||||
|
||||
// returns true if the working dir (e.g. ~/lmms) exists on disk
|
||||
// Returns true if the working dir (e.g. ~/lmms) exists on disk.
|
||||
bool hasWorkingDir() const;
|
||||
|
||||
void addRecentlyOpenedProject( const QString & _file );
|
||||
void addRecentlyOpenedProject(const QString & _file);
|
||||
|
||||
const QString & value( const QString & cls,
|
||||
const QString & attribute ) const;
|
||||
const QString & value( const QString & cls,
|
||||
const QString & value(const QString & cls,
|
||||
const QString & attribute) const;
|
||||
const QString & value(const QString & cls,
|
||||
const QString & attribute,
|
||||
const QString & defaultVal ) const;
|
||||
void setValue( const QString & cls, const QString & attribute,
|
||||
const QString & value );
|
||||
void deleteValue( const QString & cls, const QString & attribute);
|
||||
const QString & defaultVal) const;
|
||||
void setValue(const QString & cls, const QString & attribute,
|
||||
const QString & value);
|
||||
void deleteValue(const QString & cls, const QString & attribute);
|
||||
|
||||
void loadConfigFile( const QString & configFile = "" );
|
||||
void loadConfigFile(const QString & configFile = "");
|
||||
void saveConfigFile();
|
||||
|
||||
|
||||
void setWorkingDir( const QString & _wd );
|
||||
void setVSTDir( const QString & _vd );
|
||||
void setArtworkDir( const QString & _ad );
|
||||
void setLADSPADir( const QString & _fd );
|
||||
void setVersion( const QString & _cv );
|
||||
void setSTKDir( const QString & _fd );
|
||||
void setDefaultSoundfont( const QString & _sf );
|
||||
void setBackgroundArtwork( const QString & _ba );
|
||||
void setGIGDir( const QString & gd );
|
||||
void setSF2Dir( const QString & sfd );
|
||||
void setWorkingDir(const QString & workingDir);
|
||||
void setVSTDir(const QString & vstDir);
|
||||
void setLADSPADir(const QString & ladspaDir);
|
||||
void setSF2Dir(const QString & sf2Dir);
|
||||
void setSF2File(const QString & sf2File);
|
||||
void setSTKDir(const QString & stkDir);
|
||||
void setGIGDir(const QString & gigDir);
|
||||
void setThemeDir(const QString & themeDir);
|
||||
void setBackgroundPicFile(const QString & backgroundPicFile);
|
||||
|
||||
// creates the working directory & subdirectories on disk.
|
||||
// Creates the working directory & subdirectories on disk.
|
||||
void createWorkingDir();
|
||||
|
||||
signals:
|
||||
@@ -252,29 +257,29 @@ private:
|
||||
static ConfigManager * s_instanceOfMe;
|
||||
|
||||
ConfigManager();
|
||||
ConfigManager( const ConfigManager & _c );
|
||||
ConfigManager(const ConfigManager & _c);
|
||||
~ConfigManager();
|
||||
|
||||
void upgrade_1_1_90();
|
||||
void upgrade_1_1_91();
|
||||
void upgrade();
|
||||
|
||||
QString m_lmmsRcFile;
|
||||
QString m_workingDir;
|
||||
QString m_dataDir;
|
||||
QString m_artworkDir;
|
||||
QString m_vstDir;
|
||||
QString m_ladDir;
|
||||
QString m_gigDir;
|
||||
QString m_ladspaDir;
|
||||
QString m_sf2Dir;
|
||||
QString m_version;
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
QString m_sf2File;
|
||||
#endif
|
||||
#ifdef LMMS_HAVE_STK
|
||||
QString m_stkDir;
|
||||
#endif
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
QString m_defaultSoundfont;
|
||||
#endif
|
||||
QString m_backgroundArtwork;
|
||||
QString m_gigDir;
|
||||
QString m_themeDir;
|
||||
QString m_backgroundPicFile;
|
||||
QString m_lmmsRcFile;
|
||||
QString m_version;
|
||||
QStringList m_recentlyOpenedProjects;
|
||||
|
||||
typedef QVector<QPair<QString, QString> > stringPairVector;
|
||||
@@ -283,7 +288,5 @@ private:
|
||||
|
||||
|
||||
friend class LmmsCore;
|
||||
|
||||
} ;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
#ifndef CONTROLLER_H
|
||||
#define CONTROLLER_H
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "Engine.h"
|
||||
#include "Model.h"
|
||||
#include "JournallingObject.h"
|
||||
#include "templates.h"
|
||||
#include "ValueBuffer.h"
|
||||
|
||||
class ControllerDialog;
|
||||
@@ -41,7 +40,7 @@ class ControllerConnection;
|
||||
typedef QVector<Controller *> ControllerVector;
|
||||
|
||||
|
||||
class EXPORT Controller : public Model, public JournallingObject
|
||||
class LMMS_EXPORT Controller : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -102,9 +101,9 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName() const;
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
QString nodeName() const override;
|
||||
|
||||
static Controller * create( ControllerTypes _tt, Model * _parent );
|
||||
static Controller * create( const QDomElement & _this,
|
||||
@@ -112,7 +111,7 @@ public:
|
||||
|
||||
inline static float fittedValue( float _val )
|
||||
{
|
||||
return tLimit<float>( _val, 0.0f, 1.0f );
|
||||
return qBound<float>( 0.0f, _val, 1.0f );
|
||||
}
|
||||
|
||||
static long runningPeriods()
|
||||
|
||||
@@ -42,7 +42,7 @@ class ControllerConnection;
|
||||
typedef QVector<ControllerConnection *> ControllerConnectionVector;
|
||||
|
||||
|
||||
class EXPORT ControllerConnection : public QObject, public JournallingObject
|
||||
class LMMS_EXPORT ControllerConnection : public QObject, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -85,15 +85,15 @@ public:
|
||||
|
||||
static void finalizeConnections();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
static inline const QString classNodeName()
|
||||
{
|
||||
return "connection";
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return classNodeName();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
ControllerRackView();
|
||||
virtual ~ControllerRackView();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "ControllerRackView";
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public slots:
|
||||
void onControllerRemoved( Controller * );
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
private slots:
|
||||
void addController();
|
||||
|
||||
@@ -68,9 +68,9 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void modelChanged();
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * event );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void modelChanged() override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * event ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
|
||||
#include <QDomDocument>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class QTextStream;
|
||||
|
||||
class EXPORT DataFile : public QDomDocument
|
||||
class LMMS_EXPORT DataFile : public QDomDocument
|
||||
{
|
||||
MM_OPERATORS
|
||||
public:
|
||||
@@ -84,25 +84,6 @@ public:
|
||||
return m_type;
|
||||
}
|
||||
|
||||
// small helper class for adjusting application's locale settings
|
||||
// when loading or saving floating point values rendered to strings
|
||||
class LocaleHelper
|
||||
{
|
||||
public:
|
||||
enum Modes
|
||||
{
|
||||
ModeLoad,
|
||||
ModeSave,
|
||||
ModeCount
|
||||
};
|
||||
typedef Modes Mode;
|
||||
|
||||
LocaleHelper( Mode mode );
|
||||
~LocaleHelper();
|
||||
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
static Type type( const QString& typeName );
|
||||
static QString typeName( Type type );
|
||||
@@ -134,7 +115,7 @@ private:
|
||||
void loadData( const QByteArray & _data, const QString & _sourceFile );
|
||||
|
||||
|
||||
struct EXPORT typeDescStruct
|
||||
struct LMMS_EXPORT typeDescStruct
|
||||
{
|
||||
Type m_type;
|
||||
QString m_name;
|
||||
|
||||
@@ -43,17 +43,17 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual float defaultValue() const
|
||||
float defaultValue() const override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual QString displayName() const
|
||||
QString displayName() const override
|
||||
{
|
||||
return tr( "Note detuning" );
|
||||
}
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "detuning";
|
||||
}
|
||||
|
||||
@@ -30,22 +30,24 @@
|
||||
#include <stdint.h>
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class QString;
|
||||
|
||||
class DrumSynth {
|
||||
public:
|
||||
DrumSynth() {};
|
||||
int GetDSFileSamples(const char *dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs);
|
||||
|
||||
private:
|
||||
float LoudestEnv(void);
|
||||
int LongestEnv(void);
|
||||
void UpdateEnv(int e, long t);
|
||||
void GetEnv(int env, const char *sec, const char *key, const char *ini);
|
||||
void GetEnv(int env, const char *sec, const char *key, QString ini);
|
||||
|
||||
float waveform(float ph, int form);
|
||||
|
||||
int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, const char *file);
|
||||
int GetPrivateProfileInt(const char *sec, const char *key, int def, const char *file);
|
||||
float GetPrivateProfileFloat(const char *sec, const char *key, float def, const char *file);
|
||||
int GetPrivateProfileString(const char *sec, const char *key, const char *def, char *buffer, int size, QString file);
|
||||
int GetPrivateProfileInt(const char *sec, const char *key, int def, QString file);
|
||||
float GetPrivateProfileFloat(const char *sec, const char *key, float def, QString file);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#define DSP_EFFECT_LIBRARY_H
|
||||
|
||||
#include "lmms_math.h"
|
||||
#include "templates.h"
|
||||
#include "lmms_constants.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
@@ -53,25 +53,25 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual int controlCount()
|
||||
int controlCount() override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument &, QDomElement & )
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement & )
|
||||
void loadSettings( const QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "DummyControls";
|
||||
}
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
EffectControlDialog * createView() override
|
||||
{
|
||||
return new DummyEffectControlDialog( this );
|
||||
}
|
||||
@@ -95,12 +95,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual EffectControls * controls()
|
||||
EffectControls * controls() override
|
||||
{
|
||||
return &m_controls;
|
||||
}
|
||||
|
||||
bool processAudioBuffer( sampleFrame *, const fpp_t )
|
||||
bool processAudioBuffer( sampleFrame *, const fpp_t ) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -47,28 +47,28 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void playNote( NotePlayHandle *, sampleFrame * buffer )
|
||||
void playNote( NotePlayHandle *, sampleFrame * buffer ) override
|
||||
{
|
||||
memset( buffer, 0, sizeof( sampleFrame ) *
|
||||
Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument &, QDomElement & )
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement & )
|
||||
void loadSettings( const QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "dummyinstrument";
|
||||
}
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent )
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new InstrumentView( this, _parent );
|
||||
return new InstrumentViewFixedSize( this, _parent );
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -42,22 +42,22 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument &, QDomElement & )
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement & )
|
||||
void loadSettings( const QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "DummyPlugin";
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual PluginView * instantiateView( QWidget * _parent )
|
||||
PluginView * instantiateView( QWidget * _parent ) override
|
||||
{
|
||||
return new PluginView( this, _parent );
|
||||
}
|
||||
|
||||
@@ -47,10 +47,12 @@ protected:
|
||||
DropToolBar * addDropToolBar(Qt::ToolBarArea whereToAdd, QString const & windowTitle);
|
||||
DropToolBar * addDropToolBar(QWidget * parent, Qt::ToolBarArea whereToAdd, QString const & windowTitle);
|
||||
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
protected slots:
|
||||
virtual void play() {}
|
||||
virtual void record() {}
|
||||
virtual void recordAccompany() {}
|
||||
virtual void toggleStepRecording() {}
|
||||
virtual void stop() {}
|
||||
|
||||
private slots:
|
||||
@@ -64,7 +66,7 @@ protected:
|
||||
///
|
||||
/// \param record If set true, the editor's toolbar will contain record
|
||||
/// buttons in addition to the play and stop buttons.
|
||||
Editor(bool record = false);
|
||||
Editor(bool record = false, bool record_step = false);
|
||||
virtual ~Editor();
|
||||
|
||||
|
||||
@@ -73,6 +75,7 @@ protected:
|
||||
QAction* m_playAction;
|
||||
QAction* m_recordAction;
|
||||
QAction* m_recordAccompanyAction;
|
||||
QAction* m_toggleStepRecordingAction;
|
||||
QAction* m_stopAction;
|
||||
};
|
||||
|
||||
@@ -89,8 +92,8 @@ signals:
|
||||
void dropped(QDropEvent* event);
|
||||
|
||||
protected:
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
void dropEvent(QDropEvent* event);
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
void dropEvent(QDropEvent* event) override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class EffectChain;
|
||||
class EffectControls;
|
||||
|
||||
|
||||
class EXPORT Effect : public Plugin
|
||||
class LMMS_EXPORT Effect : public Plugin
|
||||
{
|
||||
MM_OPERATORS
|
||||
Q_OBJECT
|
||||
@@ -47,10 +47,10 @@ public:
|
||||
const Descriptor::SubPluginFeatures::Key * _key );
|
||||
virtual ~Effect();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "effect";
|
||||
}
|
||||
@@ -148,11 +148,6 @@ public:
|
||||
m_noRun = _state;
|
||||
}
|
||||
|
||||
inline const Descriptor::SubPluginFeatures::Key & key() const
|
||||
{
|
||||
return m_key;
|
||||
}
|
||||
|
||||
EffectChain * effectChain() const
|
||||
{
|
||||
return m_parent;
|
||||
@@ -166,9 +161,16 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
Effects should call this at the end of audio processing
|
||||
|
||||
If the setting "Keep effects running even without input" is disabled,
|
||||
after "decay" ms of a signal below "gate", the effect is turned off
|
||||
and won't be processed again until it receives new audio input
|
||||
*/
|
||||
void checkGate( double _out_sum );
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * );
|
||||
PluginView * instantiateView( QWidget * ) override;
|
||||
|
||||
// some effects might not be capable of higher sample-rates so they can
|
||||
// sample it down before processing and back after processing
|
||||
@@ -201,8 +203,6 @@ private:
|
||||
sampleFrame * _dst_buf, sample_rate_t _dst_sr,
|
||||
const f_cnt_t _frames );
|
||||
|
||||
Descriptor::SubPluginFeatures::Key m_key;
|
||||
|
||||
ch_cnt_t m_processors;
|
||||
|
||||
bool m_okay;
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
class Effect;
|
||||
|
||||
|
||||
class EXPORT EffectChain : public Model, public SerializingObject
|
||||
class LMMS_EXPORT EffectChain : public Model, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectChain( Model * _parent );
|
||||
virtual ~EffectChain();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "fxchain";
|
||||
}
|
||||
|
||||
@@ -33,20 +33,22 @@
|
||||
class EffectControls;
|
||||
|
||||
|
||||
class EXPORT EffectControlDialog : public QWidget, public ModelView
|
||||
class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EffectControlDialog( EffectControls * _controls );
|
||||
virtual ~EffectControlDialog();
|
||||
|
||||
virtual bool isResizable() const {return false;}
|
||||
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
EffectControls * m_effectControls;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
inline EffectChain* fxChain()
|
||||
{
|
||||
|
||||
@@ -73,9 +73,9 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void modelChanged();
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
#include <QtCore/QObject>
|
||||
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
class BBTrackContainer;
|
||||
class DummyTrackContainer;
|
||||
@@ -53,7 +54,7 @@ class Ladspa2LMMS;
|
||||
class LmmsCore;
|
||||
typedef LmmsCore Engine;
|
||||
|
||||
class EXPORT LmmsCore : public QObject
|
||||
class LMMS_EXPORT LmmsCore : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -100,6 +101,9 @@ public:
|
||||
{
|
||||
return s_framesPerTick;
|
||||
}
|
||||
|
||||
static float framesPerTick(sample_rate_t sample_rate);
|
||||
|
||||
static void updateFramesPerTick();
|
||||
|
||||
static inline LmmsCore * inst()
|
||||
@@ -111,6 +115,9 @@ public:
|
||||
return s_instanceOfMe;
|
||||
}
|
||||
|
||||
static void setDndPluginKey(void* newKey);
|
||||
static void* pickDndPluginKey();
|
||||
|
||||
signals:
|
||||
void initProgress(const QString &msg);
|
||||
|
||||
@@ -137,6 +144,7 @@ private:
|
||||
static DummyTrackContainer * s_dummyTC;
|
||||
|
||||
static Ladspa2LMMS * s_ladspaManager;
|
||||
static void* s_dndPluginKey;
|
||||
|
||||
// even though most methods are static, an instance is needed for Qt slots/signals
|
||||
static LmmsCore * s_instanceOfMe;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
class EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject
|
||||
class LMMS_EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -91,9 +91,9 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName() const
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "el";
|
||||
}
|
||||
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "Plugin.h"
|
||||
|
||||
|
||||
class EXPORT ExportFilter : public Plugin
|
||||
class LMMS_EXPORT ExportFilter : public Plugin
|
||||
{
|
||||
public:
|
||||
ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, NULL ) {}
|
||||
@@ -44,15 +44,15 @@ public:
|
||||
int tempo, int masterPitch, const QString &filename ) = 0;
|
||||
protected:
|
||||
|
||||
virtual void saveSettings( QDomDocument &, QDomElement & )
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement & )
|
||||
void loadSettings( const QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "import_filter";
|
||||
}
|
||||
|
||||
@@ -41,14 +41,14 @@ public:
|
||||
ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export );
|
||||
|
||||
protected:
|
||||
virtual void reject( void );
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void reject( void ) override;
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
|
||||
private slots:
|
||||
void startBtnClicked( void );
|
||||
void updateTitleBar( int );
|
||||
void accept();
|
||||
void accept() override;
|
||||
void startExport();
|
||||
|
||||
void onFileFormatChanged(int);
|
||||
|
||||
@@ -35,8 +35,10 @@ class FadeButton : public QAbstractButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FadeButton( const QColor & _normal_color, const QColor &
|
||||
_activated_color, QWidget * _parent );
|
||||
FadeButton( const QColor & _normal_color,
|
||||
const QColor & _activated_color,
|
||||
const QColor & _hold_color,
|
||||
QWidget * _parent );
|
||||
|
||||
virtual ~FadeButton();
|
||||
void setActiveColor( const QColor & activated_color );
|
||||
@@ -44,22 +46,30 @@ public:
|
||||
|
||||
public slots:
|
||||
void activate();
|
||||
void noteEnd();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void customEvent( QEvent * );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
void customEvent( QEvent * ) override;
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
|
||||
|
||||
private:
|
||||
QTime m_stateTimer;
|
||||
QTime m_releaseTimer;
|
||||
|
||||
// the default color of the widget
|
||||
QColor m_normalColor;
|
||||
// the color on note play
|
||||
QColor m_activatedColor;
|
||||
// the color after the "play" fade is done but a note is still playing
|
||||
QColor m_holdColor;
|
||||
int activeNotes;
|
||||
|
||||
void signalUpdate();
|
||||
QColor fadeToColor(QColor, QColor, QTime, float);
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
class TextFloat;
|
||||
|
||||
|
||||
class EXPORT Fader : public QWidget, public FloatModelView
|
||||
class LMMS_EXPORT Fader : public QWidget, public FloatModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -109,13 +109,13 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent *ev );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent* mouseEvent );
|
||||
virtual void mouseMoveEvent( QMouseEvent *ev );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent *ev );
|
||||
virtual void paintEvent( QPaintEvent *ev );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void mousePressEvent( QMouseEvent *ev ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent* mouseEvent ) override;
|
||||
void mouseMoveEvent( QMouseEvent *ev ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
void wheelEvent( QWheelEvent *ev ) override;
|
||||
void paintEvent( QPaintEvent *ev ) override;
|
||||
|
||||
inline bool clips(float const & value) const { return value >= 1.0f; }
|
||||
|
||||
|
||||
@@ -55,13 +55,13 @@ public:
|
||||
|
||||
private slots:
|
||||
void reloadTree( void );
|
||||
void expandItems( QTreeWidgetItem * item=NULL );
|
||||
void expandItems( QTreeWidgetItem * item=NULL, QList<QString> expandedDirs = QList<QString>() );
|
||||
// call with item=NULL to filter the entire tree
|
||||
bool filterItems( const QString & filter, QTreeWidgetItem * item=NULL );
|
||||
void giveFocusToFilter();
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent( QKeyEvent * ke );
|
||||
void keyPressEvent( QKeyEvent * ke ) override;
|
||||
|
||||
void addItems( const QString & path );
|
||||
|
||||
@@ -87,12 +87,16 @@ public:
|
||||
FileBrowserTreeWidget( QWidget * parent );
|
||||
virtual ~FileBrowserTreeWidget() = default;
|
||||
|
||||
//! This method returns a QList with paths (QString's) of all directories
|
||||
//! that are expanded in the tree.
|
||||
QList<QString> expandedDirs( QTreeWidgetItem * item = nullptr ) const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * e );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * me );
|
||||
void contextMenuEvent( QContextMenuEvent * e ) override;
|
||||
void mousePressEvent( QMouseEvent * me ) override;
|
||||
void mouseMoveEvent( QMouseEvent * me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * me ) override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -129,13 +133,13 @@ public:
|
||||
|
||||
void update( void );
|
||||
|
||||
inline QString fullName( QString path = QString::null )
|
||||
inline QString fullName( QString path = QString() )
|
||||
{
|
||||
if( path == QString::null )
|
||||
if( path.isEmpty() )
|
||||
{
|
||||
path = m_directories[0];
|
||||
}
|
||||
if( path != QString::null )
|
||||
if( ! path.isEmpty() )
|
||||
{
|
||||
path += QDir::separator();
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class EXPORT FileDialog : public QFileDialog
|
||||
class LMMS_EXPORT FileDialog : public QFileDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -51,10 +51,10 @@ public:
|
||||
FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex);
|
||||
~FxLine();
|
||||
|
||||
virtual void paintEvent( QPaintEvent * );
|
||||
virtual void mousePressEvent( QMouseEvent * );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * );
|
||||
virtual void contextMenuEvent( QContextMenuEvent * );
|
||||
void paintEvent( QPaintEvent * ) override;
|
||||
void mousePressEvent( QMouseEvent * ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * ) override;
|
||||
void contextMenuEvent( QContextMenuEvent * ) override;
|
||||
|
||||
inline int channelIndex() { return m_channelIndex; }
|
||||
void setChannelIndex(int index);
|
||||
@@ -79,9 +79,7 @@ public:
|
||||
|
||||
static const int FxLineHeight;
|
||||
|
||||
void renameChannel();
|
||||
|
||||
bool eventFilter (QObject *dist, QEvent *event);
|
||||
bool eventFilter (QObject *dist, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void drawFxLine( QPainter* p, const FxLine *fxLine, bool isActive, bool sendToThis, bool receiveFromThis );
|
||||
@@ -101,6 +99,9 @@ private:
|
||||
QLineEdit * m_renameLineEdit;
|
||||
QGraphicsView * m_view;
|
||||
|
||||
public slots:
|
||||
void renameChannel();
|
||||
|
||||
private slots:
|
||||
void renameFinished();
|
||||
void removeChannel();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* templates.h - miscellanous templates and algorithms
|
||||
* FxLineLcdSpinBox.h - a specialization of LcdSpnBox for setting FX channels
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
@@ -22,18 +22,32 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef FX_LINE_LCD_SPIN_BOX_H
|
||||
#define FX_LINE_LCD_SPIN_BOX_H
|
||||
|
||||
#ifndef TEMPLATES_H
|
||||
#define TEMPLATES_H
|
||||
#include "LcdSpinBox.h"
|
||||
|
||||
#include <QtCore/QtAlgorithms>
|
||||
class TrackView;
|
||||
|
||||
|
||||
template<class T>
|
||||
inline T tLimit( const T x, const T x1, const T x2 )
|
||||
class FxLineLcdSpinBox : public LcdSpinBox
|
||||
{
|
||||
return qBound( x1, x, x2 );
|
||||
}
|
||||
Q_OBJECT
|
||||
public:
|
||||
FxLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = NULL) :
|
||||
LcdSpinBox(numDigits, parent, name), m_tv(tv)
|
||||
{}
|
||||
virtual ~FxLineLcdSpinBox() {}
|
||||
|
||||
void setTrackView(TrackView * tv);
|
||||
|
||||
protected:
|
||||
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
||||
void contextMenuEvent(QContextMenuEvent* event) override;
|
||||
|
||||
private:
|
||||
TrackView * m_tv;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -67,7 +67,7 @@ class FxChannel : public ThreadableJob
|
||||
// pointers to other channels that send to this one
|
||||
FxRouteVector m_receives;
|
||||
|
||||
virtual bool requiresProcessing() const { return true; }
|
||||
bool requiresProcessing() const override { return true; }
|
||||
void unmuteForSolo();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class FxChannel : public ThreadableJob
|
||||
void processed();
|
||||
|
||||
private:
|
||||
virtual void doProcessing();
|
||||
void doProcessing() override;
|
||||
};
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ class FxRoute : public QObject
|
||||
};
|
||||
|
||||
|
||||
class EXPORT FxMixer : public Model, public JournallingObject
|
||||
class LMMS_EXPORT FxMixer : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -133,10 +133,10 @@ public:
|
||||
void prepareMasterMix();
|
||||
void masterMix( sampleFrame * _buf );
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "fxmixer";
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
class QButtonGroup;
|
||||
class FxLine;
|
||||
|
||||
class EXPORT FxMixerView : public QWidget, public ModelView,
|
||||
class LMMS_EXPORT FxMixerView : public QWidget, public ModelView,
|
||||
public SerializingObjectHook
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -64,10 +64,10 @@ public:
|
||||
FxMixerView();
|
||||
virtual ~FxMixerView();
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent * e);
|
||||
void keyPressEvent(QKeyEvent * e) override;
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline FxLine * currentFxLine()
|
||||
{
|
||||
@@ -110,7 +110,7 @@ public slots:
|
||||
int addNewChannel();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
|
||||
private slots:
|
||||
void updateFaders();
|
||||
|
||||
@@ -38,19 +38,24 @@
|
||||
class graphModel;
|
||||
|
||||
|
||||
class EXPORT Graph : public QWidget, public ModelView
|
||||
class LMMS_EXPORT Graph : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum graphStyle
|
||||
{
|
||||
NearestStyle,
|
||||
LinearStyle,
|
||||
LinearNonCyclicStyle,
|
||||
BarStyle,
|
||||
NearestStyle, //!< draw as stairs
|
||||
LinearStyle, //!< connect each 2 samples with a line, with wrapping
|
||||
LinearNonCyclicStyle, //!< LinearStyle without wrapping
|
||||
BarStyle, //!< draw thick bars
|
||||
NumGraphStyles
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param _width Pixel width of widget
|
||||
* @param _height Pixel height of widget
|
||||
*/
|
||||
Graph( QWidget * _parent, graphStyle _style = Graph::LinearStyle,
|
||||
int _width = 132,
|
||||
int _height = 104
|
||||
@@ -82,19 +87,19 @@ public:
|
||||
signals:
|
||||
void drawn();
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseMoveEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
|
||||
protected slots:
|
||||
void updateGraph( int _startPos, int _endPos );
|
||||
void updateGraph();
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
void changeSampleAt( int _x, int _y );
|
||||
void drawLineAt( int _x, int _y, int _lastx );
|
||||
@@ -111,10 +116,24 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
class EXPORT graphModel : public Model
|
||||
/**
|
||||
@brief 2 dimensional function plot
|
||||
|
||||
Function plot graph with discrete x scale and continous y scale
|
||||
This makes it possible to display "#x" samples
|
||||
*/
|
||||
class LMMS_EXPORT graphModel : public Model
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param _min Minimum y value to display
|
||||
* @param _max Maximum y value to display
|
||||
* @param _size Number of samples (e.g. x value)
|
||||
* @param _step Step size on y axis where values snap to, or 0.0f
|
||||
* for "no snapping"
|
||||
*/
|
||||
graphModel( float _min,
|
||||
float _max,
|
||||
int _size,
|
||||
@@ -146,14 +165,21 @@ public:
|
||||
return( m_samples.data() );
|
||||
}
|
||||
|
||||
void convolve(const float *convolution, const int convolutionLength, const int centerOffset);
|
||||
//! Make cyclic convolution
|
||||
//! @param convolution Samples to convolve with
|
||||
//! @param convolutionLength Number of samples to take for each sum
|
||||
//! @param centerOffset Offset for resulting values
|
||||
void convolve(const float *convolution,
|
||||
const int convolutionLength, const int centerOffset);
|
||||
|
||||
public slots:
|
||||
//! Set range of y values
|
||||
void setRange( float _min, float _max );
|
||||
|
||||
void setLength( int _size );
|
||||
|
||||
//! Update one sample
|
||||
void setSampleAt( int x, float val );
|
||||
//! Update samples array
|
||||
void setSamples( const float * _value );
|
||||
|
||||
void setWaveToSine();
|
||||
@@ -169,6 +195,7 @@ public slots:
|
||||
void invert();
|
||||
void shiftPhase( int _deg );
|
||||
void clear();
|
||||
void clearInvisible();
|
||||
|
||||
signals:
|
||||
void lengthChanged();
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
GroupBox( const QString & _caption, QWidget * _parent = NULL );
|
||||
virtual ~GroupBox();
|
||||
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
PixmapButton * ledButton()
|
||||
{
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class QLabel;
|
||||
|
||||
@@ -41,7 +41,7 @@ class PianoRollWindow;
|
||||
class ProjectNotes;
|
||||
class SongEditorWindow;
|
||||
|
||||
class EXPORT GuiApplication : public QObject
|
||||
class LMMS_EXPORT GuiApplication : public QObject
|
||||
{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
class TrackContainer;
|
||||
|
||||
|
||||
class EXPORT ImportFilter : public Plugin
|
||||
class LMMS_EXPORT ImportFilter : public Plugin
|
||||
{
|
||||
public:
|
||||
ImportFilter( const QString & _file_name,
|
||||
@@ -78,20 +78,26 @@ protected:
|
||||
return m_file.read( _data, _len );
|
||||
}
|
||||
|
||||
inline QByteArray readAllData()
|
||||
{
|
||||
m_file.seek(0);
|
||||
return m_file.readAll();
|
||||
}
|
||||
|
||||
inline void ungetChar( char _ch )
|
||||
{
|
||||
m_file.ungetChar( _ch );
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument &, QDomElement & )
|
||||
void saveSettings( QDomDocument &, QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement & )
|
||||
void loadSettings( const QDomElement & ) override
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "import_filter";
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ public:
|
||||
return m_autoPattern;
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define INSTRUMENT_H
|
||||
|
||||
#include <QString>
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "MidiTime.h"
|
||||
@@ -41,7 +41,7 @@ class NotePlayHandle;
|
||||
class Track;
|
||||
|
||||
|
||||
class EXPORT Instrument : public Plugin
|
||||
class LMMS_EXPORT Instrument : public Plugin
|
||||
{
|
||||
MM_OPERATORS
|
||||
public:
|
||||
@@ -55,14 +55,17 @@ public:
|
||||
|
||||
Q_DECLARE_FLAGS(Flags, Flag);
|
||||
|
||||
Instrument( InstrumentTrack * _instrument_track,
|
||||
const Descriptor * _descriptor );
|
||||
Instrument(InstrumentTrack * _instrument_track,
|
||||
const Descriptor * _descriptor,
|
||||
const Descriptor::SubPluginFeatures::Key * key = nullptr);
|
||||
virtual ~Instrument() = default;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// functions that can/should be re-implemented:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
virtual bool hasNoteInput() const { return true; }
|
||||
|
||||
// if the plugin doesn't play each note, it can create an instrument-
|
||||
// play-handle and re-implement this method, so that it mixes its
|
||||
// output buffer only once per mixer-period
|
||||
@@ -107,16 +110,18 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual QString fullDisplayName() const;
|
||||
QString fullDisplayName() const override;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// provided functions:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// instantiate instrument-plugin with given name or return NULL
|
||||
// on failure
|
||||
static Instrument * instantiate( const QString & _plugin_name,
|
||||
InstrumentTrack * _instrument_track );
|
||||
//! instantiate instrument-plugin with given name or return NULL
|
||||
//! on failure
|
||||
static Instrument * instantiate(const QString & _plugin_name,
|
||||
InstrumentTrack * _instrument_track,
|
||||
const Plugin::Descriptor::SubPluginFeatures::Key* key,
|
||||
bool keyFromDnd = false);
|
||||
|
||||
virtual bool isFromTrack( const Track * _track ) const;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
InstrumentFunctionNoteStacking * m_cc;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
InstrumentFunctionArpeggio * m_a;
|
||||
GroupBox * m_arpGroupBox;
|
||||
|
||||
@@ -54,10 +54,10 @@ public:
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "chordcreator";
|
||||
}
|
||||
@@ -176,10 +176,10 @@ public:
|
||||
void processNote( NotePlayHandle* n );
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "arpeggiator";
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
GroupBox * m_midiInputGroupBox;
|
||||
LcdSpinBox * m_inputChannelSpinBox;
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include "PlayHandle.h"
|
||||
#include "Instrument.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class EXPORT InstrumentPlayHandle : public PlayHandle
|
||||
class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle
|
||||
{
|
||||
public:
|
||||
InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack );
|
||||
@@ -40,16 +40,9 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void play( sampleFrame * _working_buffer )
|
||||
void play( sampleFrame * _working_buffer ) override
|
||||
{
|
||||
// if the instrument is midi-based, we can safely render right away
|
||||
if( m_instrument->flags() & Instrument::IsMidiBased )
|
||||
{
|
||||
m_instrument->play( _working_buffer );
|
||||
return;
|
||||
}
|
||||
|
||||
// if not, we need to ensure that all our nph's have been processed first
|
||||
// ensure that all our nph's have been processed first
|
||||
ConstNotePlayHandleList nphv = NotePlayHandle::nphsOfInstrumentTrack( m_instrument->instrumentTrack(), true );
|
||||
|
||||
bool nphsLeft;
|
||||
@@ -72,12 +65,12 @@ public:
|
||||
m_instrument->play( _working_buffer );
|
||||
}
|
||||
|
||||
virtual bool isFinished() const
|
||||
bool isFinished() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool isFromTrack( const Track* _track ) const
|
||||
bool isFromTrack( const Track* _track ) const override
|
||||
{
|
||||
return m_instrument->isFromTrack( _track );
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ public:
|
||||
float volumeLevel( NotePlayHandle * _n, const f_cnt_t _frame );
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName() const
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "eldata";
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
InstrumentSoundShaping * m_ss;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "Piano.h"
|
||||
#include "PianoView.h"
|
||||
#include "Pitch.h"
|
||||
#include "Plugin.h"
|
||||
#include "Track.h"
|
||||
|
||||
|
||||
@@ -53,6 +54,7 @@ class InstrumentTrackWindow;
|
||||
class InstrumentMidiIOView;
|
||||
class InstrumentMiscView;
|
||||
class Knob;
|
||||
class FxLineLcdSpinBox;
|
||||
class LcdSpinBox;
|
||||
class LeftRightNav;
|
||||
class midiPortMenu;
|
||||
@@ -64,7 +66,7 @@ class LedCheckBox;
|
||||
class QLabel;
|
||||
|
||||
|
||||
class EXPORT InstrumentTrack : public Track, public MidiEventProcessor
|
||||
class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor
|
||||
{
|
||||
Q_OBJECT
|
||||
MM_OPERATORS
|
||||
@@ -79,8 +81,8 @@ public:
|
||||
|
||||
MidiEvent applyMasterKey( const MidiEvent& event );
|
||||
|
||||
virtual void processInEvent( const MidiEvent& event, const MidiTime& time = MidiTime(), f_cnt_t offset = 0 );
|
||||
virtual void processOutEvent( const MidiEvent& event, const MidiTime& time = MidiTime(), f_cnt_t offset = 0 );
|
||||
void processInEvent( const MidiEvent& event, const MidiTime& time = MidiTime(), f_cnt_t offset = 0 ) override;
|
||||
void processOutEvent( const MidiEvent& event, const MidiTime& time = MidiTime(), f_cnt_t offset = 0 ) override;
|
||||
// silence all running notes played by this track
|
||||
void silenceAllNotes( bool removeIPH = false );
|
||||
|
||||
@@ -112,7 +114,7 @@ public:
|
||||
void deleteNotePluginData( NotePlayHandle * _n );
|
||||
|
||||
// name-stuff
|
||||
virtual void setName( const QString & _new_name );
|
||||
void setName( const QString & _new_name ) override;
|
||||
|
||||
// translate given key of a note-event to absolute key (i.e.
|
||||
// add global master-pitch and base-note of this instrument track)
|
||||
@@ -132,24 +134,26 @@ public:
|
||||
|
||||
// play everything in given frame-range - creates note-play-handles
|
||||
virtual bool play( const MidiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
|
||||
// create new view for me
|
||||
virtual TrackView * createView( TrackContainerView* tcv );
|
||||
TrackView * createView( TrackContainerView* tcv ) override;
|
||||
|
||||
// create new track-content-object = pattern
|
||||
virtual TrackContentObject * createTCO( const MidiTime & _pos );
|
||||
TrackContentObject * createTCO( const MidiTime & _pos ) override;
|
||||
|
||||
|
||||
// called by track
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void loadTrackSpecificSettings( const QDomElement & _this );
|
||||
QDomElement & _parent ) override;
|
||||
void loadTrackSpecificSettings( const QDomElement & _this ) override;
|
||||
|
||||
using Track::setJournalling;
|
||||
|
||||
|
||||
// load instrument whose name matches given one
|
||||
Instrument * loadInstrument( const QString & _instrument_name );
|
||||
Instrument * loadInstrument(const QString & _instrument_name,
|
||||
const Plugin::Descriptor::SubPluginFeatures::Key* key = nullptr,
|
||||
bool keyFromDnd = false);
|
||||
|
||||
AudioPort * audioPort()
|
||||
{
|
||||
@@ -222,10 +226,11 @@ signals:
|
||||
void midiNoteOff( const Note& );
|
||||
void nameChanged();
|
||||
void newNote();
|
||||
void endNote();
|
||||
|
||||
|
||||
protected:
|
||||
virtual QString nodeName() const
|
||||
QString nodeName() const override
|
||||
{
|
||||
return "instrumenttrack";
|
||||
}
|
||||
@@ -326,12 +331,12 @@ public:
|
||||
static void cleanupWindowCache();
|
||||
|
||||
// Create a menu for assigning/creating channels for this track
|
||||
QMenu * createFxMenu( QString title, QString newFxLabel );
|
||||
QMenu * createFxMenu( QString title, QString newFxLabel ) override;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
|
||||
|
||||
private slots:
|
||||
@@ -413,8 +418,8 @@ public:
|
||||
|
||||
static void dragEnterEventGeneric( QDragEnterEvent * _dee );
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -426,11 +431,11 @@ public slots:
|
||||
|
||||
protected:
|
||||
// capture close-events for toggling instrument-track-button
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
virtual void focusInEvent( QFocusEvent * _fe );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
void focusInEvent( QFocusEvent * _fe ) override;
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
|
||||
|
||||
protected slots:
|
||||
@@ -439,8 +444,11 @@ protected slots:
|
||||
void viewPrevInstrument();
|
||||
|
||||
private:
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
void viewInstrumentInDirection(int d);
|
||||
//! adjust size of any child widget of the main tab
|
||||
//! required to keep the old look when using a variable sized tab widget
|
||||
void adjustTabSize(QWidget *w);
|
||||
|
||||
InstrumentTrack * m_track;
|
||||
InstrumentTrackView * m_itv;
|
||||
@@ -454,7 +462,7 @@ private:
|
||||
QLabel * m_pitchLabel;
|
||||
LcdSpinBox* m_pitchRangeSpinBox;
|
||||
QLabel * m_pitchRangeLabel;
|
||||
LcdSpinBox * m_effectChannelNumber;
|
||||
FxLineLcdSpinBox * m_effectChannelNumber;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
class InstrumentTrackWindow;
|
||||
|
||||
|
||||
class EXPORT InstrumentView : public PluginView
|
||||
//! Instrument view with variable size
|
||||
class LMMS_EXPORT InstrumentView : public PluginView
|
||||
{
|
||||
public:
|
||||
InstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~InstrumentView();
|
||||
~InstrumentView() override;
|
||||
|
||||
Instrument * model()
|
||||
{
|
||||
@@ -48,11 +49,25 @@ public:
|
||||
return( castModel<Instrument>() );
|
||||
}
|
||||
|
||||
virtual void setModel( Model * _model, bool = false );
|
||||
void setModel( Model * _model, bool = false ) override;
|
||||
|
||||
InstrumentTrackWindow * instrumentTrackWindow();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
//! Instrument view with fixed LMMS-default size
|
||||
class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView
|
||||
{
|
||||
QSize sizeHint() const override { return QSize(250, 250); }
|
||||
QSize minimumSizeHint() const override { return sizeHint(); }
|
||||
|
||||
public:
|
||||
using InstrumentView::InstrumentView;
|
||||
~InstrumentViewFixedSize() override;
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* export.h - macros for export-declarations
|
||||
* IoHelper.h - helper functions for file I/O
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2018 Hyunjin Song <tteu.ingog/at/gmail.com>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
@@ -22,25 +22,51 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXPORT_H
|
||||
#define EXPORT_H
|
||||
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
std::wstring toWString(const std::string& s)
|
||||
{
|
||||
std::wstring ret;
|
||||
int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, s.data(),
|
||||
s.length(), nullptr, 0);
|
||||
if (len == 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
ret.resize(len);
|
||||
MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s.length(), &ret[0], len);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
|
||||
#ifdef PLUGIN_NAME
|
||||
#define EXPORT __declspec(dllimport)
|
||||
#define PLUGIN_EXPORT __declspec(dllexport)
|
||||
#include <io.h>
|
||||
#define F_OPEN_UTF8(a, b) _wfopen(toWString(a).data(), L##b)
|
||||
#else
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#ifdef LMMS_HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#define F_OPEN_UTF8(a, b) fopen((a).data(), b)
|
||||
#endif
|
||||
|
||||
int fileToDescriptor(FILE* f, bool closeFile = true)
|
||||
{
|
||||
int fh;
|
||||
if (f == NULL) {return -1;}
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
fh = _dup(_fileno(f));
|
||||
#else
|
||||
|
||||
#define EXPORT
|
||||
#define PLUGIN_EXPORT
|
||||
|
||||
fh = dup(fileno(f));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
if (closeFile) {fclose(f);}
|
||||
return fh;
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "SerializingObject.h"
|
||||
|
||||
|
||||
class EXPORT JournallingObject : public SerializingObject
|
||||
class LMMS_EXPORT JournallingObject : public SerializingObject
|
||||
{
|
||||
public:
|
||||
JournallingObject();
|
||||
@@ -59,9 +59,9 @@ public:
|
||||
void addJournalCheckPoint();
|
||||
|
||||
virtual QDomElement saveState( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
QDomElement & _parent ) override;
|
||||
|
||||
virtual void restoreState( const QDomElement & _this );
|
||||
void restoreState( const QDomElement & _this ) override;
|
||||
|
||||
inline bool isJournalling() const
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <QtCore/QPoint>
|
||||
|
||||
#include "AutomatableModelView.h"
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
@@ -43,7 +42,7 @@ enum knobTypes
|
||||
|
||||
|
||||
|
||||
class EXPORT Knob : public QWidget, public FloatModelView
|
||||
class LMMS_EXPORT Knob : public QWidget, public FloatModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS( knobTypes )
|
||||
@@ -74,6 +73,7 @@ class EXPORT Knob : public QWidget, public FloatModelView
|
||||
public:
|
||||
Knob( knobTypes _knob_num, QWidget * _parent = NULL, const QString & _name = QString() );
|
||||
Knob( QWidget * _parent = NULL, const QString & _name = QString() ); //!< default ctor
|
||||
Knob( const Knob& other ) = delete;
|
||||
virtual ~Knob();
|
||||
|
||||
// TODO: remove
|
||||
@@ -124,16 +124,16 @@ signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void focusOutEvent( QFocusEvent * _fe );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _me );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void dragEnterEvent( QDragEnterEvent * _dee ) override;
|
||||
void dropEvent( QDropEvent * _de ) override;
|
||||
void focusOutEvent( QFocusEvent * _fe ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
void mouseMoveEvent( QMouseEvent * _me ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
|
||||
void paintEvent( QPaintEvent * _me ) override;
|
||||
void wheelEvent( QWheelEvent * _me ) override;
|
||||
|
||||
virtual float getValue( const QPoint & _p );
|
||||
|
||||
@@ -145,7 +145,7 @@ private slots:
|
||||
private:
|
||||
QString displayValue() const;
|
||||
|
||||
virtual void doConnections();
|
||||
void doConnections() override;
|
||||
|
||||
QLineF calculateLine( const QPointF & _mid, float _radius,
|
||||
float _innerRadius = 1) const;
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
#include "LadspaManager.h"
|
||||
|
||||
|
||||
class EXPORT Ladspa2LMMS : public LadspaManager
|
||||
//! Class responsible for sorting found plugins (by LadspaManager)
|
||||
//! into categories
|
||||
class LMMS_EXPORT Ladspa2LMMS : public LadspaManager
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
typedef struct PortDescription port_desc_t;
|
||||
|
||||
|
||||
class EXPORT LadspaControl : public Model, public JournallingObject
|
||||
class LMMS_EXPORT LadspaControl : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent, const QString & _name );
|
||||
virtual void loadSettings( const QDomElement & _this, const QString & _name );
|
||||
inline virtual QString nodeName() const
|
||||
inline QString nodeName() const override
|
||||
{
|
||||
return "port";
|
||||
}
|
||||
@@ -92,13 +92,13 @@ protected slots:
|
||||
void linkStateChanged();
|
||||
|
||||
protected:
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& element )
|
||||
void saveSettings( QDomDocument& doc, QDomElement& element ) override
|
||||
{
|
||||
Q_UNUSED(doc)
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
virtual void loadSettings( const QDomElement& element )
|
||||
void loadSettings( const QDomElement& element ) override
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
class LadspaControl;
|
||||
|
||||
|
||||
class EXPORT LadspaControlView : public QWidget, public ModelView
|
||||
class LMMS_EXPORT LadspaControlView : public QWidget, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ typedef struct ladspaManagerStorage
|
||||
} ladspaManagerDescription;
|
||||
|
||||
|
||||
class EXPORT LadspaManager
|
||||
class LMMS_EXPORT LadspaManager
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
#include "AutomatableModelView.h"
|
||||
|
||||
|
||||
class EXPORT LcdSpinBox : public LcdWidget, public IntModelView
|
||||
class LMMS_EXPORT LcdSpinBox : public LcdWidget, public IntModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
LcdSpinBox( int numDigits, QWidget* parent, const QString& name = QString::null );
|
||||
LcdSpinBox( int numDigits, QWidget* parent, const QString& name = QString() );
|
||||
|
||||
LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null );
|
||||
LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString() );
|
||||
|
||||
virtual ~LcdSpinBox() = default;
|
||||
|
||||
virtual void modelChanged()
|
||||
void modelChanged() override
|
||||
{
|
||||
ModelView::modelChanged();
|
||||
update();
|
||||
@@ -65,12 +65,12 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void mousePressEvent( QMouseEvent * _me ) override;
|
||||
void mouseMoveEvent( QMouseEvent * _me ) override;
|
||||
void mouseReleaseEvent( QMouseEvent * _me ) override;
|
||||
void wheelEvent( QWheelEvent * _we ) override;
|
||||
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
|
||||
|
||||
private:
|
||||
bool m_mouseMoving;
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
#include <QtCore/QMap>
|
||||
#include <QWidget>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class EXPORT LcdWidget : public QWidget
|
||||
class LMMS_EXPORT LcdWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -40,9 +40,9 @@ class EXPORT LcdWidget : public QWidget
|
||||
Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor )
|
||||
|
||||
public:
|
||||
LcdWidget( QWidget* parent, const QString& name = QString::null );
|
||||
LcdWidget( int numDigits, QWidget* parent, const QString& name = QString::null );
|
||||
LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null );
|
||||
LcdWidget( QWidget* parent, const QString& name = QString() );
|
||||
LcdWidget( int numDigits, QWidget* parent, const QString& name = QString() );
|
||||
LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString() );
|
||||
|
||||
virtual ~LcdWidget();
|
||||
|
||||
@@ -71,7 +71,7 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
void paintEvent( QPaintEvent * pe ) override;
|
||||
|
||||
virtual void updateSize();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
class QPixmap;
|
||||
|
||||
|
||||
class EXPORT LedCheckBox : public AutomatableButton
|
||||
class LMMS_EXPORT LedCheckBox : public AutomatableButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -45,10 +45,10 @@ public:
|
||||
} ;
|
||||
|
||||
LedCheckBox( const QString & _txt, QWidget * _parent,
|
||||
const QString & _name = QString::null,
|
||||
const QString & _name = QString(),
|
||||
LedColors _color = Yellow );
|
||||
LedCheckBox( QWidget * _parent,
|
||||
const QString & _name = QString::null,
|
||||
const QString & _name = QString(),
|
||||
LedColors _color = Yellow );
|
||||
|
||||
virtual ~LedCheckBox();
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
Q_PROPERTY( QString text READ text WRITE setText )
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
void paintEvent( QPaintEvent * _pe ) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -49,18 +49,18 @@ public:
|
||||
|
||||
virtual ~LfoController();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName() const;
|
||||
void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
|
||||
void loadSettings( const QDomElement & _this ) override;
|
||||
QString nodeName() const override;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual ControllerDialog * createDialog( QWidget * _parent );
|
||||
ControllerDialog * createDialog( QWidget * _parent ) override;
|
||||
|
||||
|
||||
protected:
|
||||
// The internal per-controller value updating function
|
||||
virtual void updateValueBuffer();
|
||||
void updateValueBuffer() override;
|
||||
|
||||
FloatModel m_baseModel;
|
||||
TempoSyncKnobModel m_speedModel;
|
||||
@@ -98,8 +98,8 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void modelChanged();
|
||||
void contextMenuEvent( QContextMenuEvent * _me ) override;
|
||||
void modelChanged() override;
|
||||
|
||||
LfoController * m_lfo;
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
*/
|
||||
|
||||
#include <QWidget>
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
#ifndef LMMSPALETTE_H
|
||||
#define LMMSPALETTE_H
|
||||
|
||||
|
||||
class EXPORT LmmsPalette : public QWidget
|
||||
class LMMS_EXPORT LmmsPalette : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( QColor background READ background WRITE setBackground )
|
||||
@@ -43,8 +43,6 @@ class EXPORT LmmsPalette : public QWidget
|
||||
Q_PROPERTY( QColor brightText READ brightText WRITE setBrightText )
|
||||
Q_PROPERTY( QColor highlight READ highlight WRITE setHighlight )
|
||||
Q_PROPERTY( QColor highlightedText READ highlightedText WRITE setHighlightedText )
|
||||
Q_PROPERTY( QColor toolTipText READ toolTipText WRITE setToolTipText )
|
||||
Q_PROPERTY( QColor toolTipBase READ toolTipBase WRITE setToolTipBase )
|
||||
|
||||
public:
|
||||
LmmsPalette( QWidget * parent, QStyle * stylearg );
|
||||
@@ -65,8 +63,6 @@ public:
|
||||
ACCESSMET( brightText, setBrightText )
|
||||
ACCESSMET( highlight, setHighlight )
|
||||
ACCESSMET( highlightedText, setHighlightedText )
|
||||
ACCESSMET( toolTipText, setToolTipText )
|
||||
ACCESSMET( toolTipBase, setToolTipBase )
|
||||
|
||||
#undef ACCESSMET
|
||||
|
||||
@@ -83,8 +79,6 @@ private:
|
||||
QColor m_brightText;
|
||||
QColor m_highlight;
|
||||
QColor m_highlightedText;
|
||||
QColor m_toolTipText;
|
||||
QColor m_toolTipBase;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -67,21 +67,21 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual QPalette standardPalette( void ) const;
|
||||
QPalette standardPalette( void ) const override;
|
||||
|
||||
virtual void drawComplexControl(
|
||||
ComplexControl control,
|
||||
const QStyleOptionComplex * option,
|
||||
QPainter *painter,
|
||||
const QWidget *widget ) const;
|
||||
const QWidget *widget ) const override;
|
||||
virtual void drawPrimitive( PrimitiveElement element,
|
||||
const QStyleOption *option,
|
||||
QPainter *painter,
|
||||
const QWidget *widget = 0 ) const;
|
||||
const QWidget *widget = 0 ) const override;
|
||||
|
||||
virtual int pixelMetric( PixelMetric metric,
|
||||
const QStyleOption * option = 0,
|
||||
const QWidget * widget = 0 ) const;
|
||||
const QWidget * widget = 0 ) const override;
|
||||
|
||||
static QPalette * s_palette;
|
||||
|
||||
|
||||
67
include/LocaleHelper.h
Normal file
67
include/LocaleHelper.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* LocaleHelper.h - compatibility functions for handling decimal separators
|
||||
* Providing helper functions which handle both periods and commas
|
||||
* for decimal separators to load old projects correctly
|
||||
*
|
||||
* Copyright (c) 2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2018 Hyunjin Song <tteu.ingog/at/gmail.com>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* 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 LOCALEHELPER_H
|
||||
#define LOCALEHELPER_H
|
||||
|
||||
#include <QLocale>
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
|
||||
namespace LocaleHelper
|
||||
{
|
||||
inline double toDouble(QString str, bool* ok = nullptr)
|
||||
{
|
||||
bool isOkay;
|
||||
double value;
|
||||
QLocale c(QLocale::C);
|
||||
c.setNumberOptions(QLocale::RejectGroupSeparator);
|
||||
value = c.toDouble(str, &isOkay);
|
||||
if (!isOkay)
|
||||
{
|
||||
QLocale german(QLocale::German);
|
||||
german.setNumberOptions(QLocale::RejectGroupSeparator);
|
||||
value = german.toDouble(str, &isOkay);
|
||||
}
|
||||
if (ok != nullptr) {*ok = isOkay;}
|
||||
return value;
|
||||
}
|
||||
|
||||
inline float toFloat(QString str, bool* ok = nullptr)
|
||||
{
|
||||
double d = toDouble(str, ok);
|
||||
if (!std::isinf(d) && std::fabs(d) > std::numeric_limits<float>::max())
|
||||
{
|
||||
if (ok != nullptr) {*ok = false;}
|
||||
return 0.0f;
|
||||
}
|
||||
return static_cast<float>(d);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LOCALEHELPER_H
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2017-2017 Tres Finocchiaro <tres.finocchiaro/at/gmail.com>
|
||||
*
|
||||
* This file is part of LMMS - http://lmms.io
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
@@ -31,12 +31,10 @@
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
|
||||
#if defined(LMMS_BUILD_WIN32)
|
||||
class MainApplication : public QApplication, public QAbstractNativeEventFilter
|
||||
#else
|
||||
class MainApplication : public QApplication
|
||||
@@ -44,13 +42,11 @@ class MainApplication : public QApplication
|
||||
{
|
||||
public:
|
||||
MainApplication(int& argc, char** argv);
|
||||
bool event(QEvent* event);
|
||||
bool event(QEvent* event) override;
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
bool winEventFilter(MSG* msg, long* result);
|
||||
#if QT_VERSION >= 0x050000
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* message,
|
||||
long* result);
|
||||
#endif
|
||||
#endif
|
||||
inline QString& queuedFile()
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
void addSpacingToToolBar( int _size );
|
||||
|
||||
// wrap the widget with a window decoration and add it to the workspace
|
||||
EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags=0);
|
||||
LMMS_EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags=0);
|
||||
|
||||
|
||||
///
|
||||
@@ -148,7 +148,6 @@ public slots:
|
||||
|
||||
void emptySlot();
|
||||
void createNewProject();
|
||||
void createNewProjectFromTemplate( QAction * _idx );
|
||||
void openProject();
|
||||
bool saveProject();
|
||||
bool saveProjectAs();
|
||||
@@ -177,11 +176,11 @@ private slots:
|
||||
void onExportProjectMidi();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
virtual void focusOutEvent( QFocusEvent * _fe );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void keyReleaseEvent( QKeyEvent * _ke );
|
||||
virtual void timerEvent( QTimerEvent * _ev );
|
||||
void closeEvent( QCloseEvent * _ce ) override;
|
||||
void focusOutEvent( QFocusEvent * _fe ) override;
|
||||
void keyPressEvent( QKeyEvent * _ke ) override;
|
||||
void keyReleaseEvent( QKeyEvent * _ke ) override;
|
||||
void timerEvent( QTimerEvent * _ev ) override;
|
||||
|
||||
|
||||
private:
|
||||
@@ -204,10 +203,6 @@ private:
|
||||
QWidget * m_toolBar;
|
||||
QGridLayout * m_toolBarLayout;
|
||||
|
||||
QMenu * m_templatesMenu;
|
||||
QMenu * m_recentlyOpenedProjectsMenu;
|
||||
int m_custom_templates_count;
|
||||
|
||||
struct keyModifiers
|
||||
{
|
||||
keyModifiers() :
|
||||
@@ -240,10 +235,7 @@ private:
|
||||
|
||||
private slots:
|
||||
void browseHelp();
|
||||
void fillTemplatesMenu();
|
||||
void openRecentlyOpenedProject( QAction * _action );
|
||||
void showTool( QAction * _idx );
|
||||
void updateRecentlyOpenedProjectsMenu();
|
||||
void updateViewMenu( void );
|
||||
void updateConfig( QAction * _who );
|
||||
void onToggleMetronome();
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "export.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class EXPORT MemoryManager
|
||||
class LMMS_EXPORT MemoryManager
|
||||
{
|
||||
public:
|
||||
struct ThreadGuard
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
MeterDialog( QWidget * _parent, bool _simple = false );
|
||||
virtual ~MeterDialog();
|
||||
|
||||
virtual void modelChanged();
|
||||
void modelChanged() override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void sendByte( const unsigned char c );
|
||||
virtual void run();
|
||||
void sendByte( const unsigned char c ) override;
|
||||
void run() override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -67,44 +67,44 @@ public:
|
||||
|
||||
virtual void processOutEvent( const MidiEvent & _me,
|
||||
const MidiTime & _time,
|
||||
const MidiPort * _port );
|
||||
const MidiPort * _port ) override;
|
||||
|
||||
virtual void applyPortMode( MidiPort * _port );
|
||||
virtual void applyPortName( MidiPort * _port );
|
||||
void applyPortMode( MidiPort * _port ) override;
|
||||
void applyPortName( MidiPort * _port ) override;
|
||||
|
||||
virtual void removePort( MidiPort * _port );
|
||||
void removePort( MidiPort * _port ) override;
|
||||
|
||||
|
||||
// list seq-ports from ALSA
|
||||
virtual QStringList readablePorts() const
|
||||
QStringList readablePorts() const override
|
||||
{
|
||||
return m_readablePorts;
|
||||
}
|
||||
|
||||
virtual QStringList writablePorts() const
|
||||
QStringList writablePorts() const override
|
||||
{
|
||||
return m_writablePorts;
|
||||
}
|
||||
|
||||
// return name of port which specified MIDI event came from
|
||||
virtual QString sourcePortName( const MidiEvent & ) const;
|
||||
QString sourcePortName( const MidiEvent & ) const override;
|
||||
|
||||
// (un)subscribe given MidiPort to/from destination-port
|
||||
virtual void subscribeReadablePort( MidiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = true );
|
||||
bool _subscribe = true ) override;
|
||||
virtual void subscribeWritablePort( MidiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = true );
|
||||
bool _subscribe = true ) override;
|
||||
virtual void connectRPChanged( QObject * _receiver,
|
||||
const char * _member )
|
||||
const char * _member ) override
|
||||
{
|
||||
connect( this, SIGNAL( readablePortsChanged() ),
|
||||
_receiver, _member );
|
||||
}
|
||||
|
||||
virtual void connectWPChanged( QObject * _receiver,
|
||||
const char * _member )
|
||||
const char * _member ) override
|
||||
{
|
||||
connect( this, SIGNAL( writablePortsChanged() ),
|
||||
_receiver, _member );
|
||||
@@ -117,7 +117,7 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
virtual void run();
|
||||
void run() override;
|
||||
|
||||
#ifdef LMMS_HAVE_ALSA
|
||||
QMutex m_seqMutex;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user