Changeset View
Changeset View
Standalone View
Standalone View
src/mpris2/mediaplayer2player.h
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 40 | { | |||
|---|---|---|---|---|---|
| 58 | Q_PROPERTY(int mediaPlayerPresent READ mediaPlayerPresent WRITE setMediaPlayerPresent NOTIFY mediaPlayerPresentChanged) | 58 | Q_PROPERTY(int mediaPlayerPresent READ mediaPlayerPresent WRITE setMediaPlayerPresent NOTIFY mediaPlayerPresentChanged) | ||
| 59 | 59 | | |||
| 60 | public: | 60 | public: | ||
| 61 | explicit MediaPlayer2Player(MediaPlayList *playListControler, | 61 | explicit MediaPlayer2Player(MediaPlayList *playListControler, | ||
| 62 | ManageAudioPlayer *manageAudioPlayer, | 62 | ManageAudioPlayer *manageAudioPlayer, | ||
| 63 | ManageMediaPlayerControl* manageMediaPlayerControl, | 63 | ManageMediaPlayerControl* manageMediaPlayerControl, | ||
| 64 | ManageHeaderBar * manageHeaderBar, | 64 | ManageHeaderBar * manageHeaderBar, | ||
| 65 | AudioWrapper *audioPlayer, | 65 | AudioWrapper *audioPlayer, | ||
| 66 | bool showProgressOnTaskBar, | ||||
| 66 | QObject* parent = nullptr); | 67 | QObject* parent = nullptr); | ||
| 67 | ~MediaPlayer2Player() override; | 68 | ~MediaPlayer2Player() override; | ||
| 68 | 69 | | |||
| 69 | QString PlaybackStatus() const; | 70 | QString PlaybackStatus() const; | ||
| 70 | double Rate() const; | 71 | double Rate() const; | ||
| 71 | QVariantMap Metadata() const; | 72 | QVariantMap Metadata() const; | ||
| 72 | double Volume() const; | 73 | double Volume() const; | ||
| 73 | qlonglong Position() const; | 74 | qlonglong Position() const; | ||
| 74 | double MinimumRate() const; | 75 | double MinimumRate() const; | ||
| 75 | double MaximumRate() const; | 76 | double MaximumRate() const; | ||
| 76 | bool CanGoNext() const; | 77 | bool CanGoNext() const; | ||
| 77 | bool CanGoPrevious() const; | 78 | bool CanGoPrevious() const; | ||
| 78 | bool CanPlay() const; | 79 | bool CanPlay() const; | ||
| 79 | bool CanPause() const; | 80 | bool CanPause() const; | ||
| 80 | bool CanSeek() const; | 81 | bool CanSeek() const; | ||
| 81 | bool CanControl() const; | 82 | bool CanControl() const; | ||
| 82 | int currentTrack() const; | 83 | int currentTrack() const; | ||
| 83 | int mediaPlayerPresent() const; | 84 | int mediaPlayerPresent() const; | ||
| 84 | 85 | | |||
| 86 | bool showProgressOnTaskBar() const; | ||||
| 87 | void setShowProgressOnTaskBar(bool value); | ||||
| 88 | | ||||
| 85 | Q_SIGNALS: | 89 | Q_SIGNALS: | ||
| 86 | void Seeked(qlonglong Position); | 90 | void Seeked(qlonglong Position); | ||
| 87 | 91 | | |||
| 88 | void rateChanged(double newRate); | 92 | void rateChanged(double newRate); | ||
| 89 | void volumeChanged(double newVol); | 93 | void volumeChanged(double newVol); | ||
| 90 | void playbackStatusChanged(); | 94 | void playbackStatusChanged(); | ||
| 91 | void canGoNextChanged(); | 95 | void canGoNextChanged(); | ||
| 92 | void canGoPreviousChanged(); | 96 | void canGoPreviousChanged(); | ||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 142 | private: | |||
| 158 | qlonglong m_position = 0; | 162 | qlonglong m_position = 0; | ||
| 159 | MediaPlayList *m_playListControler = nullptr; | 163 | MediaPlayList *m_playListControler = nullptr; | ||
| 160 | bool m_playerIsSeekableChanged = false; | 164 | bool m_playerIsSeekableChanged = false; | ||
| 161 | ManageAudioPlayer* m_manageAudioPlayer = nullptr; | 165 | ManageAudioPlayer* m_manageAudioPlayer = nullptr; | ||
| 162 | ManageMediaPlayerControl* m_manageMediaPlayerControl = nullptr; | 166 | ManageMediaPlayerControl* m_manageMediaPlayerControl = nullptr; | ||
| 163 | ManageHeaderBar * m_manageHeaderBar = nullptr; | 167 | ManageHeaderBar * m_manageHeaderBar = nullptr; | ||
| 164 | AudioWrapper *m_audioPlayer = nullptr; | 168 | AudioWrapper *m_audioPlayer = nullptr; | ||
| 165 | mutable QDBusMessage mProgressIndicatorSignal; | 169 | mutable QDBusMessage mProgressIndicatorSignal; | ||
| 170 | bool mShowProgressOnTaskBar = true; | ||||
| 166 | }; | 171 | }; | ||
| 167 | 172 | | |||
| 168 | #endif // MEDIAPLAYER2PLAYER_H | 173 | #endif // MEDIAPLAYER2PLAYER_H | ||