diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-17 16:00:00 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-17 16:00:00 -0400 |
commit | f809e720d7bf5c2b314c705ad5600776afcf6659 (patch) | |
tree | 3a85e35b1e7f670a2a1c53cf017800dcc3a7aec6 /lumina-fm/widgets/MultimediaWidget.h | |
parent | Touch up the new Grey-Dark color scheme a bit - now the highlight/accent colo... (diff) | |
download | lumina-f809e720d7bf5c2b314c705ad5600776afcf6659.tar.gz lumina-f809e720d7bf5c2b314c705ad5600776afcf6659.tar.bz2 lumina-f809e720d7bf5c2b314c705ad5600776afcf6659.zip |
Convert the multimedia player and slideshow viewer into separate classes/widgets for lumina-fm, and add the new UI for the directory browser as well (no .h/.cpp source files filled out yet for it yet though).
These new widgets/classes are tied into the build for compilation purposes, but they are not actually used in the app yet.
Diffstat (limited to 'lumina-fm/widgets/MultimediaWidget.h')
-rw-r--r-- | lumina-fm/widgets/MultimediaWidget.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/lumina-fm/widgets/MultimediaWidget.h b/lumina-fm/widgets/MultimediaWidget.h new file mode 100644 index 00000000..65769d77 --- /dev/null +++ b/lumina-fm/widgets/MultimediaWidget.h @@ -0,0 +1,69 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_FM_MULTIMEDIA_WIDGET_H +#define _LUMINA_FM_MULTIMEDIA_WIDGET_H + +#include <QList> +#include <QWidget> +#include <QObject> +#include <QMediaObject> +#include <QMediaPlayer> +#include <QVideoWidget> + +#include "../DirData.h" + +namespace Ui{ + class MultimediaWidget; +}; + +class MultimediaWidget : public QWidget{ + Q_OBJECT +public: + MultimediaWidget(QWidget *parent = 0); + ~MultimediaWidget(); + +public slots: + void LoadMultimedia(QList<LFileInfo> list); + + //Theme change functions + void UpdateIcons(); + void UpdateText(); + +private: + Ui::MultimediaWidget *ui; + QMediaPlayer *mediaObj; + QVideoWidget *videoDisplay; + QString playerTTime; //total time - to prevent recalculation every tick + + QString msToText(qint64 ms); + +private slots: + //Media Object functions + void playerStatusChanged(QMediaPlayer::MediaStatus stat); + void playerStateChanged(QMediaPlayer::State newstate); + void playerVideoAvailable(bool showVideo); + void playerDurationChanged(qint64 dur); + void playerTimeChanged(qint64 ctime); + void playerError(); + void playerFinished(); + + //The UI functions + void on_tool_player_play_clicked(); + void on_combo_player_list_currentIndexChanged(int index); + void on_tool_player_next_clicked(); + void on_tool_player_prev_clicked(); + void on_tool_player_pause_clicked(); + void on_tool_player_stop_clicked(); + + //Slider controls + void on_playerSlider_sliderPressed(); + void on_playerSlider_sliderReleased(); + void on_playerSlider_valueChanged(int val); + + +}; +#endif
\ No newline at end of file |