| 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 PlaybackToolBarTimeSignatureItem : public muse::uicomponents::ToolBarItem |
| 13 |
{ |
| 14 |
Q_OBJECT |
| 15 |
|
| 16 |
Q_PROPERTY(int upper READ upper WRITE setUpper NOTIFY upperChanged FINAL) |
| 17 |
Q_PROPERTY(int lower READ lower WRITE setLower NOTIFY lowerChanged FINAL) |
| 18 |
|
| 19 |
muse::Inject<context::IGlobalContext> globalContext; |
| 20 |
|
| 21 |
public: |
| 22 |
explicit PlaybackToolBarTimeSignatureItem(const muse::ui::UiAction& action, muse::uicomponents::ToolBarItemType::Type type, |
| 23 |
QObject* parent = nullptr); |
| 24 |
|
| 25 |
int upper() const; |
| 26 |
void setUpper(int newUpper); |
| 27 |
|
| 28 |
int lower() const; |
| 29 |
void setLower(int newLower); |
| 30 |
|
| 31 |
signals: |
| 32 |
void upperChanged(); |
| 33 |
void lowerChanged(); |
| 34 |
|
| 35 |
private: |
| 36 |
void onProjectChanged(); |
| 37 |
|
| 38 |
void updateValues(); |
| 39 |
|
| 40 |
int m_upper = 0; |
| 41 |
int m_lower = 0; |
| 42 |
}; |
| 43 |
} |