diff options
author | Javier <dev.git@javispedro.com> | 2021-09-19 22:22:23 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2021-09-19 22:22:23 +0200 |
commit | 118283b748359c3268f47e382762c90cd5c412ac (patch) | |
tree | 54447ef05c49eb31a01b561a82cbb6085a11b0c3 /mainwindow.h | |
parent | fd2a247a065548422b828d3055729e435a918f42 (diff) | |
download | scribiu-118283b748359c3268f47e382762c90cd5c412ac.tar.gz scribiu-118283b748359c3268f47e382762c90cd5c412ac.zip |
replace Phonon with QtMultimedia
Diffstat (limited to 'mainwindow.h')
-rw-r--r-- | mainwindow.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mainwindow.h b/mainwindow.h index 2f5575c..03479a2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -21,8 +21,7 @@ #include <QtWidgets/QMainWindow> #include <QtWidgets/QLabel> -#include <phonon/MediaObject> -#include <phonon/AudioOutput> +#include <QtMultimedia/QMediaPlayer> #include "notebookmodel.h" #include "paperreplaymodel.h" #include "smartpenmanager.h" @@ -57,9 +56,11 @@ private slots: void handlePaperReplayRequested(const QString &file, qint64 time); void handlePaperReplayPlay(); void handlePaperReplayPause(); - void handleMediaStateChange(Phonon::State state); - void handleMediaTotalTimeChanged(qint64 time); - void handleMediaTick(qint64 time); + void handlePaperReplaySliderChanged(int value); + void handlePlayerStateChanged(QMediaPlayer::State state); + void handlePlayerDurationChanged(qint64 time); + void handlePlayerPositionChanged(qint64 time); + void handlePlayerSeekableChanged(bool seekable); void handlePensBeingSynchronizedChanged(); void handlePenSyncComplete(const QString &penName); void handlePenSyncFailed(const QString &penName); @@ -70,15 +71,15 @@ protected: void closeEvent(QCloseEvent *event); private: - QString formatDuration(qint64 time); + QString formatDuration(qint64 time) const; + QString currentPlayerMediaPath() const; private: Ui::MainWindow *ui; NotebookModel *_notebooks; SmartpenManager *_manager; - Phonon::MediaObject *_media; - Phonon::AudioOutput *_mediaOutput; + QMediaPlayer *_player; qint64 _pendingSeek; QString _curPenName; |