| 1 |
/* |
| 2 |
* Audacity: A Digital Audio Editor |
| 3 |
*/ |
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QString> |
| 7 |
|
| 8 |
#include "modularity/ioc.h" |
| 9 |
#include "playback/iplayback.h" |
| 10 |
|
| 11 |
#include "uicomponents/view/toolbaritem.h" |
| 12 |
|
| 13 |
namespace au::playback { |
| 14 |
class PlaybackToolBarControlItem : public muse::uicomponents::ToolBarItem |
| 15 |
{ |
| 16 |
Q_OBJECT |
| 17 |
|
| 18 |
Q_PROPERTY(QColor iconColor READ iconColor WRITE setIconColor NOTIFY iconColorChanged) |
| 19 |
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged) |
| 20 |
|
| 21 |
muse::Inject<IPlayback> playback; |
| 22 |
|
| 23 |
public: |
| 24 |
explicit PlaybackToolBarControlItem(const muse::ui::UiAction& action, muse::uicomponents::ToolBarItemType::Type type, |
| 25 |
QObject* parent = nullptr); |
| 26 |
|
| 27 |
QColor iconColor() const; |
| 28 |
void setIconColor(const QColor& color); |
| 29 |
|
| 30 |
QColor backgroundColor() const; |
| 31 |
void setBackgroundColor(const QColor& color); |
| 32 |
|
| 33 |
signals: |
| 34 |
void iconColorChanged(); |
| 35 |
|
| 36 |
void backgroundColorChanged(); |
| 37 |
|
| 38 |
private: |
| 39 |
QColor m_iconColor; |
| 40 |
QColor m_backgroundColor; |
| 41 |
}; |
| 42 |
} |