| 1 |
/* |
| 2 |
* Audacity: A Digital Audio Editor |
| 3 |
*/ |
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include "modularity/ioc.h" |
| 7 |
#include "context/iglobalcontext.h" |
| 8 |
|
| 9 |
#include "uicomponents/view/toolbaritem.h" |
| 10 |
|
| 11 |
namespace au::playback { |
| 12 |
class PlaybackToolBarBPMItem : public muse::uicomponents::ToolBarItem |
| 13 |
{ |
| 14 |
Q_OBJECT |
| 15 |
|
| 16 |
Q_PROPERTY(double currentValue READ currentValue WRITE setCurrentValue NOTIFY currentValueChanged FINAL) |
| 17 |
|
| 18 |
muse::Inject<context::IGlobalContext> globalContext; |
| 19 |
|
| 20 |
public: |
| 21 |
explicit PlaybackToolBarBPMItem(const muse::ui::UiAction& action, muse::uicomponents::ToolBarItemType::Type type, |
| 22 |
QObject* parent = nullptr); |
| 23 |
|
| 24 |
double currentValue() const; |
| 25 |
void setCurrentValue(double value); |
| 26 |
|
| 27 |
signals: |
| 28 |
void currentValueChanged(); |
| 29 |
|
| 30 |
private: |
| 31 |
void onProjectChanged(); |
| 32 |
|
| 33 |
void updateValues(); |
| 34 |
|
| 35 |
double m_currentValue = 0.0; |
| 36 |
}; |
| 37 |
} |