Merge branch 'stable-1.2' into master

This commit is contained in:
Lukas W
2020-06-01 15:19:20 +02:00
18 changed files with 121 additions and 58 deletions

View File

@@ -34,6 +34,7 @@
#include "weak_libjack.h"
#endif
#include <atomic>
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QtCore/QMap>
@@ -57,6 +58,7 @@ public:
// the jack callback is handled here, we call the midi client so that it can read
// it's midi data during the callback
AudioJack * addMidiClient(MidiJack *midiClient);
void removeMidiClient(void) { m_midiClient = nullptr; }
jack_client_t * jackClient() {return m_client;};
inline static QString name()
@@ -106,9 +108,9 @@ private:
jack_client_t * m_client;
bool m_active;
bool m_stopped;
std::atomic<bool> m_stopped;
MidiJack *m_midiClient;
std::atomic<MidiJack *> m_midiClient;
QVector<jack_port_t *> m_outputPorts;
jack_default_audio_sample_t * * m_tempOutBufs;
surroundSampleFrame * m_outBuf;

View File

@@ -173,8 +173,7 @@ private:
BoolModel m_volumeKnob;
FloatModel m_volumeRatio;
QPoint m_mouseOffset;
QPoint m_origMousePos;
QPoint m_lastMousePos; //!< mouse position in last mouseMoveEvent
float m_leftOver;
bool m_buttonPressed;

View File

@@ -73,8 +73,9 @@ protected:
void mouseDoubleClickEvent( QMouseEvent * _me ) override;
private:
float m_remainder; //!< floating offset of spinbox in [-0.5, 0.5]
bool m_mouseMoving;
QPoint m_origMousePos;
QPoint m_lastMousePos; //!< mouse position in last mouseMoveEvent
int m_displayOffset;
void enterValue();

View File

@@ -29,6 +29,7 @@
#include <QtCore/QVector>
#include <QtCore/QList>
#include <QWidget>
#include <QSize>
#include <QColor>
#include <QMimeData>
@@ -206,6 +207,9 @@ class TrackContentObjectView : public selectableObject, public ModelView
Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor )
Q_PROPERTY( QColor BBPatternBackground READ BBPatternBackground WRITE setBBPatternBackground )
Q_PROPERTY( bool gradient READ gradient WRITE setGradient )
// We have to use a QSize here because using QPoint isn't supported.
// width -> x, height -> y
Q_PROPERTY( QSize mouseHotspotHand WRITE setMouseHotspotHand )
public:
TrackContentObjectView( TrackContentObject * tco, TrackView * tv );
@@ -240,6 +244,7 @@ public:
void setTextShadowColor( const QColor & c );
void setBBPatternBackground( const QColor & c );
void setGradient( const bool & b );
void setMouseHotspotHand(const QSize & s);
// access needsUpdate member variable
bool needsUpdate();
@@ -316,8 +321,10 @@ private:
QColor m_textShadowColor;
QColor m_BBPatternBackground;
bool m_gradient;
QSize m_mouseHotspotHand; // QSize must be used because QPoint isn't supported by property system
bool m_cursorSetYet;
bool m_needsUpdate;
bool m_needsUpdate;
inline void setInitialPos( QPoint pos )
{
m_initialMousePos = pos;